raidutils-0.0.6.orig/0002775000175000000620000000000010333777643014357 5ustar bapstaff00000000000000raidutils-0.0.6.orig/lib/0002775000175000000620000000000010333777643015125 5ustar bapstaff00000000000000raidutils-0.0.6.orig/lib/Makefile.am0000664000175000000620000000055010175141260017137 0ustar bapstaff00000000000000lib_LTLIBRARIES=libraidutil.la libraidutil_la_SOURCES=ctlr_map.cpp dpt_buff.cpp engcalls.cpp engmsg.c findpath.c funcs.c hba_log.cpp lockunix.c scsi_log.cpp dptalign.c libraidutil_la_CPPFLAGS=-O3 -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -Dtrue=1 -Dfalse=0 -DHORIZONTAL -DNEW_RSC_MGR -DNEW_RSC_HDR -D_DPT_FLASH -DNEW_LOGGER -DI_WANT_SNI_DEBUG -D__UNIX__ -I../include raidutils-0.0.6.orig/lib/Makefile.in0000664000175000000620000006570310175141465017172 0ustar bapstaff00000000000000# Makefile.in generated by automake 1.9.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ SOURCES = $(libraidutil_la_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c 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 = lib DIST_COMMON = $(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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libraidutil_la_LIBADD = am_libraidutil_la_OBJECTS = libraidutil_la-ctlr_map.lo \ libraidutil_la-dpt_buff.lo libraidutil_la-engcalls.lo \ libraidutil_la-engmsg.lo libraidutil_la-findpath.lo \ libraidutil_la-funcs.lo libraidutil_la-hba_log.lo \ libraidutil_la-lockunix.lo libraidutil_la-scsi_log.lo \ libraidutil_la-dptalign.lo libraidutil_la_OBJECTS = $(am_libraidutil_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libraidutil_la_SOURCES) DIST_SOURCES = $(libraidutil_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libraidutil.la libraidutil_la_SOURCES = ctlr_map.cpp dpt_buff.cpp engcalls.cpp engmsg.c findpath.c funcs.c hba_log.cpp lockunix.c scsi_log.cpp dptalign.c libraidutil_la_CPPFLAGS = -O3 -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -Dtrue=1 -Dfalse=0 -DHORIZONTAL -DNEW_RSC_MGR -DNEW_RSC_HDR -D_DPT_FLASH -DNEW_LOGGER -DI_WANT_SNI_DEBUG -D__UNIX__ -I../include all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libraidutil.la: $(libraidutil_la_OBJECTS) $(libraidutil_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libraidutil_la_LDFLAGS) $(libraidutil_la_OBJECTS) $(libraidutil_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libraidutil_la-ctlr_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libraidutil_la-dpt_buff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libraidutil_la-dptalign.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libraidutil_la-engcalls.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libraidutil_la-engmsg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libraidutil_la-findpath.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libraidutil_la-funcs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libraidutil_la-hba_log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libraidutil_la-lockunix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libraidutil_la-scsi_log.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libraidutil_la-engmsg.lo: engmsg.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libraidutil_la-engmsg.lo -MD -MP -MF "$(DEPDIR)/libraidutil_la-engmsg.Tpo" -c -o libraidutil_la-engmsg.lo `test -f 'engmsg.c' || echo '$(srcdir)/'`engmsg.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libraidutil_la-engmsg.Tpo" "$(DEPDIR)/libraidutil_la-engmsg.Plo"; else rm -f "$(DEPDIR)/libraidutil_la-engmsg.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='engmsg.c' object='libraidutil_la-engmsg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libraidutil_la-engmsg.lo `test -f 'engmsg.c' || echo '$(srcdir)/'`engmsg.c libraidutil_la-findpath.lo: findpath.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libraidutil_la-findpath.lo -MD -MP -MF "$(DEPDIR)/libraidutil_la-findpath.Tpo" -c -o libraidutil_la-findpath.lo `test -f 'findpath.c' || echo '$(srcdir)/'`findpath.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libraidutil_la-findpath.Tpo" "$(DEPDIR)/libraidutil_la-findpath.Plo"; else rm -f "$(DEPDIR)/libraidutil_la-findpath.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='findpath.c' object='libraidutil_la-findpath.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libraidutil_la-findpath.lo `test -f 'findpath.c' || echo '$(srcdir)/'`findpath.c libraidutil_la-funcs.lo: funcs.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libraidutil_la-funcs.lo -MD -MP -MF "$(DEPDIR)/libraidutil_la-funcs.Tpo" -c -o libraidutil_la-funcs.lo `test -f 'funcs.c' || echo '$(srcdir)/'`funcs.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libraidutil_la-funcs.Tpo" "$(DEPDIR)/libraidutil_la-funcs.Plo"; else rm -f "$(DEPDIR)/libraidutil_la-funcs.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='funcs.c' object='libraidutil_la-funcs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libraidutil_la-funcs.lo `test -f 'funcs.c' || echo '$(srcdir)/'`funcs.c libraidutil_la-lockunix.lo: lockunix.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libraidutil_la-lockunix.lo -MD -MP -MF "$(DEPDIR)/libraidutil_la-lockunix.Tpo" -c -o libraidutil_la-lockunix.lo `test -f 'lockunix.c' || echo '$(srcdir)/'`lockunix.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libraidutil_la-lockunix.Tpo" "$(DEPDIR)/libraidutil_la-lockunix.Plo"; else rm -f "$(DEPDIR)/libraidutil_la-lockunix.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lockunix.c' object='libraidutil_la-lockunix.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libraidutil_la-lockunix.lo `test -f 'lockunix.c' || echo '$(srcdir)/'`lockunix.c libraidutil_la-dptalign.lo: dptalign.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libraidutil_la-dptalign.lo -MD -MP -MF "$(DEPDIR)/libraidutil_la-dptalign.Tpo" -c -o libraidutil_la-dptalign.lo `test -f 'dptalign.c' || echo '$(srcdir)/'`dptalign.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libraidutil_la-dptalign.Tpo" "$(DEPDIR)/libraidutil_la-dptalign.Plo"; else rm -f "$(DEPDIR)/libraidutil_la-dptalign.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dptalign.c' object='libraidutil_la-dptalign.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libraidutil_la-dptalign.lo `test -f 'dptalign.c' || echo '$(srcdir)/'`dptalign.c .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< libraidutil_la-ctlr_map.lo: ctlr_map.cpp @am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libraidutil_la-ctlr_map.lo -MD -MP -MF "$(DEPDIR)/libraidutil_la-ctlr_map.Tpo" -c -o libraidutil_la-ctlr_map.lo `test -f 'ctlr_map.cpp' || echo '$(srcdir)/'`ctlr_map.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libraidutil_la-ctlr_map.Tpo" "$(DEPDIR)/libraidutil_la-ctlr_map.Plo"; else rm -f "$(DEPDIR)/libraidutil_la-ctlr_map.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ctlr_map.cpp' object='libraidutil_la-ctlr_map.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libraidutil_la-ctlr_map.lo `test -f 'ctlr_map.cpp' || echo '$(srcdir)/'`ctlr_map.cpp libraidutil_la-dpt_buff.lo: dpt_buff.cpp @am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libraidutil_la-dpt_buff.lo -MD -MP -MF "$(DEPDIR)/libraidutil_la-dpt_buff.Tpo" -c -o libraidutil_la-dpt_buff.lo `test -f 'dpt_buff.cpp' || echo '$(srcdir)/'`dpt_buff.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libraidutil_la-dpt_buff.Tpo" "$(DEPDIR)/libraidutil_la-dpt_buff.Plo"; else rm -f "$(DEPDIR)/libraidutil_la-dpt_buff.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dpt_buff.cpp' object='libraidutil_la-dpt_buff.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libraidutil_la-dpt_buff.lo `test -f 'dpt_buff.cpp' || echo '$(srcdir)/'`dpt_buff.cpp libraidutil_la-engcalls.lo: engcalls.cpp @am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libraidutil_la-engcalls.lo -MD -MP -MF "$(DEPDIR)/libraidutil_la-engcalls.Tpo" -c -o libraidutil_la-engcalls.lo `test -f 'engcalls.cpp' || echo '$(srcdir)/'`engcalls.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libraidutil_la-engcalls.Tpo" "$(DEPDIR)/libraidutil_la-engcalls.Plo"; else rm -f "$(DEPDIR)/libraidutil_la-engcalls.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='engcalls.cpp' object='libraidutil_la-engcalls.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libraidutil_la-engcalls.lo `test -f 'engcalls.cpp' || echo '$(srcdir)/'`engcalls.cpp libraidutil_la-hba_log.lo: hba_log.cpp @am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libraidutil_la-hba_log.lo -MD -MP -MF "$(DEPDIR)/libraidutil_la-hba_log.Tpo" -c -o libraidutil_la-hba_log.lo `test -f 'hba_log.cpp' || echo '$(srcdir)/'`hba_log.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libraidutil_la-hba_log.Tpo" "$(DEPDIR)/libraidutil_la-hba_log.Plo"; else rm -f "$(DEPDIR)/libraidutil_la-hba_log.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hba_log.cpp' object='libraidutil_la-hba_log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libraidutil_la-hba_log.lo `test -f 'hba_log.cpp' || echo '$(srcdir)/'`hba_log.cpp libraidutil_la-scsi_log.lo: scsi_log.cpp @am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libraidutil_la-scsi_log.lo -MD -MP -MF "$(DEPDIR)/libraidutil_la-scsi_log.Tpo" -c -o libraidutil_la-scsi_log.lo `test -f 'scsi_log.cpp' || echo '$(srcdir)/'`scsi_log.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libraidutil_la-scsi_log.Tpo" "$(DEPDIR)/libraidutil_la-scsi_log.Plo"; else rm -f "$(DEPDIR)/libraidutil_la-scsi_log.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_log.cpp' object='libraidutil_la-scsi_log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libraidutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libraidutil_la-scsi_log.lo `test -f 'scsi_log.cpp' || echo '$(srcdir)/'`scsi_log.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libLTLIBRARIES # 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: raidutils-0.0.6.orig/lib/ctlr_map.cpp0000664000175000000620000017516710044153307017431 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 10/5/98 * ***************************************************************************** * * File Name: ctlr_map.cpp * Module: * Contributors: Mark Salyzyn * Description: Discover device naming in the OS environment. * Version Control: * * $Revision: 37 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "osd_defs.h" #include #if !defined(_DPT_WIN_NT) && !defined _DPT_MSDOS # include #endif #include #include #if !defined _DPT_WIN_NT && !defined _DPT_NETWARE && !defined _DPT_MSDOS # if (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD) || defined(_SCO_UNIX)) # include # else # include # endif #endif #include #include #include "ctlr_map.hpp" #include /*** MANIFEST ***/ #define NBUS 8 #if (NBUS == 8) # define BUS_SHIFT 3 #elif (NBUS == 4) # define BUS_SHIFT 2 #else # error BUS_SHIFT is not defined #endif /*** STATIC DATA ***/ unsigned char * DPTControllerMap::controller2Dpt; unsigned char DPTControllerMap::controller2DptSize; unsigned char * DPTControllerMap::dpt2Controller; unsigned char DPTControllerMap::dpt2ControllerSize; char** DPTControllerMap::dpt2Path; unsigned char DPTControllerMap::dpt2PathSize; int DPTControllerMap::popen_pid[_NFILE]; DPTControllerMap::DPTControllerMap() { if ((controller2Dpt == (unsigned char *)NULL) && (dpt2Controller == (unsigned char *)NULL) && (dpt2Path == (char**)NULL)) { init(); } } /* * Make bigger, not smaller, and ensure in-place success, or return an * error. */ int DPTControllerMap::Realloc( unsigned char** array, unsigned* size, unsigned newSize, int fill) { if ( *size == 0 ) { if ( *array ) { delete *array; } *array = new unsigned char [ sizeof(unsigned char) * newSize ]; memset (*array, fill, sizeof(unsigned char) * newSize ); *size = sizeof(unsigned char) * newSize; } else if ( *size < ( sizeof(unsigned char) * newSize )) { unsigned char * hold = new unsigned char [ sizeof(unsigned char) * newSize ]; if ( hold == (unsigned char *)NULL ) { return -1; } memcpy (hold, *array, sizeof(unsigned char) * *size ); memset (hold + *size, fill, sizeof(unsigned char) * ( newSize - *size )); delete *array; *array = hold; *size = sizeof(unsigned char) * newSize; } /* Success */ return 0; } /* Used for the (unsigned char *)arrays defined statically in this class */ int DPTControllerMap::Realloc( unsigned char** array, unsigned char* size, unsigned newSize, int fill) { unsigned Size = *size; int retVal = Realloc(array, &Size, (unsigned)newSize, fill); *size = Size; return retVal; } /* Used for the (char **)arrays defined statically in this class */ int DPTControllerMap::Realloc( char*** array, unsigned char* size, unsigned newSize, int fill) { unsigned Size = *size * sizeof(char *); int retVal = Realloc((unsigned char **)array, &Size, newSize*sizeof(char *), fill); *size = Size / sizeof(char *); return retVal; } #if defined _DPT_SOLARIS ////////////////////////////////////////////////////////////////////////// // snoop through the filesystem to intuit the controller mappings. // The following routine makes up the mapping tables above to translate // the Solaris mappings to DPT controller index mappings. ////////////////////////////////////////////////////////////////////////// void DPTControllerMap::init() { struct map { int controller; // -1 if controli2o, -2 if in devices tree int dpt; // dpt designation if available. int major; // defined for controli2o or devices tree entries. int minor; // defined for controli2o or devices tree entries. int bus; // bus referenced (0 for controli2o) char * device; // pathname in devices tree struct map * next; } * map = (struct map *)NULL; struct map * controller; struct map * entry; int i, offset; char Buffer[512]; enum controller_Type { CONTROLLER_controli2o = -1, CONTROLLER_in_device_tree = -2, CONTROLLER_controli2o_failed = -3, CONTROLLER_controli2o_failed_and_remove = -4, CONTROLLER_remove = -5 }; // Find all the known target device links from dev into the devices // directory. Due to a `security feature' of SafePopenRead, we must // perform the node checking within here rather than at the shell // script within SafePopenRead. FILE * fp = SafePopenRead( "ls -l /dev/rdsk/c* /dev/dsk/c* 2>/dev/null | " "sed -n '" "s/.*\\(.dev.r*dsk.c\\)\\([0-9][0-9]*\\)\\(.*\\) -> ......devices.\\(.*\\)\\/mscsi@\\([0-9]\\)\\(,0.s*[cs][md][dk]*@.*\\)/\\2 \\5 \\4 \\1\\2\\3 \\4\\/mscsi@\\5\\6/p" "' | " "sort -u"); if (fp) while (fgets (Buffer, sizeof(Buffer), fp)) { struct map * new_entry = new struct map; new_entry->major = -1; new_entry->device = new char[ strlen (Buffer) + 1 ]; char * path = new char[ strlen (Buffer) + 1 ]; char * other_path = new char[ strlen (Buffer) + 1 ]; sscanf( Buffer, "%d %d %s %s %s\n", &new_entry->controller, &new_entry->bus, new_entry->device, path, other_path ); if ((( map == (struct map *)NULL ) || ( map->controller != new_entry->controller ) || ( map->bus != new_entry->bus ) || ( strcmp( map->device, new_entry->device ) != 0 )) && ( PathExists ( path ) != PathExists_None )) { static char ls_major[] = "ls -l /devices/%s 2>/dev/null | sed -n '" "s/.* \\([0-9]*\\),[ ]*\\([0-9]*\\).*.devices..*/\\1 \\2/p'"; delete [] path; path = new char[ strlen (other_path) + sizeof(ls_major) ]; sprintf( path, ls_major, other_path ); FILE * fp_major = SafePopenRead( path ); if (fp_major) while (fgets (Buffer, sizeof(Buffer), fp_major)) { sscanf( Buffer, "%d %d\n", &new_entry->major, &new_entry->minor ); } (void)SafePclose( fp_major ); new_entry->dpt = -2; new_entry->next = map; map = new_entry; } else { delete new_entry->device; delete new_entry; } delete [] path; } (void)SafePclose( fp ); # if (defined(DEBUG)) printf ("After ls -r /dev/dsk /dev/rdsk:\n"); for (entry = map; entry; entry = entry->next) { printf ("c%-3dd%-3d%-4d%-5db%-2d\"%s\"\n", entry->controller, entry->dpt, entry->major, entry->minor, entry->bus, entry->device); } # endif // Find all the referenced controlling hba nodes, we should check if // we can open the node to confirm that it is real (todo). fp = SafePopenRead( "if test -z \"`mount | grep '/devices on /tmp/devices '`\" ; then " "find /devices -print | grep ':controli2o' | xargs rm -f 2>/dev/null ;" "fi ;" "/usr/sbin/drvconfig -i dpti2o 2>/dev/null ;" "find /devices -print | fgrep 'scsis\nDPT,i2o\npci1044,a501' | " "sed -n '/:controli2o$/p' | " "xargs ls -l | " "sed -n '" "s/.* \\([0-9]*\\),[ ]*\\([0-9]*\\).*.devices.\\(.*\\):controli2o/\\1 \\2 \\3/p" "' | " "sort -u"); offset = 0; if (fp) while (fgets (Buffer, sizeof(Buffer), fp)) { int fd; struct map * new_entry = new struct map; new_entry->controller = CONTROLLER_controli2o; new_entry->bus = 0; new_entry->device = new char[ strlen (Buffer) + 1 ]; sscanf( Buffer, "%d %d %s\n", &new_entry->major, &new_entry->minor, new_entry->device ); sprintf( Buffer, "/devices/%s:controli2o", new_entry->device ); if ( PathExists ( Buffer ) == PathExists_None ) { sprintf( Buffer, "/devices/%s:dpti2o", new_entry->device ); if ( PathExists ( Buffer ) == PathExists_None ) { new_entry->controller = CONTROLLER_controli2o_failed; } } if (( new_entry->controller == CONTROLLER_controli2o ) && ( !Realloc( &dpt2Path, &dpt2PathSize, new_entry->minor + 1, 0) )) { if ( dpt2Path[ new_entry->minor ] ) { delete [] dpt2Path[ new_entry->minor ]; } dpt2Path[ new_entry->minor ] = Strdup (new_entry->device); } new_entry->dpt = new_entry->minor; if (new_entry->minor != 0) { ++offset; } else if (offset == 0) { new_entry->dpt = -1; } new_entry->next = map; map = new_entry; } (void)SafePclose (fp); // Any dpt0's are considered valid if there are higher than 0 for minors if (offset) for (entry = map; entry; entry = entry->next) { if (entry->dpt == -1) { entry->dpt = 0; } } # if (defined(DEBUG)) printf ("After ls -r /device... | grep controli2o:\n"); for (entry = map; entry; entry = entry->next) { printf ("c%-3dd%-3d%-4d%-5db%-2d\"%s\"\n", entry->controller, entry->dpt, entry->major, entry->minor, entry->bus, entry->device); } # endif // Remove any `old' controli2o entries that were erroneously not // handled by the boot -r option. for (entry = map; entry; entry = entry->next) { if (entry->controller >= 0) { continue; } // is there a drive entry that matches? for (struct map * drive = map; drive && ((drive->controller < 0) // additional clue || strcmp (entry->device, drive->device)); drive = drive->next) { continue; } // one did match, remove any *others* that match our device number if (drive) for (controller = drive = map; controller = controller->next; drive = controller) { if ((controller->major == entry->major) && (controller->minor == entry->minor) && (controller != entry)) { switch (controller->controller) { case CONTROLLER_controli2o: controller->controller = CONTROLLER_remove; break; case CONTROLLER_controli2o_failed: controller->controller = CONTROLLER_controli2o_failed_and_remove; break; } } } } # if (defined(DEBUG)) printf ("After removing apparently old controli2o nodes:\n"); for (entry = map; entry; entry = entry->next) { printf ("c%-3dd%-3d%-4d%-5db%-2d\"%s\"\n", entry->controller, entry->dpt, entry->major, entry->minor, entry->bus, entry->device); } # endif // Find all the referenced devices that failed to be acquired, by // searching the devices tree, then removing any that match ones // that are already linked. fp = SafePopenRead( "find /devices -print | fgrep 'scsis\nDPT,i2o\npci1044,a501' | grep mscsi | fgrep 'sd@\ncmdk@' | " "xargs ls -l 2>/dev/null | " "sed -n '" "s/.* \\([0-9]*\\),[ ]*\\([0-9]*\\).*\\(.devices.\\)\\(.*\\)\\(.mscsi@\\)\\([0-9]*\\)\\(,0.s*[cs][md][dk]*@.*:[a-h]\\)/\\1 \\2 \\6 \\4 \\3\\4\\5\\6\\7/p" "' | " "sort -u"); if (fp) while (fgets (Buffer, sizeof(Buffer), fp)) { struct map * new_entry = new struct map; new_entry->controller = CONTROLLER_in_device_tree; new_entry->device = new char[ strlen (Buffer) + 1 ]; char * path = new char[ strlen (Buffer) + 1 ]; sscanf(Buffer, "%d %d %d %s %s\n", &new_entry->major, &new_entry->minor, &new_entry->bus, new_entry->device, path); for (entry = map; entry && (( entry->major != new_entry->major ) || ( entry->bus != new_entry->bus ) || ( strcmp( entry->device, new_entry->device ) != 0 )); entry = entry->next); if (( entry == (struct map *)NULL ) && ( PathExists ( path ) != PathExists_None )) { new_entry->dpt = -1; new_entry->next = map; map = new_entry; } else { delete new_entry->device; delete new_entry; } delete [] path; } (void)SafePclose (fp); # if (defined(DEBUG)) printf ("After adding device entries not referenced prior:\n"); for (entry = map; entry; entry = entry->next) { printf ("c%-3dd%-3d%-4d%-5db%-2d\"%s\"\n", entry->controller, entry->dpt, entry->major, entry->minor, entry->bus, entry->device); } # endif // Now, check through entries, removing devices that match defunct // controllers so they do not affect the generated controller to // DPT controller index list. Remove defunct controller entries after // each is dealt with. for ( controller = (struct map *)NULL, entry = map; entry; ) { if (( entry->controller == CONTROLLER_controli2o_failed ) || ( entry->controller == CONTROLLER_controli2o_failed_and_remove )) { struct map * drive = map; struct map * last = (struct map *)NULL; // is there a drive or other controller entry that matches? // then remove. while ( drive ) { if ((( drive->controller >= 0 ) || ( drive->controller == CONTROLLER_remove ) || ( drive->controller == CONTROLLER_in_device_tree )) && ( strcmp (entry->device, drive->device) == 0 )) { if (last) { last->next = drive->next; delete drive->device; delete drive; drive = last; } else { drive = map = drive->next; last = (struct map *)NULL; continue; } } last = drive; drive = drive->next; } if (controller) { controller->next = entry->next; delete entry->device; delete entry; entry = controller; } else { entry = map = entry->next; controller = (struct map *)NULL; continue; } } entry = (controller = entry)->next; } # if (defined(DEBUG)) printf ("After removing devices that match defunct controllers\n"); for (entry = map; entry; entry = entry->next) { printf ("c%-3dd%-3d%-4d%-5db%-2d\"%s\"\n", entry->controller, entry->dpt, entry->major, entry->minor, entry->bus, entry->device); } # endif // If one node knows the dpt number, and another matching device // does not, then synchronize them now. for (controller = map; controller; controller = controller->next) { if (controller->dpt < 0) { continue; } for (entry = map; entry; entry = entry->next) { if ((entry->dpt < 0) && (strcmp(entry->device, controller->device) == 0)) { entry->dpt = controller->dpt; } } } // removing controller nodes matching devices as they simply form // superfluous (duplicate) information but with the critical controller // number missing. for (offset = 0, controller = (struct map *)NULL, entry = map; entry;) { struct map * drive; if (entry->controller != CONTROLLER_controli2o) { // is this entry a non-DPT controller? char * cp = entry->device; drive = (struct map *)NULL; while ((strlen(cp) >= 5) && memcmp (cp, "scsis", 5) // SPARC && memcmp (cp, "DPT,i2o", 7) // Legacy && memcmp (cp, "pci1044,a501", 12)) // INTEL { ++cp; } if (strlen(cp) < 5) { drive = entry; ++offset; // All unknown controllers form an offset } } else { // is there a drive entry that matches? for ( drive = map; drive && (( drive->controller < 0 ) || strcmp ( entry->device, drive->device ) || ( drive->bus != entry->bus )); drive = drive->next ) { continue; } } // one did match, remove! if (drive) { if (controller) { controller->next = entry->next; delete entry->device; delete entry; entry = controller; } else { entry = map = entry->next; controller = (struct map *)NULL; continue; } } controller = entry; entry = entry->next; } # if (defined(DEBUG)) printf ("After removing controllers than match devices:\n"); for (entry = map; entry; entry = entry->next) { printf ("c%-3dd%-3d%-4d%-5db%-2d\"%s\"\n", entry->controller, entry->dpt, entry->major, entry->minor, entry->bus, entry->device); } # endif // Sort the entries to make it easier to index through the controller // numbers to fill in any missing (CONTROLLER_controli2o and // CONTROLLER_in_device_tree) entries. This is similar to `sort -u' do { i = 0; for (controller = (struct map *)NULL, entry = map; entry && entry->next; entry = (controller = entry)->next) { int compare = (((entry->next->controller < 0) || (entry->controller < 0)) ? strcmp (entry->next->device, entry->device) : (entry->next->controller - entry->controller)); if (compare == 0) { compare = ((((entry->dpt >= 0) && (entry->next->dpt >= 0)) && (entry->dpt != entry->next->dpt)) ? (entry->next->dpt - entry->dpt) : (entry->next->bus - entry->bus)); // If adjoining buses, then the controller number will also // be sequential? estimate prior entries. if (((entry->dpt < 0) || (entry->next->dpt < 0) || (entry->dpt == entry->next->dpt)) && ((entry->next->bus - entry->bus) == 1) && (entry->controller < 0) && (entry->next->controller > 0)) { // If we already have an entry that matches this // estimated controller, then do *not* do this!! for (struct map * duplicate = map; duplicate && ((entry->next->controller-1) != duplicate->controller); duplicate = duplicate->next); if (duplicate == (struct map *)NULL) { entry->controller = entry->next->controller - 1; } } } // superfluous identical entries to be removed. if (compare == 0) { if (entry->controller == -1) { if (controller == (struct map *)NULL) { map = entry->next; delete entry->device; delete entry; entry = map; } else { controller->next = entry->next; delete entry->device; delete entry; entry = controller; } ++i; // above `bus/controller' estimate benefits! continue; } if (entry->next->controller == -1) { controller = entry->next; entry->next = controller->next; delete controller->device; delete controller; ++i; // above `bus/controller' estimate benefits! continue; } if (entry->controller == -2) { if (controller == (struct map *)NULL) { map = entry->next; delete entry->device; delete entry; entry = map; } else { controller->next = entry->next; delete entry->device; delete entry; entry = controller; } ++i; // above `bus/controller' estimate benefits! continue; } if (entry->next->controller == -2) { controller = entry->next; entry->next = controller->next; delete controller->device; delete controller; ++i; // above `bus/controller' estimate benefits! continue; } } if (compare < 0) { ++i; if (controller == (struct map *)NULL) { map = entry->next; entry->next = entry->next->next; map->next = entry; entry = map; } else { controller->next = entry->next; entry->next = entry->next->next; controller->next->next = entry; entry = controller->next; } } } } while (i); # if (defined(DEBUG)) printf ("After sorting:\n"); for (entry = map; entry; entry = entry->next) { printf ("c%-3dd%-3d%-4d%-5db%-2d\"%s\"\n", entry->controller, entry->dpt, entry->major, entry->minor, entry->bus, entry->device); } printf ("offset = %d\n", offset); # endif // Convert unknown controller entries into a controller number for (entry = map; entry; entry = entry->next) { if (entry->controller < 0) { // If the offset is already used ... for (controller = map; controller && (offset != controller->controller); controller = controller->next); if (controller == (struct map *)NULL) { ++offset; } } else { offset = entry->controller + 1; } } # if (defined(DEBUG)) printf ("After guessing some controller entries:\n"); for (entry = map; entry; entry = entry->next) { printf ("c%-3dd%-3d%-4d%-5db%-2d\"%s\"\n", entry->controller, entry->dpt, entry->major, entry->minor, entry->bus, entry->device); } printf ("offset = %d\n", offset); # endif // determine maximums for allocations of mappings dpt2ControllerSize = controller2DptSize = 0; if (dpt2Controller) { delete dpt2Controller; dpt2Controller = (unsigned char *)NULL; } if (controller2Dpt) { delete controller2Dpt; controller2Dpt = (unsigned char *)NULL; } for (entry = map; entry; entry = entry->next) { delete entry->device; if (entry->controller > (int)controller2DptSize) { controller2DptSize = entry->controller; } if (entry->bus == 0) { ++dpt2ControllerSize; } if (entry->dpt < 0) { entry->dpt = dpt2ControllerSize - 1; } if ((entry->dpt >= 0) && ((entry->dpt + 1) > dpt2ControllerSize)) { dpt2ControllerSize = (entry->dpt + 1); } } dpt2ControllerSize <<= BUS_SHIFT; dpt2Controller = new unsigned char[ dpt2ControllerSize + 6 ]; controller2Dpt = new unsigned char[ ++controller2DptSize + 6 ]; memset (dpt2Controller, 255, dpt2ControllerSize); memset (controller2Dpt, 255, controller2DptSize); // Generate the mapping table, and delete the entries as we go. for (i = 0, controller = (struct map *)NULL, entry = map; entry; controller = entry, entry = entry->next) { if (controller && (entry->bus <= controller->bus)) { i += NBUS; } if (entry->dpt >= 0) { i = (entry->dpt << BUS_SHIFT); } dpt2Controller[ i + entry->bus ] = (entry->controller >= 0) ? entry->controller : -1; if (entry->controller >= 0) { controller2Dpt[ entry->controller ] = i + entry->bus; } if (controller) { delete controller; } } if (controller) { delete controller; } # if (defined(DEBUG)) printf ("c# DPT Bus\n"); for (i = 0; i < controller2DptSize; ++i) { printf ("c%-3d", i); if (controller2Dpt[ i ] != 255) { printf ("d%-3db%d", controller2Dpt[ i ] >> BUS_SHIFT, controller2Dpt[ i ]&(NBUS-1)); } else { printf ("c%-3d--", i); } printf ("\n"); } printf ("----------\n"); for (i = 0; i < dpt2ControllerSize; ++i) { if (dpt2Controller[ i ] != 255) { printf ("c%-3dd%-3db%d\n", dpt2Controller[ i ], i >> BUS_SHIFT, i & (NBUS-1)); } } printf ("----------\n"); for (i = 0; i < dpt2PathSize; ++i) { if (dpt2Path[ i ]) { printf (" d%-3d%s\n", i, dpt2Path[ i ]); } } # endif } #elif (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) ////////////////////////////////////////////////////////////////////////// // snoop through the filesystem to intuit the controller mappings. // The following routine makes up the mapping tables above to translate // the BSDi mappings to DPT controller index mappings. ////////////////////////////////////////////////////////////////////////// void DPTControllerMap::init() { FILE * fp; char Buffer[512]; int eata = 0; /* * Lets construct the controller `path' mappings first, *our* dpteng * controller number order should be observed, this means the i2o * cards precede the eata cards always (the drivers may load in exactly * opposite order). First check how many `i2o' cards are installed to * determine the starting point for the `eata' cards. */ fp = SafePopenRead( #if (defined(_DPT_FREE_BSD)) "dmesg | sed -n 's/^dpti\\([0-9]*\\).* bus /\\1 dpti\\1/p\n" "s/.* at asr\\([0-9]*\\).* bus /\\1 dpti\\1/p' | sort -u" #else "dmesg | sed -n 's/^dpti\\([0-9]*\\).* bus 0/\\1 dpti\\1/p'" #endif ); if (fp) while (fgets (Buffer, sizeof(Buffer), fp)) { int controller = 32; char name[8]; sscanf( Buffer, "%d %s\n", &controller, name); if ( controller > 31 ) { continue; } if ( eata < controller ) { eata = controller; } ++eata; } (void)SafePclose (fp); int hba = eata - 1; fp = SafePopenRead( #if (defined(_DPT_FREE_BSD)) "dmesg | sed -n 's/^dpti\\([0-9]*\\).* bus \\([0-9]*\\)/\\1 \\2 dpti\\1/p\n" "s/^dpt\\([0-9]*\\).* bus \\([0-9]*\\)/\\1 \\2 dpt\\1/p\n" "s/^dpt\\([0-9]*\\).*/\\1 0 dpt\\1/p\n" "s/.* at asr\\([0-9]*\\).* bus \\([0-9]*\\).*/\\1 \\2 asr\\1/p\n'"); #else "dmesg | sed -n 's/^dpti\\([0-9]*\\).* bus \\([0-9]*\\)/\\1 \\2 dpti\\1/p\n" "s/^dpt\\([0-9]*\\).* bus \\([0-9]*\\)/\\1 \\2 dpt\\1/p\n" "s/^dpt\\([0-9]*\\).*/\\1 0 dpt\\1/p'"); #endif if (fp) while (fgets (Buffer, sizeof(Buffer), fp)) { int controller = 32, bus = NBUS; char name[8]; sscanf( Buffer, "%d %d %s\n", &controller, &bus, name); /* Initialization and validity checks */ if (( controller == 0 ) && ( #if (defined(_DPT_FREE_BSD)) (name[0] == 'a') || #endif (name[3] == 'i'))) { hba = 0; } else if ( bus == 0 ) { ++hba; } if (( bus >= NBUS ) || ( controller > 31 )) { continue; } if ( hba < ( controller - bus )) { hba = controller - bus; } /* Resize dpt2Path as necessary */ if ( !Realloc (&dpt2Path, &dpt2PathSize, ( hba + 1 ) << BUS_SHIFT, 0 )) { if ( dpt2Path[ ( hba << BUS_SHIFT ) + bus ] ) { delete [] dpt2Path[ ( hba << BUS_SHIFT ) + bus ]; } dpt2Path[ ( hba << BUS_SHIFT ) + bus ] = Strdup ( name ); } } (void)SafePclose (fp); /* * Lets construct the sd device mappings. We will use the controller2Dpt * string to hold on to the array of chars divided up as follows: * { * unsigned char lun:3; * unsigned char bus:3; * unsigned char id; * unsigned char hba; * }; */ hba = -1; fp = SafePopenRead( "dmesg | sed -n 's/^\\(dpti[0-9]*\\).* bus \\([0-9]*\\)/bus \\2 \\1/p\n" #if (defined(_DPT_FREE_BSD)) /* "s/.* at \\(asr[0-9]*\\).* bus \\([0-9]*\\)/bus \\2 \\1/p\n" */ #endif "s/^\\(dpt[0-9]*\\).* bus \\([0-9]*\\)/bus \\2 \\1/p\n" "s/^\\(dpt[0-9]*\\).*/bus 0 \\1/p\n" #if (defined(_DPT_FREE_BSD)) "s/^\\(.*\\) at \\(asr[0-9]*\\) bus \\([0-9]*\\) target \\([0-9]*\\) lun \\([0-9]*\\)/\\1 \\2 \\3 \\4 \\5/p\n" #endif "s/^tg.* target \\([0-9]*\\)/tg \\1/p\n" "s/^\\(s[drt][0-9]\\).* unit \\([0-9]*\\).*/lun \\2 \\1/p' |" "awk 'BEGIN {\n" " bus=-1\n" " id=-1\n" " type=\"\"\n" "}\n" "/^bus 0 / {\n" " bus=-1\n" "}\n" "/^bus/ {\n" " type=$3\n" " bus=$2\n" " id=-1\n" "}\n" "/^tg/ {\n" " id=$2\n" "}\n" #if (defined(_DPT_FREE_BSD)) "/asr/ {\n" " print $0\n" "}\n" #endif "/^lun/ {\n" " if (( bus != -1 ) && ( id != -1 )) {\n" " print $3 \" \" type \" \" bus \" \" id \" \" $2\n" " }\n" "}'"); if (fp) while (fgets (Buffer, sizeof(Buffer), fp)) { int sd, bus, id, lun, index; char type[2], controller[7]; sscanf( Buffer, "%c%c%d %s %d %d %d\n", type, type+1, &sd, controller, &bus, &id, &lun); index = sd * 6; if ( bus == 0 ) { ++hba; } #if (defined(_DPT_FREE_BSD)) if (controller[0] == 'a') { sscanf( controller, "asr%d", &hba); hba += 200; } else #endif if (controller[3] == 'i') { sscanf( controller, "dpti%d", &hba); } else { sscanf( controller, "dpt%d", &hba); hba += 100; } hba = getHba( hba ); switch ((unsigned short)type[0] + (type[1] << 8)) { case (unsigned short)'s' + ('d' << 8): #if (defined(_DPT_FREE_BSD)) case (unsigned short)'d' + ('a' << 8): #endif if ( !Realloc( &controller2Dpt, &controller2DptSize, (unsigned char)(index + 6), (char)-1) ) { controller2Dpt[ index + 0 ] = hba; controller2Dpt[ index + 1 ] = bus; controller2Dpt[ index + 2 ] = id; controller2Dpt[ index + 3 ] = lun; controller2Dpt[ index + 4 ] = type[0]; controller2Dpt[ index + 5 ] = type[1]; } break; case (unsigned short)'s' + ('r' << 8): #if (defined(_DPT_FREE_BSD)) case (unsigned short)'c' + ('d' << 8): #endif if ( !Realloc( &dpt2Controller, &dpt2ControllerSize, (unsigned char)(index + 6), (char)-1) ) { dpt2Controller[ index + 0 ] = hba; dpt2Controller[ index + 1 ] = bus; dpt2Controller[ index + 2 ] = lun; dpt2Controller[ index + 3 ] = id; dpt2Controller[ index + 4 ] = type[0]; dpt2Controller[ index + 5 ] = type[1]; } break; case (unsigned short)'s' + ('t' << 8): /* Tape devices not supported yet */ break; } } (void)SafePclose (fp); # if (defined(DEBUG)) int i; printf ("DPT controller\n"); for (i = 0; i < dpt2PathSize; ++i) { if (dpt2Path[ i ]) { char buffer[8]; sprintf ( buffer, "%db%d", i >> BUS_SHIFT, i & (NBUS-1) ); printf ("d%-7s%s\n", buffer, dpt2Path[ i ]); } } printf ("\nscsi address\n"); for (i = 0; i < controller2DptSize; i += 6) { if (controller2Dpt[ i ] != (unsigned char)-1) { printf ("%c%c%-3ud%ub%ut%ud%u\n", controller2Dpt[ i + 4 ], controller2Dpt[ i + 5 ], i / 3, controller2Dpt[ i + 0 ], controller2Dpt[ i + 1 ], controller2Dpt[ i + 2 ], controller2Dpt[ i + 3 ]); } } for (i = 0; i < dpt2ControllerSize; i += 6) { if (dpt2Controller[ i ] != (unsigned char)-1) { printf ("%c%c%-3ud%ub%ut%ud%u\n", dpt2Controller[ i + 4 ], dpt2Controller[ i + 5 ], i / 3, dpt2Controller[ i + 0 ], dpt2Controller[ i + 1 ], dpt2Controller[ i + 2 ], dpt2Controller[ i + 3 ]); } } # endif } #else void DPTControllerMap::init() { } #endif ////////////////////////////////////////////////////////////////// // destructor ////////////////////////////////////////////////////////////////// DPTControllerMap::~DPTControllerMap() { } ////////////////////////////////////////////////////////////////// // getAdapterString // Caller must delete. ////////////////////////////////////////////////////////////////// char* DPTControllerMap::getAdapterString(int hba) { char* hbaString = new char[5]; # if (defined(_DPT_SOLARIS) || defined(_DPT_UNIXWARE)) int ctlr, bus = 0; while ((ctlr = getController(hba, bus)) == -1) { ++bus; } if (ctlr != -1) { sprintf(hbaString, "c%d", ctlr); return hbaString; } # endif sprintf(hbaString, "d%d", hba); return hbaString; } char* DPTControllerMap::Strdup(char* String) { char* newString = new char [strlen(String) + 1]; if (newString == (char *)NULL) { return ((char *)NULL); } return (strcpy(newString, String)); } char* DPTControllerMap::getAdapterPath(int hba) { # if (defined(_DPT_SOLARIS) || defined(_DPT_UNIXWARE)) if ((hba < dpt2PathSize) && (dpt2Path[hba] != (char *)NULL)) { return (Strdup (dpt2Path[hba])); } # elif (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) int bus; for (bus = 0; bus < NBUS; ++bus) { if ((hba < (dpt2PathSize << BUS_SHIFT)) && (dpt2Path[(hba<> BUS_SHIFT)) && ((retVal = dpt2Controller[(hba << BUS_SHIFT) + bus]) != 255)) { return retVal; } # elif (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) if (hba < (dpt2PathSize << BUS_SHIFT)) { char* hbaString = dpt2Path[ (hba << BUS_SHIFT) + bus ]; if ( hbaString != (char*)NULL ) { int retVal; if (( hba = *(hbaString += 3) ) != 'i' ) { --hbaString; } retVal = 0; while (( '0' <= *++hbaString ) && ( *hbaString <= '9' )) { retVal = (retVal *= 10) + (*hbaString - '0'); } /* If other than i2o, then 100 and up ... */ if ( hba != 'i' ) { retVal %= 100; retVal += 100; } return retVal; } } # endif return -1; } /////////////////////////////////////////////////// // getHba /////////////////////////////////////////////////// int DPTControllerMap::getHba(int controller) { # if (defined(_DPT_SOLARIS) || defined(_DPT_UNIXWARE)) if ((controller <= controller2DptSize) && (controller2Dpt[controller] != 255)) { return (controller2Dpt[controller] >> BUS_SHIFT); } # elif (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) int hba = 0; char buffer[8]; sprintf( buffer, "dpt%s%d", &"i"[controller > 99], controller % 100 ); # if (defined(_DPT_FREE_BSD)) if (controller > 199) { sprintf( buffer, "asr%d", controller % 100 ); } # endif while (hba < dpt2PathSize) { int bus = 0; while (bus < NBUS) { char* hbaString = dpt2Path[ hba + bus ]; if (( hbaString != (char*)NULL ) && ( strcmp ( buffer, hbaString ) == 0 )) { return (hba >> BUS_SHIFT); } ++bus; } hba += NBUS; } # endif return -1; } ///////////////////////////////////////////////// // getBus ///////////////////////////////////////////////// int DPTControllerMap::getBus(int controller) { # if (defined(_DPT_SOLARIS) || defined(_DPT_UNIXWARE)) if ((controller <= controller2DptSize) && (controller2Dpt[controller] != 255)) { return (controller2Dpt[controller] & (NBUS-1)); } # elif (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) int hba = 0; char buffer[8]; sprintf( buffer, "dpt%s%d", &"i"[controller > 99], controller % 100 ); # if (defined(_DPT_FREE_BSD)) if (controller > 199) { sprintf( buffer, "asr%d", controller % 100 ); } # endif while (hba < dpt2PathSize) { int bus = 0; while (bus < NBUS) { char* hbaString = dpt2Path[ hba + bus ]; if (( hbaString != (char*)NULL ) && ( strcmp ( buffer, hbaString ) == 0 )) { return bus; } ++bus; } hba += NBUS; } # endif return -1; } // Security conscious individuals will never let popen run at the effective // groups of the program, but at the more acceptable level of the invoking // user. This limits the command permissions! #if (defined(_DPT_SOLARIS) || defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) FILE * DPTControllerMap::SafePopenRead( char * commands ) { int fildes[2], pid; FILE * fp = (FILE *)NULL; // This is considered the `safe' path locations for our environment static char path[] = "PATH=/usr/bin:/usr/sbin:/usr/ucb:/etc:/sbin;export PATH;%s"; char * cp; if ( pipe( fildes ) ) { return ( fp ) ; } (void)fcntl ( fildes[1], F_SETFD, O_WRONLY ); (void)fcntl ( fildes[0], F_SETFD, O_RDONLY ); // The other security measure is to completely eliminate the environment. const char * env[1] = { (char *)NULL }; switch ( pid = fork() ) { case (pid_t)0: // Child process (void)close ( fildes[0] ); (void)close ( 1 ); // Close standard output (void)dup2 ( fildes[1], 1 ); (void)close ( fildes[1] ); // Change user to the real user id, not the effective. setuid (getuid()); setgid (getgid()); cp = new char[sizeof(path) - 3 + strlen (commands) + 1]; sprintf (cp, path, commands); // now, call the shelled out programs at the user level. (void)execle( "/bin/sh", "sh", "-c", cp, 0, env ); delete [] cp; _exit (1); case (pid_t)-1: // Failed (void)close ( fildes[0] ); (void)close ( fildes[1] ); break; default: // Parent process popen_pid [ fildes[0] ] = pid; (void)close ( fildes[1] ); fp = fdopen ( fildes[0], "r" ); if ( fp == (FILE *)NULL ) { int status, r; void (*hstat)(int), (*istat)(int), (*qstat)(int); istat = signal ( SIGINT, SIG_IGN ); qstat = signal ( SIGQUIT, SIG_IGN ); hstat = signal ( SIGHUP, SIG_IGN ); (void)close ( fildes[0] ); (void)kill ( pid, SIGHUP ); (void)kill ( pid, SIGTERM ); (void)sleep (2); // Wait for it (void)kill ( pid, SIGKILL ); while ( (r = wait(&status)) != pid && r != -1 ) ; (void)signal ( SIGINT, istat ); (void)signal ( SIGQUIT, qstat ); (void)signal ( SIGHUP, hstat ); } break; } return ( fp ); } int DPTControllerMap::SafePclose( FILE * fp ) { int status, f, r; void (*hstat)(int), (*istat)(int), (*qstat)(int); if ( !fp ) { return ( -1 ); } f = fileno( fp ); (void)fclose( fp ); istat = signal ( SIGINT, SIG_IGN ); qstat = signal ( SIGQUIT, SIG_IGN ); hstat = signal ( SIGHUP, SIG_IGN ); while ( (r = wait(&status)) != popen_pid[f] && r != -1 ) ; if ( r == -1 ) { status = -1; } (void)signal ( SIGINT, istat ); (void)signal ( SIGQUIT, qstat ); (void)signal ( SIGHUP, hstat ); return ( status ); } #endif // _DPT_SOLARIS || _DPT_BSDI || _DPT_FREE_BSD #if defined _DPT_WIN_NT || defined _DPT_LINUX || defined _DPT_UNIXWARE enum DPTControllerMap::PathExists DPTControllerMap::PathExists( char * path ) { return ( PathExists_Exists ); } #elif defined _DPT_SCO || defined _DPT_NETWARE || defined _DPT_MSDOS DPTControllerMap::PathExists_t DPTControllerMap::PathExists( char * path ) { return ( PathExists_Exists ); } #else # if (defined(_DPT_FREE_BSD) || defined(_DPT_BSDI)) DPTControllerMap::PathExists_t # else enum PathExists # endif DPTControllerMap::PathExists( char * path ) { int fd; # if (!defined(_DPT_FREE_BSD) && !defined(__FreeBSD_version) && (__FreeBSD_version < 400000)) extern int errno; # endif // Only root or sys can perform this test reliably if ( ( getuid () != 0 ) && ( geteuid () != 0 ) && ( getuid () != 3 ) && ( geteuid () != 3 ) && ( getgid () != 0 ) && ( getegid () != 0 ) && ( getgid () != 3 ) && ( getegid () != 3 ) ) { return ( PathExists_Exists ); } if (( fd = open ( path, O_RDONLY ) ) >= 0 ) { char buffer[512]; int readOk = ( read ( fd, buffer, sizeof(buffer) ) == sizeof(buffer) ); close ( fd ); return ( readOk ? PathExists_Read : PathExists_Open ); } return( (( errno == ENXIO ) || ( errno == ENOENT )) ? PathExists_None : PathExists_Open ); } #endif // This method is called to reset the static members of DPTControllerMap void DPTControllerMap::Reset() { if (controller2Dpt) { delete controller2Dpt; controller2Dpt = (unsigned char*)NULL; } controller2DptSize = 0; if (dpt2Controller) { delete dpt2Controller; dpt2Controller = (unsigned char*)NULL; } dpt2ControllerSize = 0; if (dpt2Path) { delete dpt2Path; dpt2Path = (char **)NULL; } dpt2PathSize = 0; } raidutils-0.0.6.orig/lib/dpt_buff.cpp0000664000175000000620000002536310044153307017411 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - DPT_BUFF.CPP //*************************************************************************** // //Description: // // This file contains function definitions for the dptBuffer_S //structure. // //Author: Doug Anderson //Date: 11/16/92 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "dpt_buff.h" //Function - dptBuffer_S::extract() - start //=========================================================================== // //Description: // // This function reads a block of data from the next available location //in the DPT buffer. This function can be called repetitively to read //multiple data blocks from a single DPT buffer. // //Parameters: // //Return Value: // // 0 = Extraction truncated // 1 = Success - all requested bytes were extracted // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptBuffer_S::extract(void *inData_P,uLONG dataSize) { uLONG numToCopy = 0; // If there is any space left... if (writeIndex>readIndex) { // Determine how many bytes have not been read... uLONG numLeft = writeIndex - readIndex; // Determine how many bytes to read from the buffer numToCopy = (numLeft > dataSize) ? dataSize : numLeft; // Copy the data from the I/O buffer to the specified buffer memcpy(inData_P,data+readIndex,(uINT)numToCopy); // Increment the read index readIndex += numToCopy; } return (numToCopy==dataSize); } //dptBuffer_S::extract() - end //Function - dptBuffer_S::skip() - start //=========================================================================== // //Description: // // This function increments the read index by the specified amount //without extracting any information. // //Parameters: // //Return Value: // // 0 = Extraction truncated // 1 = Success - all requested bytes were extracted // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptBuffer_S::skip(uLONG dataSize) { uLONG numToCopy = 0; // If there is any space left... if (writeIndex>readIndex) { // Determine how many bytes have not been read... uLONG numLeft = writeIndex - readIndex; // Determine how many bytes may be skipped numToCopy = (numLeft>dataSize) ? dataSize : numLeft; // Increment the read index readIndex += numToCopy; } return (numToCopy==dataSize); } //dptBuffer_S::skip() - end //Function - dptBuffer_S::insert() - start //=========================================================================== // //Description: // // This function writes a block of data to the next available location //in the DPT buffer. This function can be called repetitively to read //multiple data blocks from a single DPT buffer. // //Parameters: // //Return Value: // // 0 = Insertion incomplete // 1 = Success - all requested bytes were inserted // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptBuffer_S::insert(void *inData_P,uLONG dataSize) { uLONG numToCopy = 0; // If there is any room left... if (allocSize>writeIndex) { // Determine how many bytes are left in the data buffer uLONG numLeft = allocSize - writeIndex; // Determine how many bytes may be copied into the buffer numToCopy = (numLeft < dataSize) ? numLeft : dataSize; // Copy the data into the buffer memcpy(data+writeIndex,inData_P,(uINT)numToCopy); // Increment the write index writeIndex += numToCopy; } return (numToCopy==dataSize); } //dptBuffer_S::insert() - end //Function - dptBuffer_S::setExtractSize() - start //=========================================================================== // //Description: // // This function sets the number of bytes that can be read from //the buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function should be used sparingly. This function is // provided for use in situations where an the reset(),insert() // procedure was not used to initialize the buffer. // //--------------------------------------------------------------------------- void dptBuffer_S::setExtractSize(uLONG inSize) { // Take the minimum of the buffer size and the request size writeIndex = (allocSize > inSize) ? inSize : allocSize; } //dptBuffer_S::setExtractSize() - end //Function - dptBuffer_S::newBuffer() - start //=========================================================================== // //Description: // // This function allocates a new DPT I/O buffer with the specified //data buffer size and initializes the buffer header. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptBuffer_S * dptBuffer_S::newBuffer(uLONG size) { dptBuffer_S *buff_P = NULL; uLONG AllocSize; // If a non-zero data buffer has been requested... if (size) { // // Set up the alloc size to include the buffer header // AllocSize = sizeof(dptBuffer_S)-1 + size; // // Now lets make sure the size is an even multiple of 16, and // just for good measure we will buffer it by 16 for all of those // environments that have a problem with alignment // AllocSize = (AllocSize & 0xfffffff0) + 0x10; // Allocate a new I/O buffer of the specified size buff_P = (dptBuffer_S *) new uCHAR[AllocSize]; // If the buffer was allocated... if (buff_P != NULL) { // Initialize the buffer header buff_P->commID = 0; buff_P->allocSize = size; buff_P->readIndex = 0; buff_P->writeIndex = 0; // Clear the data buffer memset(buff_P->data,0,(uINT)size); } } return (buff_P); } //dptBuffer_S::newBuffer() - end //Function - dptBuffer_S::delBuffer() - start //=========================================================================== // //Description: // // This function frees an I/O buffer that was allocated with' //newBuffer(). // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptBuffer_S::delBuffer(dptBuffer_S *buff_P) { // If a valid I/O buffer was specified... if (buff_P!=NULL) // Delete the buffer as a uCHAR array delete[] ((uCHAR *)buff_P); } //dptBuffer_S::delBuffer() - end //Function - dptBuffer_S::netInsert() - start //=========================================================================== // //Description: // // This function is used to place inData into DPT network order //(byte swapping if necessary) and then call insert() to place the //value in the DPT buffer. Apart from the possible byte swapping, this //function should behave identically to insert(). // //Parameters: // //Return Value: // // 0 = Extraction truncated // 1 = Success - all requested bytes were extracted // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptBuffer_S::netInsert(uLONG inData) { uLONG temp = NET_SWAP_4(inData); return (insert(&temp, sizeof(uLONG))); } uSHORT dptBuffer_S::netInsert(uSHORT inData) { uSHORT temp = NET_SWAP_2(inData); return (insert(&temp, sizeof(uSHORT))); } //dptBuffer_S::netInsert() - end //Function - dptBuffer_S::netExtract() - start //=========================================================================== // //Description: // // This function is used to call extract() to remove data from the DPT //buffer (which is in DPT network order) and then return the data in host //byte order (byte swapping if necessary). Apart from the possible byte //swapping, this function should behave identically to extract(). // //Parameters: // //Return Value: // // 0 = Extraction truncated // 1 = Success - all requested bytes were extracted // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptBuffer_S::netExtract(uLONG &inData) { uSHORT retVal = extract(&inData, sizeof(uLONG)); inData = NET_SWAP_4(inData); // return the result of the call to extract() return retVal; } uSHORT dptBuffer_S::netExtract(long &inData) { uSHORT retVal = extract(&inData, sizeof(long)); inData = NET_SWAP_4(inData); // return the result of the call to extract() return retVal; } uSHORT dptBuffer_S::netExtract(uSHORT &inData) { uSHORT retVal = extract(&inData, sizeof(uSHORT)); inData = NET_SWAP_2(inData); // return the result of the call to extract() return retVal; } uSHORT dptBuffer_S::netExtract(short &inData) { uSHORT retVal = extract(&inData, sizeof(short)); inData = NET_SWAP_2(inData); // return the result of the call to extract() return retVal; } //dptBuffer_S::netExtract() - end raidutils-0.0.6.orig/lib/dptalign.c0000664000175000000620000003471110044153307017057 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - DPTALIGN.C //*************************************************************************** // //Description: // // This file contains function definitions for short and long //word get/set operations relative to an absolute byte offset. // //Author: Doug Anderson //Date: 5/2/95 // //Editors: // //Remarks: // // //*************************************************************************** //------------- //Include Files //------------- #include "dptalign.h" #ifdef __cplusplus extern "C" { #endif //Function - dptGetV2() - start //=========================================================================== // //Description: // // This function returns the 2 byte value at the specified byte //offset relative to the specified pointer. // //--------------------------------------------------------------------------- uLONG dptGetV2(void *in_P,uLONG byteOffset) { #ifdef _DPT_BIG_ENDIAN register uLONG tmpLong = (uLONG) *(((uCHAR *)in_P)+byteOffset+1); tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset)) << 8; #else register uLONG tmpLong = (uLONG) *(((uCHAR *)in_P)+byteOffset); tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset+1)) << 8; #endif return (tmpLong); } //dptGetV2() - end //Function - dptSetV2() - start //=========================================================================== // //Description: // // This function sets the 2 byte value at the specified byte //offset relative to the specified pointer to the specified value // //--------------------------------------------------------------------------- uLONG dptSetV2(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+1) = (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset) = (uCHAR) (newValue >> 8); #else *(((uCHAR *)in_P)+byteOffset) = (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) = (uCHAR) (newValue >> 8); #endif return (newValue); } //dptSetV2() - end //Function - dptOrV2() - start //=========================================================================== // //Description: // // This function "ors" the specified value with the 2 byte value //at the specified byte offset relative to the specified pointer. // //--------------------------------------------------------------------------- void dptOrV2(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+1) |= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset) |= (uCHAR) (newValue >> 8); #else *(((uCHAR *)in_P)+byteOffset) |= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) |= (uCHAR) (newValue >> 8); #endif return; } //dptOrV2() - end //Function - dptAndV2() - start //=========================================================================== // //Description: // // This function "ands" the specified value with the 2 byte value //at the specified byte offset relative to the specified pointer. // //--------------------------------------------------------------------------- void dptAndV2(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+1) &= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset) &= (uCHAR) (newValue >> 8); #else *(((uCHAR *)in_P)+byteOffset) &= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) &= (uCHAR) (newValue >> 8); #endif return; } //dptAndV2() - end //Function - dptXorV2() - start //=========================================================================== // //Description: // // This function "exclusive ors" the specified value with the //2 byte value at the specified byte offset relative to the specified //pointer. // //--------------------------------------------------------------------------- void dptXorV2(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+1) ^= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset) ^= (uCHAR) (newValue >> 8); #else *(((uCHAR *)in_P)+byteOffset) ^= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) ^= (uCHAR) (newValue >> 8); #endif return; } //dptXorV2() - end //Function - dptGetV3() - start //=========================================================================== // //Description: // // This function returns the 3 byte value at the specified absolute //byte offset relative to the specified pointer. // //--------------------------------------------------------------------------- uLONG dptGetV3(void *in_P,uLONG byteOffset) { #ifdef _DPT_BIG_ENDIAN register uLONG tmpLong = (uLONG) *(((uCHAR *)in_P)+byteOffset+2); tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset+1)) << 8; tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset)) << 16; #else register uLONG tmpLong = (uLONG) *(((uCHAR *)in_P)+byteOffset); tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset+1)) << 8; tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset+2)) << 16; #endif return (tmpLong & 0x00FFFFFF); } //dptGetV3() - end //Function - dptSetV3() - start //=========================================================================== // //Description: // // This function sets the 3 byte value at the specified absolute //byte offset relative to the specified pointer. // //--------------------------------------------------------------------------- uLONG dptSetV3(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+2) = (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) = (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset) = (uCHAR) (newValue >> 16); #else *(((uCHAR *)in_P)+byteOffset) = (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) = (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+2) = (uCHAR) (newValue >> 16); #endif return (newValue & 0x00FFFFFF); } //dptSetV3() - end //Function - dptOrV3() - start //=========================================================================== // //Description: // // This function "ors" the specified value with the 3 byte value //at the specified byte offset relative to the specified pointer. // //--------------------------------------------------------------------------- void dptOrV3(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+2) |= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) |= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset) |= (uCHAR) (newValue >> 16); #else *(((uCHAR *)in_P)+byteOffset) |= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) |= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+2) |= (uCHAR) (newValue >> 16); #endif return; } //dptOrV3() - end //Function - dptAndV3() - start //=========================================================================== // //Description: // // This function "ands" the specified value with the 4 byte value //at the specified byte offset relative to the specified pointer. // //--------------------------------------------------------------------------- void dptAndV3(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+2) &= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) &= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset) &= (uCHAR) (newValue >> 16); #else *(((uCHAR *)in_P)+byteOffset) &= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) &= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+2) &= (uCHAR) (newValue >> 16); #endif return; } //dptAndV3() - end //Function - dptXorV3() - start //=========================================================================== // //Description: // // This function "exclusive ors" the specified value with the //4 byte value at the specified byte offset relative to the specified //pointer. // //--------------------------------------------------------------------------- void dptXorV3(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+2) ^= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) ^= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset) ^= (uCHAR) (newValue >> 16); #else *(((uCHAR *)in_P)+byteOffset) ^= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) ^= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+2) ^= (uCHAR) (newValue >> 16); #endif return; } //dptXorV3() - end //Function - dptGetV4() - start //=========================================================================== // //Description: // // This file returns the 4 byte value at the specified absolute //byte offset relative to the specified pointer. // //--------------------------------------------------------------------------- uLONG dptGetV4(void *in_P,uLONG byteOffset) { #ifdef _DPT_BIG_ENDIAN register uLONG tmpLong = (uLONG) *(((uCHAR *)in_P)+byteOffset+3); tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset+2)) << 8; tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset+1)) << 16; tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset)) << 24; #else register uLONG tmpLong = (uLONG) *(((uCHAR *)in_P)+byteOffset); tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset+1)) << 8; tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset+2)) << 16; tmpLong |= ((uLONG) *(((uCHAR *)in_P)+byteOffset+3)) << 24; #endif return (tmpLong); } //dptGetV4() - end //Function - dptSetV4() - start //=========================================================================== // //Description: // // This file sets the 4 byte value at the specified absolute //byte offset relative to the specified pointer. // //--------------------------------------------------------------------------- uLONG dptSetV4(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+3) = (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+2) = (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+1) = (uCHAR) (newValue >> 16); *(((uCHAR *)in_P)+byteOffset) = (uCHAR) (newValue >> 24); #else *(((uCHAR *)in_P)+byteOffset) = (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) = (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+2) = (uCHAR) (newValue >> 16); *(((uCHAR *)in_P)+byteOffset+3) = (uCHAR) (newValue >> 24); #endif return (newValue); } //dptSetV4() - end //Function - dptOrV4() - start //=========================================================================== // //Description: // // This function "ors" the specified value with the 4 byte value //at the specified byte offset relative to the specified pointer. // //--------------------------------------------------------------------------- void dptOrV4(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+3) |= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+2) |= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+1) |= (uCHAR) (newValue >> 16); *(((uCHAR *)in_P)+byteOffset) |= (uCHAR) (newValue >> 24); #else *(((uCHAR *)in_P)+byteOffset) |= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) |= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+2) |= (uCHAR) (newValue >> 16); *(((uCHAR *)in_P)+byteOffset+3) |= (uCHAR) (newValue >> 24); #endif return; } //dptOrV4() - end //Function - dptAndV4() - start //=========================================================================== // //Description: // // This function "ands" the specified value with the 4 byte value //at the specified byte offset relative to the specified pointer. // //--------------------------------------------------------------------------- void dptAndV4(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+3) &= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+2) &= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+1) &= (uCHAR) (newValue >> 16); *(((uCHAR *)in_P)+byteOffset) &= (uCHAR) (newValue >> 24); #else *(((uCHAR *)in_P)+byteOffset) &= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) &= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+2) &= (uCHAR) (newValue >> 16); *(((uCHAR *)in_P)+byteOffset+3) &= (uCHAR) (newValue >> 24); #endif return; } //dptAndV4() - end //Function - dptXorV4() - start //=========================================================================== // //Description: // // This function "exclusive ors" the specified value with the //4 byte value at the specified byte offset relative to the specified //pointer. // //--------------------------------------------------------------------------- void dptXorV4(void *in_P,uLONG byteOffset,uLONG newValue) { #ifdef _DPT_BIG_ENDIAN *(((uCHAR *)in_P)+byteOffset+3) ^= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+2) ^= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+1) ^= (uCHAR) (newValue >> 16); *(((uCHAR *)in_P)+byteOffset) ^= (uCHAR) (newValue >> 24); #else *(((uCHAR *)in_P)+byteOffset) ^= (uCHAR) newValue; *(((uCHAR *)in_P)+byteOffset+1) ^= (uCHAR) (newValue >> 8); *(((uCHAR *)in_P)+byteOffset+2) ^= (uCHAR) (newValue >> 16); *(((uCHAR *)in_P)+byteOffset+3) ^= (uCHAR) (newValue >> 24); #endif return; } //dptXorV4() - end #ifdef __cplusplus }; #endif raidutils-0.0.6.orig/lib/engcalls.cpp0000664000175000000620000011743010044153307017405 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* File - ENGCALLS.CPP */ /*****************************************************************************/ /* */ /*Description: */ /* This Module Contains The Functions That Allow An Application To */ /* Access The DPT Engine Entry Points. */ /* */ /* */ /*Author: Bob Pasteur */ /*Date: */ /* */ /*Editors: */ /* */ /*Remarks: */ /* */ /*****************************************************************************/ /*Include Files -------------------------------------------------------------*/ #include #include #include #include #include #if !defined __MWERKS__ #include #include #include #include #endif #include #include #include "osd_util.h" #include "eng_std.h" #include "rtncodes.h" #include "messages.h" #include "osd_unix.h" //#include "eng_std.h" #include "dpt_buff.h" #include "engmsg.h" #include "engine.h" #ifdef _DPT_LOGGER #include "sem.hpp" extern MuxEvent_C loggerThread_X; #endif #ifdef __cplusplus extern "C" { #endif /* Definitions - Defines & Constants ---------------------------------------*/ /* Definitions - Structure & Typedef ---------------------------------------*/ /* Variables - External ----------------------------------------------------*/ extern char **environ; extern uLONG DptEnginePid; /* Variables - Global ------------------------------------------------------*/ #ifdef MESSAGES static int MsgID = -1; static int BufferID = -1; #if defined (HAS_COMM_ENGINE) && defined (NEW_COMM_ENG) static int commMsgID = -1; #endif static int SignalSetUp = 0; static uLONG toEngBuffSize = 0; static uLONG toEngTotalSize = 0; static uLONG fromEngBuffSize = 0; static uLONG fromEngTotalSize = 0; static uLONG fromEngBuffOffset = 0; static char *SharedMemoryPtr = NULL; static char *ToEngPtr; static char *FromEngPtr; char EngineLoadString[100] = {'Z','\0'}; char CommEngineLoadString[100] = {'Z','\0'}; int EngineMessageTimeout = 0; #include "findpath.h" char *EnginePathName = "raideng"; char *CommEnginePathName = "dptcom"; #if defined(_DPT_UNIXWARE) || defined ( _DPT_DGUX ) char *EnginePathNameDefault = "/var/dpt/raideng &"; char *CommEnginePathNameDefault = "/var/dpt/dptcom &"; char *DefaultPathName = "/var/dpt/"; #elif defined(_DPT_AIX) char *EnginePathNameDefault = "/usr/lpp/dpt/raideng &"; char *CommEnginePathNameDefault = "/usr/lpp/dpt/dptcom &"; char *DefaultPathName = "/usr/lpp/dpt/"; #elif defined (SNI_MIPS) char *EnginePathNameDefault = "/opt/dpt/lib/raideng &"; char *CommEnginePathNameDefault = "/opt/dpt/lib/dptcom &"; char *DefaultPathName = "/opt/dpt/lib/"; #elif defined (_DPT_SOLARIS) char *EnginePathNameDefault = "/opt/SUNWhwrdg/raideng"; char *CommEnginePathNameDefault = "/opt/SUNWhwrdg/dptcom"; char *DefaultPathName = "/opt/SUNWhwrdg/"; #else char *EnginePathNameDefault = "/usr/dpt/raideng &"; char *CommEnginePathNameDefault = "/usr/dpt/dptcom &"; char *DefaultPathName = "/usr/dpt/"; #endif /* _DPT_UNIXWARE else */ #endif /* MESSAGES */ /* Prototypes - function ---------------------------------------------------*/ #if (defined(DPT_DEBUG)) void I2oPrintMem(char* Addr,long Count); #endif uLONG DPT_OpenEngine(void); uLONG DPT_CloseEngine(void); DPT_RTN_T DPT_CallEngine(DPT_TAG_T EngineTag, DPT_MSG_T event, DPT_TAG_T target, void *fromEng_P, void *toEng_P,uLONG timeout); #if defined (HAS_COMM_ENGINE) && defined (NEW_COMM_ENG) uLONG DPT_OpenCommEng(char *iniFile); uLONG DPT_CloseCommEng(void); DPT_RTN_T DPT_CallCommEng(DPT_TAG_T EngineTag, DPT_MSG_T event, DPT_TAG_T target, void *fromEng_P, void *toEng_P,uLONG timeout); #endif // has comm, new comm uLONG DPT_IsEngineAlive(void) ; #ifdef MESSAGES char *AllocBuffers(uLONG toEngSize, uLONG fromEngSize); void DeAllocBuffers(void); void DptSignalHandler(int SignalToHandle); int SetAlarm(void); void SetEngineLoadPath(char *PathName); #endif /* MESSAGES */ /* Prototypes - external function ------------------------------------------*/ /*-------------------------------------------------------------------------*/ /* Function DPT_CallAnEngine */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* DestinationKey : msq key for destination (i.e. DPT_EngineKey) */ /* EngineTag : Engine Tag */ /* event : Event Message To Pass to The Engine */ /* target : Tag Of Target */ /* */ /* This Function Makes The Actual Call to The Engine Through Messaging. */ /* The Pertinant Buffer Information And Data Are Copied To And From The */ /* Shared Memory Buffers That Are Allocated By This Module. */ /* */ /* Return : See rtncodes.h for explanation of DPT_RTN_T codes. */ /*-------------------------------------------------------------------------*/ DPT_RTN_T DPT_CallAnEngine(long DestinationKey, DPT_TAG_T EngineTag, DPT_MSG_T event, DPT_TAG_T target, void *fromEng_P, void *toEng_P,uLONG timeout) { DPT_RTN_T Rtnval = ERR_UNSPECIFIED; #ifdef MESSAGES int i; MsgHdr HdrBuff; uLONG FromSize,ToSize; int OldAlarmValue = 0; uLONG p_id; int Done = 0; /* If We Havn't Gotten The Message Queue ID Yet ( The Open Call Has */ /* Not Been Made) or the engine is not out there, Return An Error */ if(MsgID == -1) { return(ERR_NO_MSG_QUEUE_FOUND); } // // If we already have the PID of the engine, and the engine isn't alive, // return an error // if((DptEnginePid) && (!(DPT_IsEngineAlive()))) { return(ERR_CANNOT_SIGNAL_PROCESS); } // // Get our PID for the command // p_id = getpid(); #ifdef _DPT_LOGGER // // If this is the logger, we have to semaphore commands sent to the engine // due to the threading put into the logger // loggerThread_X.GainAccess(); #endif // // Get the buffer sizes for the passed in command // FromSize = ((dptBuffer_S *)fromEng_P)->allocSize; ToSize = ((dptBuffer_S *)toEng_P)->allocSize; // // If we are going to time this one, save off the old timmer value // if(timeout) { OldAlarmValue = alarm(0); } // // As part of the robustness added, we will loop through until we have an error // or receive back the response that we sent out // while(!Done) { Done = 1; // // If there are any messages on the queue with a type of our process ID, // they must be failed retries or some other error condition, so pull // them off and discard them // i = msgrcv(MsgID,(struct msgbuf *)&HdrBuff,MsgDataSize,p_id,IPC_NOWAIT); while(i != -1) { i = msgrcv(MsgID,(struct msgbuf *)&HdrBuff,MsgDataSize,p_id,IPC_NOWAIT); } // // If the shared memory buffers are not big enough to handle this command // allocate buffers big enough // if((SharedMemoryPtr == NULL)||(FromSize > fromEngBuffSize)|| (ToSize > toEngBuffSize)) { if(AllocBuffers(ToSize,FromSize) == NULL) { printf("\nShared Memory Allocation Failed, To Size = %x, From Size = %x, Errno = %x", ToSize, FromSize, errno); #ifdef _DPT_LOGGER // // If this is the logger, release the semaphore // loggerThread_X.ReleaseAccess(); #endif return(ERR_CANNOT_ALLOC_BUFFERS); } } // // Copy over the data from the passed In buffers into our // shared memory buffers // memcpy(ToEngPtr,toEng_P,sizeof(dptBuffer_S) + (uINT)((dptBuffer_S *)toEng_P)->writeIndex); memcpy(FromEngPtr,fromEng_P,sizeof(dptBuffer_S)); // // Set up the message header // HdrBuff.engineTag = EngineTag; HdrBuff.engEvent = (uLONG)event; HdrBuff.targetTag = target; HdrBuff.callerID = p_id; HdrBuff.BufferID = BufferID; HdrBuff.FromEngBuffOffset = fromEngBuffOffset; HdrBuff.timeOut = timeout; HdrBuff.result = 0; // // Set up the proper message type in the buffer header // HdrBuff.MsgID = DestinationKey; // // Send off the message to the engine // if(i = msgsnd(MsgID,(struct msgbuf *)&HdrBuff,MsgDataSize,0) != -1) { // // Set up the alarm if we are timming // EngineMessageTimeout = 0; if(timeout) { alarm((int)timeout); } // // Wait for the return message from the engine // while((i = msgrcv(MsgID,(struct msgbuf *)&HdrBuff,MsgDataSize,p_id,0)) == -1) { // // If we have a timeout, exit the loop // if(EngineMessageTimeout) { Rtnval = ERR_MSGRCV_TIMEOUT; break; } // // if there was an error receiving the message, exit the loop // if(errno != EINTR) { Rtnval = ERR_MSGRCV_FAILED; break; } } //while((i = msgrcv(MsgID,(struct msgbuf *)&HdrBuff,MsgDataSize,p_id,0)) == -1) // // If we were timming, turn off the alarm // if(timeout) { alarm(0); } // // For a failed message receive set up an error code // if(i == -1) { if(Rtnval == ERR_UNSPECIFIED) Rtnval = ERR_MSGRCV_FAILED; HdrBuff.result = 0xff; DeAllocBuffers(); } // // The message received OK, so validate that this is the // message we sent out by checking the engine event and // the shared memory segment // else { if((HdrBuff.engEvent == (uLONG)event)&&(HdrBuff.BufferID == BufferID)) { // // We have a winner, so copy over the returned data // Rtnval = HdrBuff.result; memcpy(fromEng_P,FromEngPtr,sizeof(dptBuffer_S) + (uINT)((dptBuffer_S *)FromEngPtr)->writeIndex); } // // We received the wrong message back. Here we will discard the message // we just received, and wait for the one we sent. If we receive back the // original one we sent, we will have to resend it because of the shared // memory, we can't be sure that the data is valid. // else { EngineMessageTimeout = 0; if(timeout) { alarm((int)timeout); } // // Wait for the original // while((i = msgrcv(MsgID,(struct msgbuf *)&HdrBuff,MsgDataSize,p_id,0)) == -1) { if(EngineMessageTimeout) { Rtnval = ERR_MSGRCV_TIMEOUT; break; } if(errno != EINTR) { Rtnval = ERR_MSGRCV_FAILED; break; } } //while((i = msgrcv(MsgID,(struct msgbuf *)&HdrBuff,MsgDataSize,p_id,0)) == -1) // // Turn off the alarm // if(timeout) { alarm(0); } // // Deallocate the buffers here. This way, the next command will // have a different shared memory segment that can be used as // part of the validation process // DeAllocBuffers(); // // For a failed message receive set up an error code // if(i == -1) { if(Rtnval == ERR_UNSPECIFIED) Rtnval = ERR_MSGRCV_FAILED; HdrBuff.result = 0xff; } // // We received the message back, so lets go back and send it again // else { Done = 0; } } //if((HdrBuff.engEvent == (uLONG)event)&&(HdrBuff.BufferID == BufferID)) else } //if(i == -1) else } //if(i = msgsnd(MsgID,(struct msgbuf *)&HdrBuff,MsgDataSize,0) != -1) else { Rtnval = ERR_MSGSND_FAILED; // printf("\nError sending message in CallAnEngine = %d",errno); } } //while(!Done) #endif /* MESSAGES */ #ifdef NO_MESSAGES Rtnval = DPT_Engine(EngineTag,event,target,fromEng_P,toEng_P,timeout); // // The comm engine will not work with no messaging // #if defined (HAS_COMM_ENGINE) #error This will not work for the comm engine! You must fix it! #endif // has comm #endif /* NO_MESSAGES */ #ifdef _DPT_LOGGER // // If this is the logger, release the semaphore // loggerThread_X.ReleaseAccess(); #endif // // If there was an alarm set on the way in, reset it // if(OldAlarmValue) { alarm(OldAlarmValue); } return(Rtnval); } /*-------------------------------------------------------------------------*/ /* Function DPT_OpenEngine */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed Into This Function */ /* */ /* This Function Should Be Called By An Application Before Any Attempt Is */ /* Made To Access The Engine. A Check For A Running Engine Is Made, And If */ /* No Engine Is Found, The Function Will Try To Load The Engine. If A */ /* Running Engine Is Found, An Open Call Is Made To The Engine. */ /* */ /* Return : See rtncodes.h for explanation of DPT_RTN_T codes. */ /*-------------------------------------------------------------------------*/ uLONG DPT_OpenEngine(void) { uLONG Rtnval; #ifdef MESSAGES int i; int WaitVal; Rtnval = ERR_UNSPECIFIED; /* If The Signal Handler Isn't Set Up Yet, Do So */ if(!SignalSetUp) { if(SetAlarm()) { return(ERR_CANNOT_SET_SIGHANDLER); } SignalSetUp = 1; } /* Check To See If There Is An Engine Out There */ if(MsgID == -1) { MsgID = CheckForEngine(DPT_TurnAroundKey,1,2); } /* If We Didn't Find One, Try To Load It */ if((MsgID == -1)&&(strlen(EngineLoadString))) { if((EngineLoadString[0] == 'Z')&&(EngineLoadString[1] == '\0')) { EnginePathName = FindPath ((CONST char *)EnginePathName, X_OK); if(EnginePathName != NULL) { strcpy(EngineLoadString,EnginePathName); strcat(EngineLoadString, "&"); } else { strcpy(EngineLoadString,EnginePathNameDefault); } } #if defined (_DPT_SOLARIS) || defined (_DPT_MOTIF) i = strlen(EngineLoadString) - 1; if(EngineLoadString[i] == '&') { EngineLoadString[i] = '\0'; } if( !(i = fork()) ) { execle(EngineLoadString,EngineLoadString, 0, environ); _exit(1); } WaitVal = 0; while((WaitVal != i)&&(WaitVal != -1)) { WaitVal = wait(NULL); } #else i = system(EngineLoadString); #endif /* If The system Call Was Successful, Wait For 1 Second And */ /* Check For The Engine Again */ if(i != -1) { for (i = 10; i > 0 && MsgID == -1; --i) { sleep(1); MsgID = CheckForEngine(DPT_TurnAroundKey,1,2); } } } // // If the engine is out there, make an open call */ // if(MsgID != -1) { Rtnval = MessageDPTEngine(DPT_TurnAroundKey,MsgID,ENGMSG_OPEN,2); } #endif /* MESSAGES */ #ifdef NO_MESSAGES Rtnval = DPT_StartEngine(); #endif /* NO_MESSAGES */ return(Rtnval); } /*-------------------------------------------------------------------------*/ /* Function DPT_CloseEngine */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed Into This Function */ /* */ /* This Function Should Be Called When An Application Is Finished With The */ /* Engine. A Close Call Is Made To The Engine, And All Allocated Resources */ /* Are Freed. */ /* */ /* Return : See rtncodes.h for explanation of DPT_RTN_T codes. */ /*-------------------------------------------------------------------------*/ uLONG DPT_CloseEngine(void) { uLONG Rtnval; #ifdef MESSAGES Rtnval = ERR_UNSPECIFIED; /* Make Sure That The Engine Was Properly Opened */ if(MsgID != -1) { /* Make The Close Call */ Rtnval = MessageDPTEngine(DPT_TurnAroundKey,MsgID,ENGMSG_CLOSE,2); /* If This Is The Last Client Closing, We Will Get An Error Of */ /* Message Que Removed Because The Engine Commited Suicide. */ /* Return A Good Status */ # ifndef EIDRM # define EIDRM 82 # endif if(Rtnval == EIDRM) Rtnval = MSG_RTN_COMPLETED; } /* Free Up The Resources */ DeAllocBuffers(); #endif /* MESSAGES */ #ifdef NO_MESSAGES Rtnval = DPT_StopEngine(); #endif /* NO_MESSAGES */ return(Rtnval); } /*-------------------------------------------------------------------------*/ /* Function DPT_CallEngine */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* EngineTag : Engine Tag */ /* event : Event Message To Pass to The Engine */ /* target : Tag Of Target */ /* */ /* This Function Makes The Actual Call to The Engine Through Messaging. */ /* The Pertinant Buffer Information And Data Are Copied To And From The */ /* Shared Memory Buffers That Are Allocated By This Module. */ /* */ /* Return : See rtncodes.h for explanation of DPT_RTN_T codes. */ /*-------------------------------------------------------------------------*/ DPT_RTN_T DPT_CallEngine(DPT_TAG_T EngineTag, DPT_MSG_T event, DPT_TAG_T target, void *fromEng_P, void *toEng_P,uLONG timeout) { /* we just pass this on with the appropriate key */ return DPT_CallAnEngine(DPT_EngineKey, EngineTag, event, target, fromEng_P, toEng_P, timeout); } #if defined (HAS_COMM_ENGINE) && defined (NEW_COMM_ENG) /*-------------------------------------------------------------------------*/ /* Function DPT_OpenCommEng */ /*-------------------------------------------------------------------------*/ /* */ /* This function should be called by an application before any attempt is */ /* made to access the comm engine. A check for a running comm engine is */ /* made, and if no comm engine is found, the function will try to load */ /* one. If a running engine is founf we will place an open call to it. */ /* */ /* If iniFile is not NULL, we will add the INI= option to the load string. */ /* */ /* Return : 0 If Open Is Sucessfull, 1 Otherwise */ /*-------------------------------------------------------------------------*/ uLONG DPT_OpenCommEng(char *iniFile) { uLONG Rtnval = 1; char IniParams[50]; int i; /* If the signal handler isn't set up yet, do so */ if (!SignalSetUp) { if (SetAlarm()) { return(1); } SignalSetUp = 1; } /* Check to see if there is a Comm Engine out there */ if (commMsgID == -1) { commMsgID = CheckForCommEng(DPT_CommEngineKey,1,2); } /* If we didn't find one, try to load it */ if ((commMsgID == -1) && (strlen(CommEngineLoadString))) { if ((CommEngineLoadString[0] == 'Z') && (CommEngineLoadString[1] == '\0')) { CommEnginePathName = FindPath((CONST char *)CommEnginePathName, X_OK); if(CommEnginePathName != NULL) { strcpy(CommEngineLoadString, CommEnginePathName); strcat(CommEngineLoadString, "&"); } else { strcpy(CommEngineLoadString, CommEnginePathNameDefault); } } IniParams[0] = '\0'; /* actually do the load */ #if defined (_DPT_SOLARIS) || defined (_DPT_MOTIF) i = strlen(CommEngineLoadString) - 1; if(CommEngineLoadString[i] == '&') { CommEngineLoadString[i] = '\0'; } if( !(i = fork()) ) { // // DEBUG CODE : For now we will not use the passed in ini // file name because it causes an error // message to be displayed // iniFile = NULL; if (iniFile) { strcpy(IniParams, " INI="); strcat(IniParams, iniFile); execle(CommEngineLoadString,CommEngineLoadString, IniParams, 0, environ); } else { execle(CommEngineLoadString,CommEngineLoadString, 0, environ); } _exit(1); } #else if (iniFile) { char *endP = &(CommEngineLoadString[strlen(CommEngineLoadString)-1]); // "-INI=xxx" strcpy(IniParams, " -INI="); strcat(IniParams, iniFile); strcat(IniParams, " &"); strcat(end_P,IniParams); } i = system(CommEngineLoadString); #endif /* If the system call was successful, wait for 1 second and */ /* check for the Comm Engine again */ if (i != -1) { uLONG waiting = 20; // wait for up to this many seconds while ((commMsgID == -1) && (waiting--)) { //DEBUG - might need this when debugging modem init //printf("\nwaiting for comm eng %d\n", waiting); sleep(1); commMsgID = CheckForCommEng(DPT_CommEngineKey,1,2); } } } /* If we found a Comm Engine, make an open call to the unix Comm Engine */ if (commMsgID != -1) { Rtnval = MessageDPTEngine(DPT_CommEngineKey,commMsgID,ENGMSG_OPEN,2); // for use with the comm server, we need to set msqID to commMsgID // (we can safely do this because we know that the comm engine is running // and that it will have started the engine by now) if (MsgID == -1) { MsgID = commMsgID; } } return(Rtnval); } /*-------------------------------------------------------------------------*/ /* Function DPT_CloseCommEng */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed Into This Function */ /* */ /* This function should be called when an application is finished with the */ /* Comm Engine. A close call is made to the Comm Engine, and all allocated */ /* resources are freed. */ /* */ /* Return : 0 If Close Is Sucessfull, 1 Otherwise */ /*-------------------------------------------------------------------------*/ uLONG DPT_CloseCommEng(void) { uLONG Rtnval = 1; /* Make sure that the comm engine was properly opened */ if (commMsgID != -1) { /* make the close call */ Rtnval = MessageDPTEngine(DPT_CommEngineKey,commMsgID,ENGMSG_CLOSE,2); /* If this is the last client closing, we will get an error of */ /* message que removed because the engine commited suicide. */ /* Return a good status */ if (Rtnval == EIDRM) Rtnval = 0; } /* Free Up The Resources */ DeAllocBuffers(); return(Rtnval); } /*-------------------------------------------------------------------------*/ /* Function DPT_CallCommEng */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* EngineTag : Engine Tag */ /* event : Event Message To Pass to The Engine */ /* target : Tag Of Target */ /* */ /* This Function Makes The Actual Call to The Engine Through Messaging. */ /* The Pertinant Buffer Information And Data Are Copied To And From The */ /* Shared Memory Buffers That Are Allocated By This Module. */ /* */ /* Return : Return Code From DPT_CallEngine */ /*-------------------------------------------------------------------------*/ DPT_RTN_T DPT_CallCommEng(DPT_TAG_T EngineTag, DPT_MSG_T event, DPT_TAG_T target, void *fromEng_P, void *toEng_P,uLONG timeout) { /* we just pass this on with the appropriate key */ return DPT_CallAnEngine(DPT_CommEngineKey, EngineTag, event, target, fromEng_P, toEng_P, timeout); } #endif // has comm, new comm /*-------------------------------------------------------------------------*/ /* Function DPT_IsEngineAlive */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed Into This Function */ /* */ /* This function should be called when an application wants to determine */ /* if the engine is still alive. It should only be called after a */ /* sucessfull call to DPT_OpenEngine has been made. This function should */ /* probably be used for a timeout situation. */ /* */ /* Return : 1 if engine is alive, 0 otherwise */ /*-------------------------------------------------------------------------*/ uLONG DPT_IsEngineAlive(void) { uLONG Rtnval = 0; if(DptEnginePid) { if(kill((pid_t)DptEnginePid,0) == 0) { Rtnval = 1; } } return(Rtnval); } #ifdef MESSAGES /*-------------------------------------------------------------------------*/ /* Function AllocBuffers */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* toEngSize : Size Of The To Engine Data Buffer */ /* fromEngSize : Size Of The from Engine Data Buffer */ /* */ /* This Function Will Allocate The Shared Memory Buffers */ /* */ /* Return : Pointer To The Attached Shared Memory, 0 If Failure */ /*-------------------------------------------------------------------------*/ char *AllocBuffers(uLONG toEngSize, uLONG fromEngSize) { struct shmid_ds shm_buff; /* If There Is Currently A Shared Memory Segment Set Up, DeAllocate It */ DeAllocBuffers(); /* Set Up The New inBuff And outBuff Sizes */ toEngBuffSize = toEngSize; toEngTotalSize = toEngSize + sizeof(dptBuffer_S); #if defined (_DPT_STRICT_ALIGN) // alignment if (toEngTotalSize & 0x03) { toEngTotalSize += 4; toEngTotalSize &= ~0x03; } #endif fromEngBuffSize = fromEngSize; fromEngTotalSize = fromEngSize + sizeof(dptBuffer_S); fromEngBuffOffset = toEngTotalSize; /* Get The Shared Memory Segment */ BufferID = shmget(IPC_PRIVATE,(int)(toEngTotalSize + fromEngTotalSize), SHM_ALLRD | SHM_ALLWR | IPC_CREAT); /* If We Got The Segment, Try To Attach To It */ if(BufferID != -1) { SharedMemoryPtr = (char *)shmat(BufferID,0,0); /* The Attach Failed, So DeAllocate The Shared Memory */ if((int)SharedMemoryPtr == -1) { shmctl(BufferID,IPC_RMID,&shm_buff); SharedMemoryPtr = NULL; toEngBuffSize = 0; toEngTotalSize = 0; fromEngBuffSize = 0; fromEngTotalSize = 0; fromEngBuffOffset = 0; } else { ToEngPtr = SharedMemoryPtr; FromEngPtr = SharedMemoryPtr + fromEngBuffOffset; } } /* Could Not Get The Segment */ else { SharedMemoryPtr = NULL; // printf("\n errno = %d\ntoEngTotalSize= %lu \nfromEngTotalSize= %lu", errno,toEngTotalSize,fromEngTotalSize); } return(SharedMemoryPtr); } /*-------------------------------------------------------------------------*/ /* Function DeAllocBuffers */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed In To This Function */ /* */ /* This Function Will DeAllocate The Shared Memory Buffers */ /* */ /* Return : None */ /*-------------------------------------------------------------------------*/ void DeAllocBuffers(void) { struct shmid_ds shm_buff; if(BufferID != -1) { if(SharedMemoryPtr != NULL) shmdt(SharedMemoryPtr); shmctl(BufferID,IPC_RMID,&shm_buff); BufferID = -1; } SharedMemoryPtr = NULL; toEngBuffSize = 0; toEngTotalSize = 0; fromEngBuffSize = 0; fromEngTotalSize = 0; fromEngBuffOffset = 0; } /*-------------------------------------------------------------------------*/ /* Function DptSignalHandler */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed To This Function */ /* */ /* This Function Is The Signal Handler. It Is Called By The System When */ /* The Alarm Goes Off. Currently All It Does Is Set The Timeout Flag */ /* */ /* Return : None */ /*-------------------------------------------------------------------------*/ void DptSignalHandler(int SignalToHandle) { #ifdef MESSAGES // // We only want to set up a timeout if the signal was the alarm // if(SignalToHandle == SIGALRM) { EngineMessageTimeout = 1; } #endif /* MESSAGES */ } /*-------------------------------------------------------------------------*/ /* Function SetAlarm */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed In To This Function */ /* */ /* This Function Will */ /* */ /* Return : 0 if alarm set OK, error code othrewise */ /*-------------------------------------------------------------------------*/ int SetAlarm(void) { struct sigaction sig; int Rtnval = 0; /* if the signalling has already been setup, don't do it again */ /* (change mad to accomodate the comm engine */ if(SignalSetUp) { return Rtnval; } /* Initialize The Signaling */ memset((void *)&sig,0,sizeof(sig)); #if defined ( _DPT_SCO ) || defined ( _DPT_AIX ) || defined(_DPT_BSDI ) || defined(_DPT_FREE_BSD ) || defined( _DPT_LINUX ) sig.sa_handler = (void (*)(int))DptSignalHandler; #elif defined ( _DPT_SOLARIS ) sig.sa_handler = (void (*)(int))DptSignalHandler; #elif defined ( _DPT_UNIXWARE ) //DEBUG CODE : UnixWare 7 // sig.sa_handler = (void (*)())DptSignalHandler; sig.sa_handler = (void (*)(int))DptSignalHandler; #elif defined ( _DPT_DGUX ) sig.sa_handler = (void (*)_PROTO_ARGS((int)))DptSignalHandler; #elif defined ( SNI_MIPS ) sig.sa_handler = (void (*)())DptSignalHandler; #else #error Define this for your OS #endif // // Set up to catch the alarm signal for message timeouts // if(sigaction(SIGALRM,&sig,0) == -1) { Rtnval = 1; } // // We were having problems with a broken pipe signal when a remote // connection to NetWare was broken. This caused the comm engine // to core dump. We will now set up to catch it, but we don't have // to do anything with it in the interrupt routine. // if(sigaction(SIGPIPE,&sig,0) == -1) { Rtnval = 1; } return(Rtnval); } /*-------------------------------------------------------------------------*/ /* Function SetEngineLoadPath */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* PathName : Path To Try To Load Engine */ /* */ /* This Function Set The Load Path For The Engine */ /* */ /* Return : NONE */ /*-------------------------------------------------------------------------*/ void SetEngineLoadPath(char *PathName) { if(PathName != NULL) { strcpy(EngineLoadString,PathName); strcat(EngineLoadString," &"); } else EngineLoadString[0] = '\0'; } #endif /* MESSAGES */ #ifdef __cplusplus } /* extern c */ #endif #if (defined(DPT_DEBUG)) //------------------------------------------------------------------------- // Function I2oPrintMem //------------------------------------------------------------------------- // The Parameters Passed To This Function Are : // Addr : Far Address To Be Dumped // Count : Number Of Bytes To Dump // // This Function Dumps Memory To The Screen For Debug Purposes // // Return : NONE //------------------------------------------------------------------------- void I2oPrintMem(char* Addr,long Count) { uLONG Offset,i; Offset = 0; // Loop For Count Bytes while(Offset < Count) { // Print Out The Address In HEX printf("\n%.4x ",Offset); // Now Print Out 16 Bytes In HEX Format for(i = 0; i < 16; ++i) { if(Offset + i >= Count) { printf(" "); } else { printf("%.2x ",Addr[Offset + i] & 0x0ff); } if(i == 7) { printf("- "); } } // Print Out The Same 16 Bytes In ASCII Format printf(" "); for(i = 0; i < 16; ++i) { if(Offset + i >= Count) { break; } if((Addr[Offset + i] > 0x1F)&&(Addr[Offset + i] < 0x7F)) { printf("%c",Addr[Offset + i]); } else { printf("."); } } // Bump The Offset By 16 And Check For Scrolling Past Screen Offset += 16; } } #endif // DPT_DEBUG raidutils-0.0.6.orig/lib/engmsg.c0000664000175000000620000003377510044153307016546 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /*File - ENGMSG.C */ /*****************************************************************************/ /* */ /*Description: */ /* This Module Contains Those Functions Functions That Allow An */ /* Application To Send The Turn Arround Type Of Messages To The */ /* DPT Engine. */ /* */ /*Author: Bob Pasteur */ /*Date: */ /* */ /*Editors: */ /* */ /*Remarks: */ /* */ /*****************************************************************************/ /*Include Files -------------------------------------------------------------*/ #include #include #include #include #include #include #include #include #include "osd_util.h" #include "eng_std.h" #include "rtncodes.h" #include "messages.h" #include "osd_unix.h" #ifdef __cplusplus extern "C" { #endif #include #include "lockunix.h" #ifdef _DPT_LOGGER #include "sem.hpp" extern MuxEvent_C loggerThread_X; #endif uLONG DptEnginePid = 0; /*-------------------------------------------------------------------------*/ /* Function MessageDPTEngine */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* EngineMsgKey : Unique Engine Message Queue Identifier */ /* msqID : Engine Message Queue ID */ /* EngineMessage : Message To Be Sent To The Engine */ /* SecondsToWait : Time In Seconds To Wait Before A Timeout */ /* */ /* This Function Will Send Off A Turnarround Type Message To The Passed In */ /* Message Queue. This Function Assumes That The Alarm Signal Has Been Set */ /* Up Already By The Caller. */ /* */ /* Return : 0 For Success, Error Value Otherwise */ /*-------------------------------------------------------------------------*/ int MessageDPTEngine(int EngineMsgKey,int msqID,int EngineMessage, int SecondsToWait) { MsgHdr HdrBuff; int p_id,i,Rtnval,OldAlarm; int Done; Rtnval = 1; // // Save off the process id of this client and any old alarm value // p_id = (int)getpid(); OldAlarm = alarm(0); #ifdef _DPT_LOGGER // // If this is the logger, we have to semaphore commands sent to the engine // due to the threading put into the logger // loggerThread_X.GainAccess(); #endif // // Loop through until we have received the message we sent out or an // error has occured // Done = 0; while(!Done) { Done = 1; // // If there are any messages on the queue with a type of our process ID, // they must be failed retries or some other error condition, so pull // them off and discard them // i = msgrcv(msqID,(struct msgbuf *)&HdrBuff,MsgDataSize,p_id,IPC_NOWAIT); while(i != -1) { i = msgrcv(msqID,(struct msgbuf *)&HdrBuff,MsgDataSize,p_id,IPC_NOWAIT); } // // Set up the turnaround message, the engineTag,targetTag,and callerID are // all set to the pid of the process // HdrBuff.engineTag = p_id; HdrBuff.engEvent = EngineMessage; HdrBuff.targetTag = p_id; HdrBuff.callerID = p_id; HdrBuff.BufferID = 0; HdrBuff.FromEngBuffOffset = 0; HdrBuff.result = 0; // Set up the passed in message type HdrBuff.MsgID = EngineMsgKey; // // Send off the message to the engine // if(i = msgsnd(msqID,(struct msgbuf *)&HdrBuff,MsgDataSize,0) != -1) { // // Let's set up a little loop here receiving messages in case // we get a "dead" message back, we will throw it away and // continue to wait for the one we sent. // while(i != -1) { // // Set the alarm // alarm(SecondsToWait); // // Wait for the message to come back from the engine // i = msgrcv(msqID,(struct msgbuf *)&HdrBuff,MsgDataSize,p_id,0); // // Clear thr alarm after the receive // alarm(0); // // If this is our boy, break out of the loop // if((i != -1)&&(HdrBuff.engEvent == EngineMessage)) { break; } } // // If the receive returned an error, we will return the error // if(i == -1) { Rtnval = errno; } // // The message returnde OK, so try to validate it // else { // // If the message type we sent is the one we got back, // we will assume that this is the one we sent. // if(HdrBuff.engEvent == EngineMessage) { Rtnval = 0; // // If we havent gotten the engine's process ID yet and this // is an open message, save off the engine pid // if((!DptEnginePid)&&(EngineMessage == ENGMSG_OPEN)) { DptEnginePid = HdrBuff.callerID; } } //if(HdrBuff.engEvent == EngineMessage) // // The message we received was not the one we sent, so loop // around and send it again // else { Done = 0; } } //if(i == -1) else } //if(i = msgsnd(msqID,(struct msgbuf *)&HdrBuff,MsgDataSize,0) != -1) //else printf("\nError Sending message in MessageDPTEngine = %d",errno); } //while(!Done) #ifdef _DPT_LOGGER // // Release the logger semaphore // loggerThread_X.ReleaseAccess(); #endif // // Restore the original timmer value on the way out // if(OldAlarm) { alarm(OldAlarm); } return(Rtnval); } /*-------------------------------------------------------------------------*/ /* Function CheckForEngine */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* EngineMsgKey : Unique Engine Message Queue Identifier */ /* */ /* This Function Checks For The Presence Of A Messageing Engine Of The */ /* Type That Has The Passed In Message ID. This Function Assumes That The */ /* Alarm Signal Has Been Set Up Already By The Caller. */ /* */ /* Return : Message Queue ID if Found, -1 Otherwise */ /*-------------------------------------------------------------------------*/ int CheckForEngine(int EngineMsgKey,int Clear,int SecondsToWait) { int msqID = -1; struct msqid_ds CtlBuf; int i; int LoopCount; MsgHdr HdrBuff; int p_id,OldAlarm; /* If No Timeout Is Set Up, Set It To 1 Second */ if(!SecondsToWait) SecondsToWait = 2; /* Try To Get The Unique Message Que Of This ID */ // need to get ENGINE's q - old code -> msqID = msgget(EngineMsgKey, ... msqID = msgget(DPT_EngineKey, MSG_ALLRD | MSG_ALLWR); /* If There Is One Out There, Try To Send A Message To It */ if(msqID != -1) { i = MessageDPTEngine(EngineMsgKey,msqID,ENGMSG_ECHO,SecondsToWait); /* If The Message Fails, do some more checking before we fail it */ if(i) { /* Set Up The Header, Engine Tag == Target Tag = Caller ID = ComEngineP_ID */ /* For A Turn Around Engine Message */ p_id = (int)getpid(); HdrBuff.engineTag = p_id; HdrBuff.engEvent = ENGMSG_ECHO; HdrBuff.targetTag = p_id; HdrBuff.callerID = p_id; HdrBuff.BufferID = 0; HdrBuff.FromEngBuffOffset = 0; HdrBuff.result = 0; /* Set Up The Proper Message Type In The Buffer Headers */ HdrBuff.MsgID = EngineMsgKey; // // Set up a loop for about a minute to wait for the echo message to // come back if we determine that engine is out there // LoopCount = 60 / SecondsToWait; while(LoopCount--) { // // Is the engine locked?? // if(IsLock("dpteng")) { /* Set Up The Timeout, And Save Off Any Current Timmer Value */ OldAlarm = alarm(SecondsToWait); /* Wait For The Return Messages */ i = msgrcv(msqID,(struct msgbuf *)&HdrBuff, MsgDataSize,p_id,0); /* Restore The Original Timmer Value On The Way Out */ alarm(OldAlarm); // // If the receive fails, continue looping // if(i == -1) { continue; } // // The receive was successful, so return a found status // else { return(msqID); } } // // Engine isn't there, exit the loop // else { break; } } // // At this point, we assume the engine is not loaded so clear // out the message queue if they want us to // if(Clear) msgctl(msqID,IPC_RMID,&CtlBuf); msqID = -1; } } return(msqID); } /*-------------------------------------------------------------------------*/ /* Function CheckForCommEng */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* EngineMsgKey : Unique Engine Message Queue Identifier */ /* */ /* This function checks for the presence of a messaging engine of the */ /* type that has the passed in message ID. This function assumes that the */ /* alarm signal has been set up already by the caller. */ /* */ /* Return : Message Queue ID if Found, -1 Otherwise */ /*-------------------------------------------------------------------------*/ int CheckForCommEng(int EngineMsgKey,int Clear,int SecondsToWait) { int msqID = -1; int i; /* If No Timeout Is Set Up, Set It To 1 Second */ if(!SecondsToWait) SecondsToWait = 1; /* Try To Get The Unique Message Que Of This ID */ /* (we need to look for the ENGINE's msq) */ msqID = msgget(DPT_EngineKey, MSG_ALLRD | MSG_ALLWR); /* If There Is One Out There, Try To Send A Message To It */ if(msqID != -1) { i = MessageDPTEngine(EngineMsgKey,msqID,ENGMSG_ECHO,SecondsToWait); /* If The Message Fails, just set msgID to -1 */ /* (Since the queue belongs to the engine we can't delete it) */ if(i) { msqID = -1; // return -1 to indicate no other engine } } return(msqID); } #ifdef __cplusplus } /* extern C */ #endif raidutils-0.0.6.orig/lib/findpath.c0000664000175000000620000004216010044153307017047 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 12/11/98 * ***************************************************************************** * * File Name: findpath.c * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * *****************************************************************************/ #if (defined(__cplusplus)) extern "C" { #endif /*** INCLUDES ***/ /* #include "osd_defs.h" */ #include "findpath.h" #include #include #if defined(__bsdi__) || defined(_DPT_BSDI) # include #else # include #endif #include #include // Mark S. to investigate //#include #if (!defined(DEFAULT_PATH)) # if (defined(_DPT_UNIXWARE) || defined ( _DPT_DGUX )) # define DEFAULT_PATH ".:/var/dpt:/opt/SUNWhwrdg:/opt/SUNWhwrdc:/usr/dpt:/usr/lpp/dpt:/opt/dpt/lib" # elif (defined(_DPT_AIX)) # define DEFAULT_PATH ".:/usr/lpp/dpt:/var/dpt:/opt/SUNWhwrdg:/opt/SUNWhwrdc:/usr/dpt:/opt/dpt/lib" # elif (defined (SNI_MIPS)) # define DEFAULT_PATH ".:/opt/dpt/lib:/usr/lpp/dpt:/var/dpt:/opt/SUNWhwrdg:/opt/SUNWhwrdc:/usr/dpt" # elif (defined (_DPT_SOLARIS)) # define DEFAULT_PATH ".:/opt/SUNWhwrdg:/opt/SUNWhwrdc:/opt/dpt/lib:/usr/lpp/dpt:/var/dpt:/usr/dpt" # elif (defined (_DPT_WIN32) || defined (_WIN32)) # define DEFAULT_PATH ".;\\dptmgr;\\usr\\dpt;\\opt\\dpt;\\opt\\dpt\\lib;\\usr\\lpp\\dpt;\\var\\dpt" # else # define DEFAULT_PATH ".:/usr/dpt:/opt/SUNWhwrdg:/opt/SUNWhwrdc:/opt/dpt/lib:/usr/lpp/dpt:/var/dpt" # endif /* _DPT_UNIXWARE else */ #endif /* !DEFAULT_PATH */ #if (!defined(SEPARATOR)) # if (defined(_DPT_UNIXWARE) || defined(_DPT_DGUX) || defined(_DPT_AIX) || defined(_SNI_MIPS) || defined(_DPT_SOLARIS) || defined(unix)) # define SEPARATOR ":" # elif (defined(_DPT_WIN32) || defined(_WIN32) || defined(__MWERKS__)) # define SEPARATOR ";" # endif #endif /* !SEPARATOR */ #if (!defined(DIRECTORY_SEPARATOR)) # if (defined(_DPT_UNIXWARE) || defined(_DPT_DGUX) || defined(_DPT_AIX) || defined(_SNI_MIPS) || defined(_DPT_SOLARIS) || defined(unix) || defined(__unix__) || defined(UNIX)) # define DIRECTORY_SEPARATOR "/" # elif (defined(_WIN32) || defined(__MWERKS__)) # define DIRECTORY_SEPARATOR "\\" # endif #endif /* !SEPARATOR */ #if (!defined(STATIC)) # define STATIC static #endif #if (!defined(EXTERN)) # define EXTERN extern #endif /*** PROTOTYPES ***/ STATIC char * Strcat (char * left, CONST char * right); STATIC char * DirName (CONST char * left); STATIC char * BaseName (CONST char * left); STATIC int fileAccess (CONST char * file, int mode); STATIC char * Strtok(const char * string, const char * sepset); /*** STATIC DATA ***/ STATIC CONST char DefaultPath[] = DEFAULT_PATH; STATIC CONST char Separator[] = SEPARATOR; STATIC char DirectorySeparator[] = DIRECTORY_SEPARATOR; /*** EXTERNAL DATA ***/ EXTERN char ** Argv; #if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 0x8000)) char ** Argv; main(int argc, char ** argv) { Argv=argv; FindPath(argv[1], X_OK); exit (0); } #endif /*** PROCEDURES ***/ /* Allocate a new structure to hold old information */ STATIC char * Strcat (char * left, CONST char * right) { int zero = 0; unsigned size; if ((right == (char *)NULL) || (*right == '\0') || ((left = (char *)((zero = (left == (char *)NULL)) ? malloc (size = strlen(right) + 1) : realloc (left, size = strlen(left) + strlen(right) + 1)) ) == (char *)NULL)) { return (left); } if (zero) { memset (left, 0, size); } return (strcat (left, right)); } /* Find the base name of the supplied string */ STATIC char * DirName (CONST char * left) { char * retVal; if ((retVal = (char *)left) != (char *)NULL) { char * cp = retVal + strlen(retVal); unsigned size; while ((--cp >= left) && (*cp != '/') && (*cp != '\\') && (*cp != ':')) { continue; } if (cp >= left) { DirectorySeparator[0] = *cp; } if ((size = (unsigned)(cp - left) + 2) <= 1) { return ((char *)NULL); } if ((retVal = (char *)malloc (size)) != (char *)NULL) { ((char *)memcpy (retVal, left, size - 1))[size - 1] = '\0'; } } return (retVal); } /* Find the file name of the supplied string */ STATIC char * BaseName (CONST char * left) { char * retVal; # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr,"BaseName(\"%s\")", left); # endif if ((retVal = (char *)left) != (char *)NULL) { unsigned size; char * cp = retVal + (size = strlen(retVal)); while ((--cp >= left) && (*cp != '/') && (*cp != '\\') && (*cp != ':')) { continue; } if (cp >= left) { DirectorySeparator[0] = *cp; } if (size <= (unsigned)(++cp - left)) { # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr,"=NULL\r\n"); # endif return ((char *)NULL); } size -= (unsigned)(cp - left) - 1; if ((retVal = (char *)malloc (size)) != (char *)NULL) { ((char *)memcpy (retVal, cp, size - 1))[size - 1] = '\0'; } } # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr,"=\"%s\"\r\n", retVal); # endif return (retVal); } /* * Since findpath is only concerned with filenames, and not directories, * we have a special version of access we use here to ensure that there * is nothing `special' about the file referenced. */ STATIC int fileAccess (CONST char * file, int mode) { struct { struct stat s; unsigned short x; /* Packing affects struct stat size */ } fileStat; int retVal; /* If we can't stat it, we can access it ... */ if ((retVal = stat (file, &fileStat.s)) < 0) { return (retVal); } /* Older UNIXiii and libraries may not have this defined */ # if (!defined(S_ISREG)) # define S_ISREG(mode) (mode&S_IFREG) # endif if (S_ISREG(fileStat.s.st_mode) == 0) { return (1); } return (access (file, mode)); } /*LINTLIBRARY*/ /* * uses strpbrk and strspn to break string into tokens on * sequentially subsequent calls. returns NULL at end. * This one differs from the library routine by not destroying * the contents of the parameters. */ STATIC char * Strtok(const char * string, const char * sepset) { register char *p, *q, *r; static char *savept; static char *hold; if(hold != NULL) { free(hold); hold = NULL; } if(string == NULL) p = savept; else p = (char *)string; if(p == NULL) return(NULL); q = p + strspn(p, sepset); if(*q == '\0') return(NULL); if((r = strpbrk(q, sepset)) == NULL) savept = 0; else { hold = (char *)malloc ((unsigned)(r - q) + 1); if (hold) { p = r + strspn(r, sepset); savept = (p > r)? p: r+1; (void)memcpy (hold, q, (unsigned)(r - q)); hold[r - q] = '\0'; q = hold; } else { /* NOTREACHED */ *r = '\0'; p = r + strspn(r, sepset); savept = (p > r)? ++p: ++r; } } return(q); } /* * Workhorse to find a path with a specific search string. */ char * FindPathWithSearch(CONST char * file, int mode, CONST char * search) { char * Name; # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr,"FindPathWithSearch(\"%s\",%x,\"%s\")\r\n", file, mode, search); # endif /* Only a directory ... */ if ((Name = BaseName(file)) == (char *)NULL) { # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr,"FindPathWithSearch=NULL\r\n"); # endif return (NULL); } if (search != (CONST char *)NULL) { char * token; char * path = (char *)search; if (file[0] != DirectorySeparator[0]) { /* See if directory relative access works */ while ( # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr,"Strtok(%s%s%s,\"%s\")\r\n", path?"\"":"",path?path:"NULL",path?"\"":"", Separator), # endif (token = Strtok (path, Separator)) != (char *)NULL) { if (((path = Strcat (NULL, token)) != (char *)NULL) && ((path[strlen(path) - 1] == DirectorySeparator[0]) || ((path = Strcat (path, (CONST char *)DirectorySeparator)) != (char *)NULL)) && ((path = Strcat (path, file)) != (char *)NULL)) { # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr, "Try \"%s\"\r\n", path); # endif if (fileAccess (path, mode) == 0) { free (Name); # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr, "FindPathWithSearch=\"%s\"\r\n", path); # endif return (path); } free (path); } /* Strtok likes this ... */ path = (char *)NULL; } path = (char *)search; } /* See if basename access works */ while ((token = Strtok (path, Separator)) != (char *)NULL) { if (((path = Strcat (NULL, token)) != (char *)NULL) && ((path[strlen(path) - 1] == DirectorySeparator[0]) || ((path = Strcat (path, (CONST char *)DirectorySeparator)) != (char *)NULL)) && ((path = Strcat (path, Name)) != (char *)NULL)) { # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr,"Try \"%s\"\r\n", path); # endif if (fileAccess (path, mode) == 0) { free (Name); # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr,"FindPathWithSearch=\"%s\"\r\n", path); # endif return (path); } free (path); } path = (char *)NULL; /* Strtok likes this ... */ } } free (Name); # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr,"FindPathWithSearch=NULL\r\n"); # endif return (NULL); } char * AddSearch(char * searchLeft, CONST char * searchRight) { if ((searchRight != (char *)NULL) && (searchRight[0] != '\0')) { if (searchLeft != (char *)NULL) { searchLeft = Strcat (searchLeft, Separator); } searchLeft = Strcat (searchLeft, searchRight); } # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr, "search=\"%s\"\n", searchLeft); # endif return searchLeft; } /* AddSearch - end */ char * AddSearchArgv(char * search) { # if (defined(_DPT_UNIXWARE) || defined(_DPT_DGUX) || defined(_DPT_AIX) || defined(_SNI_MIPS) || defined(_DPT_SOLARIS) || defined(_NEXT_SOURCE) || defined(unix) || defined(__unix__) || defined(UNIX) || defined(__linux__)) char * _localArgv[2]; #endif char ** localArgv; # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr, "SearchArgv(\"%s\")\n", search); # endif # if (defined(_DPT_UNIXWARE) || defined(_DPT_DGUX) || defined(_DPT_AIX) || defined(_SNI_MIPS) || defined(_DPT_SOLARIS) || defined(_NEXT_SOURCE) || defined(unix) || defined(__unix__) || defined(UNIX) || defined(__linux__)) # if (defined (_DPT_SOLARIS)) if (((localArgv = Argv) == (char **)NULL) || (localArgv[0] == (char *)NULL) || (localArgv[0][0] == '\0')) { extern char ** ___Argv; Argv = ___Argv; } # elif (defined (_NEXT_SOURCE)) if (((localArgv = Argv) == (char **)NULL) || (localArgv[0] == (char *)NULL) || (localArgv[0][0] == '\0')) { extern char ** NXArgv; Argv = NXArgv; } # else /* Universal UNIX means of acquiring our command line */ if (((localArgv = Argv) == (char **)NULL) || (localArgv[0] == (char *)NULL) || (localArgv[0][0] == '\0')) { static char _grep[] = "/usr/bin/grep"; char * grep = _grep; static char _ps[] = "/usr/bin/ps"; char * ps = _ps; # if (defined(_DPT_SCO)) static char command[] = "%s -lf|%s ' %d '"; # else static char command[] = "%s -l|%s ' %d '"; # endif char * buffer; localArgv = (char **)NULL; if (fileAccess (grep, X_OK)) { grep += 4; } if (fileAccess (ps, X_OK)) { ps += 4; } if ((buffer = (char *)malloc (sizeof(command) - 6 + 10 + strlen(ps) + strlen(grep))) != (char *)NULL) { FILE * fp; sprintf (buffer, command, ps, grep, getpid()); if ((fp = popen (buffer, "r")) != (FILE *)NULL) { free (buffer); buffer = (char *)malloc(512); while (fgets (buffer, 512, fp)) { char * cp = buffer; while (*cp && (*cp != '\r') && (*cp != '\n')) ++cp; *cp = '\0'; while (--cp > buffer) { if ((cp[0] == ':') && ('0' <= cp[1]) && (cp[1] <= '5') && ('0' <= cp[2]) && (cp[2] <= '9')) { break; } } if (*cp == ':') { cp += 3; /* Parse out argument 0 */ while ((*cp == ' ') || (*cp == '\t')) { ++cp; } cp = strcpy (buffer, cp); while (*cp && (*cp != ' ') && (*cp != '\t')) { ++cp; } *cp = '\0'; _localArgv[0] = buffer; _localArgv[1] = NULL; localArgv = _localArgv; break; } } pclose (fp); if (localArgv == (char **)NULL) { free (buffer); } } else { free (buffer); } } } # endif /* If we still don't have the command line, acquire it from the shell */ if ((localArgv == (char **)NULL) || (localArgv[0] == (char *)NULL) || (localArgv[0][0] == '\0')) { int length; /* This works for zsh, ksh and bash */ if (((_localArgv[0] = getenv ("_")) != (char *)NULL) && ((length = strlen(_localArgv[0])) > 1) && (strcmp (_localArgv[0] + length - 2, "sh") != 0)) { _localArgv[1] = NULL; localArgv = _localArgv; } } # else /* !UNIX */ localArgv = Argv; # endif # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr, "localArgv=%p localArgv[0]=%p=\"%s\"\n", localArgv, (localArgv)?localArgv[0]:NULL, (localArgv)?localArgv[0]:NULL); # endif if (localArgv != (char **)NULL) { /* Search execute directory */ char * execute = DirName ((CONST char *)localArgv[0]); # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr, "DirName(\"%s\")=\"%s\"\n", localArgv[0], execute); # endif if (execute != (char *)NULL) { search = AddSearch(search, execute); free (execute); } # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr, "Argv search=\"%s\"\n", search); # endif } # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr, "AddSearchArgv()=\"%s\"\n", search); # endif return search; } /* AddSearchArgv - end */ char * FindPath (CONST char * file, int mode) { char * SearchPath; char * Name; # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr, "FindPath(\"%s\",%x)\n", file, mode); # endif /* First determine the search paths */ SearchPath = DirName(file); /* Search path if originally supplied */ # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr, "SearchPath=\"%s\"\n", SearchPath ? SearchPath : "(null)"); # endif SearchPath = AddSearchArgv(SearchPath); # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr, "SearchPath=\"%s\"\n", SearchPath ? SearchPath : "(null)"); # endif SearchPath = AddSearch(SearchPath, DefaultPath); # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr, "SearchPath=\"%s\"\n", SearchPath ? SearchPath : "(null)"); # endif SearchPath = AddSearch(SearchPath, getenv("DPTPATH")); # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr, "DPTPATH SearchPath=\"%s\"\n", SearchPath); # endif SearchPath = AddSearch(SearchPath, getenv("PATH")); # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 2)) fprintf (stderr, "PATH SearchPath=\"%s\"\n", SearchPath); # endif /* Now that we have the search paths, lets search for the specified file */ Name = FindPathWithSearch (file, mode, (CONST char *)SearchPath); free (SearchPath); if (Name != (char *)NULL) { return (Name); } if ((Name = BaseName(file)) == (char *)NULL) { return (NULL); } /* Check current directory */ if (fileAccess (Name, mode) == 0) { # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr, "Return \"%s\"\n", Name); # endif return (Name); } free (Name); # if (defined(DEBUG_FINDPATH) && (DEBUG_FINDPATH & 1)) fprintf (stderr, "None Found\n"); # endif return (NULL); } #if (defined(__cplusplus)) } #endif raidutils-0.0.6.orig/lib/funcs.c0000664000175000000620000003660510044153307016377 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /*File - FUNCS.C */ /*****************************************************************************/ /* */ /*Description: */ /* This Function Contains Miscalaneous Functions Used By The Unix */ /* Applications, Including Some Of The Library Calls That Are Found */ /* In DOS, But Not In Unix. */ /* */ /*Author: Bob Pasteur */ /*Date: */ /* */ /*Editors: */ /* */ /*Remarks: */ /* */ /* */ /*****************************************************************************/ /*Include Files -------------------------------------------------------------*/ #include #include #include #include #ifndef __MSDOS__ #include #endif #include #include "osd_util.h" #include "eng_std.h" #ifdef __cplusplus extern "C" { #endif #if defined(__UNIX__) || defined (_DPT_UNIX) /*-------------------------------------------------------------------------*/ /* Function strupr */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* String : String To Be Converted */ /* */ /* This Function Converts The Passed In String To All Upper Case */ /* */ /* Return : Pointer To The String */ /*-------------------------------------------------------------------------*/ char *strupr( char *String ) { int i; i = 0; while(String[i] != '\0') { String[i] = toupper(String[i]); ++i; } return(String); } /*-------------------------------------------------------------------------*/ /* Function strlwr */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* String : String To Be Converted */ /* */ /* This Function Converts The Passed In String To All lower Case */ /* */ /* Return : Pointer To The String */ /*-------------------------------------------------------------------------*/ char *strlwr( char *String ) { int i; i = 0; while(String[i] != '\0') { String[i] = tolower(String[i]); ++i; } return(String); } /*-------------------------------------------------------------------------*/ /* Function stricmp */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* String1 : First String To Be Compared */ /* String2 : Second String To Be Compared */ /* */ /* This Function Will Do A Case InSensitive Compare on The Two Strings */ /* Passed In. */ /* */ /* Return : 0 If Strings Compare OK */ /* Positive Value If String 1 Is Greater Than String 2 */ /* Negative Value If String 2 Is Greater Than String 1 */ /*-------------------------------------------------------------------------*/ int stricmp(char *String1, char *String2) { int Len1, Len2, Rtnval, i; Len1 = strlen(String1); Len2 = strlen(String2); /* Make Sure Lengths Are The Same */ if(Len1 != Len2) { /* String Two Shorter */ if(Len1 > Len2) Rtnval = 1; /* String One Shorter */ else Rtnval = -1; } /* Lengths Are The Same, So Do The Conversions And Compares */ else { for(i = 0; i < Len1; ++i) { if(toupper(String1[i]) != toupper(String2[i])) break; } /* If The Compares Failed, Calculate The Return Value */ if(i < Len1) Rtnval = String1[i] - String2[i]; else Rtnval = 0; } return(Rtnval); } /*-------------------------------------------------------------------------*/ /* Function strnicmp */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* String1 : First String To Be Compared */ /* String2 : Second String To Be Compared */ /* maxlen : maximum number of characters to compare */ /* */ /* This Function Will Do A Case InSensitive Compare on The Two Strings */ /* Passed In. */ /* */ /* Return : 0 If Strings Compare OK */ /* Positive Value If String 1 Is Greater Than String 2 */ /* Negative Value If String 2 Is Greater Than String 1 */ /*-------------------------------------------------------------------------*/ int strnicmp(char *s1, char *s2, int maxlen) { /* scan through strings, looking for difference */ while ((maxlen > 0) && (*s1 != '\0')) { /* compare the strings */ if (toupper(*s1) != toupper(*s2)) return (*s2 - *s1); /* loop */ maxlen--; if (maxlen > 0) { s1++; s2++; } } if (toupper(*s1) != toupper(*s2)) return (*s2 - *s1); /* return final result */ else return(0); } /*Function - strnset - start ============================================================================= Description: sets n elements of str_P to the character c Parameters: char *, char, int Return Value: char * Global Variables Affected: Remarks: (Side effects, Assumptions, Warnings...) if (strlen(str_P) < n) n = strlen(str_P) ----------------------------------------------------------------------------- */ char * strnset(char *str_P, char c, int n) { if (strlen(str_P) < n) n = strlen(str_P); n--; while(n > -1) str_P[n--] = c; return(str_P); } /* - end */ /*Function - strcmpi - start ============================================================================= Description: Comapres two strings to see if they are the same, not case sensetive Parameters: Return Value: 0 is s1 == s1, > 0 if s1 > s2, < 0 id s1 < s2 Global Variables Affected: Remarks: (Side effects, Assumptions, Warnings...) ----------------------------------------------------------------------------- */ int strcmpi(char *str1_P, char *str2_P) { return(stricmp(str1_P, str2_P)); } /* - end */ #endif /*-------------------------------------------------------------------------*/ /* Function AsciiDigetsToHexByte */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* String : 2 Byte String To Be Converted */ /* */ /* This Function Takes The First 2 Bytes Of The Passed In Ascii Hex String */ /* And Converts Them To Their Numeric Value */ /* */ /* Return : Converted Byte Value */ /*-------------------------------------------------------------------------*/ uCHAR AsciiDigetsToHexByte( char *String ) { uCHAR i,j; /* Get The First Hex Diget, Convert It To Numeric, And Shift It Up */ i = String[0]; if(isdigit(i)) i -= '0'; else i = toupper(i) - 'A' + 10; i <<= 4; /* Get The Second Hex Diget, Convert It To Numeric, And Or It In */ j = String[1]; if(isdigit(j)) j -= '0'; else j = toupper(j) - 'A' + 10; i |= j; return(i); } /*-------------------------------------------------------------------------*/ /* Function InvertBytes */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* Source : Source To Be Converted */ /* Dest : Destination To Put The Converted Source */ /* InvertCount : Number Of Bytes To Be Inverted */ /* */ /* This Function Inverts The Passed In Source Bytes And Places The */ /* Inverted String Into The Passed In Destination */ /* */ /* Return : NONE */ /*-------------------------------------------------------------------------*/ void InvertBytes(uCHAR *Source,uCHAR *Dest,uSHORT InvertCount) { uSHORT i; i = 0; do { Dest[i++] = Source[--InvertCount]; } while(InvertCount); } /*-------------------------------------------------------------------------*/ /* Function LongToAscii */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* Value : Value To Be Converted */ /* String : String To Put The Converted Value Into */ /* Base : Base To Be Converted In */ /* */ /* This Function Converts A Long Value To Ascii */ /* */ /* Return : A Pointer To The String */ /*-------------------------------------------------------------------------*/ char *LongToAscii(uLONG Value,char *String,uSHORT Base) { uLONG i,j; char Str[80]; /* If It Is A 0, Just Do It */ if(Value == 0) { String[0] = '0'; String[1] = '\0'; } else { /* Loop Through Dividing By The Base Generating An Ascii Diget For */ /* Each Iteration */ i = 0; while(Value) { j = Value % Base; /* If Not Base 10, Set Up A Letter If Greater Than 10 */ if(j >= 10) Str[i] = 'A' + (char)(j - 10); else Str[i] = '0' + (char)j; ++i; Value /= Base; } Str[i] = '\0'; /* Now Invert The String, Sense We Did It LSB First */ for(j = 0; j < i; ++j) String[j] = Str[i - j - 1]; String[i] = '\0'; } return(String); } /*-------------------------------------------------------------------------*/ /* Function dptr_PrintMem */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* Addr : Far Address To Be Dumped */ /* Count : Number Of Bytes To Dump */ /* */ /* This Function Dumps Memory To The Screen For Debug Purposes */ /* */ /* Return : NONE */ /*-------------------------------------------------------------------------*/ void dptr_PrintMem(uCHAR *Addr,int Count) { int Offset,i,NumLines; Offset = 0; NumLines = 0; /* Loop For Count Bytes */ while(Offset < Count) { /* Print Out The Address In HEX */ printf("\n%.8X ",Offset); /* Now Print Out 16 Bytes In HEX Format */ for(i = 0; i < 16; ++i) { if(Offset + i >= Count) printf(" "); else printf("%.2X ",Addr[Offset + i]); if(i == 7) printf("- "); } /* Print Out The Same 16 Bytes In ASCII Format */ printf(" "); for(i = 0; i < 16; ++i) { if(Offset + i >= Count) break; if((Addr[Offset + i] > 0x1F)&&(Addr[Offset + i] < 0x7F)) printf("%c",Addr[Offset + i]); else printf("."); } /* Bump The Offset By 16 And Check For Scrolling Past Screen */ Offset += 16; ++NumLines; if(NumLines >= 20) { getchar(); NumLines = 0; } } } #ifdef __cplusplus } /* extern C */ #endif raidutils-0.0.6.orig/lib/hba_log.cpp0000664000175000000620000002120510044153307017202 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - HBA_LOG.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptHBAlog_C //class. // //Author: Doug Anderson //Date: 5/6/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "hba_log.hpp" //Function - dptHBAlog_C::dptHBAlog_C() - start //=========================================================================== // //Description: // // This function is called to initialize the new object. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptHBAlog_C::dptHBAlog_C() { param_P = (logParam_S *)(header_P = (logHeader_S *)NULL); validBytes = paramBytes = 0; curEventBytes = 0; } //dptHBAlog_C::dptHBAlog_C() - end //Function - dptHBAlog_C::reverseParam() - start //=========================================================================== // //Description: // // This function is called from reverseAllParams() to provide an //opportunity to reverse the data portion of the log parameters. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptHBAlog_C::reverseParam() { // Reverse the first long word (All parameter codes - usually event time) // Ignore the severity level, reverse parameter specific fields switch (code() & 0x0fff) { case 0x001: ((hl_Header_S *)(param_P->getData()))->scsiSwap(); break; case 0x002: ((hl_Overflow_S *)(param_P->getData()))->scsiSwap(); break; case 0x003: ((hl_SCSIstat_S *)(param_P->getData()))->scsiSwap(); break; case 0x004: ((hl_ReqSense_S *)(param_P->getData()))->scsiSwap(); break; case 0x005: ((hl_HBAerr_S *)(param_P->getData()))->scsiSwap(); break; case 0x006: ((hl_Reassign_S *)(param_P->getData()))->scsiSwap(); break; case 0x007: ((hl_RAMerr_S *)(param_P->getData()))->scsiSwap(); break; case 0x008: ((hl_Time_S *)(param_P->getData()))->scsiSwap(); break; case 0x009: ((hl_ArrayCfg_S *)(param_P->getData()))->scsiSwap(); break; case 0x00b: ((hl_MajorStat_S *)(param_P->getData()))->scsiSwap(); break; case 0x00c: ((hl_DataIC_S *)(param_P->getData()))->scsiSwap(); break; case 0x00d: ((hl_HCrcved_S *)(param_P->getData()))->scsiSwap(); break; case 0x00e: ((hl_SCSIcmd_S *)(param_P->getData()))->scsiSwap(); break; case 0x00f: ((hl_Lock_S *)(param_P->getData()))->scsiSwap(); break; case 0x010: ((hl_decArray_S *)(param_P->getData()))->scsiSwap(); break; case 0x012: ((hl_driveFailure_S *)(param_P->getData()))->scsiSwap(); break; case 0x013: case 0x014: case 0x015: ((hl_voltage_S *)(param_P->getData()))->scsiSwap(); break; case 0x016: case 0x017: case 0x018: ((hl_temperature_S *)(param_P->getData()))->scsiSwap(); break; case 0x01a: ((hl_diagStartStop_S *)(param_P->getData()))->scsiSwap(); break; case 0x01b: ((hl_smartThreshold_S *)(param_P->getData()))->scsiSwap(); break; case 0x01c: ((hl_scheduledDiag_S *)(param_P->getData()))->scsiSwap(); break; case 0x01d: ((hl_debug_S *)(param_P->getData()))->scsiSwap(); break; case 0x01f: ((hl_expandArray_S *)(param_P->getData()))->scsiSwap(); break; case 0x020: case 0x021: ((hl_serverStatus_S *)(param_P->getData()))->scsiSwap(); break; case 0x022: ((hl_formatDone_S *)(param_P->getData()))->scsiSwap(); break; case 0x024: case 0x025: ((SafTe_S *)(param_P->getData()))->scsiSwap(); break; case 0x026: case 0x027: ((Ses_S *)(param_P->getData()))->scsiSwap(); break; case 0x028: ((SesTemp_S *)(param_P->getData()))->scsiSwap(); break; case 0x031: ((ResetDataRetention_S *)(param_P->getData()))->scsiSwap(); break; case 0x03e: case 0x03f: case 0x040: case 0x041: ((BlockList_S *)(param_P->getData()))->scsiSwap(); break; case 0x042: ((WriteBackFailue_S *)(param_P->getData()))->scsiSwap(); break; case 0x043: ((BatteryEvent_S *)(param_P->getData()))->scsiSwap(); break; case 0x044: ((CacheChangeEvent_S *)(param_P->getData()))->scsiSwap(); break; case 0x045: ((BusReset_S *)(param_P->getData()))->scsiSwap(); break; case 0x046: ((FibreLoop_S *)(param_P->getData()))->scsiSwap(); break; case 0x050: ((BatteryCalibrate_S *)(param_P->getData()))->scsiSwap(); break; case 0x051: ((HdmIspChannel_S *)(param_P->getData()))->scsiSwap(); break; case 0x052: ((SpcDownSpeed_S *)(param_P->getData()))->scsiSwap(); break; case 0x053: ((EnclosureExist_S *)(param_P->getData()))->scsiSwap(); break; default: ((hl_Standard_S *)(param_P->getData()))->scsiSwap(); break; } } //dptHBAlog_C::reverseParam() - end //Function - dptHBAlog_C::calcInit() - start //=========================================================================== // //Description: // // This function Initialize log page specific variables // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- void dptHBAlog_C::calcInit() { fwEventBytes = 0; } //dptHBAlog_C::calcInit() - end //Function - dptHBAlog_C::calcInfo() - start //=========================================================================== // //Description: // // This function calculates the # of FW event bytes read from the //log buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- void dptHBAlog_C::calcInfo() { if ((code() & 0xf000)!=0xf000) fwEventBytes += 4 + param_P->getLength(); } //dptHBAlog_C::calcInfo() - end //Function - dptHBAlog_C::curOffsetInit() - start //=========================================================================== // //Description: // // This function initializes the current offset. //log buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- void dptHBAlog_C::curOffsetInit() { curEventBytes = 0; } //dptHBAlog_C::curOffsetInit() - end //Function - dptHBAlog_C::calcCurOffset() - start //=========================================================================== // //Description: // // This function calculates the byte offset of the current parameter. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- void dptHBAlog_C::calcCurOffset() { if ((code() & 0xf000)!=0xf000) curEventBytes += 4 + param_P->getLength(); } //dptHBAlog_C::calcCurOffset() - end raidutils-0.0.6.orig/lib/lockunix.c0000664000175000000620000001162410044153307017107 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * UNIX locking mechanism */ #include #include #include #include #include #include #include #include #include "lockunix.h" static char Lock[] = "/tmp/%s.LOCK"; extern int errno; static char * getName(char * name) { extern char ** Argv; if (name) { return (name); } if ((name = strrchr (Argv[0], '/')) != (char *)NULL) { return (name); } return (Argv[0]); } #if defined __GNUC__ int MkLock __P((char * name)) #else int MkLock (char * name) #endif { #if defined _DPT_SPARC extern char * mktemp __P((char * origTemplate)); #endif //_DPT_SPARC static char Template[] = "/tmp/%s.XXXXXX"; char buffer[10]; int fd; char * Name = getName (name); char * templateBuffer = (char *)malloc (strlen(Name)+sizeof(Template)-1); char * lock; if (templateBuffer == (char *)NULL) { return (-1); } if ((lock = (char *)malloc (strlen(Name)+sizeof(Lock)-1)) == (char *)NULL) { free (templateBuffer); return (-1); } sprintf (templateBuffer, Template, Name); if ((fd = open(mktemp (templateBuffer), O_WRONLY|O_CREAT|O_EXCL)) < 0) { free (templateBuffer); free (lock); return (-1); } sprintf (buffer, "%d\n", (int)getpid()); write (fd, buffer, strlen(buffer)); close (fd); sprintf (lock, Lock, Name); if (link (templateBuffer, lock) == 0) { unlink (templateBuffer); free (templateBuffer); free (lock); return (0); } /* Check if the file is valid, and thus has a proper PID */ if ((fd = open(lock, O_RDONLY)) >= 0) { read (fd, buffer, sizeof(buffer)); close (fd); if ((fd = atoi (buffer)) == 0) { /* Empty file is a lock */ errno = EPERM; } else if (kill (fd, 0) == 0) { unlink (templateBuffer); free (templateBuffer); free (lock); return (fd != getpid()); /* Is it me? */ } /* Unlink the lock */ if (errno != EPERM) { unlink (lock); } } fd = link (templateBuffer, lock); unlink (templateBuffer); free (templateBuffer); free (lock); return (fd); } #if defined __GNUC__ void RmLock __P((char * name)) #else void RmLock (char * name) #endif { char * Name = getName (name); char * lock = (char *)malloc (strlen(Name) + sizeof(Lock) - 1); if (lock != (char *)NULL) { sprintf (lock, Lock, Name); unlink (lock); free (lock); } } #if defined __GNUC__ void ChLock __P((char * name, int pid)) #else void ChLock (char * name, int pid) #endif { char * Name = getName (name); int fd; char buffer[10]; char * lock = (char *)malloc (strlen(Name) + sizeof(Lock) - 1); if (lock != (char *)NULL) { sprintf (lock, Lock, Name); if ((fd = open(lock, O_WRONLY|O_CREAT|O_TRUNC)) >= 0) { sprintf (buffer, "%d\n", pid); write (fd, buffer, strlen(buffer)); close (fd); } free (lock); } } #if defined __GNUC__ int IsLock __P((char * name)) #else int IsLock (char * name) #endif { char * Name = getName (name); int fd; char buffer[10]; char * lock = (char *)malloc (strlen(Name) + sizeof(Lock) - 1); if (lock == (char *)NULL) { return (-1); } sprintf (lock, Lock, Name); fd = open(lock, O_RDONLY); free (lock); if (fd < 0) { return (0); } read (fd, buffer, sizeof(buffer)); close (fd); if ((fd = atoi (buffer)) == 0) { /* Empty file is a lock */ return (-1); /* In transition, try again */ } else if (kill (fd, 0) == 0) { return (1); } return (errno == EPERM); /* Not Locked, permission denied excepted */ } raidutils-0.0.6.orig/lib/scsi_log.cpp0000664000175000000620000004376110044153307017424 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - SCSI_LOG.CPP //*************************************************************************** // //Description: // // This file contains function definitions for the dptSCSIlog_C //class. // //Author: Doug Anderson //Date: 5/6/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #define dptNVRAM_computeChecksum /* not inlined */ #include "dpt_log.hpp" //Function - dptSCSIlog_C::dptSCSIlog_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptSCSIlog_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptSCSIlog_C::dptSCSIlog_C() : param_P(NULL), paramBytes(0), validBytes(0), header_P(NULL) { } //dptSCSIlog_C::dptSCSIlog_C() - end //Function - dptSCSIlog_C - start //=========================================================================== // //Description: // // These functions are virtual functions that do nothing in this class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIlog_C::reverseParam() {} void dptSCSIlog_C::calcInit() {} void dptSCSIlog_C::calcInfo() {} void dptSCSIlog_C::curOffsetInit() {} void dptSCSIlog_C::calcCurOffset() {} //dptSCSIlog_C - end //Function - dptSCSIlog_C::clear() - start //=========================================================================== // //Description: // // This function initializes all data. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIlog_C::clear() { param_P = (logParam_S *)(header_P = (logHeader_S *)NULL); validBytes = paramBytes = 0; curOffsetInit(); } //dptSCSIlog_C::clear() - end //Function - dptSCSIlog_C::initSense() - start //=========================================================================== // //Description: // // This function initializes the specified buffer as a log sense //buffer. This function will initialize all pointers and variables. //One of three additional functions can be performed on the log buffer: // 1. Nothing (Just initialize the pointers and variables) // 2. Reverse the log sense information // 3. Execute a virtual function to compute special initialization // information. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void SwapLog(logHeader_S * header_P) { // Reverse the log header page length if (header_P != (logHeader_S *)NULL) { header_P->scsiSwap(); } } uCHAR * dptSCSIlog_C::initSense(void *buff_P,uSHORT option) { // Dis-associate the log data from any buffer clear(); if (buff_P != (void *)NULL) { // Cast the data buffer as a log page header header_P = (logHeader_S *) buff_P; if (option==1) { // Reverse the page length SwapLog (header_P); } // Calculate the log sense info (optionally reverse bytes) calcSenseInfo(option); } return (data_P()); } //dptSCSIlog_C::initSense() - end //Function - dptSCSIlog_C::reset() - start //=========================================================================== // //Description: // // This function initializes the CCB's log sense/select pointers. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR * dptSCSIlog_C::reset() { if (header_P != (logHeader_S *)NULL) { paramBytes = 0; curOffsetInit(); param_P = (logParam_S *) header_P->getParams(); // Insure there is enough space for the the first log parameter if (header_P->getPageLength() >= (4+param_P->getLength())) paramBytes += 4 + param_P->getLength(); else param_P = (logParam_S *)NULL; } return (data_P()); } //dptSCSIlog_C::reset() - end //Function - dptSCSIlog_C::next() - start //=========================================================================== // //Description: // // This function points the param_P pointer to the next log parameter. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR * dptSCSIlog_C::next() { if (param_P != (logParam_S *)NULL) { // Calculate the byte offset of the current parameter calcCurOffset(); // Increment to the next parameter param_P = (logParam_S *) (param_P->getData()+param_P->getLength()); if ((header_P != (logHeader_S *)NULL) && (header_P->getPageLength() >= (paramBytes+4+param_P->getLength()))) { // Increment the log counter to the next paramter paramBytes += 4 + param_P->getLength(); } else param_P = (logParam_S *)NULL; } return (data_P()); } //dptSCSIlog_C::next() - end //Function - dptSCSIlog_C::calcSenseInfo() - start //=========================================================================== // //Description: // // This function sequences through the log parameters initializing //all data. If reverseEm is set, the log parameters are reversed //before they are processed. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIlog_C::calcSenseInfo(uSHORT reverseEm) { // Reset to the first parameter reset(); // Initialize log page specific variables calcInit(); // Loop through all valid parameters while (param_P != (logParam_S *)NULL) { if (reverseEm) { // Reverse the parameter code bytes param_P->scsiSwap(); // Reverse the parameter data bytes reverseParam(); } // Calculate log page specific info calcInfo(); // Get the next parameter next(); } // Set the number of valid log bytes in this buffer validBytes = 4 + paramBytes; // Reset to the first parameter reset(); } //dptSCSIlog_C::calcSenseInfo() - end //Function - dptSCSIlog_C::findParam() - start //=========================================================================== // //Description: // // This function finds either the first or the next parameter //with the specified parameter code. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR * dptSCSIlog_C::findParam(uSHORT inCode,uSHORT fromStart) { uSHORT found = 0; // Reset the log pointers if (fromStart) reset(); else next(); while ( (param_P != (logParam_S *)NULL) && !found ) { // Check for the specified parameter code if (param_P->getCode()==inCode) found = 1; else // Get the next log parameter next(); } return (data_P()); } //dptSCSIlog_C::findParam() - end //Function - dptSCSIlog_C::data_P() - start //=========================================================================== // //Description: // // This function returns a pointer to the current parameters data //buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR * dptSCSIlog_C::data_P() { if (param_P != (logParam_S *)NULL) return(param_P->getData()); else return ((uCHAR *)NULL); } //dptSCSIlog_C::data_P() - end //Function - dptSCSIlog_C::flags() - start //=========================================================================== // //Description: // // This function returns the current parameter flag byte. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR dptSCSIlog_C::flags() { uCHAR retVal = 0; if (param_P != (logParam_S *)NULL) retVal = param_P->getFlags(); return (retVal); } //dptSCSIlog_C::flags() - end //Function - dptSCSIlog_C::length() - start //=========================================================================== // //Description: // // This function returns the current parameter data length. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR dptSCSIlog_C::length() { uCHAR retVal = 0; if (param_P != (logParam_S *)NULL) retVal = param_P->getLength(); return (retVal); } //dptSCSIlog_C::length() - end //Function - dptSCSIlog_C::code() - start //=========================================================================== // //Description: // // This function returns the current parameter code. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSIlog_C::code() { uSHORT retVal = 0xffff; if (param_P != (logParam_S *)NULL) retVal = param_P->getCode(); return (retVal); } //dptSCSIlog_C::code() - end //Function - dptSCSIlog_C::page() - start //=========================================================================== // //Description: // // This function returns the log page code associated with this buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR dptSCSIlog_C::page() { uCHAR retVal = 0xff; if (header_P != (logHeader_S *)NULL) retVal = header_P->getPageCode() & 0x3f; return (retVal); } //dptSCSIlog_C::page() - end //Function - dptSCSIlog_C::totalSize() - start //=========================================================================== // //Description: // // This function returns the total # of bytes in this log buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSIlog_C::totalSize() { uSHORT retVal = 0; if (header_P != (logHeader_S *)NULL) retVal = header_P->getPageLength() + 4; return (retVal); } //dptSCSIlog_C::totalSize() - end //Function - dptSCSIlog_C::validSize() - start //=========================================================================== // //Description: // // This function returns the number of valid parameter bytes + the //log header size. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSIlog_C::validSize() { uSHORT retVal = 0; if (header_P != (logHeader_S *)NULL) retVal = validBytes; return (retVal); } //dptSCSIlog_C::validSize() - end //Function - dptSCSIlog_C::size() - start //=========================================================================== // //Description: // // This function returns the # of bytes for the current parameter // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR dptSCSIlog_C::size() { uCHAR rtnVal = 0; if (param_P) rtnVal = param_P->getLength(); return(rtnVal); } //dptSCSIlog_C::size() - end //Function - dptSCSIlog_C::isValidParam() - start //=========================================================================== // //Description: // // This function determines if the current parameted is valid. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSIlog_C::isValidParam() { uSHORT retVal = 0; if (param_P != (logParam_S *)NULL) retVal = 1; return (retVal); } //dptSCSIlog_C::isValidParam() - end /* //Function - dptSCSIlog_C::initSelect() - start //=========================================================================== // //Description: // // This function initializes the specified buffer as a new log select //buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR * dptSCSIlog_C::initSelect(void *buff_P,uCHAR pageCode) { if (buff_P == (void *)NULL) // Dis-associate the log data from any buffer clear(); else { // Cast the data buffer as a log page header header_P = (logHeader_S *) buff_P; // Set the log page code header_P->setPageCode(pageCode & 0x3f); header_P->setReserved(0); header_P->setPageLength(0); param_P = (logParam_S *) header_P->getParams(); validBytes = paramBytes = 0; } return (data_P()); } //dptSCSIlog_C::initSelect() - end //Function - dptSCSIlog_C::setParam() - start //=========================================================================== // //Description: // // This function sets the specified log paramter. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIlog_C::setParam(uSHORT code,uCHAR dataLen,uCHAR inFlags) { if (param_P != (logParam_S *)NULL) { // Set the log parameter code param_P->setCode(code); // Set the parameter flags param_P->setFlags(inFlags); // Set the data length param_P->setLength(dataLen); // Set the parameter byte count paramBytes += 4 + dataLen; // Set the log header page length header_P->setPageLength(paramBytes); } } //dptSCSIlog_C::setParam() - end //Function - dptSCSIlog_C::nextNew() - start //=========================================================================== // //Description: // // This function increments the parameter pointer to the next //new parameter to be set. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR * dptSCSIlog_C::nextNew() { if (param_P != (logParam_S *)NULL) // Increment to the next parameter param_P = (logParam_S *) (param_P->getData()+param_P->getLength()); return (data_P()); } //dptSCSIlog_C::nextNew() - end //Function - dptSCSIlog_C::selReverse() - start //=========================================================================== // //Description: // // This function reverses all the log select data for output. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIlog_C::selReverse() { // Reverse all the parameter codes reverseAllParams(); // Reverse the log header page length SwapLog(header_P); } //dptSCSIlog_C::selReverse() - end */ raidutils-0.0.6.orig/AUTHORS0000664000175000000620000000017010044153307015403 0ustar bapstaff00000000000000Doug Anderson Mark Salyzyn Bob Pasteur Bill Smith Bob Roycroft Don Kemper Markus Lidel raidutils-0.0.6.orig/COPYING0000664000175000000620000000273610044153307015400 0ustar bapstaff00000000000000Copyright (c) 1996-2004, Adaptec Corporation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Adaptec Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. raidutils-0.0.6.orig/ChangeLog0000664000175000000620000000051310175141260016106 0ustar bapstaff000000000000000.0.6 Fixes for gcc 3.4. 0.0.5 added i2o-dev.h linux header which should fix some compile problems 0.0.4 changed recognision of I2O pass-thru option availability and fixed header includes for gcc 3.3. 0.0.3 added SPEC file to build a rpm 0.0.2 bugfix of control file device node name (now /dev/i2o/ctl) 0.0.1 initial release raidutils-0.0.6.orig/INSTALL0000664000175000000620000002207110175141472015375 0ustar bapstaff00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PREFIX', the package will use PREFIX as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. raidutils-0.0.6.orig/Makefile.am0000664000175000000620000000003510044153333016366 0ustar bapstaff00000000000000SUBDIRS=lib raidutil raideng raidutils-0.0.6.orig/Makefile.in0000664000175000000620000004510710175141472016416 0ustar bapstaff00000000000000# Makefile.in generated by automake 1.9.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c 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@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure \ $(top_srcdir)/distribution/raidutils.spec.in AUTHORS COPYING \ ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \ install-sh ltmain.sh missing subdir = . 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 configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = distribution/raidutils.spec SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = lib raidutil raideng all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) 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: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 distribution/raidutils.spec: $(top_builddir)/config.status $(top_srcdir)/distribution/raidutils.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/distribution @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(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-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raidutils-0.0.6.orig/NEWS0000664000175000000620000000011410044153333015027 0ustar bapstaff00000000000000For the latest news of the raidutils look at http://i2o.shadowconnect.com/. raidutils-0.0.6.orig/README0000664000175000000620000000000010044153337015206 0ustar bapstaff00000000000000raidutils-0.0.6.orig/aclocal.m40000664000175000000620000074422410175141433016214 0ustar bapstaff00000000000000# generated automatically by aclocal 1.9.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 47 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # -------------------- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ------------------------------------------------------------------ AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && test "X$CXX" != "Xno"; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 dll's AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- #- set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case "$host_cpu" in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) case $host_cpu in alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that LIBLTDL # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If # DIRECTORY is not provided and an installed libltdl is not found, it is # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single # quotes!). If your package is not flat and you're not using automake, # define top_builddir and top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # -------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # # Check for any special shared library compilation flags. # _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= if test "$GCC" = no; then case $host_os in sco3.2v5*) _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' ;; esac fi if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : else AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no fi fi # # Check to make sure the static flag actually works. # AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) # Report which librarie types wil actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; darwin* | rhapsody*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' ;; esac fi ;; esac output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cc # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; dgux*) case $cc_basename in ec++) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC) case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case "$host_cpu" in ia64*|hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc) # Intel C++ with_gnu_ld=yes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; cxx) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; osf3*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sco*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) symcode='[[BDRT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; cxx) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $CC in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; sco3.2v5*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi4*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; sco3.2v5*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4.2uw2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv5*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && break cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done SED=$lt_cv_path_SED ]) AC_MSG_RESULT([$SED]) ]) # -*- Autoconf -*- # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # Generated from amversion.in; do not edit by hand. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.2])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) 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])]) # serial 7 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # 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"]) ]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 7 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 11 # 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.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 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 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # 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_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # -*- Autoconf -*- # Copyright (C) 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # 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])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # 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 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Copyright (C) 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # 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="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # _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 raidutils-0.0.6.orig/autogen.sh0000775000175000000620000000012710045537770016351 0ustar bapstaff00000000000000#!/bin/sh libtoolize -c --force aclocal autoheader autoconf automake -c --add-missing raidutils-0.0.6.orig/compile0000775000175000000620000000706210175141464015726 0ustar bapstaff00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2004-09-10.20 # Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit 0 ;; -v | --v*) echo "compile $scriptversion" exit 0 ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then mv "$cofile" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: raidutils-0.0.6.orig/config.guess0000775000175000000620000012206510046164250016664 0ustar bapstaff00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-06-17' # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 -q "$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 ;' # 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 ## for Red Hat Linux if test -f /etc/redhat-release ; then VENDOR=redhat ; else VENDOR= ; fi # 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 ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # 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 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/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms exit 0 ;; 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 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; 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 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; 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 0 ;; 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 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; 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 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # 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 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; 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 \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; 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 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????: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 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; 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 0 ;; *: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 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 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 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 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 # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 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 && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; 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 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-${VENDOR:-unknown}-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-${VENDOR:-unknown}-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; 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 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-${VENDOR:-unknown}-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; 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 0 ;; 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 0 ;; 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 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; 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 0 ;; i*86:*:5:[78]*) 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 0 ;; 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 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; 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 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*: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) 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 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *: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 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; 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 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; 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"); 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 && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # 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 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; 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: raidutils-0.0.6.orig/config.h.in0000664000175000000620000001470110045537675016402 0ustar bapstaff00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if the `closedir' function returns void instead of `int'. */ #undef CLOSEDIR_VOID /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM /* Define to 1 if you have the `atexit' function. */ #undef HAVE_ATEXIT /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the header file. */ #undef HAVE_FSTREAM /* Define to 1 if you have the header file. */ #undef HAVE_FSTREAM_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_IOMANIP /* Define to 1 if you have the header file. */ #undef HAVE_IOMANIP_H /* Define to 1 if you have the header file. */ #undef HAVE_IOSTREAM /* Define to 1 if you have the header file. */ #undef HAVE_IOSTREAM_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the header file. */ #undef HAVE_SSTREAM /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* 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 `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strcspn' function. */ #undef HAVE_STRCSPN /* 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 `strpbrk' function. */ #undef HAVE_STRPBRK /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strspn' function. */ #undef HAVE_STRSPN /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the header file. */ #undef HAVE_STRSTREAM_H /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the `sysinfo' function. */ #undef HAVE_SYSINFO /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_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_SYSTEMINFO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* 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 you have the header file. */ #undef HAVE_VALUES_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* 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 version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if the `S_IS*' macros in do not work properly. */ #undef STAT_MACROS_BROKEN /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `int' if does not define. */ #undef pid_t /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ #undef volatile raidutils-0.0.6.orig/config.sub0000775000175000000620000007301510046164250016327 0ustar bapstaff00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-06-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 0;; * ) 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* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -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/'` ;; -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] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | s390 | s390x \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # 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-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | s390-* | s390x-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; 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 ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; 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 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; 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 ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; 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 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; 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 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; 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 ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -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*) # 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* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -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 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -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 ;; -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 ;; -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 *-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 ;; 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 ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -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 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: raidutils-0.0.6.orig/configure0000775000175000000620000270235110175141451016260 0ustar bapstaff00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for I2O RAID Utilities 0.0.6. # # Copyright (C) 2003 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 Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 # 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` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='I2O RAID Utilities' PACKAGE_TARNAME='i2o-raid-utilities' PACKAGE_VERSION='0.0.6' PACKAGE_STRING='I2O RAID Utilities 0.0.6' PACKAGE_BUGREPORT='' ac_unique_file="config.h.in" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= 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 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -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 | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -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 ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 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 ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # 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 its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS # # 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 I2O RAID Utilities 0.0.6 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 \`..'] _ACEOF cat <<_ACEOF 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] --datadir=DIR read-only architecture-independent data [PREFIX/share] --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] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _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 I2O RAID Utilities 0.0.6:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] 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 CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style 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 elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF I2O RAID Utilities configure 0.0.6 generated by GNU Autoconf 2.59 Copyright (C) 2003 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 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by I2O RAID Utilities $as_me 0.0.6, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { 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` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&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_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. 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, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # 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='i2o-raid-utilities' VERSION='0.0.6' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Checks for programs. ac_ext=cc 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 -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C++ compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C++ compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$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 for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-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= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_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 for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 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 -std1. */ int osf4_cc_array ['\x00' == 0 ? 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 # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi; # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && break cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done SED=$lt_cv_path_SED fi echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6 NM="$lt_cv_path_NM" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi4*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case "$host_cpu" in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) case $host_cpu in alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 4361 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext 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 fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; esac need_locks="$enable_libtool_lock" echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------------------- ## ## Report this to the I2O RAID Utilities lists. ## ## --------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc 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 echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc 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=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_F77" && break done F77=$ac_ct_F77 fi # Provide some information about the compiler. echo "$as_me:5235:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 else echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris* | sysv5*) symcode='[BDRT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6 objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default fi; test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # # Check for any special shared library compilation flags. # lt_prog_cc_shlib= if test "$GCC" = no; then case $host_os in sco3.2v5*) lt_prog_cc_shlib='-belf' ;; esac fi if test -n "$lt_prog_cc_shlib"; then { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : else { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} lt_cv_prog_cc_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_prog_compiler_static" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6269: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6273: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic='-Kpic' lt_prog_compiler_static='-dn' ;; solaris*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6502: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6506: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6562: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:6566: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds="$tmp_archive_cmds" fi else ld_shlibs=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec=' ' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi4*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='-all_load $convenience' link_all_deplibs=yes else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=no hardcode_shlibpath_var=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no hardcode_shlibpath_var=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 7896 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var " || \ test "X$hardcode_automatic"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* 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_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* 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_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which librarie types wil actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; darwin* | rhapsody*) if test "$GCC" = yes; then archive_cmds_need_lc=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag='-undefined dynamic_lookup' ;; esac fi ;; esac output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='-all_load $convenience' link_all_deplibs=yes else ld_shlibs=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" # Check whether --with-tags or --without-tags was given. if test "${with_tags+set}" = set; then withval="$with_tags" tagnames="$withval" fi; if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && test "X$CXX" != "Xno"; then ac_ext=cc 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 archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cc # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX=' ' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) if test "$GXX" = yes; then archive_cmds_need_lc_CXX=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_CXX='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='-all_load $convenience' link_all_deplibs_CXX=yes else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd12*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | kfreebsd*-gnu) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_CXX='+b $libdir' hardcode_libdir_separator_CXX=: ;; ia64*) hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case "$host_cpu" in hppa*64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC) case "$host_cpu" in hppa*64*|ia64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case "$host_cpu" in ia64*|hppa*64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc) # Intel C++ with_gnu_ld=yes archive_cmds_need_lc_CXX=no archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; cxx) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; osf3*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sco*) archive_cmds_need_lc_CXX=no case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.0-5 | solaris2.0-5.*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) archive_cmds_need_lc_CXX=no ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; cxx) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC) lt_prog_compiler_pic_CXX='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11044: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:11048: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11104: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:11108: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 11615 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var CXX" || \ test "X$hardcode_automatic_CXX"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6 if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* 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_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* 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_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_CXX" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) test "$enable_shared" = yes && enable_static=no ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_F77='-Kpic' lt_prog_compiler_static_F77='-dn' ;; solaris*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13411: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13415: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13471: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13475: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds_F77="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds_F77="$tmp_archive_cmds" fi else ld_shlibs_F77=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_F77=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77=' ' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi4*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc_F77=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_F77='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='-all_load $convenience' link_all_deplibs_F77=yes else ld_shlibs_F77=no fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; ia64*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; *) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; sco3.2v5*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4.2uw2*) archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_F77='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv5*) no_undefined_flag_F77=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec_F77= hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 14785 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var F77" || \ test "X$hardcode_automatic_F77"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6 if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15526: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15530: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_GCJ='-Kpic' lt_prog_compiler_static_GCJ='-dn' ;; solaris*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15759: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15763: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15819: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:15823: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds_GCJ="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds_GCJ="$tmp_archive_cmds" fi else ld_shlibs_GCJ=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ=' ' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi4*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc_GCJ=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_GCJ='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='-all_load $convenience' link_all_deplibs_GCJ=yes else ld_shlibs_GCJ=no fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; ia64*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; *) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; sco3.2v5*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4.2uw2*) archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv5*) no_undefined_flag_GCJ=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec_GCJ= hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 17153 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var GCJ" || \ test "X$hardcode_automatic_GCJ"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6 if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* 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_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* 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_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion # Checks for libraries. # Checks for header files. ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in dir; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi else echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in x; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi fi echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in fcntl.h malloc.h memory.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/systeminfo.h unistd.h values.h inttypes.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------------------- ## ## Report this to the I2O RAID Utilities lists. ## ## --------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc 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 for ac_header in strstream.h sstream fstream.h fstream iostream.h iostream iomanip.h iomanip do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------------------- ## ## Report this to the I2O RAID Utilities lists. ## ## --------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done 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 # Checks for typedefs, structures, and compiler characteristics. echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6 if test "${ac_cv_header_stat_broken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if defined(S_ISBLK) && defined(S_IFDIR) # if S_ISBLK (S_IFDIR) You lose. # endif #endif #if defined(S_ISBLK) && defined(S_IFCHR) # if S_ISBLK (S_IFCHR) You lose. # endif #endif #if defined(S_ISLNK) && defined(S_IFREG) # if S_ISLNK (S_IFREG) You lose. # endif #endif #if defined(S_ISSOCK) && defined(S_IFREG) # if S_ISSOCK (S_IFREG) You lose. # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "You lose" >/dev/null 2>&1; then ac_cv_header_stat_broken=yes else ac_cv_header_stat_broken=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6 if test $ac_cv_header_stat_broken = yes; then cat >>confdefs.h <<\_ACEOF #define STAT_MACROS_BROKEN 1 _ACEOF fi echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 if test "${ac_cv_header_stdbool_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef bool # error bool is not defined #endif #ifndef false # error false is not defined #endif #if false # error false is not 0 #endif #ifndef true # error true is not defined #endif #if true != 1 # error true is not 1 #endif #ifndef __bool_true_false_are_defined # error __bool_true_false_are_defined is not defined #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) -0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) -0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; int main () { return !a + !b + !c + !d + !e + !f + !g + !h + !i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdbool_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 echo "$as_me:$LINENO: checking for _Bool" >&5 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 if test "${ac_cv_type__Bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((_Bool *) 0) return 0; if (sizeof (_Bool)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type__Bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type__Bool=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 echo "${ECHO_T}$ac_cv_type__Bool" >&6 if test $ac_cv_type__Bool = yes; then cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STDBOOL_H 1 _ACEOF fi echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((pid_t *) 0) return 0; if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking for working volatile" >&5 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6 if test "${ac_cv_c_volatile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { volatile int x; int * volatile y; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_volatile=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_volatile=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 echo "${ECHO_T}$ac_cv_c_volatile" >&6 if test $ac_cv_c_volatile = no; then cat >>confdefs.h <<\_ACEOF #define volatile _ACEOF fi # Checks for library functions. echo "$as_me:$LINENO: checking whether closedir returns void" >&5 echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6 if test "${ac_cv_func_closedir_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_closedir_void=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header_dirent> #ifndef __cplusplus int closedir (); #endif int main () { exit (closedir (opendir (".")) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_closedir_void=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_closedir_void=yes fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5 echo "${ECHO_T}$ac_cv_func_closedir_void" >&6 if test $ac_cv_func_closedir_void = yes; then cat >>confdefs.h <<\_ACEOF #define CLOSEDIR_VOID 1 _ACEOF fi for ac_header in unistd.h vfork.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------------------- ## ## Report this to the I2O RAID Utilities lists. ## ## --------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in fork vfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then echo "$as_me:$LINENO: checking for working fork" >&5 echo $ECHO_N "checking for working fork... $ECHO_C" >&6 if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* By Ruediger Kuhlmann. */ #include #if HAVE_UNISTD_H # include #endif /* Some systems only have a dummy stub for fork() */ int main () { if (fork() < 0) exit (1); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_fork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_fork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 echo "${ECHO_T}$ac_cv_func_fork_works" >&6 else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then echo "$as_me:$LINENO: checking for working vfork" >&5 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 if test "${ac_cv_func_vfork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_vfork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ #include #include #include #include #include #if HAVE_UNISTD_H # include #endif #if HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; exit( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_vfork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_vfork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_VFORK 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define vfork fork _ACEOF fi if test "x$ac_cv_func_fork_works" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_FORK 1 _ACEOF fi if test $ac_cv_c_compiler_gnu = yes; then echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_traditional+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------------------- ## ## Report this to the I2O RAID Utilities lists. ## ## --------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if STDC_HEADERS || HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { exit (malloc (0) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6 if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 0 _ACEOF case $LIBOBJS in "malloc.$ac_objext" | \ *" malloc.$ac_objext" | \ "malloc.$ac_objext "* | \ *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define malloc rpl_malloc _ACEOF fi echo "$as_me:$LINENO: checking for working memcmp" >&5 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) exit (1); } exit (0); } ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memcmp_working=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in "memcmp.$ac_objext" | \ *" memcmp.$ac_objext" | \ "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------------------- ## ## Report this to the I2O RAID Utilities lists. ## ## --------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6 if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_realloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if STDC_HEADERS || HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { exit (realloc (0, 0) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_realloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6 if test $ac_cv_func_realloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 0 _ACEOF case $LIBOBJS in "realloc.$ac_objext" | \ *" realloc.$ac_objext" | \ "realloc.$ac_objext "* | \ *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define realloc rpl_realloc _ACEOF fi echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef signal # undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6 if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_lstat_dereferences_slashed_symlink=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6 test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then case $LIBOBJS in "lstat.$ac_objext" | \ *" lstat.$ac_objext" | \ "lstat.$ac_objext "* | \ *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6 if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_stat_empty_string_bug=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; exit (stat ("", &sbuf) ? 1 : 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_stat_empty_string_bug=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_stat_empty_string_bug=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6 if test $ac_cv_func_stat_empty_string_bug = yes; then case $LIBOBJS in "stat.$ac_objext" | \ *" stat.$ac_objext" | \ "stat.$ac_objext "* | \ *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else char (*f) () = _doprnt; #endif #ifdef __cplusplus } #endif int main () { return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in alarm atexit dup2 memset strchr strcspn strpbrk strrchr strspn strstr strtol strtoul sysinfo uname do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile raideng/Makefile raidutil/Makefile lib/Makefile distribution/raidutils.spec" 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, don't put newlines in cache variables' values. # 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. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *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 \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" 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}' # 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 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_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by I2O RAID Utilities $as_me 0.0.6, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --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_cs_version="\\ I2O RAID Utilities config.status 0.0.6 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "raideng/Makefile" ) CONFIG_FILES="$CONFIG_FILES raideng/Makefile" ;; "raidutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES raidutil/Makefile" ;; "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "distribution/raidutils.spec" ) CONFIG_FILES="$CONFIG_FILES distribution/raidutils.spec" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_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 to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@EGREP@,$EGREP,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CXXCPP@,$CXXCPP,;t t s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # 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. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@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,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #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. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # 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. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi raidutils-0.0.6.orig/configure.in0000664000175000000620000000254710175141260016656 0ustar bapstaff00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT([I2O RAID Utilities], 0.0.6) AC_CONFIG_SRCDIR([config.h.in]) AM_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_CPP AC_PROG_LIBTOOL # Checks for libraries. # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([fcntl.h malloc.h memory.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/systeminfo.h unistd.h values.h inttypes.h]) AC_LANG([C++]) AC_CHECK_HEADERS([strstream.h sstream fstream.h fstream iostream.h iostream iomanip.h iomanip]) AC_LANG([C]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STAT AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM AC_C_VOLATILE # Checks for library functions. AC_FUNC_CLOSEDIR_VOID AC_FUNC_FORK AC_PROG_GCC_TRADITIONAL AC_FUNC_MALLOC AC_FUNC_MEMCMP AC_FUNC_REALLOC AC_TYPE_SIGNAL AC_FUNC_STAT AC_FUNC_VPRINTF AC_CHECK_FUNCS([alarm atexit dup2 memset strchr strcspn strpbrk strrchr strspn strstr strtol strtoul sysinfo uname]) AC_CONFIG_FILES([Makefile raideng/Makefile raidutil/Makefile lib/Makefile distribution/raidutils.spec]) AC_OUTPUT raidutils-0.0.6.orig/depcomp0000775000175000000620000003554510175141464015734 0ustar bapstaff00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2004-05-31.23 # Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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 0 ;; -v | --v*) echo "depcomp $scriptversion" exit 0 ;; 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 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. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" 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. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$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" ;; 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 # Dependencies are output in .lo.d with libtool 1.4. # With libtool 1.5 they are output both in $dir.libs/$base.o.d # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the # latter, because the former will be cleaned when $dir.libs is # erased. tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir$base.o.d" tmpdepfile3="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" tmpdepfile3="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" elif test -f "$tmpdepfile2"; then tmpdepfile="$tmpdepfile2" else tmpdepfile="$tmpdepfile3" fi 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 $1 != '--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 $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac 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. -*|$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 $1 != '--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 '/^# [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, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; 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-end: "$" # End: raidutils-0.0.6.orig/install-sh0000775000175000000620000002176610175141463016362 0ustar bapstaff00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2004-09-10.20 # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= 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: -c (ignored) -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. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; 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 for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi 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 "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # 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: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # 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 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $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 "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: raidutils-0.0.6.orig/ltmain.sh0000664000175000000620000054666210046164250016201 0ustar bapstaff00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # RH: define SED for historic ltconfig's generated by Libtool 1.3 [ -z "$SED" ] && SED=sed # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.6 TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)" # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" ##################################### # Shell function definitions: # This seems to be the best place for them # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2003 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $EXIT_SUCCESS ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $EXIT_SUCCESS ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $EXIT_SUCCESS ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case "$arg_mode" in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit $EXIT_FAILURE fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # gcc -m* arguments should be passed to the linker via $compiler_flags # in order to pass architecture information to the linker # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo # but this is not reliable with gcc because gcc may use -mfoo to # select a different linker, different libraries, etc, while # -Wl,-mfoo simply passes -mfoo to the linker. -m*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) if test "$deplibs_check_method" != pass_all; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5* ) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in [0-9]*) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in [0-9]*) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in [0-9]*) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$save_output-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$save_output-${k}.$objext k=`expr $k + 1` output=$output_objdir/$save_output-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadale object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR #define DIR_SEPARATOR '/' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) #define HAVE_DOS_BASED_FILE_SYSTEM #ifndef DIR_SEPARATOR_2 #define DIR_SEPARATOR_2 '\\' #endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` done fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # GNU ar 2.10+ was changed to match POSIX; thus no paths are # encoded into archives. This makes 'ar r' malfunction in # this piecewise linking case whenever conflicting object # names appear in distinct ar calls; check, warn and compensate. if (for obj in $save_oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 AR_FLAGS=cq fi # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" save_umask=`umask` umask 0077 if $mkdir "$tmpdir"; then umask $save_umask else umask $save_umask $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyways case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "----------------------------------------------------------------------" $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $EXIT_SUCCESS # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: raidutils-0.0.6.orig/missing0000775000175000000620000002453310175141463015750 0ustar bapstaff00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2004-09-07.08 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # 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' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit 0 ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit 0 ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` 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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $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 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) 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." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: raidutils-0.0.6.orig/autom4te.cache/0002775000175000000620000000000010333777643017163 5ustar bapstaff00000000000000raidutils-0.0.6.orig/autom4te.cache/output.00000664000175000000620000270606210175141431020577 0ustar bapstaff00000000000000@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.59 for I2O RAID Utilities 0.0.6. @%:@ @%:@ Copyright (C) 2003 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 Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 # 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` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='I2O RAID Utilities' PACKAGE_TARNAME='i2o-raid-utilities' PACKAGE_VERSION='0.0.6' PACKAGE_STRING='I2O RAID Utilities 0.0.6' PACKAGE_BUGREPORT='' ac_unique_file="config.h.in" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIB@&t@OBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= 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 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -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 | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -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 ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 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 ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # 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 its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS # # 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 I2O RAID Utilities 0.0.6 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 \`..'] _ACEOF cat <<_ACEOF 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] --datadir=DIR read-only architecture-independent data [PREFIX/share] --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] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _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 I2O RAID Utilities 0.0.6:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@ --enable-fast-install@<:@=PKGS@:>@ optimize for fast installation @<:@default=yes@:>@ --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ --with-pic try to use only PIC/non-PIC objects @<:@default=use both@:>@ --with-tags@<:@=TAGS@:>@ include additional configurations @<:@automatic@:>@ 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 CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style 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 elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF I2O RAID Utilities configure 0.0.6 generated by GNU Autoconf 2.59 Copyright (C) 2003 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 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by I2O RAID Utilities $as_me 0.0.6, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { 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` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&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_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. 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, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX @%:@@%:@ ----------------- @%:@@%:@ @%:@@%:@ Output variables. @%:@@%:@ @%:@@%:@ ----------------- @%:@@%:@ _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX @%:@@%:@ ------------- @%:@@%:@ @%:@@%:@ Output files. @%:@@%:@ @%:@@%:@ ------------- @%:@@%:@ _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX @%:@@%:@ ----------- @%:@@%:@ @%:@@%:@ confdefs.h. @%:@@%:@ @%:@@%:@ ----------- @%:@@%:@ _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # 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='i2o-raid-utilities' VERSION='0.0.6' cat >>confdefs.h <<_ACEOF @%:@define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Checks for programs. ac_ext=cc 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 -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C++ compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C++ compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$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 for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration @%:@include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-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= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_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 for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 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 -std1. */ int osf4_cc_array ['\x00' == 0 ? 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 # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF @%:@ifndef __cplusplus choke me @%:@endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration @%:@include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi; # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && break cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done SED=$lt_cv_path_SED fi echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6 NM="$lt_cv_path_NM" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi4*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case "$host_cpu" in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) case $host_cpu in alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext 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 fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; esac need_locks="$enable_libtool_lock" echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @%:@define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc 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 echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc 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=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_F77" && break done F77=$ac_ct_F77 fi # Provide some information about the compiler. echo "$as_me:__oline__:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 else echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris* | sysv5*) symcode='[BDRT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6 objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default fi; test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # # Check for any special shared library compilation flags. # lt_prog_cc_shlib= if test "$GCC" = no; then case $host_os in sco3.2v5*) lt_prog_cc_shlib='-belf' ;; esac fi if test -n "$lt_prog_cc_shlib"; then { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : else { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} lt_cv_prog_cc_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_prog_compiler_static" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic='-Kpic' lt_prog_compiler_static='-dn' ;; solaris*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds="$tmp_archive_cmds" fi else ld_shlibs=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec=' ' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi4*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='-all_load $convenience' link_all_deplibs=yes else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=no hardcode_shlibpath_var=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no hardcode_shlibpath_var=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var " || \ test "X$hardcode_automatic"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* 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_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* 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_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which librarie types wil actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; darwin* | rhapsody*) if test "$GCC" = yes; then archive_cmds_need_lc=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag='-undefined dynamic_lookup' ;; esac fi ;; esac output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='-all_load $convenience' link_all_deplibs=yes else ld_shlibs=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" # Check whether --with-tags or --without-tags was given. if test "${with_tags+set}" = set; then withval="$with_tags" tagnames="$withval" fi; if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && test "X$CXX" != "Xno"; then ac_ext=cc 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 archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cc # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX=' ' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) if test "$GXX" = yes; then archive_cmds_need_lc_CXX=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_CXX='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='-all_load $convenience' link_all_deplibs_CXX=yes else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd12*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | kfreebsd*-gnu) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_CXX='+b $libdir' hardcode_libdir_separator_CXX=: ;; ia64*) hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case "$host_cpu" in hppa*64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC) case "$host_cpu" in hppa*64*|ia64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case "$host_cpu" in ia64*|hppa*64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc) # Intel C++ with_gnu_ld=yes archive_cmds_need_lc_CXX=no archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; cxx) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; osf3*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sco*) archive_cmds_need_lc_CXX=no case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.0-5 | solaris2.0-5.*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) archive_cmds_need_lc_CXX=no ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; cxx) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC) lt_prog_compiler_pic_CXX='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var CXX" || \ test "X$hardcode_automatic_CXX"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6 if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* 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_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* 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_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_CXX" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) test "$enable_shared" = yes && enable_static=no ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_F77='-Kpic' lt_prog_compiler_static_F77='-dn' ;; solaris*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds_F77="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds_F77="$tmp_archive_cmds" fi else ld_shlibs_F77=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_F77=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77=' ' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi4*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc_F77=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_F77='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='-all_load $convenience' link_all_deplibs_F77=yes else ld_shlibs_F77=no fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; ia64*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; *) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; sco3.2v5*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4.2uw2*) archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_F77='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv5*) no_undefined_flag_F77=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec_F77= hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var F77" || \ test "X$hardcode_automatic_F77"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6 if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_GCJ='-Kpic' lt_prog_compiler_static_GCJ='-dn' ;; solaris*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds_GCJ="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds_GCJ="$tmp_archive_cmds" fi else ld_shlibs_GCJ=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ=' ' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi4*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc_GCJ=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_GCJ='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='-all_load $convenience' link_all_deplibs_GCJ=yes else ld_shlibs_GCJ=no fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; ia64*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; *) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; sco3.2v5*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4.2uw2*) archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv5*) no_undefined_flag_GCJ=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec_GCJ= hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var GCJ" || \ test "X$hardcode_automatic_GCJ"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6 if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* 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_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* 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_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion # Checks for libraries. # Checks for header files. ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in dir; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi else echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in x; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi fi echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @%:@define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in fcntl.h malloc.h memory.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/systeminfo.h unistd.h values.h inttypes.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc 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 for ac_header in strstream.h sstream fstream.h fstream iostream.h iostream iomanip.h iomanip do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done 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 # Checks for typedefs, structures, and compiler characteristics. echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6 if test "${ac_cv_header_stat_broken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if defined(S_ISBLK) && defined(S_IFDIR) # if S_ISBLK (S_IFDIR) You lose. # endif #endif #if defined(S_ISBLK) && defined(S_IFCHR) # if S_ISBLK (S_IFCHR) You lose. # endif #endif #if defined(S_ISLNK) && defined(S_IFREG) # if S_ISLNK (S_IFREG) You lose. # endif #endif #if defined(S_ISSOCK) && defined(S_IFREG) # if S_ISSOCK (S_IFREG) You lose. # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "You lose" >/dev/null 2>&1; then ac_cv_header_stat_broken=yes else ac_cv_header_stat_broken=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6 if test $ac_cv_header_stat_broken = yes; then cat >>confdefs.h <<\_ACEOF @%:@define STAT_MACROS_BROKEN 1 _ACEOF fi echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 if test "${ac_cv_header_stdbool_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef bool # error bool is not defined #endif #ifndef false # error false is not defined #endif #if false # error false is not 0 #endif #ifndef true # error true is not defined #endif #if true != 1 # error true is not 1 #endif #ifndef __bool_true_false_are_defined # error __bool_true_false_are_defined is not defined #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) -0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) -0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; int main () { return !a + !b + !c + !d + !e + !f + !g + !h + !i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdbool_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 echo "$as_me:$LINENO: checking for _Bool" >&5 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 if test "${ac_cv_type__Bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((_Bool *) 0) return 0; if (sizeof (_Bool)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type__Bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type__Bool=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 echo "${ECHO_T}$ac_cv_type__Bool" >&6 if test $ac_cv_type__Bool = yes; then cat >>confdefs.h <<_ACEOF @%:@define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_STDBOOL_H 1 _ACEOF fi echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF @%:@define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((pid_t *) 0) return 0; if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @%:@define TIME_WITH_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @%:@define TM_IN_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking for working volatile" >&5 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6 if test "${ac_cv_c_volatile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { volatile int x; int * volatile y; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_volatile=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_volatile=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 echo "${ECHO_T}$ac_cv_c_volatile" >&6 if test $ac_cv_c_volatile = no; then cat >>confdefs.h <<\_ACEOF @%:@define volatile _ACEOF fi # Checks for library functions. echo "$as_me:$LINENO: checking whether closedir returns void" >&5 echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6 if test "${ac_cv_func_closedir_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_closedir_void=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header_dirent> #ifndef __cplusplus int closedir (); #endif int main () { exit (closedir (opendir (".")) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_closedir_void=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_closedir_void=yes fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5 echo "${ECHO_T}$ac_cv_func_closedir_void" >&6 if test $ac_cv_func_closedir_void = yes; then cat >>confdefs.h <<\_ACEOF @%:@define CLOSEDIR_VOID 1 _ACEOF fi for ac_header in unistd.h vfork.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in fork vfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then echo "$as_me:$LINENO: checking for working fork" >&5 echo $ECHO_N "checking for working fork... $ECHO_C" >&6 if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* By Ruediger Kuhlmann. */ #include #if HAVE_UNISTD_H # include #endif /* Some systems only have a dummy stub for fork() */ int main () { if (fork() < 0) exit (1); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_fork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_fork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 echo "${ECHO_T}$ac_cv_func_fork_works" >&6 else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then echo "$as_me:$LINENO: checking for working vfork" >&5 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 if test "${ac_cv_func_vfork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_vfork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ #include #include #include #include #include #if HAVE_UNISTD_H # include #endif #if HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; exit( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_vfork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_vfork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_VFORK 1 _ACEOF else cat >>confdefs.h <<\_ACEOF @%:@define vfork fork _ACEOF fi if test "x$ac_cv_func_fork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_FORK 1 _ACEOF fi if test $ac_cv_c_compiler_gnu = yes; then echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_traditional+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if STDC_HEADERS || HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { exit (malloc (0) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6 if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF @%:@define HAVE_MALLOC 0 _ACEOF case $LIB@&t@OBJS in "malloc.$ac_objext" | \ *" malloc.$ac_objext" | \ "malloc.$ac_objext "* | \ *" malloc.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS malloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF @%:@define malloc rpl_malloc _ACEOF fi echo "$as_me:$LINENO: checking for working memcmp" >&5 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) exit (1); } exit (0); } ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memcmp_working=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 test $ac_cv_func_memcmp_working = no && case $LIB@&t@OBJS in "memcmp.$ac_objext" | \ *" memcmp.$ac_objext" | \ "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS memcmp.$ac_objext" ;; esac for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6 if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_realloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if STDC_HEADERS || HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { exit (realloc (0, 0) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_realloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6 if test $ac_cv_func_realloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_REALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF @%:@define HAVE_REALLOC 0 _ACEOF case $LIB@&t@OBJS in "realloc.$ac_objext" | \ *" realloc.$ac_objext" | \ "realloc.$ac_objext "* | \ *" realloc.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS realloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF @%:@define realloc rpl_realloc _ACEOF fi echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef signal # undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <<_ACEOF @%:@define RETSIGTYPE $ac_cv_type_signal _ACEOF echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6 if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_lstat_dereferences_slashed_symlink=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6 test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF @%:@define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then case $LIB@&t@OBJS in "lstat.$ac_objext" | \ *" lstat.$ac_objext" | \ "lstat.$ac_objext "* | \ *" lstat.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS lstat.$ac_objext" ;; esac fi echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6 if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_stat_empty_string_bug=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; exit (stat ("", &sbuf) ? 1 : 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_stat_empty_string_bug=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_stat_empty_string_bug=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6 if test $ac_cv_func_stat_empty_string_bug = yes; then case $LIB@&t@OBJS in "stat.$ac_objext" | \ *" stat.$ac_objext" | \ "stat.$ac_objext "* | \ *" stat.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF @%:@define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else char (*f) () = _doprnt; #endif #ifdef __cplusplus } #endif int main () { return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in alarm atexit dup2 memset strchr strcspn strpbrk strrchr strspn strstr strtol strtoul sysinfo uname do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile raideng/Makefile raidutil/Makefile lib/Makefile distribution/raidutils.spec" 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, don't put newlines in cache variables' values. # 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. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *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 \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" 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}' # 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 DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by I2O RAID Utilities $as_me 0.0.6, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --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_cs_version="\\ I2O RAID Utilities config.status 0.0.6 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "raideng/Makefile" ) CONFIG_FILES="$CONFIG_FILES raideng/Makefile" ;; "raidutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES raidutil/Makefile" ;; "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "distribution/raidutils.spec" ) CONFIG_FILES="$CONFIG_FILES distribution/raidutils.spec" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_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 to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@EGREP@,$EGREP,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CXXCPP@,$CXXCPP,;t t s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # 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. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@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,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #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. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # 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. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi raidutils-0.0.6.orig/autom4te.cache/output.10000664000175000000620000270477010175141463020611 0ustar bapstaff00000000000000@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.59 for I2O RAID Utilities 0.0.6. @%:@ @%:@ Copyright (C) 2003 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 Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 # 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` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='I2O RAID Utilities' PACKAGE_TARNAME='i2o-raid-utilities' PACKAGE_VERSION='0.0.6' PACKAGE_STRING='I2O RAID Utilities 0.0.6' PACKAGE_BUGREPORT='' ac_unique_file="config.h.in" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIB@&t@OBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= 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 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -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 | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -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 ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 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 ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # 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 its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS # # 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 I2O RAID Utilities 0.0.6 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 \`..'] _ACEOF cat <<_ACEOF 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] --datadir=DIR read-only architecture-independent data [PREFIX/share] --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] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _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 I2O RAID Utilities 0.0.6:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@ --enable-fast-install@<:@=PKGS@:>@ optimize for fast installation @<:@default=yes@:>@ --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ --with-pic try to use only PIC/non-PIC objects @<:@default=use both@:>@ --with-tags@<:@=TAGS@:>@ include additional configurations @<:@automatic@:>@ 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 CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style 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 elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF I2O RAID Utilities configure 0.0.6 generated by GNU Autoconf 2.59 Copyright (C) 2003 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 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by I2O RAID Utilities $as_me 0.0.6, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { 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` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&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_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. 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, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX @%:@@%:@ ----------------- @%:@@%:@ @%:@@%:@ Output variables. @%:@@%:@ @%:@@%:@ ----------------- @%:@@%:@ _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX @%:@@%:@ ------------- @%:@@%:@ @%:@@%:@ Output files. @%:@@%:@ @%:@@%:@ ------------- @%:@@%:@ _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX @%:@@%:@ ----------- @%:@@%:@ @%:@@%:@ confdefs.h. @%:@@%:@ @%:@@%:@ ----------- @%:@@%:@ _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # 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='i2o-raid-utilities' VERSION='0.0.6' cat >>confdefs.h <<_ACEOF @%:@define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Checks for programs. ac_ext=cc 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 -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C++ compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C++ compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$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 for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration @%:@include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-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= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_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 for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 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 -std1. */ int osf4_cc_array ['\x00' == 0 ? 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 # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF @%:@ifndef __cplusplus choke me @%:@endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration @%:@include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi; # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && break cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done SED=$lt_cv_path_SED fi echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6 NM="$lt_cv_path_NM" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi4*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case "$host_cpu" in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) case $host_cpu in alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext 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 fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; esac need_locks="$enable_libtool_lock" echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @%:@define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc 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 echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc 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=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_F77" && break done F77=$ac_ct_F77 fi # Provide some information about the compiler. echo "$as_me:__oline__:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 else echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris* | sysv5*) symcode='[BDRT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6 objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default fi; test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # # Check for any special shared library compilation flags. # lt_prog_cc_shlib= if test "$GCC" = no; then case $host_os in sco3.2v5*) lt_prog_cc_shlib='-belf' ;; esac fi if test -n "$lt_prog_cc_shlib"; then { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : else { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} lt_cv_prog_cc_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_prog_compiler_static" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic='-Kpic' lt_prog_compiler_static='-dn' ;; solaris*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds="$tmp_archive_cmds" fi else ld_shlibs=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec=' ' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi4*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='-all_load $convenience' link_all_deplibs=yes else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=no hardcode_shlibpath_var=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no hardcode_shlibpath_var=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var " || \ test "X$hardcode_automatic"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* 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_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* 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_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which librarie types wil actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; darwin* | rhapsody*) if test "$GCC" = yes; then archive_cmds_need_lc=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag='-undefined dynamic_lookup' ;; esac fi ;; esac output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='-all_load $convenience' link_all_deplibs=yes else ld_shlibs=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" # Check whether --with-tags or --without-tags was given. if test "${with_tags+set}" = set; then withval="$with_tags" tagnames="$withval" fi; if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && test "X$CXX" != "Xno"; then ac_ext=cc 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 archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cc # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX=' ' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) if test "$GXX" = yes; then archive_cmds_need_lc_CXX=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_CXX='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='-all_load $convenience' link_all_deplibs_CXX=yes else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd12*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | kfreebsd*-gnu) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_CXX='+b $libdir' hardcode_libdir_separator_CXX=: ;; ia64*) hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case "$host_cpu" in hppa*64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC) case "$host_cpu" in hppa*64*|ia64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case "$host_cpu" in ia64*|hppa*64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc) # Intel C++ with_gnu_ld=yes archive_cmds_need_lc_CXX=no archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; cxx) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; osf3*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sco*) archive_cmds_need_lc_CXX=no case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.0-5 | solaris2.0-5.*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) archive_cmds_need_lc_CXX=no ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; cxx) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC) lt_prog_compiler_pic_CXX='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var CXX" || \ test "X$hardcode_automatic_CXX"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6 if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* 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_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* 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_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_CXX" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) test "$enable_shared" = yes && enable_static=no ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_F77='-Kpic' lt_prog_compiler_static_F77='-dn' ;; solaris*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds_F77="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds_F77="$tmp_archive_cmds" fi else ld_shlibs_F77=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_F77=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77=' ' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi4*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc_F77=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_F77='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='-all_load $convenience' link_all_deplibs_F77=yes else ld_shlibs_F77=no fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; ia64*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; *) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; sco3.2v5*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4.2uw2*) archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_F77='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv5*) no_undefined_flag_F77=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec_F77= hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var F77" || \ test "X$hardcode_automatic_F77"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6 if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_GCJ='-Kpic' lt_prog_compiler_static_GCJ='-dn' ;; solaris*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds_GCJ="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds_GCJ="$tmp_archive_cmds" fi else ld_shlibs_GCJ=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ=' ' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi4*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then archive_cmds_need_lc_GCJ=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' ;; 10.*) allow_undefined_flag_GCJ='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='-all_load $convenience' link_all_deplibs_GCJ=yes else ld_shlibs_GCJ=no fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; ia64*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; *) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; sco3.2v5*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4.2uw2*) archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv5*) no_undefined_flag_GCJ=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec_GCJ= hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.01* | freebsdelf3.01*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var GCJ" || \ test "X$hardcode_automatic_GCJ"="Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6 if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* 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_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* 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_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion # Checks for libraries. # Checks for header files. ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in dir; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi else echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in x; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi fi echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @%:@define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in fcntl.h malloc.h memory.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/systeminfo.h unistd.h values.h inttypes.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc 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 for ac_header in strstream.h sstream fstream.h fstream iostream.h iostream iomanip.h iomanip do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done 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 # Checks for typedefs, structures, and compiler characteristics. echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6 if test "${ac_cv_header_stat_broken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if defined(S_ISBLK) && defined(S_IFDIR) # if S_ISBLK (S_IFDIR) You lose. # endif #endif #if defined(S_ISBLK) && defined(S_IFCHR) # if S_ISBLK (S_IFCHR) You lose. # endif #endif #if defined(S_ISLNK) && defined(S_IFREG) # if S_ISLNK (S_IFREG) You lose. # endif #endif #if defined(S_ISSOCK) && defined(S_IFREG) # if S_ISSOCK (S_IFREG) You lose. # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "You lose" >/dev/null 2>&1; then ac_cv_header_stat_broken=yes else ac_cv_header_stat_broken=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6 if test $ac_cv_header_stat_broken = yes; then cat >>confdefs.h <<\_ACEOF @%:@define STAT_MACROS_BROKEN 1 _ACEOF fi echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 if test "${ac_cv_header_stdbool_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef bool # error bool is not defined #endif #ifndef false # error false is not defined #endif #if false # error false is not 0 #endif #ifndef true # error true is not defined #endif #if true != 1 # error true is not 1 #endif #ifndef __bool_true_false_are_defined # error __bool_true_false_are_defined is not defined #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) -0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) -0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; int main () { return !a + !b + !c + !d + !e + !f + !g + !h + !i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdbool_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 echo "$as_me:$LINENO: checking for _Bool" >&5 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 if test "${ac_cv_type__Bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((_Bool *) 0) return 0; if (sizeof (_Bool)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type__Bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type__Bool=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 echo "${ECHO_T}$ac_cv_type__Bool" >&6 if test $ac_cv_type__Bool = yes; then cat >>confdefs.h <<_ACEOF @%:@define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_STDBOOL_H 1 _ACEOF fi echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF @%:@define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((pid_t *) 0) return 0; if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @%:@define TIME_WITH_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @%:@define TM_IN_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking for working volatile" >&5 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6 if test "${ac_cv_c_volatile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { volatile int x; int * volatile y; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_volatile=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_volatile=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 echo "${ECHO_T}$ac_cv_c_volatile" >&6 if test $ac_cv_c_volatile = no; then cat >>confdefs.h <<\_ACEOF @%:@define volatile _ACEOF fi # Checks for library functions. echo "$as_me:$LINENO: checking whether closedir returns void" >&5 echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6 if test "${ac_cv_func_closedir_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_closedir_void=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header_dirent> #ifndef __cplusplus int closedir (); #endif int main () { exit (closedir (opendir (".")) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_closedir_void=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_closedir_void=yes fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5 echo "${ECHO_T}$ac_cv_func_closedir_void" >&6 if test $ac_cv_func_closedir_void = yes; then cat >>confdefs.h <<\_ACEOF @%:@define CLOSEDIR_VOID 1 _ACEOF fi for ac_header in unistd.h vfork.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in fork vfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then echo "$as_me:$LINENO: checking for working fork" >&5 echo $ECHO_N "checking for working fork... $ECHO_C" >&6 if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* By Ruediger Kuhlmann. */ #include #if HAVE_UNISTD_H # include #endif /* Some systems only have a dummy stub for fork() */ int main () { if (fork() < 0) exit (1); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_fork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_fork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 echo "${ECHO_T}$ac_cv_func_fork_works" >&6 else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then echo "$as_me:$LINENO: checking for working vfork" >&5 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 if test "${ac_cv_func_vfork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_vfork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ #include #include #include #include #include #if HAVE_UNISTD_H # include #endif #if HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; exit( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_vfork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_vfork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_VFORK 1 _ACEOF else cat >>confdefs.h <<\_ACEOF @%:@define vfork fork _ACEOF fi if test "x$ac_cv_func_fork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_FORK 1 _ACEOF fi if test $ac_cv_c_compiler_gnu = yes; then echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_traditional+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if STDC_HEADERS || HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { exit (malloc (0) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6 if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF @%:@define HAVE_MALLOC 0 _ACEOF case $LIB@&t@OBJS in "malloc.$ac_objext" | \ *" malloc.$ac_objext" | \ "malloc.$ac_objext "* | \ *" malloc.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS malloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF @%:@define malloc rpl_malloc _ACEOF fi echo "$as_me:$LINENO: checking for working memcmp" >&5 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) exit (1); } exit (0); } ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memcmp_working=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 test $ac_cv_func_memcmp_working = no && case $LIB@&t@OBJS in "memcmp.$ac_objext" | \ *" memcmp.$ac_objext" | \ "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS memcmp.$ac_objext" ;; esac for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX @%:@@%:@ --------------------------------------------- @%:@@%:@ @%:@@%:@ Report this to the I2O RAID Utilities lists. @%:@@%:@ @%:@@%:@ --------------------------------------------- @%:@@%:@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6 if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_realloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if STDC_HEADERS || HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { exit (realloc (0, 0) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_realloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6 if test $ac_cv_func_realloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_REALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF @%:@define HAVE_REALLOC 0 _ACEOF case $LIB@&t@OBJS in "realloc.$ac_objext" | \ *" realloc.$ac_objext" | \ "realloc.$ac_objext "* | \ *" realloc.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS realloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF @%:@define realloc rpl_realloc _ACEOF fi echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef signal # undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <<_ACEOF @%:@define RETSIGTYPE $ac_cv_type_signal _ACEOF echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6 if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_lstat_dereferences_slashed_symlink=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6 test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF @%:@define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then case $LIB@&t@OBJS in "lstat.$ac_objext" | \ *" lstat.$ac_objext" | \ "lstat.$ac_objext "* | \ *" lstat.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS lstat.$ac_objext" ;; esac fi echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6 if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_stat_empty_string_bug=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; exit (stat ("", &sbuf) ? 1 : 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_stat_empty_string_bug=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_stat_empty_string_bug=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6 if test $ac_cv_func_stat_empty_string_bug = yes; then case $LIB@&t@OBJS in "stat.$ac_objext" | \ *" stat.$ac_objext" | \ "stat.$ac_objext "* | \ *" stat.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF @%:@define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else char (*f) () = _doprnt; #endif #ifdef __cplusplus } #endif int main () { return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in alarm atexit dup2 memset strchr strcspn strpbrk strrchr strspn strstr strtol strtoul sysinfo uname do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile raideng/Makefile raidutil/Makefile lib/Makefile distribution/raidutils.spec" 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, don't put newlines in cache variables' values. # 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. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *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 \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" 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}' # 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 DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by I2O RAID Utilities $as_me 0.0.6, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --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_cs_version="\\ I2O RAID Utilities config.status 0.0.6 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "raideng/Makefile" ) CONFIG_FILES="$CONFIG_FILES raideng/Makefile" ;; "raidutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES raidutil/Makefile" ;; "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "distribution/raidutils.spec" ) CONFIG_FILES="$CONFIG_FILES distribution/raidutils.spec" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_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 to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@EGREP@,$EGREP,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CXXCPP@,$CXXCPP,;t t s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # 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. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@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,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #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. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # 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. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi raidutils-0.0.6.orig/autom4te.cache/requests0000664000175000000620000004034510175141463020752 0ustar bapstaff00000000000000# This file was generated. # It contains the lists of macros which have been traced. # It can be safely removed. @request = ( bless( [ '0', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', '/usr/share/aclocal/libtool.m4', '/usr/share/aclocal-1.9/amversion.m4', '/usr/share/aclocal-1.9/auxdir.m4', '/usr/share/aclocal-1.9/cond.m4', '/usr/share/aclocal-1.9/depend.m4', '/usr/share/aclocal-1.9/depout.m4', '/usr/share/aclocal-1.9/header.m4', '/usr/share/aclocal-1.9/init.m4', '/usr/share/aclocal-1.9/install-sh.m4', '/usr/share/aclocal-1.9/lead-dot.m4', '/usr/share/aclocal-1.9/make.m4', '/usr/share/aclocal-1.9/missing.m4', '/usr/share/aclocal-1.9/mkdirp.m4', '/usr/share/aclocal-1.9/options.m4', '/usr/share/aclocal-1.9/runlog.m4', '/usr/share/aclocal-1.9/sanity.m4', '/usr/share/aclocal-1.9/strip.m4', '/usr/share/aclocal-1.9/tar.m4', 'configure.in' ], { 'AM_ENABLE_STATIC' => 1, 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, 'AC_C_VOLATILE' => 1, 'AC_TYPE_OFF_T' => 1, '_LT_AC_SHELL_INIT' => 1, 'AC_FUNC_CLOSEDIR_VOID' => 1, 'AC_REPLACE_FNMATCH' => 1, 'AC_DEFUN' => 1, 'AC_PROG_LIBTOOL' => 1, '_LT_AC_LANG_CXX_CONFIG' => 1, 'AM_PROG_MKDIR_P' => 1, 'AC_FUNC_STAT' => 1, 'AC_FUNC_WAIT3' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AC_FUNC_LSTAT' => 1, 'AC_STRUCT_TM' => 1, 'AC_CHECK_HEADERS' => 1, 'AC_FUNC_STRTOD' => 1, 'AM_MISSING_PROG' => 1, 'AC_FUNC_STRNLEN' => 1, 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, 'AC_PROG_CXX' => 1, '_LT_AC_LANG_C_CONFIG' => 1, 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1, 'AM_PROG_INSTALL_STRIP' => 1, 'AC_PROG_AWK' => 1, '_m4_warn' => 1, 'AC_LIBTOOL_OBJDIR' => 1, 'AC_HEADER_MAJOR' => 1, 'AM_SANITY_CHECK' => 1, 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, '_LT_AC_CHECK_DLFCN' => 1, '_AM_PROG_TAR' => 1, 'AC_LIBTOOL_GCJ' => 1, 'AC_PROG_GCC_TRADITIONAL' => 1, 'AC_LIBSOURCE' => 1, 'AC_STRUCT_ST_BLOCKS' => 1, '_LT_AC_LANG_F77' => 1, 'AC_LIBTOOL_CONFIG' => 1, 'AC_PROG_MAKE_SET' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'sinclude' => 1, 'AM_DISABLE_SHARED' => 1, '_LT_AC_LANG_CXX' => 1, 'AM_PROG_LIBTOOL' => 1, '_LT_AC_FILE_LTDLL_C' => 1, 'AM_PROG_LD' => 1, 'AC_FUNC_STRERROR_R' => 1, 'AC_DECL_SYS_SIGLIST' => 1, 'AC_FUNC_FORK' => 1, 'AU_DEFUN' => 1, 'AC_FUNC_VPRINTF' => 1, 'AC_PROG_NM' => 1, 'AC_LIBTOOL_DLOPEN' => 1, 'AC_PROG_LD' => 1, 'AC_PROG_LD_GNU' => 1, 'AC_ENABLE_FAST_INSTALL' => 1, 'AC_INIT' => 1, 'AC_STRUCT_TIMEZONE' => 1, 'AC_SUBST' => 1, 'AC_FUNC_ALLOCA' => 1, '_AM_SET_OPTION' => 1, 'AC_CANONICAL_HOST' => 1, 'AC_LIBTOOL_PROG_CC_C_O' => 1, 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, 'AC_PROG_RANLIB' => 1, 'AC_FUNC_SETPGRP' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AC_FUNC_MMAP' => 1, 'AC_TYPE_SIZE_T' => 1, 'AC_CHECK_TYPES' => 1, 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AC_CHECK_MEMBERS' => 1, 'AC_FUNC_UTIME_NULL' => 1, 'AC_FUNC_SELECT_ARGTYPES' => 1, '_LT_AC_LANG_GCJ' => 1, 'AC_FUNC_STRFTIME' => 1, 'AC_HEADER_STAT' => 1, 'AC_C_INLINE' => 1, 'AC_LIBTOOL_RC' => 1, '_LT_AC_PROG_ECHO_BACKSLASH' => 1, 'AC_DISABLE_FAST_INSTALL' => 1, 'AC_CONFIG_FILES' => 1, '_LT_AC_TRY_DLOPEN_SELF' => 1, '_LT_AC_SYS_LIBPATH_AIX' => 1, 'include' => 1, 'LT_AC_PROG_SED' => 1, 'AM_ENABLE_SHARED' => 1, 'AM_GNU_GETTEXT' => 1, '_LT_AC_LANG_GCJ_CONFIG' => 1, 'AC_ENABLE_SHARED' => 1, 'AC_CHECK_LIB' => 1, 'AC_FUNC_OBSTACK' => 1, 'AC_FUNC_MALLOC' => 1, 'AC_FUNC_GETGROUPS' => 1, 'AC_FUNC_GETLOADAVG' => 1, 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, 'AC_ENABLE_STATIC' => 1, 'AC_FUNC_FSEEKO' => 1, '_LT_AC_TAGVAR' => 1, 'AM_PROG_CC_C_O' => 1, 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, 'AM_CONDITIONAL' => 1, 'AC_FUNC_MKTIME' => 1, 'AC_HEADER_SYS_WAIT' => 1, 'AC_FUNC_MEMCMP' => 1, 'AC_PROG_LN_S' => 1, 'AM_PROG_INSTALL_SH' => 1, 'm4_include' => 1, 'AC_PROG_EGREP' => 1, 'AC_HEADER_DIRENT' => 1, 'AC_PATH_MAGIC' => 1, '_AC_AM_CONFIG_HEADER_HOOK' => 1, 'AM_MAKE_INCLUDE' => 1, '_LT_AC_TAGCONFIG' => 1, 'm4_pattern_forbid' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_LIBTOOL_COMPILER_OPTION' => 1, 'AC_DISABLE_SHARED' => 1, 'AC_LIBTOOL_SETUP' => 1, 'AC_LIBTOOL_WIN32_DLL' => 1, 'AC_PROG_LD_RELOAD_FLAG' => 1, 'AC_HEADER_TIME' => 1, 'AC_TYPE_MODE_T' => 1, 'AM_MISSING_HAS_RUN' => 1, 'AC_FUNC_GETMNTENT' => 1, 'AC_LIBTOOL_DLOPEN_SELF' => 1, 'm4_sinclude' => 1, 'AC_PATH_X' => 1, 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, 'AC_HEADER_STDC' => 1, 'AC_LIBTOOL_LINKER_OPTION' => 1, 'LT_AC_PROG_RC' => 1, 'AC_LIBTOOL_CXX' => 1, 'LT_AC_PROG_GCJ' => 1, 'AC_FUNC_ERROR_AT_LINE' => 1, 'AM_DISABLE_STATIC' => 1, 'AM_DEP_TRACK' => 1, 'AM_CONFIG_HEADER' => 1, '_AC_PROG_LIBTOOL' => 1, 'AC_FUNC_MBRTOWC' => 1, 'AC_TYPE_SIGNAL' => 1, '_AM_IF_OPTION' => 1, 'AC_TYPE_UID_T' => 1, 'AC_PATH_TOOL_PREFIX' => 1, 'm4_pattern_allow' => 1, 'AC_LIBTOOL_F77' => 1, 'AM_SET_LEADING_DOT' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, '_AM_DEPENDENCIES' => 1, 'AC_LIBTOOL_LANG_C_CONFIG' => 1, '_LT_AC_SYS_COMPILER' => 1, 'AC_PROG_CC' => 1, 'AM_PROG_NM' => 1, 'AC_FUNC_STRCOLL' => 1, 'AC_PROG_YACC' => 1, 'AC_LIBLTDL_CONVENIENCE' => 1, 'AC_DEPLIBS_CHECK_METHOD' => 1, 'AC_FUNC_CHOWN' => 1, 'AC_LIBLTDL_INSTALLABLE' => 1, 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, 'AC_FUNC_GETPGRP' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_FUNC_REALLOC' => 1, 'AC_DISABLE_STATIC' => 1, 'AC_CONFIG_LINKS' => 1, 'AM_MAINTAINER_MODE' => 1, '_LT_AC_LOCK' => 1, '_LT_AC_LANG_RC_CONFIG' => 1, 'AC_PROG_CPP' => 1, 'AC_C_CONST' => 1, 'AC_PROG_LEX' => 1, 'AC_TYPE_PID_T' => 1, 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, 'AC_FUNC_SETVBUF_REVERSED' => 1, 'AM_AUX_DIR_EXPAND' => 1, 'AC_PROG_INSTALL' => 1, '_LT_AC_LANG_F77_CONFIG' => 1, 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, '_AM_SET_OPTIONS' => 1, '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AM_RUN_LOG' => 1, 'AC_LIBTOOL_PICMODE' => 1, 'AH_OUTPUT' => 1, 'AC_CHECK_LIBM' => 1, 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, '_AM_MANGLE_OPTION' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, 'AC_CONFIG_HEADERS' => 1, 'AM_SET_DEPDIR' => 1, 'AC_CHECK_FUNCS' => 1 } ], 'Autom4te::Request' ), bless( [ '1', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', 'aclocal.m4', 'configure.in' ], { '_LT_AC_TAGCONFIG' => 1, 'm4_pattern_forbid' => 1, 'AC_CANONICAL_TARGET' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_TYPE_OFF_T' => 1, 'AC_C_VOLATILE' => 1, 'AC_FUNC_CLOSEDIR_VOID' => 1, 'AC_REPLACE_FNMATCH' => 1, 'AC_PROG_LIBTOOL' => 1, 'AC_FUNC_STAT' => 1, 'AC_HEADER_TIME' => 1, 'AC_FUNC_WAIT3' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AC_STRUCT_TM' => 1, 'AC_FUNC_LSTAT' => 1, 'AC_TYPE_MODE_T' => 1, 'AC_FUNC_GETMNTENT' => 1, 'AC_FUNC_STRTOD' => 1, 'AC_CHECK_HEADERS' => 1, 'AC_FUNC_STRNLEN' => 1, 'm4_sinclude' => 1, 'AC_PROG_CXX' => 1, 'AC_PATH_X' => 1, 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1, 'AC_PROG_AWK' => 1, '_m4_warn' => 1, 'AC_HEADER_STDC' => 1, 'AC_HEADER_MAJOR' => 1, 'AC_FUNC_ERROR_AT_LINE' => 1, 'AC_PROG_GCC_TRADITIONAL' => 1, 'AC_LIBSOURCE' => 1, 'AC_FUNC_MBRTOWC' => 1, 'AC_STRUCT_ST_BLOCKS' => 1, 'AC_CANONICAL_BUILD' => 1, 'AC_TYPE_SIGNAL' => 1, 'AC_TYPE_UID_T' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'AC_PROG_MAKE_SET' => 1, 'sinclude' => 1, 'm4_pattern_allow' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'AC_FUNC_STRERROR_R' => 1, 'AC_PROG_CC' => 1, 'AC_DECL_SYS_SIGLIST' => 1, 'AC_FUNC_FORK' => 1, 'AC_FUNC_VPRINTF' => 1, 'AC_FUNC_STRCOLL' => 1, 'AC_PROG_YACC' => 1, 'AC_INIT' => 1, 'AC_STRUCT_TIMEZONE' => 1, 'AC_FUNC_CHOWN' => 1, 'AC_SUBST' => 1, 'AC_FUNC_ALLOCA' => 1, 'AC_CANONICAL_HOST' => 1, 'AC_FUNC_GETPGRP' => 1, 'AC_PROG_RANLIB' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_FUNC_SETPGRP' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AC_FUNC_MMAP' => 1, 'AC_FUNC_REALLOC' => 1, 'AC_TYPE_SIZE_T' => 1, 'AC_CONFIG_LINKS' => 1, 'AC_CHECK_TYPES' => 1, 'LT_SUPPORTED_TAG' => 1, 'AC_CHECK_MEMBERS' => 1, 'AM_MAINTAINER_MODE' => 1, 'AC_FUNC_UTIME_NULL' => 1, 'AC_FUNC_SELECT_ARGTYPES' => 1, 'AC_FUNC_STRFTIME' => 1, 'AC_HEADER_STAT' => 1, 'AC_C_INLINE' => 1, 'AC_PROG_CPP' => 1, 'AM_ENABLE_MULTILIB' => 1, 'AC_TYPE_PID_T' => 1, 'AC_C_CONST' => 1, 'AC_PROG_LEX' => 1, 'AC_CONFIG_FILES' => 1, 'include' => 1, 'AC_FUNC_SETVBUF_REVERSED' => 1, 'AC_PROG_INSTALL' => 1, 'AM_GNU_GETTEXT' => 1, 'AC_CHECK_LIB' => 1, 'AC_FUNC_OBSTACK' => 1, 'AC_FUNC_MALLOC' => 1, 'AC_FUNC_GETGROUPS' => 1, 'AC_FUNC_GETLOADAVG' => 1, 'AH_OUTPUT' => 1, 'AC_FUNC_FSEEKO' => 1, 'AM_PROG_CC_C_O' => 1, 'AM_CONDITIONAL' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AC_FUNC_MKTIME' => 1, 'AC_CONFIG_HEADERS' => 1, 'AC_HEADER_SYS_WAIT' => 1, 'AC_FUNC_MEMCMP' => 1, 'AC_PROG_LN_S' => 1, 'm4_include' => 1, 'AC_HEADER_DIRENT' => 1, 'AC_CHECK_FUNCS' => 1 } ], 'Autom4te::Request' ) ); raidutils-0.0.6.orig/autom4te.cache/traces.00000664000175000000620000144724510175141431020524 0ustar bapstaff00000000000000m4trace:/usr/share/aclocal/libtool.m4:70: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote AM_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or AM_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])]) m4trace:/usr/share/aclocal/libtool.m4:90: -1- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ]) m4trace:/usr/share/aclocal/libtool.m4:232: -1- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ]) m4trace:/usr/share/aclocal/libtool.m4:245: -1- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC ]) m4trace:/usr/share/aclocal/libtool.m4:264: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ]) m4trace:/usr/share/aclocal/libtool.m4:275: -1- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ]) m4trace:/usr/share/aclocal/libtool.m4:431: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])]) m4trace:/usr/share/aclocal/libtool.m4:559: -1- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ]) m4trace:/usr/share/aclocal/libtool.m4:602: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ]) m4trace:/usr/share/aclocal/libtool.m4:634: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ]) m4trace:/usr/share/aclocal/libtool.m4:705: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ]) m4trace:/usr/share/aclocal/libtool.m4:712: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ]) m4trace:/usr/share/aclocal/libtool.m4:801: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ]) m4trace:/usr/share/aclocal/libtool.m4:914: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ]) m4trace:/usr/share/aclocal/libtool.m4:963: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ]) m4trace:/usr/share/aclocal/libtool.m4:990: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ]) m4trace:/usr/share/aclocal/libtool.m4:1007: -1- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ]) m4trace:/usr/share/aclocal/libtool.m4:1048: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ]) m4trace:/usr/share/aclocal/libtool.m4:1077: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ]) m4trace:/usr/share/aclocal/libtool.m4:1642: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=yes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no ]) m4trace:/usr/share/aclocal/libtool.m4:1741: -1- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && test "X$CXX" != "Xno"; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ]) m4trace:/usr/share/aclocal/libtool.m4:1749: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ]) m4trace:/usr/share/aclocal/libtool.m4:1757: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ]) m4trace:/usr/share/aclocal/libtool.m4:1787: -1- AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ]) m4trace:/usr/share/aclocal/libtool.m4:1796: -1- AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ]) m4trace:/usr/share/aclocal/libtool.m4:1826: -1- AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ]) m4trace:/usr/share/aclocal/libtool.m4:1835: -1- AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ]) m4trace:/usr/share/aclocal/libtool.m4:1865: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ]) m4trace:/usr/share/aclocal/libtool.m4:1874: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ]) m4trace:/usr/share/aclocal/libtool.m4:1884: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ]) m4trace:/usr/share/aclocal/libtool.m4:1962: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ]) m4trace:/usr/share/aclocal/libtool.m4:1977: -1- AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ]) m4trace:/usr/share/aclocal/libtool.m4:2062: -1- AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case "$host_cpu" in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) case $host_cpu in alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ]) m4trace:/usr/share/aclocal/libtool.m4:2332: -1- AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ]) m4trace:/usr/share/aclocal/libtool.m4:2353: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ]) m4trace:/usr/share/aclocal/libtool.m4:2378: -1- AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ]) m4trace:/usr/share/aclocal/libtool.m4:2414: -1- AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ]) m4trace:/usr/share/aclocal/libtool.m4:2422: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ]) m4trace:/usr/share/aclocal/libtool.m4:2431: -1- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ]) m4trace:/usr/share/aclocal/libtool.m4:2439: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ]) m4trace:/usr/share/aclocal/libtool.m4:2447: -1- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ]) m4trace:/usr/share/aclocal/libtool.m4:2455: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ]) m4trace:/usr/share/aclocal/libtool.m4:2468: -1- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ]) m4trace:/usr/share/aclocal/libtool.m4:2477: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ]) m4trace:/usr/share/aclocal/libtool.m4:2485: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) m4trace:/usr/share/aclocal/libtool.m4:2622: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # # Check for any special shared library compilation flags. # _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= if test "$GCC" = no; then case $host_os in sco3.2v5*) _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' ;; esac fi if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : else AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no fi fi # # Check to make sure the static flag actually works. # AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) # Report which librarie types wil actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; darwin* | rhapsody*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' ;; esac fi ;; esac output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ]) m4trace:/usr/share/aclocal/libtool.m4:2630: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) m4trace:/usr/share/aclocal/libtool.m4:3517: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cc # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; dgux*) case $cc_basename in ec++) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC) case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case "$host_cpu" in ia64*|hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc) # Intel C++ with_gnu_ld=yes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; cxx) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; osf3*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sco*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ]) m4trace:/usr/share/aclocal/libtool.m4:3653: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ]) m4trace:/usr/share/aclocal/libtool.m4:4349: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ]) m4trace:/usr/share/aclocal/libtool.m4:4535: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) symcode='[[BDRT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) m4trace:/usr/share/aclocal/libtool.m4:4996: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; cxx) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $CC in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; sco3.2v5*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac ]) m4trace:/usr/share/aclocal/libtool.m4:5829: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi4*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) if test "$GXX" = yes ; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' ;; esac fi ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; sco3.2v5*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4.2uw2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv5*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ]) m4trace:/usr/share/aclocal/libtool.m4:5869: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ]) m4trace:/usr/share/aclocal/libtool.m4:5874: -1- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) m4trace:/usr/share/aclocal/libtool.m4:5878: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) m4trace:/usr/share/aclocal/libtool.m4:5879: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) m4trace:/usr/share/aclocal/libtool.m4:5880: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) m4trace:/usr/share/aclocal/libtool.m4:5881: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) m4trace:/usr/share/aclocal/libtool.m4:5882: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) m4trace:/usr/share/aclocal/libtool.m4:5883: -1- AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) m4trace:/usr/share/aclocal/libtool.m4:5884: -1- AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) m4trace:/usr/share/aclocal/libtool.m4:5893: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) m4trace:/usr/share/aclocal/libtool.m4:5897: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) m4trace:/usr/share/aclocal/libtool.m4:5960: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && break cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done SED=$lt_cv_path_SED ]) AC_MSG_RESULT([$SED]) ]) m4trace:/usr/share/aclocal-1.9/amversion.m4:23: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) m4trace:/usr/share/aclocal-1.9/amversion.m4:30: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.2])]) m4trace:/usr/share/aclocal-1.9/auxdir.m4:63: -1- 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` ]) m4trace:/usr/share/aclocal-1.9/cond.m4:42: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) 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])]) m4trace:/usr/share/aclocal-1.9/depend.m4:142: -1- 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], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) m4trace:/usr/share/aclocal-1.9/depend.m4:152: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) m4trace:/usr/share/aclocal-1.9/depend.m4:167: -1- 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]) ]) m4trace:/usr/share/aclocal-1.9/depout.m4:64: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # 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 ]) m4trace:/usr/share/aclocal-1.9/depout.m4:78: -1- 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"]) ]) m4trace:/usr/share/aclocal-1.9/header.m4:23: -1- AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) m4trace:/usr/share/aclocal-1.9/header.m4:23: -1- AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete], [The macro `AM_CONFIG_HEADER' is obsolete. You should run autoupdate.])dnl AC_CONFIG_HEADERS($@)]) m4trace:/usr/share/aclocal-1.9/init.m4:103: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 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 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) m4trace:/usr/share/aclocal-1.9/init.m4:124: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) m4trace:/usr/share/aclocal-1.9/install-sh.m4:25: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) m4trace:/usr/share/aclocal-1.9/lead-dot.m4:32: -1- 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])]) m4trace:/usr/share/aclocal-1.9/make.m4:62: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) m4trace:/usr/share/aclocal-1.9/missing.m4:31: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) m4trace:/usr/share/aclocal-1.9/missing.m4:48: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) m4trace:/usr/share/aclocal-1.9/mkdirp.m4:73: -1- AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) m4trace:/usr/share/aclocal-1.9/options.m4:25: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) m4trace:/usr/share/aclocal-1.9/options.m4:31: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) m4trace:/usr/share/aclocal-1.9/options.m4:37: -1- AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) m4trace:/usr/share/aclocal-1.9/options.m4:43: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) m4trace:/usr/share/aclocal-1.9/runlog.m4:27: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) m4trace:/usr/share/aclocal-1.9/sanity.m4:63: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) m4trace:/usr/share/aclocal-1.9/strip.m4:38: -1- 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="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) m4trace:/usr/share/aclocal-1.9/tar.m4:107: -1- 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]) ]) m4trace:configure.in:5: -1- AC_INIT([I2O RAID Utilities], [0.0.6]) m4trace:configure.in:5: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.in:5: -1- m4_pattern_forbid([_AC_]) m4trace:configure.in:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.in:5: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.in:5: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.in:5: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.in:5: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.in:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}]) m4trace:configure.in:5: -1- AC_SUBST([PATH_SEPARATOR]) m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) m4trace:configure.in:5: -1- AC_SUBST([exec_prefix], [NONE]) m4trace:configure.in:5: -1- AC_SUBST([prefix], [NONE]) m4trace:configure.in:5: -1- AC_SUBST([program_transform_name], [s,x,x,]) m4trace:configure.in:5: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) m4trace:configure.in:5: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) m4trace:configure.in:5: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) m4trace:configure.in:5: -1- AC_SUBST([datadir], ['${prefix}/share']) m4trace:configure.in:5: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) m4trace:configure.in:5: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) m4trace:configure.in:5: -1- AC_SUBST([localstatedir], ['${prefix}/var']) m4trace:configure.in:5: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) m4trace:configure.in:5: -1- AC_SUBST([includedir], ['${prefix}/include']) m4trace:configure.in:5: -1- AC_SUBST([oldincludedir], ['/usr/include']) m4trace:configure.in:5: -1- AC_SUBST([infodir], ['${prefix}/info']) m4trace:configure.in:5: -1- AC_SUBST([mandir], ['${prefix}/man']) m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ #undef PACKAGE_NAME]) m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME]) m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ #undef PACKAGE_VERSION]) m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ #undef PACKAGE_STRING]) m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT]) m4trace:configure.in:5: -1- AC_SUBST([build_alias]) m4trace:configure.in:5: -1- AC_SUBST([host_alias]) m4trace:configure.in:5: -1- AC_SUBST([target_alias]) m4trace:configure.in:5: -1- AC_SUBST([DEFS]) m4trace:configure.in:5: -1- AC_SUBST([ECHO_C]) m4trace:configure.in:5: -1- AC_SUBST([ECHO_N]) m4trace:configure.in:5: -1- AC_SUBST([ECHO_T]) m4trace:configure.in:5: -1- AC_SUBST([LIBS]) m4trace:configure.in:7: -1- AM_CONFIG_HEADER([config.h]) m4trace:configure.in:7: -1- _m4_warn([obsolete], [The macro `AM_CONFIG_HEADER' is obsolete. You should run autoupdate.], [/usr/share/aclocal-1.9/header.m4:23: AM_CONFIG_HEADER is expanded from... configure.in:7: the top level]) m4trace:configure.in:7: -1- AC_CONFIG_HEADERS([config.h]) m4trace:configure.in:8: -1- AM_INIT_AUTOMAKE m4trace:configure.in:8: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.in:8: -1- AM_SET_CURRENT_AUTOMAKE_VERSION m4trace:configure.in:8: -1- AM_AUTOMAKE_VERSION([1.9.2]) m4trace:configure.in:8: -1- AC_PROG_INSTALL m4trace:configure.in:8: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.in:8: -1- AC_SUBST([INSTALL_SCRIPT]) m4trace:configure.in:8: -1- AC_SUBST([INSTALL_DATA]) m4trace:configure.in:8: -1- AC_SUBST([CYGPATH_W]) m4trace:configure.in:8: -1- _AM_SET_OPTIONS([]) m4trace:configure.in:8: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) m4trace:configure.in:8: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) m4trace:configure.in:8: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) m4trace:configure.in:8: -2- _AM_MANGLE_OPTION([no-define]) m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) m4trace:configure.in:8: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ #undef PACKAGE]) m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) m4trace:configure.in:8: -1- AH_OUTPUT([VERSION], [/* Version number of package */ #undef VERSION]) m4trace:configure.in:8: -1- AM_SANITY_CHECK m4trace:configure.in:8: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) m4trace:configure.in:8: -1- AM_MISSING_HAS_RUN m4trace:configure.in:8: -1- AM_AUX_DIR_EXPAND m4trace:configure.in:8: -1- AC_SUBST([ACLOCAL]) m4trace:configure.in:8: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) m4trace:configure.in:8: -1- AC_SUBST([AUTOCONF]) m4trace:configure.in:8: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) m4trace:configure.in:8: -1- AC_SUBST([AUTOMAKE]) m4trace:configure.in:8: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) m4trace:configure.in:8: -1- AC_SUBST([AUTOHEADER]) m4trace:configure.in:8: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) m4trace:configure.in:8: -1- AC_SUBST([MAKEINFO]) m4trace:configure.in:8: -1- AM_PROG_INSTALL_SH m4trace:configure.in:8: -1- AC_SUBST([install_sh]) m4trace:configure.in:8: -1- AM_PROG_INSTALL_STRIP m4trace:configure.in:8: -1- AC_SUBST([STRIP]) m4trace:configure.in:8: -1- AC_SUBST([ac_ct_STRIP]) m4trace:configure.in:8: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) m4trace:configure.in:8: -1- AM_PROG_MKDIR_P m4trace:configure.in:8: -1- AC_SUBST([mkdir_p]) m4trace:configure.in:8: -1- AC_PROG_AWK m4trace:configure.in:8: -1- AC_SUBST([AWK]) m4trace:configure.in:8: -1- AC_PROG_MAKE_SET m4trace:configure.in:8: -1- AC_SUBST([SET_MAKE]) m4trace:configure.in:8: -1- AM_SET_LEADING_DOT m4trace:configure.in:8: -1- AC_SUBST([am__leading_dot]) m4trace:configure.in:8: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) m4trace:configure.in:8: -2- _AM_MANGLE_OPTION([tar-ustar]) m4trace:configure.in:8: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) m4trace:configure.in:8: -2- _AM_MANGLE_OPTION([tar-pax]) m4trace:configure.in:8: -1- _AM_PROG_TAR([v7]) m4trace:configure.in:8: -1- AM_MISSING_PROG([AMTAR], [tar]) m4trace:configure.in:8: -1- AC_SUBST([AMTAR]) m4trace:configure.in:8: -1- AC_SUBST([am__tar]) m4trace:configure.in:8: -1- AC_SUBST([am__untar]) m4trace:configure.in:8: -1- _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 ]) m4trace:configure.in:8: -2- _AM_MANGLE_OPTION([no-dependencies]) m4trace:configure.in:11: -1- AC_PROG_CXX m4trace:configure.in:11: -1- AC_SUBST([CXX]) m4trace:configure.in:11: -1- AC_SUBST([CXXFLAGS]) m4trace:configure.in:11: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:11: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:11: -1- AC_SUBST([CXX]) m4trace:configure.in:11: -1- AC_SUBST([ac_ct_CXX]) m4trace:configure.in:11: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) m4trace:configure.in:11: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.in:11: -1- _AM_DEPENDENCIES([CXX]) m4trace:configure.in:11: -1- AM_SET_DEPDIR m4trace:configure.in:11: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) m4trace:configure.in:11: -1- AM_OUTPUT_DEPENDENCY_COMMANDS m4trace:configure.in:11: -1- AM_MAKE_INCLUDE m4trace:configure.in:11: -1- AC_SUBST([am__include]) m4trace:configure.in:11: -1- AC_SUBST([am__quote]) m4trace:configure.in:11: -1- AM_DEP_TRACK m4trace:configure.in:11: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.in:11: -1- AC_SUBST([AMDEP_TRUE]) m4trace:configure.in:11: -1- AC_SUBST([AMDEP_FALSE]) m4trace:configure.in:11: -1- AC_SUBST([AMDEPBACKSLASH]) m4trace:configure.in:11: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) m4trace:configure.in:11: -1- AM_CONDITIONAL([am__fastdepCXX], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) m4trace:configure.in:11: -1- AC_SUBST([am__fastdepCXX_TRUE]) m4trace:configure.in:11: -1- AC_SUBST([am__fastdepCXX_FALSE]) m4trace:configure.in:12: -1- AC_PROG_CC m4trace:configure.in:12: -1- AC_SUBST([CC]) m4trace:configure.in:12: -1- AC_SUBST([CFLAGS]) m4trace:configure.in:12: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:12: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:12: -1- AC_SUBST([CC]) m4trace:configure.in:12: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.in:12: -1- AC_SUBST([CC]) m4trace:configure.in:12: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.in:12: -1- AC_SUBST([CC]) m4trace:configure.in:12: -1- AC_SUBST([CC]) m4trace:configure.in:12: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.in:12: -1- _AM_DEPENDENCIES([CC]) m4trace:configure.in:12: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) m4trace:configure.in:12: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.in:12: -1- AC_SUBST([am__fastdepCC_TRUE]) m4trace:configure.in:12: -1- AC_SUBST([am__fastdepCC_FALSE]) m4trace:configure.in:13: -1- AC_PROG_CPP m4trace:configure.in:13: -1- AC_SUBST([CPP]) m4trace:configure.in:13: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:13: -1- AC_SUBST([CPP]) m4trace:configure.in:14: -1- AC_PROG_LIBTOOL m4trace:configure.in:14: -1- _AC_PROG_LIBTOOL m4trace:configure.in:14: -1- AC_LIBTOOL_SETUP m4trace:configure.in:14: -1- AC_ENABLE_SHARED m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from... /usr/share/aclocal/libtool.m4:1787: AC_ENABLE_SHARED is expanded from... configure.in:14: AC_ENABLE_SHARED is required by... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_ENABLE_STATIC m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from... /usr/share/aclocal/libtool.m4:1826: AC_ENABLE_STATIC is expanded from... configure.in:14: AC_ENABLE_STATIC is required by... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_ENABLE_FAST_INSTALL m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from... /usr/share/aclocal/libtool.m4:1865: AC_ENABLE_FAST_INSTALL is expanded from... configure.in:14: AC_ENABLE_FAST_INSTALL is required by... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_CANONICAL_HOST m4trace:configure.in:14: -1- AC_SUBST([build], [$ac_cv_build]) m4trace:configure.in:14: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`]) m4trace:configure.in:14: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`]) m4trace:configure.in:14: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`]) m4trace:configure.in:14: -1- AC_SUBST([host], [$ac_cv_host]) m4trace:configure.in:14: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`]) m4trace:configure.in:14: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`]) m4trace:configure.in:14: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`]) m4trace:configure.in:14: -1- AC_PROG_LD m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1331: AC_ARG_WITH is expanded from... /usr/share/aclocal/libtool.m4:2062: AC_PROG_LD is expanded from... configure.in:14: AC_PROG_LD is required by... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- LT_AC_PROG_SED m4trace:configure.in:14: -1- AC_PROG_LD_GNU m4trace:configure.in:14: -1- AC_PROG_EGREP m4trace:configure.in:14: -1- AC_SUBST([EGREP]) m4trace:configure.in:14: -1- AC_PROG_LD_RELOAD_FLAG m4trace:configure.in:14: -1- AC_PROG_NM m4trace:configure.in:14: -1- AC_PROG_LN_S m4trace:configure.in:14: -1- AC_SUBST([LN_S], [$as_ln_s]) m4trace:configure.in:14: -1- AC_DEPLIBS_CHECK_METHOD m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_MAX_CMD_LEN m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:14: -1- AC_LIBTOOL_OBJDIR m4trace:configure.in:14: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:14: -1- _LT_AC_PROG_ECHO_BACKSLASH m4trace:configure.in:14: -1- _LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ]) m4trace:configure.in:14: -1- AC_SUBST([ECHO]) m4trace:configure.in:14: -1- AC_SUBST([AR]) m4trace:configure.in:14: -1- AC_SUBST([ac_ct_AR]) m4trace:configure.in:14: -1- AC_SUBST([RANLIB]) m4trace:configure.in:14: -1- AC_SUBST([ac_ct_RANLIB]) m4trace:configure.in:14: -1- AC_SUBST([STRIP]) m4trace:configure.in:14: -1- AC_SUBST([ac_ct_STRIP]) m4trace:configure.in:14: -1- AC_PATH_MAGIC m4trace:configure.in:14: -1- AC_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH]) m4trace:configure.in:14: -1- AC_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1331: AC_ARG_WITH is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_LIBTOOL_LANG_C_CONFIG m4trace:configure.in:14: -1- _LT_AC_LANG_C_CONFIG m4trace:configure.in:14: -1- _LT_AC_TAGVAR([objext], []) m4trace:configure.in:14: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_cc_shlib], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_cc_shlib], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_cc_shlib], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_cc_shlib], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_cc_shlib], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_cc_shlib], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_cc_shlib], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_cc_shlib], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_cc_can_build_shared], []) m4trace:configure.in:14: -2- _LT_AC_TAGVAR([lt_prog_compiler_static_works], []) m4trace:configure.in:14: -2- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, ) works], [lt_prog_compiler_static_works], [$lt_prog_compiler_static], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, )=]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_COMPILER_NO_RTTI([]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:14: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_COMPILER_PIC([]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], []) m4trace:configure.in:14: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, ) works], [lt_prog_compiler_pic_works], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, )ifelse([],[],[ -DPIC],[ifelse([],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, ) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, )=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, )" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, )= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, )=no]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_CC_C_O([]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([]) m4trace:configure.in:14: -1- _LT_AC_LOCK m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from... autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from... /usr/share/aclocal/libtool.m4:559: _LT_AC_LOCK is expanded from... configure.in:14: _LT_AC_LOCK is required by... /usr/share/aclocal/libtool.m4:990: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from... /usr/share/aclocal/libtool.m4:2622: _LT_AC_LANG_C_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:2485: AC_LIBTOOL_LANG_C_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_LD_SHLIBS([]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([reload_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -2- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([runpath_var ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_LIB_STRIP m4trace:configure.in:14: -1- AC_LIBTOOL_DLOPEN_SELF([]) m4trace:configure.in:14: -1- _LT_AC_CHECK_DLFCN m4trace:configure.in:14: -1- AC_CHECK_HEADERS([dlfcn.h]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H]) m4trace:configure.in:14: -1- AC_HEADER_STDC m4trace:configure.in:14: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.in:14: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS]) m4trace:configure.in:14: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRING_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) m4trace:configure.in:14: -1- _LT_AC_TRY_DLOPEN_SELF([lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=no], [lt_cv_dlopen_self=cross]) m4trace:configure.in:14: -1- _LT_AC_TRY_DLOPEN_SELF([lt_cv_dlopen_self_static=yes], [lt_cv_dlopen_self_static=yes], [lt_cv_dlopen_self_static=no], [lt_cv_dlopen_self_static=cross]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:14: -1- AC_LIBTOOL_CONFIG([]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([CC], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predeps], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postinstall_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postuninstall_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([GCC], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predeps], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([fix_srcfile_path], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], []) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], []) m4trace:configure.in:14: -1- _LT_AC_TAGCONFIG m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1331: AC_ARG_WITH is expanded from... /usr/share/aclocal/libtool.m4:1741: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists], [/usr/share/aclocal/libtool.m4:1741: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists], [/usr/share/aclocal/libtool.m4:1741: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_LIBTOOL_LANG_CXX_CONFIG m4trace:configure.in:14: -1- _LT_AC_LANG_CXX_CONFIG([CXX]) m4trace:configure.in:14: -1- AC_SUBST([CXXCPP]) m4trace:configure.in:14: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:14: -1- AC_SUBST([CXXCPP]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predeps], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([objext], [CXX]) m4trace:configure.in:14: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.in:14: -1- AC_PROG_LD m4trace:configure.in:14: -1- AC_PROG_LD_GNU m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([GCC], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], [CXX]) m4trace:configure.in:14: -1- AC_LIBTOOL_POSTDEP_PREDEP([CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_COMPILER_PIC([CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], [CXX]) m4trace:configure.in:14: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX) works], [lt_prog_compiler_pic_works_CXX], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)ifelse([CXX],[],[ -DPIC],[ifelse([CXX],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, CXX)=no]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_CC_C_O([CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_LD_SHLIBS([CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -2- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([CXX]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([runpath_var CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_LIB_STRIP m4trace:configure.in:14: -1- AC_LIBTOOL_DLOPEN_SELF([CXX]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) m4trace:configure.in:14: -1- _LT_AC_TRY_DLOPEN_SELF([lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=no], [lt_cv_dlopen_self=cross]) m4trace:configure.in:14: -1- _LT_AC_TRY_DLOPEN_SELF([lt_cv_dlopen_self_static=yes], [lt_cv_dlopen_self_static=yes], [lt_cv_dlopen_self_static=no], [lt_cv_dlopen_self_static=cross]) m4trace:configure.in:14: -1- AC_LIBTOOL_CONFIG([CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([CC], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predeps], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postinstall_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postuninstall_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([GCC], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predeps], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([fix_srcfile_path], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], [CXX]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], [CXX]) m4trace:configure.in:14: -1- AC_LIBTOOL_LANG_F77_CONFIG m4trace:configure.in:14: -1- _LT_AC_LANG_F77_CONFIG([F77]) m4trace:configure.in:14: -1- AC_SUBST([F77]) m4trace:configure.in:14: -1- AC_SUBST([FFLAGS]) m4trace:configure.in:14: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:14: -1- AC_SUBST([F77]) m4trace:configure.in:14: -1- AC_SUBST([ac_ct_F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([objext], [F77]) m4trace:configure.in:14: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([GCC], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], [F77]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_COMPILER_PIC([F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], [F77]) m4trace:configure.in:14: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77) works], [lt_prog_compiler_pic_works_F77], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)ifelse([F77],[],[ -DPIC],[ifelse([F77],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, F77)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, F77)=no]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_CC_C_O([F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_LD_SHLIBS([F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([reload_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -2- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([F77]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([runpath_var F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_LIB_STRIP m4trace:configure.in:14: -1- AC_LIBTOOL_CONFIG([F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([CC], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predeps], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postinstall_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postuninstall_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([GCC], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predeps], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([fix_srcfile_path], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) m4trace:configure.in:14: -1- AC_LIBTOOL_LANG_GCJ_CONFIG m4trace:configure.in:14: -1- _LT_AC_LANG_GCJ_CONFIG([GCJ]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from... /usr/share/aclocal/libtool.m4:3807: _LT_AC_LANG_GCJ_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:3760: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:1741: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [instead of using `AC_LANG', `AC_LANG_SAVE', and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from... /usr/share/aclocal/libtool.m4:3807: _LT_AC_LANG_GCJ_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:3760: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:1741: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([objext], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_COMPILER_NO_RTTI([GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:14: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, GCJ)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, GCJ) -fno-rtti -fno-exceptions"]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_COMPILER_PIC([GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], [GCJ]) m4trace:configure.in:14: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ) works], [lt_prog_compiler_pic_works_GCJ], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)ifelse([GCJ],[],[ -DPIC],[ifelse([GCJ],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, GCJ)=no]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_CC_C_O([GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_LD_SHLIBS([GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([reload_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -2- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([GCJ]) m4trace:configure.in:14: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([runpath_var GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:14: -1- AC_LIBTOOL_SYS_LIB_STRIP m4trace:configure.in:14: -1- AC_LIBTOOL_DLOPEN_SELF([GCJ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) m4trace:configure.in:14: -1- _LT_AC_TRY_DLOPEN_SELF([lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=no], [lt_cv_dlopen_self=cross]) m4trace:configure.in:14: -1- _LT_AC_TRY_DLOPEN_SELF([lt_cv_dlopen_self_static=yes], [lt_cv_dlopen_self_static=yes], [lt_cv_dlopen_self_static=no], [lt_cv_dlopen_self_static=cross]) m4trace:configure.in:14: -1- AC_LIBTOOL_CONFIG([GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([CC], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predeps], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postinstall_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postuninstall_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([GCC], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predeps], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([fix_srcfile_path], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:172: AC_LANG_RESTORE is expanded from... /usr/share/aclocal/libtool.m4:3807: _LT_AC_LANG_GCJ_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:3760: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:1741: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_LIBTOOL_LANG_RC_CONFIG m4trace:configure.in:14: -1- _LT_AC_LANG_RC_CONFIG([RC]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from... /usr/share/aclocal/libtool.m4:3846: _LT_AC_LANG_RC_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:3815: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:1741: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [instead of using `AC_LANG', `AC_LANG_SAVE', and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from... /usr/share/aclocal/libtool.m4:3846: _LT_AC_LANG_RC_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:3815: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:1741: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([objext], [RC]) m4trace:configure.in:14: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) m4trace:configure.in:14: -1- AC_LIBTOOL_CONFIG([RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([CC], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predeps], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postinstall_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postuninstall_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([GCC], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([LD], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predep_objects], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdep_objects], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([predeps], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([postdeps], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([allow_undefined_flag], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([no_undefined_flag], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_action], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_direct], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_minus_L], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([hardcode_automatic], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([link_all_deplibs], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([fix_srcfile_path], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([always_export_symbols], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([exclude_expsyms], [RC]) m4trace:configure.in:14: -1- _LT_AC_TAGVAR([include_expsyms], [RC]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:172: AC_LANG_RESTORE is expanded from... /usr/share/aclocal/libtool.m4:3846: _LT_AC_LANG_RC_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:3815: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:1741: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:232: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... /usr/share/aclocal/libtool.m4:90: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... /usr/share/aclocal/libtool.m4:70: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_SUBST([LIBTOOL]) m4trace:configure.in:14: -1- AC_LIBTOOL_CXX m4trace:configure.in:14: -1- _LT_AC_LANG_CXX m4trace:configure.in:14: -1- _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) m4trace:configure.in:14: -1- AC_LIBTOOL_F77 m4trace:configure.in:14: -1- _LT_AC_LANG_F77 m4trace:configure.in:14: -1- _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) m4trace:configure.in:19: -1- AC_HEADER_DIRENT m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ #undef HAVE_DIRENT_H]) m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ #undef HAVE_SYS_NDIR_H]) m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ #undef HAVE_SYS_DIR_H]) m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ #undef HAVE_NDIR_H]) m4trace:configure.in:20: -1- AC_HEADER_STDC m4trace:configure.in:20: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.in:20: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS]) m4trace:configure.in:21: -1- AC_HEADER_SYS_WAIT m4trace:configure.in:21: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_WAIT_H]) m4trace:configure.in:21: -1- AH_OUTPUT([HAVE_SYS_WAIT_H], [/* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H]) m4trace:configure.in:22: -1- AC_CHECK_HEADERS([fcntl.h malloc.h memory.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/systeminfo.h unistd.h values.h inttypes.h]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_MALLOC_H], [/* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRING_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_SYS_FILE_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_SYS_IOCTL_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_SYS_SYSTEMINFO_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSTEMINFO_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_VALUES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_VALUES_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H]) m4trace:configure.in:24: -1- AC_CHECK_HEADERS([strstream.h sstream fstream.h fstream iostream.h iostream iomanip.h iomanip]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_STRSTREAM_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRSTREAM_H]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_SSTREAM], [/* Define to 1 if you have the header file. */ #undef HAVE_SSTREAM]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_FSTREAM_H], [/* Define to 1 if you have the header file. */ #undef HAVE_FSTREAM_H]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_FSTREAM], [/* Define to 1 if you have the header file. */ #undef HAVE_FSTREAM]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_IOSTREAM_H], [/* Define to 1 if you have the header file. */ #undef HAVE_IOSTREAM_H]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_IOSTREAM], [/* Define to 1 if you have the header file. */ #undef HAVE_IOSTREAM]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_IOMANIP_H], [/* Define to 1 if you have the header file. */ #undef HAVE_IOMANIP_H]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_IOMANIP], [/* Define to 1 if you have the header file. */ #undef HAVE_IOMANIP]) m4trace:configure.in:28: -1- AC_HEADER_STAT m4trace:configure.in:28: -1- AC_DEFINE_TRACE_LITERAL([STAT_MACROS_BROKEN]) m4trace:configure.in:28: -1- AH_OUTPUT([STAT_MACROS_BROKEN], [/* Define to 1 if the `S_IS*\' macros in do not work properly. */ #undef STAT_MACROS_BROKEN]) m4trace:configure.in:29: -1- AC_CHECK_TYPES([_Bool]) m4trace:configure.in:29: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL]) m4trace:configure.in:29: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */ #undef HAVE__BOOL]) m4trace:configure.in:29: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H]) m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H]) m4trace:configure.in:30: -1- AC_C_CONST m4trace:configure.in:30: -1- AC_DEFINE_TRACE_LITERAL([const]) m4trace:configure.in:30: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */ #undef const]) m4trace:configure.in:31: -1- AC_C_INLINE m4trace:configure.in:31: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler calls it, or to nothing if \'inline\' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif]) m4trace:configure.in:32: -1- AC_TYPE_PID_T m4trace:configure.in:32: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) m4trace:configure.in:32: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ #undef pid_t]) m4trace:configure.in:33: -1- AC_TYPE_SIZE_T m4trace:configure.in:33: -1- AC_DEFINE_TRACE_LITERAL([size_t]) m4trace:configure.in:33: -1- AH_OUTPUT([size_t], [/* Define to `unsigned\' if does not define. */ #undef size_t]) m4trace:configure.in:34: -1- AC_HEADER_TIME m4trace:configure.in:34: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) m4trace:configure.in:34: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME]) m4trace:configure.in:35: -1- AC_STRUCT_TM m4trace:configure.in:35: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME]) m4trace:configure.in:35: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your declares `struct tm\'. */ #undef TM_IN_SYS_TIME]) m4trace:configure.in:36: -1- AC_C_VOLATILE m4trace:configure.in:36: -1- AC_DEFINE_TRACE_LITERAL([volatile]) m4trace:configure.in:36: -1- AH_OUTPUT([volatile], [/* Define to empty if the keyword `volatile\' does not work. Warning: valid code using `volatile\' can become incorrect without. Disable with care. */ #undef volatile]) m4trace:configure.in:39: -1- AC_FUNC_CLOSEDIR_VOID m4trace:configure.in:39: -1- AC_DEFINE_TRACE_LITERAL([CLOSEDIR_VOID]) m4trace:configure.in:39: -1- AH_OUTPUT([CLOSEDIR_VOID], [/* Define to 1 if the `closedir\' function returns void instead of `int\'. */ #undef CLOSEDIR_VOID]) m4trace:configure.in:40: -1- AC_FUNC_FORK m4trace:configure.in:40: -1- AC_CHECK_HEADERS([unistd.h vfork.h]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H]) m4trace:configure.in:40: -1- AC_CHECK_FUNCS([fork vfork]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */ #undef HAVE_FORK]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */ #undef HAVE_VFORK]) m4trace:configure.in:40: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */ #undef HAVE_WORKING_VFORK]) m4trace:configure.in:40: -1- AC_DEFINE_TRACE_LITERAL([vfork]) m4trace:configure.in:40: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */ #undef vfork]) m4trace:configure.in:40: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */ #undef HAVE_WORKING_FORK]) m4trace:configure.in:41: -1- AC_PROG_GCC_TRADITIONAL m4trace:configure.in:42: -1- AC_FUNC_MALLOC m4trace:configure.in:42: -1- AC_CHECK_HEADERS([stdlib.h]) m4trace:configure.in:42: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.in:42: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) m4trace:configure.in:42: -1- AH_OUTPUT([HAVE_MALLOC], [/* Define to 1 if your system has a GNU libc compatible `malloc\' function, and to 0 otherwise. */ #undef HAVE_MALLOC]) m4trace:configure.in:42: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) m4trace:configure.in:42: -1- AC_LIBSOURCE([malloc.c]) m4trace:configure.in:42: -1- AC_SUBST([LIB@&t@OBJS]) m4trace:configure.in:42: -1- AC_DEFINE_TRACE_LITERAL([malloc]) m4trace:configure.in:42: -1- AH_OUTPUT([malloc], [/* Define to rpl_malloc if the replacement function should be used. */ #undef malloc]) m4trace:configure.in:43: -1- AC_FUNC_MEMCMP m4trace:configure.in:43: -1- AC_LIBSOURCE([memcmp.c]) m4trace:configure.in:43: -1- AC_SUBST([LIB@&t@OBJS]) m4trace:configure.in:44: -1- AC_FUNC_REALLOC m4trace:configure.in:44: -1- AC_CHECK_HEADERS([stdlib.h]) m4trace:configure.in:44: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.in:44: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) m4trace:configure.in:44: -1- AH_OUTPUT([HAVE_REALLOC], [/* Define to 1 if your system has a GNU libc compatible `realloc\' function, and to 0 otherwise. */ #undef HAVE_REALLOC]) m4trace:configure.in:44: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) m4trace:configure.in:44: -1- AC_LIBSOURCE([realloc.c]) m4trace:configure.in:44: -1- AC_SUBST([LIB@&t@OBJS]) m4trace:configure.in:44: -1- AC_DEFINE_TRACE_LITERAL([realloc]) m4trace:configure.in:44: -1- AH_OUTPUT([realloc], [/* Define to rpl_realloc if the replacement function should be used. */ #undef realloc]) m4trace:configure.in:45: -1- AC_TYPE_SIGNAL m4trace:configure.in:45: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) m4trace:configure.in:45: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */ #undef RETSIGTYPE]) m4trace:configure.in:46: -1- AC_FUNC_STAT m4trace:configure.in:46: -1- AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK m4trace:configure.in:46: -1- AC_DEFINE_TRACE_LITERAL([LSTAT_FOLLOWS_SLASHED_SYMLINK]) m4trace:configure.in:46: -1- AH_OUTPUT([LSTAT_FOLLOWS_SLASHED_SYMLINK], [/* Define to 1 if `lstat\' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK]) m4trace:configure.in:46: -1- AC_LIBSOURCE([lstat.c]) m4trace:configure.in:46: -1- AC_SUBST([LIB@&t@OBJS]) m4trace:configure.in:46: -1- AC_LIBSOURCE([stat.c]) m4trace:configure.in:46: -1- AC_SUBST([LIB@&t@OBJS]) m4trace:configure.in:46: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STAT_EMPTY_STRING_BUG]) m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_STAT_EMPTY_STRING_BUG], [/* Define to 1 if `stat\' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG]) m4trace:configure.in:47: -1- AC_FUNC_VPRINTF m4trace:configure.in:47: -1- AC_CHECK_FUNCS([vprintf], [ AC_CHECK_FUNC(_doprnt, [AC_DEFINE(HAVE_DOPRNT, 1, [Define to 1 if you don't have `vprintf' but do have `_doprnt.'])])]) m4trace:configure.in:47: -1- AH_OUTPUT([HAVE_VPRINTF], [/* Define to 1 if you have the `vprintf\' function. */ #undef HAVE_VPRINTF]) m4trace:configure.in:47: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOPRNT]) m4trace:configure.in:47: -1- AH_OUTPUT([HAVE_DOPRNT], [/* Define to 1 if you don\'t have `vprintf\' but do have `_doprnt.\' */ #undef HAVE_DOPRNT]) m4trace:configure.in:48: -1- AC_CHECK_FUNCS([alarm atexit dup2 memset strchr strcspn strpbrk strrchr strspn strstr strtol strtoul sysinfo uname]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */ #undef HAVE_ALARM]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_ATEXIT], [/* Define to 1 if you have the `atexit\' function. */ #undef HAVE_ATEXIT]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_DUP2], [/* Define to 1 if you have the `dup2\' function. */ #undef HAVE_DUP2]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ #undef HAVE_MEMSET]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */ #undef HAVE_STRCHR]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRCSPN], [/* Define to 1 if you have the `strcspn\' function. */ #undef HAVE_STRCSPN]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRPBRK], [/* Define to 1 if you have the `strpbrk\' function. */ #undef HAVE_STRPBRK]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRRCHR], [/* Define to 1 if you have the `strrchr\' function. */ #undef HAVE_STRRCHR]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRSPN], [/* Define to 1 if you have the `strspn\' function. */ #undef HAVE_STRSPN]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */ #undef HAVE_STRSTR]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRTOL], [/* Define to 1 if you have the `strtol\' function. */ #undef HAVE_STRTOL]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRTOUL], [/* Define to 1 if you have the `strtoul\' function. */ #undef HAVE_STRTOUL]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_SYSINFO], [/* Define to 1 if you have the `sysinfo\' function. */ #undef HAVE_SYSINFO]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_UNAME], [/* Define to 1 if you have the `uname\' function. */ #undef HAVE_UNAME]) m4trace:configure.in:54: -1- AC_CONFIG_FILES([Makefile raideng/Makefile raidutil/Makefile lib/Makefile distribution/raidutils.spec]) m4trace:configure.in:55: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.in:55: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) m4trace:configure.in:55: -1- _AC_AM_CONFIG_HEADER_HOOK([$ac_file]) m4trace:configure.in:55: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS raidutils-0.0.6.orig/autom4te.cache/traces.10000664000175000000620000011703710175141463020522 0ustar bapstaff00000000000000m4trace:configure.in:5: -1- AC_INIT([I2O RAID Utilities], [0.0.6]) m4trace:configure.in:5: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.in:5: -1- m4_pattern_forbid([_AC_]) m4trace:configure.in:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.in:5: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.in:5: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.in:5: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.in:5: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.in:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}]) m4trace:configure.in:5: -1- AC_SUBST([PATH_SEPARATOR]) m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) m4trace:configure.in:5: -1- AC_SUBST([exec_prefix], [NONE]) m4trace:configure.in:5: -1- AC_SUBST([prefix], [NONE]) m4trace:configure.in:5: -1- AC_SUBST([program_transform_name], [s,x,x,]) m4trace:configure.in:5: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) m4trace:configure.in:5: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) m4trace:configure.in:5: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) m4trace:configure.in:5: -1- AC_SUBST([datadir], ['${prefix}/share']) m4trace:configure.in:5: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) m4trace:configure.in:5: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) m4trace:configure.in:5: -1- AC_SUBST([localstatedir], ['${prefix}/var']) m4trace:configure.in:5: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) m4trace:configure.in:5: -1- AC_SUBST([includedir], ['${prefix}/include']) m4trace:configure.in:5: -1- AC_SUBST([oldincludedir], ['/usr/include']) m4trace:configure.in:5: -1- AC_SUBST([infodir], ['${prefix}/info']) m4trace:configure.in:5: -1- AC_SUBST([mandir], ['${prefix}/man']) m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ #undef PACKAGE_NAME]) m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME]) m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ #undef PACKAGE_VERSION]) m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ #undef PACKAGE_STRING]) m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT]) m4trace:configure.in:5: -1- AC_SUBST([build_alias]) m4trace:configure.in:5: -1- AC_SUBST([host_alias]) m4trace:configure.in:5: -1- AC_SUBST([target_alias]) m4trace:configure.in:5: -1- AC_SUBST([DEFS]) m4trace:configure.in:5: -1- AC_SUBST([ECHO_C]) m4trace:configure.in:5: -1- AC_SUBST([ECHO_N]) m4trace:configure.in:5: -1- AC_SUBST([ECHO_T]) m4trace:configure.in:5: -1- AC_SUBST([LIBS]) m4trace:configure.in:7: -1- _m4_warn([obsolete], [The macro `AM_CONFIG_HEADER' is obsolete. You should run autoupdate.], [aclocal.m4:6346: AM_CONFIG_HEADER is expanded from... configure.in:7: the top level]) m4trace:configure.in:7: -1- AC_CONFIG_HEADERS([config.h]) m4trace:configure.in:8: -1- AM_INIT_AUTOMAKE m4trace:configure.in:8: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.in:8: -1- AM_AUTOMAKE_VERSION([1.9.2]) m4trace:configure.in:8: -1- AC_PROG_INSTALL m4trace:configure.in:8: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.in:8: -1- AC_SUBST([INSTALL_SCRIPT]) m4trace:configure.in:8: -1- AC_SUBST([INSTALL_DATA]) m4trace:configure.in:8: -1- AC_SUBST([CYGPATH_W]) m4trace:configure.in:8: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) m4trace:configure.in:8: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) m4trace:configure.in:8: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ #undef PACKAGE]) m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) m4trace:configure.in:8: -1- AH_OUTPUT([VERSION], [/* Version number of package */ #undef VERSION]) m4trace:configure.in:8: -1- AC_SUBST([ACLOCAL]) m4trace:configure.in:8: -1- AC_SUBST([AUTOCONF]) m4trace:configure.in:8: -1- AC_SUBST([AUTOMAKE]) m4trace:configure.in:8: -1- AC_SUBST([AUTOHEADER]) m4trace:configure.in:8: -1- AC_SUBST([MAKEINFO]) m4trace:configure.in:8: -1- AC_SUBST([install_sh]) m4trace:configure.in:8: -1- AC_SUBST([STRIP]) m4trace:configure.in:8: -1- AC_SUBST([ac_ct_STRIP]) m4trace:configure.in:8: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) m4trace:configure.in:8: -1- AC_SUBST([mkdir_p]) m4trace:configure.in:8: -1- AC_PROG_AWK m4trace:configure.in:8: -1- AC_SUBST([AWK]) m4trace:configure.in:8: -1- AC_PROG_MAKE_SET m4trace:configure.in:8: -1- AC_SUBST([SET_MAKE]) m4trace:configure.in:8: -1- AC_SUBST([am__leading_dot]) m4trace:configure.in:8: -1- AC_SUBST([AMTAR]) m4trace:configure.in:8: -1- AC_SUBST([am__tar]) m4trace:configure.in:8: -1- AC_SUBST([am__untar]) m4trace:configure.in:11: -1- AC_PROG_CXX m4trace:configure.in:11: -1- AC_SUBST([CXX]) m4trace:configure.in:11: -1- AC_SUBST([CXXFLAGS]) m4trace:configure.in:11: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:11: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:11: -1- AC_SUBST([CXX]) m4trace:configure.in:11: -1- AC_SUBST([ac_ct_CXX]) m4trace:configure.in:11: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) m4trace:configure.in:11: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.in:11: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) m4trace:configure.in:11: -1- AC_SUBST([am__include]) m4trace:configure.in:11: -1- AC_SUBST([am__quote]) m4trace:configure.in:11: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.in:11: -1- AC_SUBST([AMDEP_TRUE]) m4trace:configure.in:11: -1- AC_SUBST([AMDEP_FALSE]) m4trace:configure.in:11: -1- AC_SUBST([AMDEPBACKSLASH]) m4trace:configure.in:11: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) m4trace:configure.in:11: -1- AM_CONDITIONAL([am__fastdepCXX], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) m4trace:configure.in:11: -1- AC_SUBST([am__fastdepCXX_TRUE]) m4trace:configure.in:11: -1- AC_SUBST([am__fastdepCXX_FALSE]) m4trace:configure.in:12: -1- AC_PROG_CC m4trace:configure.in:12: -1- AC_SUBST([CC]) m4trace:configure.in:12: -1- AC_SUBST([CFLAGS]) m4trace:configure.in:12: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:12: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:12: -1- AC_SUBST([CC]) m4trace:configure.in:12: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.in:12: -1- AC_SUBST([CC]) m4trace:configure.in:12: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.in:12: -1- AC_SUBST([CC]) m4trace:configure.in:12: -1- AC_SUBST([CC]) m4trace:configure.in:12: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.in:12: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) m4trace:configure.in:12: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.in:12: -1- AC_SUBST([am__fastdepCC_TRUE]) m4trace:configure.in:12: -1- AC_SUBST([am__fastdepCC_FALSE]) m4trace:configure.in:13: -1- AC_PROG_CPP m4trace:configure.in:13: -1- AC_SUBST([CPP]) m4trace:configure.in:13: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:13: -1- AC_SUBST([CPP]) m4trace:configure.in:14: -1- AC_PROG_LIBTOOL m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from... aclocal.m4:1778: AC_ENABLE_SHARED is expanded from... configure.in:14: AC_ENABLE_SHARED is required by... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from... aclocal.m4:1817: AC_ENABLE_STATIC is expanded from... configure.in:14: AC_ENABLE_STATIC is required by... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from... aclocal.m4:1856: AC_ENABLE_FAST_INSTALL is expanded from... configure.in:14: AC_ENABLE_FAST_INSTALL is required by... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_CANONICAL_HOST m4trace:configure.in:14: -1- AC_CANONICAL_BUILD m4trace:configure.in:14: -1- AC_SUBST([build], [$ac_cv_build]) m4trace:configure.in:14: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`]) m4trace:configure.in:14: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`]) m4trace:configure.in:14: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`]) m4trace:configure.in:14: -1- AC_SUBST([host], [$ac_cv_host]) m4trace:configure.in:14: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`]) m4trace:configure.in:14: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`]) m4trace:configure.in:14: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1331: AC_ARG_WITH is expanded from... aclocal.m4:2053: AC_PROG_LD is expanded from... configure.in:14: AC_PROG_LD is required by... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_SUBST([EGREP]) m4trace:configure.in:14: -1- AC_PROG_LN_S m4trace:configure.in:14: -1- AC_SUBST([LN_S], [$as_ln_s]) m4trace:configure.in:14: -1- AC_SUBST([ECHO]) m4trace:configure.in:14: -1- AC_SUBST([AR]) m4trace:configure.in:14: -1- AC_SUBST([ac_ct_AR]) m4trace:configure.in:14: -1- AC_SUBST([RANLIB]) m4trace:configure.in:14: -1- AC_SUBST([ac_ct_RANLIB]) m4trace:configure.in:14: -1- AC_SUBST([STRIP]) m4trace:configure.in:14: -1- AC_SUBST([ac_ct_STRIP]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1331: AC_ARG_WITH is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from... autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from... aclocal.m4:550: _LT_AC_LOCK is expanded from... configure.in:14: _LT_AC_LOCK is required by... aclocal.m4:981: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from... aclocal.m4:2609: _LT_AC_LANG_C_CONFIG is expanded from... aclocal.m4:2476: AC_LIBTOOL_LANG_C_CONFIG is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_CHECK_HEADERS([dlfcn.h]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H]) m4trace:configure.in:14: -1- AC_HEADER_STDC m4trace:configure.in:14: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.in:14: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS]) m4trace:configure.in:14: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRING_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H]) m4trace:configure.in:14: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) m4trace:configure.in:14: -1- _LT_AC_TAGCONFIG m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from... autoconf/general.m4:1331: AC_ARG_WITH is expanded from... aclocal.m4:1732: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists], [aclocal.m4:1732: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists], [aclocal.m4:1732: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_SUBST([CXXCPP]) m4trace:configure.in:14: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:14: -1- AC_SUBST([CXXCPP]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) m4trace:configure.in:14: -1- AC_SUBST([F77]) m4trace:configure.in:14: -1- AC_SUBST([FFLAGS]) m4trace:configure.in:14: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:14: -1- AC_SUBST([F77]) m4trace:configure.in:14: -1- AC_SUBST([ac_ct_F77]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from... aclocal.m4:3786: _LT_AC_LANG_GCJ_CONFIG is expanded from... aclocal.m4:3743: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... aclocal.m4:1732: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [instead of using `AC_LANG', `AC_LANG_SAVE', and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from... aclocal.m4:3786: _LT_AC_LANG_GCJ_CONFIG is expanded from... aclocal.m4:3743: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... aclocal.m4:1732: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) m4trace:configure.in:14: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:172: AC_LANG_RESTORE is expanded from... aclocal.m4:3786: _LT_AC_LANG_GCJ_CONFIG is expanded from... aclocal.m4:3743: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... aclocal.m4:1732: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from... aclocal.m4:3825: _LT_AC_LANG_RC_CONFIG is expanded from... aclocal.m4:3794: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... aclocal.m4:1732: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [instead of using `AC_LANG', `AC_LANG_SAVE', and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from... aclocal.m4:3825: _LT_AC_LANG_RC_CONFIG is expanded from... aclocal.m4:3794: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... aclocal.m4:1732: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:172: AC_LANG_RESTORE is expanded from... aclocal.m4:3825: _LT_AC_LANG_RC_CONFIG is expanded from... aclocal.m4:3794: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... aclocal.m4:1732: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:223: AC_LIBTOOL_SETUP is expanded from... configure.in:14: AC_LIBTOOL_SETUP is required by... aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from... configure.in:14: _AC_PROG_LIBTOOL is required by... aclocal.m4:61: AC_PROG_LIBTOOL is expanded from... configure.in:14: the top level]) m4trace:configure.in:14: -1- AC_SUBST([LIBTOOL]) m4trace:configure.in:19: -1- AC_HEADER_DIRENT m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ #undef HAVE_DIRENT_H]) m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ #undef HAVE_SYS_NDIR_H]) m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ #undef HAVE_SYS_DIR_H]) m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ #undef HAVE_NDIR_H]) m4trace:configure.in:20: -1- AC_HEADER_STDC m4trace:configure.in:20: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.in:20: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS]) m4trace:configure.in:21: -1- AC_HEADER_SYS_WAIT m4trace:configure.in:21: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_WAIT_H]) m4trace:configure.in:21: -1- AH_OUTPUT([HAVE_SYS_WAIT_H], [/* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H]) m4trace:configure.in:22: -1- AC_CHECK_HEADERS([fcntl.h malloc.h memory.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/systeminfo.h unistd.h values.h inttypes.h]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_MALLOC_H], [/* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRING_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_SYS_FILE_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_SYS_IOCTL_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_SYS_SYSTEMINFO_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSTEMINFO_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_VALUES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_VALUES_H]) m4trace:configure.in:22: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H]) m4trace:configure.in:24: -1- AC_CHECK_HEADERS([strstream.h sstream fstream.h fstream iostream.h iostream iomanip.h iomanip]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_STRSTREAM_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRSTREAM_H]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_SSTREAM], [/* Define to 1 if you have the header file. */ #undef HAVE_SSTREAM]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_FSTREAM_H], [/* Define to 1 if you have the header file. */ #undef HAVE_FSTREAM_H]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_FSTREAM], [/* Define to 1 if you have the header file. */ #undef HAVE_FSTREAM]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_IOSTREAM_H], [/* Define to 1 if you have the header file. */ #undef HAVE_IOSTREAM_H]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_IOSTREAM], [/* Define to 1 if you have the header file. */ #undef HAVE_IOSTREAM]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_IOMANIP_H], [/* Define to 1 if you have the header file. */ #undef HAVE_IOMANIP_H]) m4trace:configure.in:24: -1- AH_OUTPUT([HAVE_IOMANIP], [/* Define to 1 if you have the header file. */ #undef HAVE_IOMANIP]) m4trace:configure.in:28: -1- AC_HEADER_STAT m4trace:configure.in:28: -1- AC_DEFINE_TRACE_LITERAL([STAT_MACROS_BROKEN]) m4trace:configure.in:28: -1- AH_OUTPUT([STAT_MACROS_BROKEN], [/* Define to 1 if the `S_IS*\' macros in do not work properly. */ #undef STAT_MACROS_BROKEN]) m4trace:configure.in:29: -1- AC_CHECK_TYPES([_Bool]) m4trace:configure.in:29: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL]) m4trace:configure.in:29: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */ #undef HAVE__BOOL]) m4trace:configure.in:29: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H]) m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H]) m4trace:configure.in:30: -1- AC_C_CONST m4trace:configure.in:30: -1- AC_DEFINE_TRACE_LITERAL([const]) m4trace:configure.in:30: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */ #undef const]) m4trace:configure.in:31: -1- AC_C_INLINE m4trace:configure.in:31: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler calls it, or to nothing if \'inline\' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif]) m4trace:configure.in:32: -1- AC_TYPE_PID_T m4trace:configure.in:32: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) m4trace:configure.in:32: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ #undef pid_t]) m4trace:configure.in:33: -1- AC_TYPE_SIZE_T m4trace:configure.in:33: -1- AC_DEFINE_TRACE_LITERAL([size_t]) m4trace:configure.in:33: -1- AH_OUTPUT([size_t], [/* Define to `unsigned\' if does not define. */ #undef size_t]) m4trace:configure.in:34: -1- AC_HEADER_TIME m4trace:configure.in:34: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) m4trace:configure.in:34: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME]) m4trace:configure.in:35: -1- AC_STRUCT_TM m4trace:configure.in:35: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME]) m4trace:configure.in:35: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your declares `struct tm\'. */ #undef TM_IN_SYS_TIME]) m4trace:configure.in:36: -1- AC_C_VOLATILE m4trace:configure.in:36: -1- AC_DEFINE_TRACE_LITERAL([volatile]) m4trace:configure.in:36: -1- AH_OUTPUT([volatile], [/* Define to empty if the keyword `volatile\' does not work. Warning: valid code using `volatile\' can become incorrect without. Disable with care. */ #undef volatile]) m4trace:configure.in:39: -1- AC_FUNC_CLOSEDIR_VOID m4trace:configure.in:39: -1- AC_DEFINE_TRACE_LITERAL([CLOSEDIR_VOID]) m4trace:configure.in:39: -1- AH_OUTPUT([CLOSEDIR_VOID], [/* Define to 1 if the `closedir\' function returns void instead of `int\'. */ #undef CLOSEDIR_VOID]) m4trace:configure.in:40: -1- AC_FUNC_FORK m4trace:configure.in:40: -1- AC_CHECK_HEADERS([unistd.h vfork.h]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H]) m4trace:configure.in:40: -1- AC_CHECK_FUNCS([fork vfork]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */ #undef HAVE_FORK]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */ #undef HAVE_VFORK]) m4trace:configure.in:40: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */ #undef HAVE_WORKING_VFORK]) m4trace:configure.in:40: -1- AC_DEFINE_TRACE_LITERAL([vfork]) m4trace:configure.in:40: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */ #undef vfork]) m4trace:configure.in:40: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK]) m4trace:configure.in:40: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */ #undef HAVE_WORKING_FORK]) m4trace:configure.in:41: -1- AC_PROG_GCC_TRADITIONAL m4trace:configure.in:42: -1- AC_FUNC_MALLOC m4trace:configure.in:42: -1- AC_CHECK_HEADERS([stdlib.h]) m4trace:configure.in:42: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.in:42: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) m4trace:configure.in:42: -1- AH_OUTPUT([HAVE_MALLOC], [/* Define to 1 if your system has a GNU libc compatible `malloc\' function, and to 0 otherwise. */ #undef HAVE_MALLOC]) m4trace:configure.in:42: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) m4trace:configure.in:42: -1- AC_LIBSOURCE([malloc.c]) m4trace:configure.in:42: -1- AC_SUBST([LIB@&t@OBJS]) m4trace:configure.in:42: -1- AC_DEFINE_TRACE_LITERAL([malloc]) m4trace:configure.in:42: -1- AH_OUTPUT([malloc], [/* Define to rpl_malloc if the replacement function should be used. */ #undef malloc]) m4trace:configure.in:43: -1- AC_FUNC_MEMCMP m4trace:configure.in:43: -1- AC_LIBSOURCE([memcmp.c]) m4trace:configure.in:43: -1- AC_SUBST([LIB@&t@OBJS]) m4trace:configure.in:44: -1- AC_FUNC_REALLOC m4trace:configure.in:44: -1- AC_CHECK_HEADERS([stdlib.h]) m4trace:configure.in:44: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.in:44: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) m4trace:configure.in:44: -1- AH_OUTPUT([HAVE_REALLOC], [/* Define to 1 if your system has a GNU libc compatible `realloc\' function, and to 0 otherwise. */ #undef HAVE_REALLOC]) m4trace:configure.in:44: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) m4trace:configure.in:44: -1- AC_LIBSOURCE([realloc.c]) m4trace:configure.in:44: -1- AC_SUBST([LIB@&t@OBJS]) m4trace:configure.in:44: -1- AC_DEFINE_TRACE_LITERAL([realloc]) m4trace:configure.in:44: -1- AH_OUTPUT([realloc], [/* Define to rpl_realloc if the replacement function should be used. */ #undef realloc]) m4trace:configure.in:45: -1- AC_TYPE_SIGNAL m4trace:configure.in:45: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) m4trace:configure.in:45: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */ #undef RETSIGTYPE]) m4trace:configure.in:46: -1- AC_FUNC_STAT m4trace:configure.in:46: -1- AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK m4trace:configure.in:46: -1- AC_DEFINE_TRACE_LITERAL([LSTAT_FOLLOWS_SLASHED_SYMLINK]) m4trace:configure.in:46: -1- AH_OUTPUT([LSTAT_FOLLOWS_SLASHED_SYMLINK], [/* Define to 1 if `lstat\' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK]) m4trace:configure.in:46: -1- AC_LIBSOURCE([lstat.c]) m4trace:configure.in:46: -1- AC_SUBST([LIB@&t@OBJS]) m4trace:configure.in:46: -1- AC_LIBSOURCE([stat.c]) m4trace:configure.in:46: -1- AC_SUBST([LIB@&t@OBJS]) m4trace:configure.in:46: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STAT_EMPTY_STRING_BUG]) m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_STAT_EMPTY_STRING_BUG], [/* Define to 1 if `stat\' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG]) m4trace:configure.in:47: -1- AC_FUNC_VPRINTF m4trace:configure.in:47: -1- AC_CHECK_FUNCS([vprintf], [ AC_CHECK_FUNC(_doprnt, [AC_DEFINE(HAVE_DOPRNT, 1, [Define to 1 if you don't have `vprintf' but do have `_doprnt.'])])]) m4trace:configure.in:47: -1- AH_OUTPUT([HAVE_VPRINTF], [/* Define to 1 if you have the `vprintf\' function. */ #undef HAVE_VPRINTF]) m4trace:configure.in:47: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOPRNT]) m4trace:configure.in:47: -1- AH_OUTPUT([HAVE_DOPRNT], [/* Define to 1 if you don\'t have `vprintf\' but do have `_doprnt.\' */ #undef HAVE_DOPRNT]) m4trace:configure.in:48: -1- AC_CHECK_FUNCS([alarm atexit dup2 memset strchr strcspn strpbrk strrchr strspn strstr strtol strtoul sysinfo uname]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */ #undef HAVE_ALARM]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_ATEXIT], [/* Define to 1 if you have the `atexit\' function. */ #undef HAVE_ATEXIT]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_DUP2], [/* Define to 1 if you have the `dup2\' function. */ #undef HAVE_DUP2]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ #undef HAVE_MEMSET]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */ #undef HAVE_STRCHR]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRCSPN], [/* Define to 1 if you have the `strcspn\' function. */ #undef HAVE_STRCSPN]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRPBRK], [/* Define to 1 if you have the `strpbrk\' function. */ #undef HAVE_STRPBRK]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRRCHR], [/* Define to 1 if you have the `strrchr\' function. */ #undef HAVE_STRRCHR]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRSPN], [/* Define to 1 if you have the `strspn\' function. */ #undef HAVE_STRSPN]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */ #undef HAVE_STRSTR]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRTOL], [/* Define to 1 if you have the `strtol\' function. */ #undef HAVE_STRTOL]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRTOUL], [/* Define to 1 if you have the `strtoul\' function. */ #undef HAVE_STRTOUL]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_SYSINFO], [/* Define to 1 if you have the `sysinfo\' function. */ #undef HAVE_SYSINFO]) m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_UNAME], [/* Define to 1 if you have the `uname\' function. */ #undef HAVE_UNAME]) m4trace:configure.in:54: -1- AC_CONFIG_FILES([Makefile raideng/Makefile raidutil/Makefile lib/Makefile distribution/raidutils.spec]) m4trace:configure.in:55: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.in:55: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) raidutils-0.0.6.orig/distribution/0002775000175000000620000000000010333777643017076 5ustar bapstaff00000000000000raidutils-0.0.6.orig/distribution/raidutils.spec.in0000664000175000000620000000333110175141257022343 0ustar bapstaff00000000000000Summary: Utilities to manage Adaptec I2O compliant RAID controllers Name: raidutils Version: @VERSION@ Release: 1 License: BSD Group: Applications/System Source: http://i2o.shadowconnect.com/raidutils/raidutils-@VERSION@.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description The raidutils program allow the user to manage the Adaptec I2O compliant RAID controllers. It can, for example, create/delete an RAID array, add/remove a hot spare drive to/from a RAID array, activate/silence the alarm or get information about the status of the RAID array and disks. %prep %setup -q %build %configure make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT rm $RPM_BUILD_ROOT/%{_libdir}/libraidutil.a rm $RPM_BUILD_ROOT/%{_libdir}/libraidutil.so rm $RPM_BUILD_ROOT/%{_libdir}/libraidutil.la %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc README COPYING ChangeLog %{_bindir}/raidutil %{_bindir}/raideng %{_libdir}/libraidutil.so.0 %{_libdir}/libraidutil.so.0.0.0 %changelog * Mon Jan 24 2005 Markus Lidel - New version for FC3. * Wed May 18 2004 Markus Lidel - Compiled with new kernel interface. * Wed May 05 2004 Markus Lidel - Changed recognition of I2O pass-thru option availability. - Now raidutils use the right headers if using gcc version 3.3. * Mon May 03 2004 Markus Lidel - Cleaned up RPM regarding the guideline of Anvil, warren and mschwendt. Many thanks to them. * Sun May 02 2004 Markus Lidel - first version with SPEC file to build a rpm. raidutils-0.0.6.orig/include/0002775000175000000620000000000010333777643016002 5ustar bapstaff00000000000000raidutils-0.0.6.orig/include/basic.hh0000664000175000000620000000522110044153305017360 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ // Data associated with every engine object #undef PACK #if (defined(__GNUC__)) # define PACK __attribute__ ((packed)) #else #define PACK #endif DPT_TAG_T myTag; // This object's tag uSHORT objType; // Type of engine object // - See bit definitions above uSHORT flags; // Miscellaneous flags // - objType dependent // - See bit definitions for // each object type dptCstatus_S status; // Object status dptCaddr_S addr; // Object's SCSI address uSHORT level; // Object's origin level #if defined (_DPT_STRICT_ALIGN) uSHORT sniAdjust1; #endif DPT_TAG_T attachedTo PACK;// The tag of the manager that this // object is attached directly to #if defined(__cplusplus) && defined(_DPT_ACTIVE_ALIGNMENT) #if defined(SNI_MIPS) uLONG getAttachedTo() { return attachedTo; } uLONG setAttachedTo(uLONG inLong) { attachedTo = inLong;return inLong; } uLONG swapAttachedTo() { return attachedTo; } #endif #endif #include "descrip.hh" // Inquiry description information uCHAR userBuff[USER_BUFF_SIZE]; // Buffer available to raidutils-0.0.6.orig/include/ctlr_map.hpp0000664000175000000620000001024410044153306020272 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __CTLR_MAP_HPP #define __CTLR_MAP_HPP /**************************************************************************** * * Created: 10/5/98 * ***************************************************************************** * * File Name: ctlr_map.hpp * Module: * Contributors: Kevin Caporaso * Description: * Version Control: * * $Revision: 17 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ #ifndef _NFILE # define _NFILE 60 #endif class DPTControllerMap { #if !defined _DPT_MSDOS protected: #else public: #endif #if defined _DPT_SCO || defined _DPT_NETWARE || defined _DPT_FREE_BSD || defined _DPT_MSDOS || defined _DPT_BSDI enum PathExists_t { PathExists_None, PathExists_Exists, PathExists_Read, PathExists_Open, PathExists_Busy }; #else enum PathExists { PathExists_None, PathExists_Exists, PathExists_Read, PathExists_Open, PathExists_Busy }; #endif public: DPTControllerMap(); virtual ~DPTControllerMap(); // Methods. void init(); int Realloc(unsigned char** array, unsigned* size, unsigned newSize, int fill); int Realloc(unsigned char** array, unsigned char* size, unsigned newSize, int fill); int Realloc(char*** array, unsigned char* size, unsigned newSize, int fill); char* Strdup(char* String); char* getAdapterString(int hba); char* getAdapterPath(int hba); char* getChannelString(int hba, int bus); char* getChannelPath(int hba, int bus); char* getControllerString(int hba, int bus); char* getTargetString(int hba, int bus, int target, int lun, int hidden = 0); char* getTargetPath(int hba, int bus, int target, int lun); int getController(int hba, int bus); int getHba(int controller); int getBus(int controller); static void Reset(); private: // Member variables. static unsigned char* controller2Dpt; static unsigned char controller2DptSize; static unsigned char* dpt2Controller; static unsigned char dpt2ControllerSize; static char** dpt2Path; static unsigned char dpt2PathSize; protected: static int popen_pid[_NFILE]; // Methods. FILE * SafePopenRead(char* commands); int SafePclose(FILE* fp); #if defined _DPT_SCO || defined _DPT_NETWARE || defined _DPT_FREE_BSD || defined _DPT_MSDOS || defined _DPT_BSDI PathExists_t PathExists(char* path); #else enum PathExists PathExists(char* path); #endif }; #endif //__CTLR_MAP_HPP raidutils-0.0.6.orig/include/descrip.hh0000664000175000000620000000370110044153305017731 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ // SCSI object description structure // Include the description structure uCHAR version; // ANSI version supported uCHAR inqFlag1; // SCSI Inquiry flag #1 uCHAR inqFlag2; // SCSI Inquiry flag #2 uCHAR unUsed; // Unused char vendorID[9]; // Ascii string char productID[17]; // Ascii string char revision[5]; // Ascii string char vendorExtra[21]; // Ascii string raidutils-0.0.6.orig/include/device.hh0000664000175000000620000000411210044153305017534 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ // Data unique to every engine device #undef PACK #if (defined(__GNUC__)) # define PACK __attribute__ ((packed)) #else #define PACK #endif uSHORT scsiOffset; // 0=Async mode // Non-zero = SCSI offset uSHORT xfrSpeed; // SCSI transfer speed dptCcapacity_S capacity PACK; // Device capacity dptCemuParam_S emulation PACK; // Emulated drive parameters // DPT specific name (ASCII string) // (Up to 8 valid chars + NULL terminator + 1) uCHAR dptName[DPT_NAME_SIZE+2]; uLONG lastPartitionBlk PACK; // Last block used by a partition raidutils-0.0.6.orig/include/dpt_api.h0000664000175000000620000001664210044153305017560 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPT_API_H #define __DPT_API_H //File - DPT_APP.H //*************************************************************************** // //Description: // // This file contains the function prototypes and type definitions //for the 'C' interface to the DPT engine and the DPT communication engine. // //Author: Doug Anderson //Date: 5/4/94 // //Editors: // Mark Date Who Comment // 9/12/96 Garg Moved typedef DPT_ENGINE_FN_T to inside // of extern "C" so that it works with C++ // //Remarks: // // //*************************************************************************** // Standard DPT stuff #include "osd_util.h" // Fundamental DPT Engine data structures #ifdef __cplusplus #include "eng_std.hpp" #else #include "eng_std.h" #endif // Engine message definitions #include "dpt_msg.h" // Engine return values and error codes #include "dpt_rtn.h" // Data structures returned by MSG_GET_INFO #include "dpt_info.h" // Engine I/O buffer structures #include "dpt_buff.h" // System information data structures #include "sys_info.h" // DPT signature structure #include "dptsig.h" // Engine entry points #include "engine.h" // HBA log structure definitions #include "hba_log.h" #ifdef __cplusplus // HBA log facilitator class #include "hba_log.hpp" #endif //************************************************************************ // External Data Declarations //------------------------------------------------------------------------ // Ascii representation of DPT engine messages extern char * DPT_Messages[]; // Maximum engine message array index extern uLONG DPT_MaxMessage; // Ascii representation of DPT return values and error codes extern char * DPT_ReturnCodes[]; // Maximum return code array index extern uLONG DPT_MaxReturnCode; //************************************************************************ // 'C' Interface //------------------------------------------------------------------------ #ifdef __cplusplus extern "C" { #endif // Define a pointer to a DPT engine function // - So that a single pointer can be defined to point to either // DPT_CallEngine() or DPT_CallCommEngine() // It can be used for run-time dynamic linking of engine DLL too. typedef DPT_RTN_T (*DPT_ENGINE_FN_T)(DPT_TAG_T,DPT_MSG_T,DPT_TAG_T,void *,void *,uLONG); //============================== // DPT Engine Iterface Functions //============================== // Initializes and loads the DPT engine // Returns: // 0 = Successful - OK to use DPT_CallEngine() // Non-zero = Failure - Do not use DPT_CallEngine() DPT_RTN_T DPT_OpenEngine(void); // Provides access to the DPT engine // Parameters: // connTag = Connection tag (access handle) // msg = Engine message (see DPT_MSG.H) // tgtTag = Tag of the target engine object // fromEng_P = Buffer for data transmitted from the engine to // an application (Must comply with dptBuffer_S format) // toEng_P = Buffer for data transmitted from an application // to the engine (Must comply with dptBuffer_S format) // timeout = Message timeout value (0 = No timeout) // Returns: // See DPT_RTN.H for a list of valid return values #if !defined(_DPT_UNIX) && !defined(_SINIX) //__UNIX__ #ifdef __cplusplus inline DPT_RTN_T DPT_CallEngine(DPT_TAG_T connTag,DPT_MSG_T msg,DPT_TAG_T tgtTag,void *fromEng_P,void *toEng_P,uLONG timeout) { return (DPT_Engine(connTag,msg,tgtTag,fromEng_P,toEng_P,timeout)); } #else #define DPT_CallEngine(connTag,msg,tgtTag,fromEng_P,toEng_P,timeout) DPT_Engine(connTag,msg,tgtTag,fromEng_P,toEng_P,timeout) #endif #else DPT_RTN_T DPT_CallEngine(DPT_TAG_T, DPT_MSG_T, DPT_TAG_T, void *, void *, uLONG); #endif // Gracefully unloads the DPT engine DPT_RTN_T DPT_CloseEngine(void); //============================================= // DPT Communication Engine Interface Functions //============================================= #if defined(HAS_COMM_ENG) && defined(NEW_COMM_ENG) // prototypes that were not made available in a include file from anywhere else, therefore I am forced // to place it here. DPT_RTN_T DPT_IMPORT DPTCE_StartUp(char *pathname); void DPT_IMPORT DPTCE_ShutDown(); #endif // Initializes and loads the DPT communication engine // Returns: // 0 = Successful - OK to use DPT_CallCommEngine() // Non-zero = Failure - Do not use DPT_CallCommEngine() DPT_RTN_T DPT_OpenCommEngine(void); // Provides access to the DPT communication engine // Parameters: // connTag = Connection tag (access handle) // msg = Engine or Comm. engine message (see DPT_MSG.H) // tgtTag = Tag of the target engine object // fromEng_P = Buffer for data transmitted from the engine to // an application (Must comply with dptBuffer_S format) // toEng_P = Buffer for data transmitted from an application // to the engine (Must comply with dptBuffer_S format) // timeout = Message timeout value (0 = No timeout) // Returns: // See DPT_RTN.H for a list of valid return values DPT_RTN_T DPT_IMPORT DPT_CallCommEng(DPT_TAG_T connTag,DPT_MSG_T msg,DPT_TAG_T tgtTag,void *fromEng_P,void *toEng_P,uLONG timeout); #if defined(HAS_COMM_ENG) && defined(NEW_COMM_ENG) #if !defined(_DPT_UNIX) && !defined(_SINIX) //__UNIX__ #ifdef __cplusplus inline DPT_RTN_T DPT_CallCommEngine(DPT_TAG_T connTag,DPT_MSG_T msg,DPT_TAG_T tgtTag,void *fromEng_P,void *toEng_P,uLONG timeout) { return (DPT_CallCommEng(connTag,msg,tgtTag,fromEng_P,toEng_P,timeout)); } #else #define DPT_CallCommEngine(connTag,msg,tgtTag,fromEng_P,toEng_P,timeout) DPT_CallCommEng(connTag,msg,tgtTag,fromEng_P,toEng_P,timeout) #endif #else DPT_RTN_T DPT_CallCommEng(DPT_TAG_T, DPT_MSG_T, DPT_TAG_T, void *, void *, uLONG); #endif #endif //dz defined(HAS_COMM_ENG) && defined(NEW_COMM_ENG) // Gracefully unloads the DPT communication engine DPT_RTN_T DPT_CloseCommEngine(void); #ifdef __cplusplus }; // end - extern "C" #endif #endif raidutils-0.0.6.orig/include/dpt_buff.h0000664000175000000620000002012410044153305017717 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPT_BUFF_H #define __DPT_BUFF_H //File - DPT_BUFF.H //*************************************************************************** // //Description: // // This file contains the structure definition for the DPT engine //I/O buffer structures. // //Author: Doug Anderson //Date: 3/4/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "osd_util.h" #include "mem.h" #ifndef NO_PACK #if defined (_DPT_AIX) #pragma options align=packed #else #pragma pack(1) #endif // aix #endif //struct - dptData_S - start //=========================================================================== // //Description: // // This structure defines a DPT I/O buffer. These I/O buffers //are used to pass data into and recieve data from the DPT engine. // //--------------------------------------------------------------------------- #ifdef __cplusplus struct dptData_S { #else typedef struct { #endif uLONG commID; // Used in UNIX to ID buffers uLONG allocSize; // Size of the data area uLONG writeIndex; // # bytes written to the buffer uLONG readIndex; // # bytes read from the buffer uCHAR data[1]; // The data buffer #ifdef __cplusplus }; #else } dptData_S; #endif //dptData_S - end #ifdef __cplusplus //Struct - dptBuffer_S - start //=========================================================================== // //Description: // // This class provides the functions to manipulate a dptData_S buffer. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- struct dptBuffer_S : public dptData_S { // Clear the entire data buffer void clear() { memset(data,0x00,(uINT)allocSize); } // Reset the buffer for fresh data void reset() { readIndex = 0; writeIndex = 0; } // Prepare the buffer for reading void replay() { readIndex = 0; } // Read the next available data from the buffer uSHORT extract(void *,uLONG); uSHORT extract(uLONG &inData) { return (extract(&inData,sizeof(uLONG))); } uSHORT extract(long &inData) { return (extract(&inData,sizeof(uLONG))); } uSHORT extract(uINT &inData) { return (extract(&inData,sizeof(uSHORT))); } uSHORT extract(int &inData) { return (extract(&inData,sizeof(uSHORT))); } uSHORT extract(uSHORT &inData) { return (extract(&inData,sizeof(uSHORT))); } uSHORT extract(short &inData) { return (extract(&inData,sizeof(uSHORT))); } uSHORT extract(uCHAR &inData) { return (extract(&inData,sizeof(uCHAR))); } uSHORT extract(char &inData) { return (extract(&inData,sizeof(uCHAR))); } /* #ifdef _DPT_OS2 uSHORT extract(BYTE &inData) { return (extract(&inData,sizeof(BYTE))); } #endif */ // Increment the buffer's read index without extracting any information uSHORT skip(uLONG); // Write data to the next available location within the data buffer uSHORT insert(void *,uLONG); uSHORT insert(uLONG inData) { return (insert(&inData,sizeof(uLONG))); } uSHORT insert(long inData) { return (insert(&inData,sizeof(uLONG))); } uSHORT insert(uSHORT inData) { return (insert(&inData,sizeof(uSHORT))); } uSHORT insert(short inData) { return (insert(&inData,sizeof(uSHORT))); } uSHORT insert(uINT inData) { return (insert(&inData,sizeof(uINT))); } uSHORT insert(int inData) { return (insert(&inData,sizeof(int))); } uSHORT insert(uCHAR inData) { return (insert(&inData,sizeof(uCHAR))); } uSHORT insert(char inData) { return (insert(&inData,sizeof(uCHAR))); } // Sets the number of bytes that can be extracted from the buffer void setExtractSize(uLONG); // Create a new I/O buffer with the specified data buffer size static dptBuffer_S * newBuffer(uLONG); // Delete an I/O buffer allocated with newBuffer() static void delBuffer(dptBuffer_S *); // Structure Portability Functions // // The goal of the buffer insertion/extraction functions is to // insert/extract data from the DPT buffers in little-endian order // regardless of host byte order. This will ensure that the contents // of the buffer can be read/written on any platform. // uSHORT netInsert(void *inData, uLONG size) { return (insert(inData, size)); } uSHORT netInsert(uLONG); /* uSHORT netInsert(long inData) { return (netInsert((uLONG) inData)); }*/ uSHORT netInsert(uSHORT); /* uSHORT netInsert(short inData) { return (netInsert((uSHORT) inData)); }*/ uSHORT netInsert(uCHAR inData) { return (insert(&inData, sizeof(uCHAR))); } uSHORT netInsert(char inData) { return (insert(&inData, sizeof(char))); } uSHORT netExtract(void *inData, uLONG size) { return (extract(inData, size)); } uSHORT netExtract(uLONG &inData); uSHORT netExtract(long &inData); uSHORT netExtract(uSHORT &inData); uSHORT netExtract(short &inData); uSHORT netExtract(uCHAR &inData) { return (extract(&inData, sizeof(uCHAR))); } uSHORT netExtract(char &inData) { return (extract(&inData, sizeof(char))); } }; //dptBuffer_S - end #endif #ifndef NO_UNPACK #if defined (_DPT_AIX) #pragma options align=reset #elif defined (UNPACK_FOUR) #pragma pack(4) #else #pragma pack() #endif // aix #endif #endif raidutils-0.0.6.orig/include/dpt_eata.h0000664000175000000620000015631010044153307017720 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPT_EATA_H #define __DPT_EATA_H //File - DPT_EATA.H //*************************************************************************** // //Description: // // This file contains EATA specific structure and constant //definitions. // //Author: Doug Anderson //Date: 4/8/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "osd_util.h" #include "dptalign.h" #ifndef osdBcopy # define osdBcopy(src,dest,size) memcpy(dest,src,size) #endif #ifndef __FAR__ # ifdef __BORLANDC__ # define __FAR__ far # else # define __FAR__ # endif #endif #ifndef NO_PACK #if defined (_DPT_AIX) #pragma options align=packed #else #pragma pack(1) #endif // aix #endif //Definitions - Defines & Constants ----------------------------------------- // EATA Communcation Methods........................... #define EATA_PIO 0 #define EATA_DMA 1 /* * Eata Register set definitions. We may need to undef them to remove * errors since these same symbols are repeated in the various drivers. * There are two sets of definitions, in an effort to support driver code * and engine code that had formerly standardized on these. */ #define HA_DATA 0x00 #define HA_ERROR 0x01 #define HA_DMA_BASE 0x02 #define HA_COMMAND 0x07 # define CP_READ_CFG_PIO 0xF0 /* Read Configuration Data, PIO */ # define CP_EATA_RESET 0xF9 /* Reset SCSI Bus */ # define CP_IMMEDIATE 0xFA /* EATA Immediate command */ # define CP_DMA_CMD 0xFF /* Send an EATA DMA command */ #define HA_STATUS 0x07 # define HA_ST_ERROR 0x01 # define HA_ST_INDEX 0x02 # define HA_ST_CORRCTD 0x04 # define HA_ST_DRQ 0x08 # define HA_ST_SEEK_COMPLETE 0x10 # define HA_ST_WRT_FLT 0x20 # define HA_ST_READY 0x40 # define HA_ST_BUSY 0x80 # define HA_ST_DATA_RDY (HA_ST_SEEK_COMPLETE | HA_ST_READY | HA_ST_DRQ) #define HA_AUX_STATUS 0x08 # define HA_AUX_BUSY 0x01 # define HA_AUX_INTR 0x02 // EATA Registers ..................................... // // EPR_ = EATA PIO Register Offset #define HBA_COMMAND 0x7 // Write #define HBA_STATUS 0x7 // Read #define HBA_AUX_STATUS 0x8 // Read #define HBA_DATA 0x0 // Read/Write #define HBA_ADDR3 0x5 // Write - CP Address Byte #3 #define HBA_ADDR2 0x4 // Write - CP Address Byte #2 #define HBA_ADDR1 0x3 // Write - CP Address Byte #1 #define HBA_ADDR0 0x2 // Write - CP Address Byte #0 // EATA PIO Commands.................................. #define EPIO_RD_CONFIG 0xf0 // Read Config. #define EPIO_SEND_CP 0xf2 // Send CP (Command Packet) #define EPIO_RCVE_SP 0xf3 // Recieve SP (Status Packet) #define EPIO_TRUNCATE 0xf4 // Truncate Transfer // EATA DMA Commands.................................. #define EDMA_RD_CONFIG 0xfd // Read Config. #define EDMA_SEND_CP 0xff // Send CP (Command Packet) // EATA Commands...................................... #define EATA_RESET 0xf9 // Reset #define EDMA_RESET 0xf9 // - Clears controller hung #define EPIO_RESET 0xf9 // - Issues reset to SCSI bus // EATA Status Register............................... // Previous cmd ended in an error #define ESTAT_ERROR 0x01 // Controller will have more data soon (To avoid // context switching) #define ESTAT_MORE 0x02 // Data read was corrected by ECC algorithm #define ESTAT_CORRECT 0x04 // Data Request is active #define ESTAT_DRQ 0x08 // Seek complete #define ESTAT_SEEKCOMP 0x10 // Write fault #define ESTAT_FAULT 0x20 // Drive is ready #define ESTAT_READY 0x40 // Controller is busy #define ESTAT_BUSY 0x80 // EATA Auxillary Status Register..................... // Controller is busy (Doesn't clear interrupt) #define AUX_BUSY 0x01 // A drive interrupt is asserted #define AUX_IRQ 0x02 //Definitions - Structure & Typedef ----------------------------------------- // EATA Read Config. Data Structure................... /* Signature */ #define RDCFG_EATA_SIG (((long)'E')|(((long)'A')<<8L)|(((long)'T')<<16L)|(((long)'A')<<24L)) //flag1 // Controller supports overlapped cmds #define RDCFG_OVERLAP 0x01 // Controller supports SCSI target mode #define RDCFG_TGT_MODE 0x02 // Controller supports DMA #define RDCFG_DMA 0x10 // The DRQX value is valid #define RDCFG_DRQ_VALID 0x20 // ATA device (Head/Drive Register Req'd) #define RDCFG_ATA 0x40 // Host Adapter Address Valid #define RDCFG_HBA_ADDR 0x80 //flag2 // Controller interrupt request # #define RDCFG_IRQ_NUM 0x0f // IRQ trigger (0=edge, 1=level) #define RDCFG_IRQ_TRIG 0x10 // 0=Primary, 1=Secondary #define RDCFG_PRIORITY 0x20 // DRQ Index: // 0 = DRQ #0 // 1 = DRQ #7 // 2 = DRQ #6 // 3 = DRQ #5 #define RDCFG_DRQ_NUM 0xc0 //flag3 // (1=A secondary EISA controller does not also // respond to ISA address) #define RDCFG_NO_ISA 0x01 // 1 = A PCI HBA is configured to decode a fixed EISA address #define RDCFG_FORCE_ADDR 0x02 // 1 = A 64KByte scatter-gather table is supported #define RDCFG_SG_64K 0x04 // 1 = Unaligned scatter-gather table elements are supported #define RDCFG_SG_UAE 0x08 //flag4 // 1=This is an EISA controller #define RDCFG_EISA_BUS 0x80 // 1=This is a PCI controller #define RDCFG_PCI_BUS 0x40 // 1=RAIDNUM returned is questionable #define RDCGF_VOODOO_RAIDNUM 0x20 // 1=This ia a PCI board with an M1 chip installed #define RDCFG_PCI_M1 0x10 // 1=HBA supports AUTO termination on base channel only #define RDCFG_AUTOTRM 0x08 // 1=HBA supports SCAM on one or more channels #define RDCFG_SCAM 0x04 #define STRUCT_NAME eataRdConfig_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define eataRdConfig_size 38 typedef unsigned char eataRdConfig_S[eataRdConfig_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define eataRdConfig_size 38 #define STRUCT_SIZE eataRdConfig_size //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- // uCHAR getDevType() { return getU1(this,0); } # define eataRdConfig_getDevType(this) ((eataRdConfig_S __FAR__ *)(this))->getDevType() // uCHAR setDevType(uCHAR inChar) { return setU1(this,0,inChar); } # define eataRdConfig_setDevType(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->getDevType(inChar) // uCHAR getPageCode() { return getU1(this,1); } # define eataRdConfig_getPageCode(this) ((eataRdConfig_S __FAR__ *)(this))->getPageCode() // uCHAR setPageCode(uCHAR inChar) { return setU1(this,1,inChar); } # define eataRdConfig_setPageCode(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->getPageCode(inChar) // CR 3033 - Change byte position from 0 to 3 to reflect the correct "length" location uCHAR getLength() { return getU1(this,3); } # define eataRdConfig_getLength(this) ((eataRdConfig_S __FAR__ *)(this))->getLength() // CR 3033 - Change byte position from 0 to 3 uCHAR setLength(uCHAR inChar) { return setU1(this,3,inChar); } # define eataRdConfig_setLength(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setLength(inChar) // CR 3033 - Remove swapLength(). Change andU4 to andU1 and byte position // from 0 to 3 // uLONG swapLength() { return osdSwap4((uLONG __FAR__ *)getUP1(this,0)); } // void andLength(uLONG inLong) { andU4(this,0,inLong); } void andLength(uLONG inLong) { andU1(this,3,inLong); } uCHAR __FAR__ * getSignature() { return getUP1(this,4); } # define eataRdConfig_getSignature(this) (*((uLONG __FAR__ *)(this->getSignature()))) uCHAR getVersion() { return getU1(this,8); } # define eataRdConfig_getVersion(this) ((eataRdConfig_S __FAR__ *)(this))->getVersion() uCHAR setVersion(uCHAR inChar) { return setU1(this,8,inChar); } # define eataRdConfig_setVersion(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setVersion(inChar) void orVersion(uCHAR inChar) { orU1(this,8,inChar); } void andVersion(uCHAR inChar) { andU1(this,8,inChar); } uCHAR getFlag1() { return getU1(this,9); } # define eataRdConfig_getFlag1(this) ((eataRdConfig_S __FAR__ *)(this))->getFlag1() uCHAR setFlag1(uCHAR inChar) { return setU1(this,9,inChar); } # define eataRdConfig_setFlag1(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setFlag1(inChar) void orFlag1(uCHAR inChar) { orU1(this,9,inChar); } # define eataRdConfig_orFlag1(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->orFlag1(inChar) void andFlag1(uCHAR inChar) { andU1(this,9,inChar); } # define eataRdConfig_andFlag1(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->andFlag1(inChar) uSHORT getPadLength() { return getU2(this,10); } # define eataRdConfig_getPadLength(this) ((eataRdConfig_S __FAR__ *)(this))->getPadLength() uSHORT setPadLength(uSHORT inShort) { return setU2(this,10,inShort); } # define eataRdConfig_setPadLength(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setPadLength(inChar) uSHORT swapPadLength() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,10)); } uCHAR __FAR__ * getScsiIDs() { return getUP1(this,12); } # define eataRdConfig_getScsiIDs(this) ((eataRdConfig_S __FAR__ *)(this))->getScsiIDs() uLONG getCpLength() { return getU4(this,16); } # define eataRdConfig_getCpLength(this) ((eataRdConfig_S __FAR__ *)(this))->getCpLength() uLONG setCpLength(uLONG inLong) { return setU4(this,16,inLong); } # define eataRdConfig_setCpLength(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setCpLength(inChar) uLONG swapCpLength() { return osdSwap4((uLONG __FAR__ *)getUP1(this,16)); } uLONG getSpLength() { return getU4(this,20); } # define eataRdConfig_getSpLength(this) ((eataRdConfig_S __FAR__ *)(this))->getSpLength() uLONG setSpLength(uLONG inLong) { return setU4(this,20,inLong); } # define eataRdConfig_setSpLength(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setSpLength(inChar) uLONG swapSpLength() { return osdSwap4((uLONG __FAR__ *)getUP1(this,20)); } uSHORT getQueueSize() { return getU2(this,24); } # define eataRdConfig_getQueueSize(this) ((eataRdConfig_S __FAR__ *)(this))->getQueueSize() uSHORT setQueueSize(uSHORT inShort) { return setU2(this,24,inShort); } # define eataRdConfig_setQueueSize(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setQueueSize(inChar) uSHORT swapQueueSize() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,24)); } uLONG getSgSize() { return getU4(this,26); } # define eataRdConfig_getSgSize(this) ((eataRdConfig_S __FAR__ *)(this))->getSgSize() uLONG setSgSize(uLONG inLong) { return setU4(this,26,inLong); } # define eataRdConfig_setSgSize(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setSgSize(inChar) uLONG swapSgSize() { return osdSwap4((uLONG __FAR__ *)getUP1(this,26)); } uCHAR getFlag2() { return getU1(this,30); } # define eataRdConfig_getFlag2(this) ((eataRdConfig_S __FAR__ *)(this))->getFlag2() uCHAR setFlag2(uCHAR inChar) { return setU1(this,30,inChar); } # define eataRdConfig_setFlag2(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setFlag2(inChar) void orFlag2(uCHAR inChar) { orU1(this,30,inChar); } # define eataRdConfig_orFlag2(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->orFlag2(inChar) void andFlag2(uCHAR inChar) { andU1(this,30,inChar); } # define eataRdConfig_andFlag2(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->andFlag2(inChar) uCHAR getReserved1() { return getU1(this,31); } uCHAR getIRQ() { return getU1(this,31); } # define eataRdConfig_getIRQ(this) ((eataRdConfig_S __FAR__ *)(this))->getIRQ() uCHAR setReserved1(uCHAR inChar) { return setU1(this,31,inChar); } uCHAR setIRQ(uCHAR inChar) { return setU1(this,31,inChar); } # define eataRdConfig_setIRQ(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setIRQ(inChar) void orReserved1(uCHAR inChar) { orU1(this,31,inChar); } void andReserved1(uCHAR inChar) { andU1(this,31,inChar); } uCHAR getFlag3() { return getU1(this,32); } # define eataRdConfig_getFlag3(this) ((eataRdConfig_S __FAR__ *)(this))->getFlag3() uCHAR setFlag3(uCHAR inChar) { return setU1(this,32,inChar); } # define eataRdConfig_setFlag3(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setFlag3(inChar) void orFlag3(uCHAR inChar) { orU1(this,32,inChar); } # define eataRdConfig_orFlag3(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->orFlag3(inChar) void andFlag3(uCHAR inChar) { andU1(this,32,inChar); } # define eataRdConfig_andFlag3(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->andFlag3(inChar) uCHAR getMaxChanID() { return getU1(this,33); } # define eataRdConfig_getMaxChanID(this) ((eataRdConfig_S __FAR__ *)(this))->getMaxChanID() uCHAR setMaxChanID(uCHAR inChar) { return setU1(this,33,inChar); } # define eataRdConfig_setMaxChanID(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setMaxChanID(inChar) void orMaxChanID(uCHAR inChar) { orU1(this,33,inChar); } # define eataRdConfig_orMaxChanID(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->orMaxChanID(inChar) void andMaxChanID(uCHAR inChar) { andU1(this,33,inChar); } # define eataRdConfig_andMaxChanID(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->andMaxChanID(inChar) uCHAR getMaxLun() { return getU1(this,34); } # define eataRdConfig_getMaxLun(this) ((eataRdConfig_S __FAR__ *)(this))->getMaxLun() uCHAR setMaxLun(uCHAR inChar) { return setU1(this,34,inChar); } # define eataRdConfig_setMaxLun(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setMaxLun(inChar) void orMaxLun(uCHAR inChar) { orU1(this,34,inChar); } void andMaxLun(uCHAR inChar) { andU1(this,34,inChar); } uCHAR getFlag4() { return getU1(this,35); } # define eataRdConfig_getFlag4(this) ((eataRdConfig_S __FAR__ *)(this))->getFlag4() uCHAR setFlag4(uCHAR inChar) { return setU1(this,35,inChar); } # define eataRdConfig_setFlag4(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setFlag4(inChar) void orFlag4(uCHAR inChar) { orU1(this,35,inChar); } # define eataRdConfig_orFlag4(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->orFlag4(inChar) void andFlag4(uCHAR inChar) { andU1(this,35,inChar); } # define eataRdConfig_andFlag4(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->andFlag4(inChar) uCHAR getRaidNum() { return getU1(this,36); } # define eataRdConfig_getRaidNum(this) ((eataRdConfig_S __FAR__ *)(this))->getRaidNum() uCHAR setRaidNum(uCHAR inChar) { return setU1(this,36,inChar); } # define eataRdConfig_setRaidNum(this,inChar) ((eataRdConfig_S __FAR__ *)(this))->setRaidNum(inChar) void orRaidNum(uCHAR inChar) { orU1(this,36,inChar); } void andRaidNum(uCHAR inChar) { andU1(this,36,inChar); } uCHAR getReserved2() { return getU1(this,37); } # define eataRdConfig_getReserved2(this) ((eataRdConfig_S __FAR__ *)(this))->getReserved2() uCHAR setReserved2(uCHAR inChar) { return setU1(this,37,inChar); } void orReserved2(uCHAR inChar) { orU1(this,37,inChar); } void andReserved2(uCHAR inChar) { andU1(this,37,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } # define eataRdConfig_clear(this) ((eataRdConfig_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ * next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ * prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN // CR 3033 swapLength(); swapPadLength(); swapCpLength(); swapSpLength(); swapQueueSize(); swapSgSize(); #endif } #undef STRUCT_SIZE #elif (defined(_DPT_ACTIVE_ALIGNMENT)) /*----------------- * Access Functions *-----------------*/ #define eataRdConfig_getDevType(x) getU1(x,0) #define eataRdConfig_getPageCode(x) getU1(x,1) #define eataRdConfig_getLength(x) getU1(x,3) #define eataRdConfig_getSignature(x) (*((unsigned long __FAR__ *)getUP1(x,4))) #define eataRdConfig_getVersion(x) getU1(x,8) #define eataRdConfig_getFlag1(x) getU1(x,9) #define eataRdConfig_orFlag1(x,y) orU1(x,9,y) #define eataRdConfig_andFlag1(x,y) andU1(x,9,y) #define eataRdConfig_setFlag1(x,y) setU1(x,9,y) #define eataRdConfig_getPadLength(x) getU2(x,10) #define eataRdConfig_getScsiIDs(x) getUP1(x,12) #define eataRdConfig_getCpLength(x) getU4(x,16) #define eataRdConfig_setCpLength(x,y) setU4(x,16,y) #define eataRdConfig_getSpLength(x) getU4(x,20) #define eataRdConfig_getQueueSize(x) getU2(x,24) #define eataRdConfig_setQueueSize(x,y) setU2(x,24,y) #define eataRdConfig_getSgSize(x) getU2(x,28) #define eataRdConfig_setSgSize(x,y) setU2(x,28,y) #define eataRdConfig_getFlag2(x) getU1(x,30) #define eataRdConfig_orFlag2(x,y) orU1(x,30,y) #define eataRdConfig_andFlag2(x,y) andU1(x,30,y) #define eataRdConfig_setFlag2(x,y) setU1(x,30,y) #define eataRdConfig_getIRQ(x) getU1(x,31) #define eataRdConfig_setIRQ(x,y) setU1(x,31,y) #define eataRdConfig_getFlag3(x) getU1(x,32) #define eataRdConfig_orFlag3(x,y) orU1(x,32,y) #define eataRdConfig_andFlag3(x,y) andU1(x,32,y) #define eataRdConfig_setFlag3(x,y) setU1(x,32,y) #define eataRdConfig_getMaxChanID(x) getU1(x,33) #define eataRdConfig_orMaxChanID(x,y) orU1(x,33,y) #define eataRdConfig_andMaxChanID(x,y) andU1(x,33,y) #define eataRdConfig_setMaxChanID(x,y) setU1(x,33,y) #define eataRdConfig_getMaxLun(x) getU1(x,34) #define eataRdConfig_setMaxLun(x,y) setU1(x,34,y) #define eataRdConfig_getFlag4(x) getU1(x,35) #define eataRdConfig_orFlag4(x,y) orU1(x,35,y) #define eataRdConfig_andFlag4(x,y) andU1(x,35,y) #define eataRdConfig_setFlag4(x,y) setU1(x,35,y) #define eataRdConfig_getRaidNum(x) getU1(x,36) #define eataRdConfig_setRaidNum(x,y) setU1(x,36,y) #define eataRdConfig_getReserved2(x) getU1(x,37) /*--------------------------- * Required Support Functions *---------------------------*/ #define eataRdConfig_clear(x) osdBzero(x,eataRdConfig_size) //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG length; // # bytes following this field # define eataRdConfig_getDevType(this) \ ((eataRdConfig_S __FAR__ *)this)->length # define eataRdConfig_getPageCode(this) \ (((eataRdConfig_S __FAR__ *)this)->length>>8) # define eataRdConfig_getLength(this) \ (((eataRdConfig_S __FAR__ *)this)->length>>24) char signature[4]; // EATA signature = ascii "EATA" # define eataRdConfig_getSignature(this) \ (*((uLONG __FAR__ *)((eatatRdConfig_S __FAR__ *)this)->signature)) uCHAR version; // EATA version level supported // bits 7-4 = version level // bits 3-0 = 0 # define eataRdConfig_getVersion(this) \ ((eataRdConfig_S __FAR__ *)this)->version # define eataRdConfig_setVersion(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->version = (inChar) uCHAR flag1; // Flag byte - see bit definitions above # define eataRdConfig_getFlag1(this) ((eataRdConfig_S __FAR__ *)this)->flag1 # define eataRdConfig_setFlag1(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag1 = (inChar) # define eataRdConfig_orFlag1(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag1 |= (inChar) # define eataRdConfig_andFlag1(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag1 &= (inChar) uSHORT padLength; // Extra CP bytes sent (PIO only, DMA = 0) # define eataRdConfig_getPadLength(this) \ getU2(&(((eataRdConfig_S __FAR__ *)this)->padLength),0) # define eataRdConfig_setPadLength(this,inShort) \ setU2(&(((eataRdConfig_S __FAR__ *)this)->padLength),0,inShort) uCHAR scsiIDs[4]; // HBA's SCSI IDs for various SCSI channels # define eataRdConfig_getScsiIDs(this) \ ((eataRdConfig_S __FAR__ *)this)->scsiIDs uLONG cpLength; // # valid Command Packet bytes # define eataRdConfig_getCpLength(this) \ getU4(&(((eataRdConfig_S __FAR__ *)this)->cpLength),0) # define eataRdConfig_setCpLength(this,inLong) \ setU4(&(((eataRdConfig_S __FAR__ *)this)->cpLength),0,inLong) uLONG spLength; // # valid Status Packet bytes # define eataRdConfig_getSpLength(this) \ getU4(&(((eataRdConfig_S __FAR__ *)this)->spLength),0) # define eataRdConfig_setSpLength(this,inLong) \ setU4(&(((eataRdConfig_S __FAR__ *)this)->spLength),0,inLong) uSHORT queueSize; // Max. # CPs that can be queued # define eataRdConfig_getQueueSize(this) \ getU2(&(((eataRdConfig_S __FAR__ *)this)->queueSize),0) # define eataRdConfig_setQueueSize(this,inShort) \ setU2(&(((eataRdConfig_S __FAR__ *)this)->queueSize),0,inShort) uLONG sgSize; // Max. # Scatter Gather table entries // (8 bytes each) # define eataRdConfig_getSgSize(this) \ getU4(&(((eataRdConfig_S __FAR__ *)this)->sgSize),0) # define eataRdConfig_setSgSize(this,inLong) \ setU4(&(((eataRdConfig_S __FAR__ *)this)->sgSize),0,inLong) uCHAR flag2; // Flag byte - see bit definitions above # define eataRdConfig_getFlag2(this) ((eataRdConfig_S __FAR__ *)this)->flag2 # define eataRdConfig_setFlag2(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag2 = (inChar) # define eataRdConfig_orFlag2(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag2 |= (inChar) # define eataRdConfig_andFlag2(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag2 &= (inChar) uCHAR reserved1; // Device synchronous mode flags (defunct) // Bit 7 = SCSI ID 7... # define eataRdConfig_getIRQ(this) ((eataRdConfig_S __FAR__ *)this)->reserved1 # define eataRdConfig_setIRQ(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->reserved1 = (inChar) uCHAR flag3; // Flag byte - see bit definitions above # define eataRdConfig_getFlag3(this) ((eataRdConfig_S __FAR__ *)this)->flag3 # define eataRdConfig_setFlag3(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag3 = (inChar) # define eataRdConfig_orFlag3(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag3 |= (inChar) # define eataRdConfig_andFlag3(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag3 &= (inChar) uCHAR maxChanID; // Maximum SCSI channel/ID supported // (Max. channel = upper 3 bits) # define eataRdConfig_getMaxChanID(this) \ ((eataRdConfig_S __FAR__ *)this)->maxChanID # define eataRdConfig_setMaxChanID(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->maxChanID = (inChar) # define eataRdConfig_orMaxChanID(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->maxChanID |= (inChar) # define eataRdConfig_andMaxChanID(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->maxChanID &= (inChar) uCHAR maxLUN; // Maximum SCSI LUN supported # define eataRdConfig_getMaxLun(this) ((eataRdConfig_S __FAR__ *)this)->maxLUN # define eataRdConfig_setMaxLun(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->maxLUN = (inChar) uCHAR flag4; // Flag byte - see bit definitions above # define eataRdConfig_getFlag4(this) ((eataRdConfig_S __FAR__ *)this)->flag4 # define eataRdConfig_setFlag4(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag4 = (inChar) # define eataRdConfig_orFlag4(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag4 |= (inChar) # define eataRdConfig_andFlag4(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->flag4 &= (inChar) uCHAR raidNum; // This HBA's unique RAID number # define eataRdConfig_getRaidNum(this) \ ((eataRdConfig_S __FAR__ *)this)->raidNum # define eataRdConfig_setRaidNum(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->raidNum = (inChar) uCHAR reserved2; # define eataRdConfig_getReserved2(this) \ ((eataRdConfig_S __FAR__ *)this)->reserved2 # define eataRdConfig_setReserved2(this,inChar) \ ((eataRdConfig_S __FAR__ *)this)->reserved2 = (inChar) # define eataRdConfig_size sizeof(eataRdConfig_S) # define eataRdConfig_clear(this) osdBzero(this,eataRdConfig_size) #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME // EATA CP (Command Packet) Structure............. //flags // Issue SCSI bus reset #define CP_SCSI_RESET 0x01 // Controller should re-initialize #define CP_INIT 0x02 // DMA only - Target should automatically transfer // request sense data #define CP_REQ_SENSE 0x04 // DMA only - Data address is used for Scatter Gather #define CP_SG_ADDR 0x08 // PIO only - Quick mode (CP uses PIO, Data uses DMA) #define CP_QUICK 0x10 // The controller should interpret the cmd directly #define CP_INTERPRET 0x20 // Data Output (Write, Host to Target) #define CP_DATA_OUT 0x40 // Data Input (Read, Target to Host) #define CP_DATA_IN 0x80 //message bits #define CP_DISCONNECT 0x80 #define CP_IDENTIFY 0x40 #define STRUCT_NAME eataCP_S // #if (defined(__cplusplus)) // struct STRUCT_NAME { // #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define eataCP_size 44 // typedef unsigned char eataCP_S[eataCP_size]; // #else typedef struct { // #endif //-------------------- // If active alignment... //-------------------- #if 0 && defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 44 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getFlags() { return getU1(this,0); } # define eataCP_getFlags(this) ((eataCP_S __FAR__ *)(this))->getFlags() uCHAR setFlags(uCHAR inChar) { return setU1(this,0,inChar); } # define eataCP_setFlags(this,inChar) ((eataCP_S __FAR__ *)(this))->setFlags(inChar) uCHAR orFlags(uCHAR inChar) { return orU1(this,0,inChar); } # define eataCP_orFlags(this,inChar) ((eataCP_S __FAR__ *)(this))->orFlags(inChar) uCHAR andFlags(uCHAR inChar) { return andU1(this,0,inChar); } # define eataCP_andFlags(this,inChar) ((eataCP_S __FAR__ *)(this))->andFlags(inChar) uCHAR getReqSenseLen() { return getU1(this,1); } # define eataCP_getReqSenseLen(this) ((eataCP_S __FAR__ *)(this))->getReqSenseLen() uCHAR setReqSenseLen(uCHAR inChar) { return setU1(this,1,inChar); } # define eataCP_setReqSenseLen(this,inChar) ((eataCP_S __FAR__ *)(this))->setReqSenseLen(inChar) uCHAR getExtendedId() { return getU1(this,2); } # define eataCP_getExtendedId(this) ((eataCP_S __FAR__ *)(this))->getExtendedId() uCHAR setExtendedId(uCHAR inChar) { return setU1(this,2,inChar); } # define eataCP_setExtendedId(this,inChar) ((eataCP_S __FAR__ *)(this))->setExtendedId(inChar) uCHAR getNestedFW() { return getU1(this,5); } # define eataCP_getNestedFW(this) ((eataCP_S __FAR__ *)(this))->getNestedFW() uCHAR setNestedFW(uCHAR inChar) { return setU1(this,5,inChar); } # define eataCP_setNestedFW(this,inChar) ((eataCP_S __FAR__ *)(this))->setNestedFW(inChar) uCHAR orNestedFW(uCHAR inChar) { return orU1(this,5,inChar); } # define eataCP_orNestedFW(this,inChar) ((eataCP_S __FAR__ *)(this))->orNestedFW(inChar) uCHAR andNestedFW(uCHAR inChar) { return andU1(this,5,inChar); } # define eataCP_andNestedFW(this,inChar) ((eataCP_S __FAR__ *)(this))->andNestedFW(inChar) uCHAR getPhysical() { return getU1(this,6); } # define eataCP_getPhysical(this) ((eataCP_S __FAR__ *)(this))->getPhysical() uCHAR setPhysical(uCHAR inChar) { return setU1(this,6,inChar); } # define eataCP_setPhysical(this,inChar) ((eataCP_S __FAR__ *)(this))->setPhysical(inChar) uCHAR orPhysical(uCHAR inChar) { return orU1(this,6,inChar); } # define eataCP_orPhysical(this,inChar) ((eataCP_S __FAR__ *)(this))->orPhysical(inChar) uCHAR andPhysical(uCHAR inChar) { return andU1(this,6,inChar); } # define eataCP_andPhysical(this,inChar) ((eataCP_S __FAR__ *)(this))->andPhysical(inChar) uCHAR getDevAddr() { return getU1(this,7); } # define eataCP_getDevAddr(this) ((eataCP_S __FAR__ *)(this))->getDevAddr() uCHAR setDevAddr(uCHAR inChar) { return setU1(this,7,inChar); } # define eataCP_setDevAddr(this,inChar) ((eataCP_S __FAR__ *)(this))->setDevAddr(inChar) uCHAR orDevAddr(uCHAR inChar) { return orU1(this,7,inChar); } # define eataCP_orDevAddr(this,inChar) ((eataCP_S __FAR__ *)(this))->orDevAddr(inChar) uCHAR andDevAddr(uCHAR inChar) { return andU1(this,7,inChar); } # define eataCP_andDevAddr(this,inChar) ((eataCP_S __FAR__ *)(this))->andDevAddr(inChar) uCHAR getMessage() { return getU1(this,8); } # define eataCP_getMessage(this) ((eataCP_S __FAR__ *)(this))->getMessage() uCHAR setMessage(uCHAR inChar) { return setU1(this,8,inChar); } # define eataCP_setMessage(this,inChar) ((eataCP_S __FAR__ *)(this))->setMessage(inChar) uCHAR orMessage(uCHAR inChar) { return orU1(this,8,inChar); } # define eataCP_orMessage(this,inChar) ((eataCP_S __FAR__ *)(this))->orMessage(inChar) uCHAR andMessage(uCHAR inChar) { return andU1(this,8,inChar); } # define eataCP_andMessage(this,inChar) ((eataCP_S __FAR__ *)(this))->andMessage(inChar) uCHAR __FAR__ * getCDB() { return getUP1(this,12); } # define eataCP_getCDB(this) ((eataCP_S __FAR__ *)(this))->getCDB() uLONG getDataLength() { return getU4(this,24); } # define eataCP_getDataLength(this) ((eataCP_S __FAR__ *)(this))->getDataLength() uLONG setDataLength(uLONG inLong) { return setU4(this,24,inLong); } # define eataCP_setDataLength(this,inLong) ((eataCP_S __FAR__ *)(this))->setDataLength(inLong) uLONG __FAR__ * getDataLengthPtr() { return getUP4(this,24); } # define eataCP_getDataLengthPtr(this) ((eataCP_S __FAR__ *)(this))->getDataLengthPtr() uLONG getVCPaddr() { return *((uLONG __FAR__ *)getUP1(this,28)); } # define eataCP_getVCPaddr(this) ((eataCP_S __FAR__ *)(this))->getVCPaddr() uLONG setVCPaddr(uLONG inLong) { return *((uLONG __FAR__ *)getUP1(this,28)) = inLong; } # define eataCP_setVCPaddr(this,inLong) ((eataCP_S __FAR__ *)(this))->setVCPaddr(inLong) uLONG getDataAddr() { return getU4(this,32); } # define eataCP_getDataAddr(this) osdVirt(this->getDataAddr()) uLONG setDataAddr(uLONG inLong) { return setU4(this,32,inLong); } # define eataCP_setDataAddr(this,inLong) ((eataCP_S __FAR__ *)(this))->setDataAddr(osdPhys(inLong)) uLONG __FAR__ * getDataAddrPtr() { return getUP4(this,32); } # define eataCP_getDataAddrPtr(this) ((eataCP_S __FAR__ *)(this))->getDataAddrPtr() uLONG getSpAddr() { return getU4(this,36); } # define eataCP_getSpAddr(this) osdVirt(this->getSpAddr()) uLONG setSpAddr(uLONG inLong) { return setU4(this,36,inLong); } # define eataCP_setSpAddr(this,inLong) ((eataCP_S __FAR__ *)(this))->setSpAddr(osdPhys(inLong)) uLONG __FAR__ * getSpAddrPtr() { return getUP4(this,36); } # define eataCP_getSpAddrPtr(this) ((eataCP_S __FAR__ *)(this))->getSpAddrPtr() uLONG getReqSenseAddr() { return getU4(this,40); } # define eataCP_getReqSenseAddr(this) osdVirt(this->getReqSenseAddr()) uLONG setReqSenseAddr(uLONG inLong) { return setU4(this,40,inLong); } # define eataCP_setReqSenseAddr(this,inLong) ((eataCP_S __FAR__ *)(this))->setReqSenseAddr(osdPhys(inLong)) uLONG __FAR__ * getReqSenseAddrPtr() { return getUP4(this,40); } # define eataCP_getReqSenseAddrPtr(this) ((eataCP_S __FAR__ *)(this))->getReqSenseAddrPtr() //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } # define eataRdConfig_clear(this) ((eataCP_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ * next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ * prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE // #elif (defined(_DPT_ACTIVE_ALIGNMENT)) #endif /*----------------- * Access Functions *-----------------*/ #define eataCP_getFlags(x) getU1(x,0) #define eataCP_setFlags(x,y) setU1(x,0,y) #define eataCP_orFlags(x,y) orU1(x,0,y) #define eataCP_andFlags(x,y) andU1(x,0,y) #define eataCP_getReqSenseLen(x) getU1(x,1) #define eataCP_setReqSenseLen(x,y) setU1(x,1,y) #define eataCP_getExtendedId(x) getU1(x,2) #define eataCP_setExtendedId(x,y) setU1(x,2,y) #define eataCP_getNestedFW(x) getU1(x,5) #define eataCP_setNestedFW(x,y) setU1(x,5,y) #define eataCP_orNestedFW(x,y) orU1(x,5,y) #define eataCP_andNestedFW(x,y) andU1(x,5,y) #define eataCP_getPhysical(x) getU1(x,6) #define eataCP_setPhysical(x,y) setU1(x,6,y) #define eataCP_orPhysical(x,y) orU1(x,6,y) #define eataCP_andPhysical(x,y) andU1(x,6,y) #define eataCP_getDevAddr(x) getU1(x,7) #define eataCP_setDevAddr(x,y) setU1(x,7,y) #define eataCP_orDevAddr(x,y) orU1(x,7,y) #define eataCP_andDevAddr(x,y) andU1(x,7,y) #define eataCP_getMessage(x) getU1(x,8) #define eataCP_setMessage(x,y) setU1(x,8,y) #define eataCP_orMessage(x,y) orU1(x,8,y) #define eataCP_andMessage(x,y) andU1(x,8,y) #define eataCP_getCDB(x) getUP1(x,12) #if (!defined(eataCP_getDataLength)) # define eataCP_getDataLength(x) getU4(x,24) #endif #if (!defined(eataCP_setDataLength)) # define eataCP_setDataLength(x,y) setU4(x,24,(unsigned long)(y)) #endif #define eataCP_getDataLengthPtr(x) getUP4(x,24) #if (!defined(eataCP_getSgLength)) # define eataCP_getSgLength(x) eataCP_getDataLength(x) #endif #if (!defined(eataCP_setSgLength)) # define eataCP_setSgLength(x,y) eataCP_setDataLength(x,y) #endif #define eataCP_getSgLengthPtr(x) eataCP_getDataLengthPtr(x) #define eataCP_getVCPaddr(x) (*((unsigned long __FAR__ *)getUP1(x,28))) #define eataCP_setVCPaddr(x,y) (*((unsigned long __FAR__ *)getUP1(x,28)) \ = (unsigned long)(y)) #if (!defined(eataCP_getDataAddr)) # if (defined(osdVirt)) # define eataCP_getDataAddr(x) osdVirt(getU4(x,32)) # else # define eataCP_getDataAddr(x) getU4(x,32) # endif #endif #if (!defined(eataCP_setDataAddr)) # if (defined(osdPhys)) # define eataCP_setDataAddr(x,y) setU4(x,32,osdPhys((unsigned long)(y))) # else # define eataCP_setDataAddr(x,y) setU4(x,32,(unsigned long)(y)) # endif #endif #if (!defined(eataCP_setDataAddrPtr)) # define eataCP_getDataAddrPtr(x) getUP4(x,32) #endif #if (!defined(eataCP_getSgAddr)) # if ((defined(osdPhys) && defined(osdVirt)) || (!defined(osdPhys) && !defined(osdVirt))) # define eataCP_getSgAddr(x) ((eataSG_S __FAR__ *)eataCP_getDataAddr(x)) # endif #endif #if (!defined(eataCP_setSgAddr)) # define eataCP_setSgAddr(x,y) eataCP_setDataAddr(x,y) #endif #define eataCP_getSgAddrPtr(x) eataCP_getDataAddrPtr(x) #if (!defined(eataCP_getSpAddr)) # if (defined(osdVirt)) # define eataCP_getSpAddr(x) (eataSP_S __FAR__ *)osdVirt(getU4(x,36)) # else # define eataCP_getSpAddr(x) (eataSP_S __FAR__ *)getU4(x,36) # endif #endif #if (!defined(eataCP_setSpAddr)) # if (defined(osdPhys)) # define eataCP_setSpAddr(x,y) setU4(x,36,osdPhys((unsigned long)(y))) # else # define eataCP_setSpAddr(x,y) setU4(x,36,(unsigned long)(y)) # endif #endif #define eataCP_getSpAddrPtr(x) getUP4(x,36) #if (!defined(eataCP_getReqSenseAddr)) # if (defined(osdVirt)) # define eataCP_getReqSenseAddr(x) ((sdRequestSense_S __FAR__ *)osdVirt(getU4(x,40))) # else # define eataCP_getReqSenseAddr(x) ((sdRequestSense_S __FAR__ *)getU4(x,40)) # endif #endif #if (!defined(eataCP_setReqSenseAddr)) # if (defined(osdPhys)) # define eataCP_setReqSenseAddr(x,y) setU4(x,40,osdPhys((unsigned long)(y))) # else # define eataCP_setReqSenseAddr(x,y) setU4(x,40,(unsigned long)(y)) # endif #endif #define eataCP_getReqSenseAddrPtr(x) getUP4(x,40) #define eataCP_clear(x) osdBzero(x,eataCP_size) //----------------------------- // Else assume static alignment... //----------------------------- // #else uCHAR flags; // Flag byte - see bit definition above // # define eataCP_getFlags(this) ((eataCP_S __FAR__ *)this)->flags // # define eataCP_setFlags(this,inChar) \ // ((eataCP_S __FAR__ *)this)->flags = (inChar) // # define eataCP_orFlags(this,inChar) \ // ((eataCP_S __FAR__ *)this)->flags |= (inChar) // # define eataCP_andFlags(this,inChar) \ // ((eataCP_S __FAR__ *)this)->flags &= (inChar) uCHAR reqSenseLen; // # bytes requested by controller in // response to a check status (reqSense=1). // # define eataCP_getReqSenseLen(this) ((eataCP_S __FAR__ *)this)->reqSenseLen // # define eataCP_setReqSenseLen(this,inChar) \ // ((eataCP_S __FAR__ *)this)->reqSenseLen = (inChar) uCHAR extendedId; // Extended ID word (for SCSI IDs > 31) uCHAR unUsed[2]; // Unused uCHAR nestedFW; // Bit 0 = The SCSI cmd should be sent // to a FW drive that may be a component // of a SW drive. // # define eataCP_getNestedFW(this) ((eataCP_S __FAR__ *)this)->nestedFW // # define eataCP_setNestedFW(this,inChar) \ // ((eataCP_S __FAR__ *)this)->nestedFW = (inChar) // # define eataCP_orNestedFW(this,inChar) \ // ((eataCP_S __FAR__ *)this)->nestedFW |= (inChar) // # define eataCP_andNestedFW(this,inChar) \ // ((eataCP_S __FAR__ *)this)->nestedFW &= (inChar) uCHAR physical; // Bit 0 = The SCSI cmd should be sent // directly to the target physical unit. // (Bypasses all RAID, mirroring...) // # define eataCP_getPhysical(this) ((eataCP_S __FAR__ *)this)->physical // # define eataCP_setPhysical(this,inChar) \ // ((eataCP_S __FAR__ *)this)->physical = (inChar) // # define eataCP_orPhysical(this,inChar) \ // ((eataCP_S __FAR__ *)this)->physical |= (inChar) // # define eataCP_andPhysical(this,inChar) \ // ((eataCP_S __FAR__ *)this)->physical &= (inChar) uCHAR devAddr; // SCSI channel=bits 7-4, SCSI ID=bits 3-0 // # define eataCP_getDevAddr(this) ((eataCP_S __FAR__ *)this)->devAddr // # define eataCP_setDevAddr(this,inChar) \ // ((eataCP_S __FAR__ *)this)->devAddr = (inChar) // # define eataCP_orDevAddr(this,inChar) \ // ((eataCP_S __FAR__ *)this)->devAddr |= (inChar) // # define eataCP_andDevAddr(this,inChar) \ // ((eataCP_S __FAR__ *)this)->devAddr &= (inChar) uCHAR message[4]; // SCSI message bytes to be transfered to // the target device (0=NOP) // # define eataCP_getMessage(this) ((eataCP_S __FAR__ *)this)->message // # define eataCP_setMessage(this,inChar) \ // ((eataCP_S __FAR__ *)this)->message = (inChar) // # define eataCP_orMessage(this,inChar) \ // ((eataCP_S __FAR__ *)this)->message |= (inChar) // # define eataCP_andMessage(this,inChar) \ // ((eataCP_S __FAR__ *)this)->message &= (inChar) uCHAR scsiCDB[12]; // SCSI CDB (Command Description Block) // # define eataCP_getCDB(this) ((eataCP_S __FAR__ *)this)->scsiCDB uLONG dataLength; // If, // SG=0, Max. # bytes transfered. // SG=1, Total scatter gather packet // length (in bytes) // # define eataCP_getDataLength(this) \ // getU4(&(((eataCP_S __FAR__ *)this)->dataLength),0) // # define eataCP_setDataLength(this,inLong) \ // setU4(&(((eataCP_S __FAR__ *)this)->dataLength),0,inLong) // # define eataCP_setDataLengthPtr(this) \ // &(((eataCP_S __FAR__ *)this)->DataLength) #ifdef _DPT_REALMODE uSHORT vCPsegment; // Real Mode segment of virtual CP address uSHORT vCPoffset; // Real Mode offset of virtual CP address #else uLONG vCPaddr; // Virtual CP Address (returned in SP) // # define eataCP_getVCPaddr(this) ((eataCP_S __FAR__ *)this)->vCPaddr // # define eataCP_setVCPaddr(this,inLong) \ // ((eataCP_S __FAR__ *)this)->vCPaddr = (inLong) #endif // Note: dataAddr, SPaddr, & reqSenseAddr = Physical Addresses uLONG dataAddr; // If, // SG=0, Address of data to be read // or written // SG=1, Address of scatter gather table // # define eataCP_getDataAddr(this) \ // osdVirt(getU4(&(((eataCP_S __FAR__ *)this)->dataAddr),0)) // # define eataCP_setDataAddr(this,inLong) \ // setU4(&(((eataCP_S __FAR__ *)this)->dataAddr),0,osdPhys(inLong)) // # define eataCP_setDataAddrPtr(this) \ // &(((eataCP_S __FAR__ *)this)->dataAddr) uLONG spAddr; // Address of the SP (Status Packet) // The SP EOC bit should be cleared before // issuing a send CP. // # define eataCP_getSpAddr(this) \ // osdVirt(getU4(&(((eataCP_S __FAR__ *)this)->spAddr),0)) // # define eataCP_setSpAddr(this,inLong) \ // setU4(&(((eataCP_S __FAR__ *)this)->spAddr),0,osdPhys(inLong)) // # define eataCP_setSpAddrPtr(this) \ // &(((eataCP_S __FAR__ *)this)->spAddr) uLONG reqSenseAddr; // The address of request sense data // (check req. sense if CP error) // # define eataCP_getResSenseAddr(this) \ // osdVirt(getU4(&(((eataCP_S __FAR__ *)this)->reqSenseAddr),0)) // # define eataCP_setResSenseAddr(this,inLong) \ // setU4(&(((eataCP_S __FAR__ *)this)->reqSenseAddr),0,osdPhys(inLong)) // # define eataCP_setResSenseAddrPtr(this) \ // &(((eataCP_S __FAR__ *)this)->reqSenseAddr) //#endif // #ifdef __cplusplus // }; // #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; // #endif /* * Aggregate macros. */ #define eataCP_getBus(x) (eataCP_getDevAddr(x)>>5) #define eataCP_setBus(x,y) (eataCP_andDevAddr(x,31), \ eataCP_orDevAddr(x,(y)<<5)) #define eataCP_getTarget(x) (eataCP_getDevAddr(x)&31) #define eataCP_setTarget(x,y) (eataCP_andDevAddr(x,225), \ eataCP_orDevAddr(x,(y)&31)) #define eataCP_getLun(x) (eataCP_getMessage(x)&7) #define eataCP_setLun(x,y) (eataCP_andMessage(x,248), \ eataCP_orMessage(x,(y)&7)) #if (!defined(eataCP_getSgLength)) # define eataCP_getSgLength(x) eataCP_getDataLength(x) #endif #if (!defined(eataCP_getSgLengthPtr)) # define eataCP_getSgLengthPtr(x) eataCP_getDataLengthPtr(x) #endif #if (!defined(eataCP_getSgAddr)) # if ((defined(osdPhys) && defined(osdVirt)) || (!defined(osdPhys) && !defined(osdVirt))) # define eataCP_getSgAddr(x) ((eataSG_S __FAR__ *)eataCP_getDataAddr(x)) # endif #endif #if (!defined(eataCP_setSgAddr)) # define eataCP_setSgAddr(x,y) eataCP_setDataAddr(x,y) #endif #define eataCP_getSgAddrPtr(x) eataCP_getDataAddrPtr(x) #undef STRUCT_NAME // EATA SP (Status Packet) Structure.................. //flags // Controller status mask - see Status's above #define SP_STATUS 0x7f // End of command #define SP_EOC 0x80 // Controller status values #define HERR_NO_ERROR 0x00 #define HERR_SEL_TIMEOUT 0x01 #define HERR_CMD_TIMEOUT 0x02 #define HERR_SCSI_RESET 0x03 #define HERR_HBA_POST 0x04 #define HERR_BUS_PHASE 0x05 #define HERR_BUS_FREE 0x06 #define HERR_BUS_PARITY 0x07 #define HERR_BUS_HUNG 0x08 #define HERR_MSG_REJECT 0x09 #define HERR_BUS_RESET_STUCK 0x0a #define HERR_AUTO_SENSE 0x0b #define HERR_RAM_PARITY 0x0c #define HERR_ABORT_NA 0x0d /* CP aborted - NOT on Bus */ #define HERR_ABORTED 0x0e /* CP aborted - WAS on Bus */ #define HERR_RESET_NA 0x0f /* CP was reset - NOT on Bus */ #define HERR_RESET 0x10 /* CP was reset - WAS on Bus */ #define HERR_ECC 0x11 /* HBA Memory ECC Error */ #define HERR_PCI_PARITY 0x12 /* PCI Parity Error */ #define HERR_PCI_MASTER 0x13 /* PCI Master Abort */ #define HERR_PCI_TARGET 0x14 /* PCI Target Abort */ #define HERR_PCI_SIGNAL_TARGET 0x15 /* PCI Signalled Target Abort */ // SCSI status values #define SERR_GOOD 0x00 #define SERR_CHECK_CONDITION 0x02 #define SERR_CONDITION_MET 0x04 #define SERR_BUSY 0x08 #define SERR_INTERMEDIATE 0x10 #define SERR_INTM_CM 0x14 #define SERR_RESV_CONFLICT 0x18 #define SERR_CMD_TERMINATED 0x22 #define SERR_QUEUE_FULL 0x28 typedef struct { uCHAR ctlrStatus; // Flags byte - see bit definitions above uCHAR scsiStatus; // SCSI status (equals 0 if endCmd=0) uCHAR unUsed1; // Unused (should=0) uCHAR unUsed2; // Unused (should=0) uLONG residueLen; // # bytes not transfered #ifdef _DPT_REALMODE uSHORT vCPsegment; // Real Mode segment of virtual CP address uSHORT vCPoffset; // Real Mode offset of virtual CP address #else uLONG vCPaddr; // Virtual CP Address #endif uCHAR message[12]; // Indicate the Nexus responding to a // previous CP } eataSP_S; #define eataSP_size 24 // typedef unsigned char eataSP_S[eataSP_size]; #if (!defined(eataSP_getCtlrStatus)) # define eataSP_getCtlrStatus(x) getU1(x,0) #endif #if (!defined(eataSP_setCtlrStatus)) # define eataSP_setCtlrStatus(x,y) setU1(x,0,y) #endif #if (!defined(eataSP_orCtlrStatus)) # define eataSP_orCtlrStatus(x,y) orU1(x,0,y) #endif #if (!defined(eataSP_andCtlrStatus)) # define eataSP_andCtlrStatus(x,y) andU1(x,0,y) #endif #if (!defined(eataSP_getScsiStatus)) # define eataSP_getScsiStatus(x) getU1(x,1) #endif #if (!defined(eataSP_setScsiStatus)) # define eataSP_setScsiStatus(x,y) setU1(x,1,y) #endif #if (!defined(eataSP_getResidue)) # define eataSP_getResidue(x) getU4(x,4) #endif #if (!defined(eataSP_setResidue)) # define eataSP_setResidue(x,y) setU4(x,4,(unsigned long)(y)) #endif #define eataSP_getResiduePtr(x) getUP4(x,4) #if (!defined(eataSP_getVCPaddr)) # define eataSP_getVCPaddr(x) (*((unsigned long __FAR__ *)getUP1(x,8))) #endif #if (!defined(eataSP_setVCPaddr)) # define eataSP_setVCPaddr(x,y) ((*((unsigned long __FAR__ *)getUP1(x,8))) = y) #endif #if (!defined(eataSP_getMessage)) # define eataSP_getMessage(x) getUP1(x,12) #endif #if (!defined(eataSP_clear)) # define eataSP_clear(x) osdBzero(x,eataSP_size) #endif // EATA SG (Scatter Gather) Structure.................. typedef struct { uLONG addr; uLONG length; } eataSG_S; typedef struct { uCHAR __FAR__ * addr_P; uLONG length; } eataSGptr_S; #define eataSG_size 8 // typedef unsigned char eataSG_S[eataSG_size]; #if (!defined(eataSG_getAddr)) # if (defined(osdVirt)) # define eataSG_getAddr(x) osdVirt(getU4(x,0)) # else # define eataSG_getAddr(x) getU4(x,0) # endif #endif #if (!defined(eataSG_setAddr)) # if (defined(osdPhys)) # define eataSG_setAddr(x,y) setU4(x,0,osdPhys((unsigned long)(y))) # else # define eataSG_setAddr(x,y) setU4(x,0,(unsigned long)(y)) # endif #endif #define eataSG_getAddrPtr(x) getUP4(x,0) #define eataSG_getLength(x) getU4(x,4) #define eataSG_setLength(x,y) setU4(x,4,(unsigned long)(y)) #define eataSG_getLengthPtr(x) getUP4(x,4) /* * Log Sense page that provides a list of the LSUs installed into the * specified HBA. This log page is an interpreted 0x36. */ #define eataLSU_size 512 typedef unsigned char eataLSU_S[eataLSU_size]; #define eataLSU_getPageCode(x) getU1(x,0) #define eataLSU_getReserved1(x) getU1(x,1) #define eataLSU_getPageLength(x) getU2(x,2) #define eataLSU_getParmCode(x) getU2(x,4) #define eataLSU_getReserved2(x) getU1(x,6) #define eataLSU_getSize(x) getU1(x,7) #define eataLSU_getEataDevAddr(x) ((eataLSUList_S __FAR__ *)getUP1(x,8)) /* * The LSU data list contained at eataLSU_getEataDevAddr */ #define eataLSUList_size 2 typedef unsigned char eataLSUList_S[eataLSUList_size]; #define eataLSUList_getBus(x) (getU1(x,0) & 7) #define eataLSUList_getHba(x) (getU1(x,0) >> 3) #define eataLSUList_getLun(x) (getU1(x,1) & 15) #define eataLSUList_getTarget(x) (getU1(x,1) >> 4) /* * A Mode Sense(10) page 0x2A gets you ... */ #define PHYS_CHANGE 0x80 #define eataPhysDesc_size 250 typedef unsigned char eataPhysDesc_S[eataPhysDesc_size]; /* The Mode Page header */ #define eataPhysDesc_getDataLength(x) getU2(x,0) #define eataPhysDesc_setDataLength(x,y) setU2(x,0,y) #define eataPhysDesc_getMediumType(x) getU1(x,2) #define eataPhysDesc_getDevice(x) getU1(x,3) #define eataPhysDesc_getReserved1(x) getU2(x,4) #define eataPhysDesc_getBlockLength(x) getU2(x,6) /* The actual Mode Page */ #define eataPhysDesc_getModePage(x) getU1(x,8) #define eataPhysDesc_getLength(x) getU1(x,9) /* A status array, [targets][Bus] [16][15] */ #define eataPhysDesc_getStatus(x) getUP1(x,10) /* * Then, a Mode sense(10) page 0x3B gets you ... */ #define LAP_CMD_ADD 0x80 #define LAP_CMD_DELETE 0x81 #define LAP_CMD_MODIFY 0x82 #define LAP_CMD_REPLACE 0x83 #define LAP_CMD_ABORT 0x84 #define LAP_CMD_BUILD 0x88 #define LAP_CMD_REBUILD 0x89 #define LAP_CMD_VERIFY 0x8a #define LAP_CMD_VERIFY_FIX 0x8b #define LAP_CMD_VERIFY_ABORT 0x8c #define eataLSUDesc_size 512 typedef unsigned char eataLSUDesc_S[eataLSUDesc_size]; /* The Mode Page header */ #define eataLSUDesc_getDataLength(x) getU2(x,0) #define eataLSUDesc_setDataLength(x,y) setU2(x,0,y) #define eataLSUDesc_getMediumType(x) getU1(x,2) #define eataLSUDesc_getDevice(x) getU1(x,3) #define eataLSUDesc_getReserved1(x) getU2(x,4) #define eataLSUDesc_getBlockLength(x) getU2(x,6) /* The actual Mode Page */ #define eataLSUDesc_getModePage(x) getU1(x,8) #define eataLSUDesc_getLength(x) getU1(x,9) #define eataLSUDesc_getActionStatus(x) getU1(x,10) #define eataLSUDesc_setActionStatus(x,y) setU1(x,10,y) #define eataLSUDesc_getRAIDLevel(x) getU1(x,11) #define eataLSUDesc_getLsuType(x) getU1(x,12) #define eataLSUDesc_getLsuBytesPerBlock(x) getU4(x,13) #define eataLSUDesc_getCompBytesPerBlock(x) getU2(x,17) #define eataLSUDesc_getLsuCapacity(x) getU4(x,19) #define eataLSUDesc_getStartOffset(x) getU4(x,23) /* Verify Error Block */ #define eataLSUDesc_getReserved2(x) getUP1(x,27) #define eataLSUDesc_getLsuStripeSize(x) getU1(x,31) #define eataLSUDesc_getCopyDir(x) getU1(x,32) #define eataLSUDesc_getFlags(x) getU1(x,33) #define eataLSUDesc_getReconBlock(x) getU4(x,34) #define eataLSUDesc_getReconFrequency(x) getU1(x,38) #define eataLSUDesc_getReconAmount(x) getU2(x,39) #define eataLSUDesc_getLunNumber(x) getU1(x,41) #define eataLSUDesc_getHbaIndex(x) getU1(x,42) #define eataLSUDesc_getSpinDown(x) getU1(x,43) #define eataLSUDesc_getCompList(x) ((eataLSUCompList_S*)(getUP1(x,44))) /* * And the component list looks like: */ #define eataLSUCompList_size 6 typedef unsigned char eataLSUCompList_S[eataLSUCompList_size]; #define eataLSUCompList_getBus(x) eataLSUList_getBus(x) #define eataLSUCompList_getHba(x) eataLSUList_getHba(x) #define eataLSUCompList_getLun(x) eataLSUList_getLun(x) #define eataLSUCompList_getTarget(x) eataLSUList_getTarget(x) #define eataLSUCompList_getStripe(x) getU4(x,2) #ifndef NO_UNPACK #if defined (_DPT_AIX) #pragma options align=reset #elif defined (UNPACK_FOUR) #pragma pack(4) #else #pragma pack() #endif // aix #endif #endif raidutils-0.0.6.orig/include/dpt_log.hpp0000664000175000000620000001352610044153305020126 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPT_LOG_HPP #define __DPT_LOG_HPP //File - DPT_LOG.HPP //*************************************************************************** // //Description: // // This file contains class definitions to facilitate accessing //log sense/select buffers. // //Author: Doug Anderson //Date: 5/6/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "osd_util.h" #include "eng_std.hpp" #include "dpt_scsi.h" #ifndef NO_PACK #if defined (_DPT_AIX) #pragma options align=packed #else #pragma pack(1) #endif // aix #endif //class - dptSCSIlog_C - start //=========================================================================== // //Description: // // This class facilitates accessing a log sense/select buffer. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptSCSIlog_C { public: // Data............................................... // Pointer to the current log parameter logParam_S *param_P; // Current # of valid parameter bytes uSHORT paramBytes; // Total # of valid bytes in the buffer uSHORT validBytes; // Log header pointer (start of buffer) logHeader_S *header_P; // Virtual Functions.................................. // Called from reverseAllParams() for each parameter encountered. // - Allows the data portion of each parameter to be reversed virtual void reverseParam(); // Initialize log page specific variables virtual void calcInit(); // Calculate log page specific variables virtual void calcInfo(); // Initialize the current byte offset virtual void curOffsetInit(); // Calculate the byte offset of the current parameter virtual void calcCurOffset(); // Other Functions.................................... // Finds the specified paramter uCHAR * findParam(uSHORT,uSHORT); // Calculate log sense variables (optionally reverse bytes) void calcSenseInfo(uSHORT); public: // Constructor/Desctructor............................ dptSCSIlog_C(); // Boolean Functions.................................. // Determines if the current parameter is valid uSHORT isValidParam(); // Return Private Data................................ // Return the page code associated with this buffer uCHAR page(); // Return the current parameter code uSHORT code(); // Return the current flag byte uCHAR flags(); // Returns the current parameter length uCHAR length(); // Return the # of data bytes associated with the current parameter uCHAR size(); // Return a pointer to the current parameter data uCHAR * data_P(); // The # valid parameter bytes + the log header uSHORT validSize(); // The # parameter bytes returned + the log header uSHORT totalSize(); // Other Functions.................................... // NULLs this log class void clear(); // Initializes the specified buffer as a log sense buffer // - Option 0 = Initialize but do not reverse bytes // - Option 1 = Initialize & Reverse the byte ordering uCHAR * initSense(void *,uSHORT=0); // Resets to the first parameter uCHAR * reset(); // Increments to the next parameter uCHAR * next(); // Find the specified parameter code // - Begin the search with the first parameter uCHAR * find(uSHORT inCode) { return (findParam(inCode,1)); } // Find the specified parameter code // - Begin the search with the next parameter uCHAR * findNext(uSHORT inCode) { return (findParam(inCode,0)); } // Log Select Functions............................... // Initializes the specified buffer as a new log select buffer // uCHAR * initSelect(void *,uCHAR); // Set the current parameter // void setParam(uSHORT,uCHAR,uCHAR=0); // Increment to the next new log parameter // uCHAR * nextNew(); // Reverse the log select data for output // void selReverse(); }; //dptSCSIlog_C - end #ifndef NO_UNPACK #if defined (_DPT_AIX) #pragma options align=reset #elif defined (UNPACK_FOUR) #pragma pack(4) #else #pragma pack() #endif // aix #endif #endif raidutils-0.0.6.orig/include/dpt_scsi.h0000664000175000000620000077200410044153306017752 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPT_SCSI_H #define __DPT_SCSI_H //File - DPT_SCSI.H //*************************************************************************** // //Description: // // This file contains basic SCSI definitions. // //Author: Doug Anderson //Date: 5/2/95 // //Editors: // //Remarks: // // //*************************************************************************** //-------------- // Include Files //-------------- #ifndef osdBzero # define osdBzero(pointer,size) memset(pointer,0,size) # ifdef __cplusplus extern "C" { # endif # if (defined(_DPT_ARC)) # include # else # include "mem.h" # endif # include # ifdef __cplusplus } # endif #endif #ifndef __FAR__ # if (defined(__BORLANDC__)) # define __FAR__ far # else # define __FAR__ # endif #endif #include "osd_util.h" #include "dptalign.h" #ifndef NO_PACK #if defined (_DPT_AIX) #pragma options align=packed #else #pragma pack(1) #endif // aix #endif //------------ // Definitions //------------ // SCSI CDB Opcodes............................................ // // SCSI Opcode: // // Group 0: 0x00 - 0x1f -> 6 Byte CDBs - 21 bit LBAs // Group 1: 0x20 - 0x3f -> 10 Byte CDBs - 32 bit LBAs // Group 2: 0x40 - 0x5f -> 10 Byte CDBs - 32 bit LBAs // Group 3: 0x60 - 0x7f -> reserved // Group 4: 0x80 - 0x9f -> reserved // Group 5: 0xa0 - 0xbf -> 12 Byte CDBs - 32 bit LBAs // Group 6: 0xc0 - 0xdf -> vendor unique // Group 7: 0xe0 - 0xff -> vendor unique // Note: "SC" stands for "SCSI Command" // All SCSI Devices........... // Group 0 - Mandatory Support #define SC_TEST_READY 0x00 // Test Unit Ready #define SC_REQ_SENSE 0x03 // Request Sense #define SC_INQUIRY 0x12 // Inquiry command #define SC_SEND_DIAG 0x1d // Send diagnostics // Group 0 - Optional Support #define SC_COPY 0x18 // Copy #define SC_RCVE_DIAG 0x1c // Recieve diagnostics results // Group 1 - Mandatory Support // Group 1 - Optional Support #define SC_COMPARE 0x39 // Compare #define SC_COPY_VERIFY 0x3a // Copy & Verify #define SC_WRITE_BUFFER 0x3b // Write Buffer #define SC_READ_BUFFER 0x3c // Read Buffer // Group 2 #define SC_LOG_SENSE 0x4d // Log Sense #define SC_LOG_SELECT 0x4c // Log Select #define SC_MODE_SELECT 0x55 // Mode Select #define SC_MODE_SENSE 0x5a // Mode Sense #define SC_READ_LOG 0x5f // Read Log // Mode page definitions #define MP_DISK_GEOMETRY 0x04 // disk units geometry #define MP_CACHING_PAGE 0x08 // cache page settings #define MP_READ_BUF_CAP 0x5c // Read buffer capacity // Direct Access Devices...... // Group 0 - Mandatory Support #define SC_FORMAT 0x04 // Format Unit #define SC_READ0 0x08 // Read #define SC_WRITE0 0x0a // Write #define SC_RESERVE0 0x16 // Reserve #define SC_RELEASE0 0x17 // Release // Group 0 - Optional Support #define SC_REZERO 0x01 // Rezero Unit #define SC_REASSIGN 0x07 // Reassign blocks #define SC_SEEK0 0x0b // Seek #define SC_MODE_SELECT0 0x15 // Mode Select #define SC_MODE_SENSE0 0x1a // Mode Sense #define SC_START_STOP 0x1b // Start/Stop Unit #define SC_MEDIA 0x1e // Prevent/Allow media removal // Group 1 - Mandatory Support #define SC_READ_CAPACITY 0x25 // Read Capacity #define SC_READ 0x28 // Read #define SC_WRITE 0x2a // Write // Group 1 - Optional Support #define SC_SEEK 0x2b // Seek #define SC_WRITE_VERIFY 0x2e // Write & Verify #define SC_VERIFY 0x2f // Verify #define SC_SEARCH_HIGH 0x30 // Search Data High #define SC_SEARCH_EQUAL 0x31 // Search Data Equal #define SC_SEARCH_LOW 0x32 // Search Data Low #define SC_SET_LIMITS 0x33 // Set limits #define SC_PREFETCH 0x34 // Pre-fetch #define SC_FLUSH_CACHE 0x35 // Flush Cache #define SC_LOCK_CACHE 0x36 // Lock/Unlock cache #define SC_READ_DEFECT 0x37 // Read defect data #define SC_READ_LONG 0x3e // Read long #define SC_WRITE_LONG 0x3f // Write long // DPT Unique Commands #define SC_RUN 0xcf // Request Unit Notification (DPT unique) #define SC_DPT_MFC 0x0e // DPT multi-function command // Function codes for the DPT mult-function command #define MFC_ALARM_OFF 0x01 // Turn HBA Alarm Off #define MFC_READ_RAID_TBL 0x02 // Cmd HBA to re-read RAID table #define MFC_UNCRASH 0x03 // Un-crash drive #define MFC_QUIET 0x04 // Quiet SCSI bus #define MFC_UNQUIET 0x05 // Un-quiet SCSI bus #define MFC_ALARM_ON 0x06 // Turn HBA alarm on #define MFC_SET_RAIDID 0x09 // Tell the adapter what RAID ID it's at. #define MFC_DIAG_SCHEDULE 0x0f // Schedule a F/W diagnostic #define MFC_DIAG_STOP 0x10 // Stop an active F/W diagnostic #define MFC_DIAG_STATUS 0x11 // Get the F/W diagnostic status // for a device (blocks complete...) #define MFC_DIAG_EXCLUSION 0x12 // Set the background task exclusion // period #define MFC_DIAG_QUERY_SCHEDULE 0x13 // Query the diagnostic schedule for // a device #define MFC_DIAG_UNSCHEDULE 0x14 // Unschedule a scheduled diagnostic #define MFC_SMART_EMUL_ON 0x15 // Enable SMART emulation #define MFC_SMART_EMUL_OFF 0x16 // Disable SMART emulation #define MFC_SMART_STATUS 0x19 // Get the SMART status #define MFC_ALARM_DISABLE 0x1A #define MFC_ALARM_ENABLE 0x1B #define MFC_CONFIGURE 0x20 // JBOD configure/deconfigure #define MFC_CALIBRATE_BATTERY 0x21 // Calibrate battery #define MFC_READ_DRIVE_SIZE_TBL 0x23 //SCSI control byte................................... // EATA physical bit #define CDB_CTL_PHYSICAL 0x40 // EATA interpret bit #define CDB_CTL_INTERPRET 0x80 // Linked command #define CDB_CTL_LINK 0x01 // Used with the link command #define CDB_CTL_FLAG 0x02 //SCSI Command Definitions............................ // Note: "sc" stands for SCSI command //struct - scInquiry_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines a SCSI Inquiry Command. // //--------------------------------------------------------------------------- //lun // Enable vital product data #define FLG_SCSI_EVPD 0x01 // SCSI LUN #define FLG_SCSI_LUN 0xe0 #define STRUCT_NAME scInquiry_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define scInquiry_size 6 typedef unsigned char scInquiry_S[scInquiry_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } # define scInquiry_getOpCode(this) ((scInquiry_S __FAR__ *)(this))->getOpCode() uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } # define scInquiry_setOpCode(this,inChar) ((scInquiry_S __FAR__ *)(this))->setOpCode(inChar) uCHAR getLun() { return getS1(this,1); } # define scInquiry_getLun(this) ((scInquiry_S __FAR__ *)(this))->getLun() uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } # define scInquiry_setLun(this,inChar) ((scInquiry_S __FAR__ *)(this))->setLun(inChar) void orLun(uCHAR inChar) { orU1(this,1,inChar); } # define scInquiry_orLun(this,inChar) ((scInquiry_S __FAR__ *)(this))->orLun(inChar) void andLun(uCHAR inChar) { andU1(this,1,inChar); } # define scInquiry_andLun(this,inChar) ((scInquiry_S __FAR__ *)(this))->andLun((uCHAR)(inChar)) uCHAR getPageCode() { return getU1(this,2); } # define scInquiry_getPageCode(this) ((scInquiry_S __FAR__ *)(this))->getPageCode() uCHAR setPageCode(uCHAR inChar) { return setU1(this,2,inChar); } # define scInquiry_setPageCode(this,inChar) ((scInquiry_S __FAR__ *)(this))->setPageCode(inChar) uCHAR getReserved1() { return getU1(this,3); } # define scInquiry_getReserved1(this) ((scInquiry_S __FAR__ *)(this))->getReserved1() uCHAR setReserved1(uCHAR inChar) { return setU1(this,3,inChar); } # define scInquiry_setReserved1(this,inChar) ((scInquiry_S __FAR__ *)(this))->setReserved1(inChar) uCHAR getAllocLength() { return getU1(this,4); } # define scInquiry_getAllocLength(this) ((scInquiry_S __FAR__ *)(this))->getAllocLength() uCHAR setAllocLength(uCHAR inChar) { return setU1(this,4,inChar); } # define scInquiry_setAllocLength(this,inChar) ((scInquiry_S __FAR__ *)(this))->setAllocLength(inChar) uCHAR getControl() { return getU1(this,5); } # define scInquiry_getControl(this) ((scInquiry_S __FAR__ *)(this))->getControl() uCHAR setControl(uCHAR inChar) { return setU1(this,5,inChar); } # define scInquiry_setControl(this,inChar) ((scInquiry_S __FAR__ *)(this))->setControl(inChar) //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } # define scInquiry_clear(this) ((scInquiry_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE #elif (defined (_DPT_ACTIVE_ALIGNMENT)) /*----------------- * Access Functions *-----------------*/ #define scInquiry_getOpCode(x) getU1(x,0) #define scInquiry_setOpCode(x,y) setU1(x,0,y) #define scInquiry_getLun(x) getU1(x,1) #define scInquiry_setLun(x,y) setU1(x,1,y) #define scInquiry_orLun(x,y) orU1(x,1,y) #define scInquiry_andLun(x,y) andU1(x,1,y) #define scInquiry_getPageCode(x) getU1(x,2) #define scInquiry_setPageCode(x,y) setU1(x,2,y) #define scInquiry_getReserved1(x) getU1(x,3) #define scInquiry_setReserved1(x,y) setU1(x,3,y) #define scInquiry_getAllocLength(x) getU1(x,4) #define scInquiry_setAllocLength(x,y) setU1(x,4,y) #define scInquiry_getControl(x) getU1(x,5) #define scInquiry_setControl(x,y) setU1(x,5,y) /*--------------------------- * Required Support Functions *---------------------------*/ #define scInquiry_clear(x) osdBzero(x,scInquiry_size) //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; # define scInquiry_getOpCode(this) ((scInquiry_S __FAR__ *)this)->opCode # define scInquiry_setOpCode(this,inChar) \ ((scInquiry_S __FAR__ *)this)->opCode = (inChar) uCHAR lun; # define scInquiry_getLun(this) ((scInquiry_S __FAR__ *)this)->lun # define scInquiry_setLun(this,inChar) \ ((scInquiry_S __FAR__ *)this)->lun = (inChar) # define scInquiry_orLun(this,inChar) \ ((scInquiry_S __FAR__ *)this)->lun |= (inChar) # define scInquiry_andLun(this,inChar) \ ((scInquiry_S __FAR__ *)this)->lun &= (inChar) uCHAR pageCode; // Page of vital product information # define scInquiry_getPageCode(this) ((scInquiry_S __FAR__ *)this)->pageCode # define scInquiry_setPageCode(this,inChar) \ ((scInquiry_S __FAR__ *)this)->pageCode = (inChar) uCHAR reserved1; // Reserved # define scInquiry_getReserved1(this) ((scInquiry_S __FAR__ *)this)->reserved1 # define scInquiry_setReserved1(this,inChar) \ ((scInquiry_S __FAR__ *)this)->reserved1 = (inChar) uCHAR allocLength; // # of bytes allocated for Inquiry Info # define scInquiry_getAllocLength(this) \ ((scInquiry_S __FAR__ *)this)->allocLength # define scInquiry_setAllocLength(this,inChar) \ ((scInquiry_S __FAR__ *)this)->allocLength = (inChar) uCHAR control; // Control bits # define scInquiry_getControl(this) ((scInquiry_S __FAR__ *)this)->control # define scInquiry_setControl(this,inChar) \ ((scInquiry_S __FAR__ *)this)->control = (inChar) /*--------------------------- * Required Support Functions *---------------------------*/ # define scInquiry_size sizeof(scInquiry_S) # define scInquiry_clear(x) osdBzero(x,scInquiry_size) #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //scInquiry_S - end //struct - scPassThru_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines a hardware array pass thru command. // //--------------------------------------------------------------------------- //FLG_PASS_DIRECTION // direction -> target to host #define HWA_TGT2HOST 0x03 // direction -> host to target #define HWA_HOST2TGT 0x02 // direction -> no data transfer #define HWA_NO_XFR 0x01 //lun // Data transfer direction #define FLG_PASS_DIRECTION 0x03 #define STRUCT_NAME scPassThru_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getLun() { return getU1(this,1); } uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } void orLun(uCHAR inChar) { orU1(this,1,inChar); } void andLun(uCHAR inChar) { andU1(this,1,inChar); } uCHAR getChanID() { return getU1(this,2); } uCHAR setChanID(uCHAR inChar) { return setU1(this,2,inChar); } uSHORT getAllocLength() { return getU2(this,3); } uSHORT setAllocLength(uSHORT inShort) { return setU2(this,3,inShort); } uSHORT swapAllocLength() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,3)); } uCHAR getControl() { return getU1(this,5); } uCHAR setControl(uCHAR inChar) { return setU1(this,5,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapAllocLength(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; uCHAR lun; uCHAR chanID; // Bits 7-4: SCSI channel // Bits 3-0: SCSI ID uSHORT allocLength; // # of bytes allocated for Inquiry Info uCHAR control; // Control bits #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //scPassThru_S - end //struct - scRdCapacity_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines a SCSI read capacity command. // //--------------------------------------------------------------------------- //lun // Relative addressing #define FLG_RDCAP_REL_ADDR 0x01 //byte8 // Partial medium indicator #define FLG_RDCAP_PMI 0x01 #define STRUCT_NAME scRdCapacity_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define scRdCapacity_size 10 typedef unsigned char scRdCapacity_S[scRdCapacity_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 10 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } # define scRdCapacity_getOpCode(this) ((scRdCapacity_S __FAR__ *)(this))->getOpCode() uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } # define scRdCapacity_setOpCode(this,inChar) ((scRdCapacity_S __FAR__ *)(this))->setOpCode(inChar) uCHAR getLun() { return getU1(this,1); } # define scRdCapacity_getLun(this) ((scRdCapacity_S __FAR__ *)(this))->getLun() uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } # define scRdCapacity_setLun(this,inChar) ((scRdCapacity_S __FAR__ *)(this))->setLun(inChar) void orLun(uCHAR inChar) { orU1(this,1,inChar); } # define scRdCapacity_orLun(this,inChar) ((scRdCapacity_S __FAR__ *)(this))->orLun(inChar) void andLun(uCHAR inChar) { andU1(this,1,inChar); } # define scRdCapacity_andLun(this,inChar) ((scRdCapacity_S __FAR__ *)(this))->andLun(inChar) uLONG getAddress() { return getU4(this,2); } # define scRdCapacity_getAddress(this) ((scRdCapacity_S __FAR__ *)(this))->getAddress() uLONG setAddress(uLONG inLong) { return setU4(this,2,inLong); } # define scRdCapacity_setAddress(this,inLong) ((scRdCapacity_S __FAR__ *)(this))->setAddress(inLong) uLONG swapAddress() { return osdSwap4((uLONG __FAR__ *)getUP1(this,2)); } uLONG __FAR__ *getAddressPtr() { return (uLONG __FAR__ *)getUP1(this,2); } # define scRdCapacity_getAddressPtr(this) ((scRdCapacity_S __FAR__ *)(this))->getAddressPtr() uCHAR getReserved1() { return getU1(this,6); } # define scRdCapacity_getReserved1(this) ((scRdCapacity_S __FAR__ *)(this))->getReserved1() uCHAR setReserved1(uCHAR inChar) { return setU1(this,6,inChar); } # define scRdCapacity_setReserved1(this,inChar) ((scRdCapacity_S __FAR__ *)(this))->setReserved1(inChar) uCHAR getReserved2() { return getU1(this,7); } # define scRdCapacity_getReserved2(this) ((scRdCapacity_S __FAR__ *)(this))->getReserved2() uCHAR setReserved2(uCHAR inChar) { return setU1(this,7,inChar); } # define scRdCapacity_setReserved2(this,inChar) ((scRdCapacity_S __FAR__ *)(this))->setReserved2(inChar) uCHAR getPmi() { return getU1(this,8); } # define scRdCapacity_getPmi(this) ((scRdCapacity_S __FAR__ *)(this))->getPmi() uCHAR setPmi(uCHAR inChar) { return setU1(this,8,inChar); } # define scRdCapacity_setPmi(this,inChar) ((scRdCapacity_S __FAR__ *)(this))->setPmi(inChar) uCHAR getControl() { return getU1(this,9); } # define scRdCapacity_getControl(this) ((scRdCapacity_S __FAR__ *)(this))->getControl() uCHAR setControl(uCHAR inChar) { return setU1(this,9,inChar); } # define scRdCapacity_setControl(this,inChar) ((scRdCapacity_S __FAR__ *)(this))->setControl(inChar) //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } # define scRdCapacity_clear(this) ((scRdCapacity_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapAddress(); #endif } #undef STRUCT_SIZE #elif (defined(_DPT_ACTIVE_ALIGNMENT)) /*----------------- * Access Functions *-----------------*/ #define scRdCapacity_getOpCode(x) getU1(x,0) #define scRdCapacity_setOpCode(x,y) setU1(x,y,0) #define scRdCapacity_getLun(x) getU1(x,1) #define scRdCapacity_setLun(x,y) setU1(x,1,y) #define scRdCapacity_orLun(x,y) orU1(x,y,1) #define scRdCapacity_andLun(x,y) andU1(x,1,y) #define scRdCapacity_getAddress(x) getU4(x,2) #define scRdCapacity_setAddress(x,y) setU4(x,2,y) #define scRdCapacity_getReserved1(x) getU1(x,6) #define scRdCapacity_setReserved1(x,y) setU1(x,6,y) #define scRdCapacity_getReserved2(x) getU1(x,7) #define scRdCapacity_setReserved2(x,y) setU1(x,7,y) #define scRdCapacity_getPmi(x) getU1(x,8) #define scRdCapacity_setPmi(x,y) setU1(x,8,y) #define scRdCapacity_getControl(x) getU1(x,9) #define scRdCapacity_setControl(x,y) setU1(x,9,y) /*--------------------------- * Required Support Functions *---------------------------*/ #define scRdCapacity_clear(x) osdBzero(x,scRdCapacity_size) //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; # define scRdCapacity_getOpCode(this) ((scRdCapacity_S __FAR__ *)this)->opCode # define scRdCapacity_setOpCode(this,inChar) \ ((scRdCapacity_S __FAR__ *)this)->opCode = (inChar) uCHAR lun; # define scRdCapacity_getLun(this) ((scRdCapacity_S __FAR__ *)this)->lun # define scRdCapacity_setLun(this,inChar) \ ((scRdCapacity_S __FAR__ *)this)->lun = (inChar) # define scRdCapacity_orLun(this,inChar) \ ((scRdCapacity_S __FAR__ *)this)->lun |= (inChar) # define scRdCapacity_andLun(this,inChar) \ ((scRdCapacity_S __FAR__ *)this)->lun &= (inChar) uLONG address; // Used with the PMI bit # define scRdCapacity_getAddress(this) \ getU4(&(((scRdCapacity_S __FAR__ *)this)->address),0) # define scRdCapacity_setAddress(this,inLong) \ setU4(&(((scRdCapacity_S __FAR__ *)this)->address),0,inLong) uCHAR reserved1; // Reserved # define scRdCapacity_getReserved1(this) \ ((scRdCapacity_S __FAR__ *)this)->reserved1 # define scRdCapacity_setReserved1(this,inChar) \ ((scRdCapacity_S __FAR__ *)this)->reserved1 = (inChar) uCHAR reserved2; // Reserved # define scRdCapacity_getReserved2(this) \ ((scRdCapacity_S __FAR__ *)this)->reserved2 # define scRdCapacity_setReserved2(this,inChar) \ ((scRdCapacity_S __FAR__ *)this)->reserved2 = (inChar) uCHAR pmi; // Partial medium indicator # define scRdCapacity_getPmi(this) ((scRdCapacity_S __FAR__ *)this)->pmi # define scRdCapacity_setPmi(this,inChar) \ ((scRdCapacity_S __FAR__ *)this)->pmi = (inChar) uCHAR control; // Control bits # define scRdCapacity_getControl(this) \ ((scRdCapacity_S __FAR__ *)this)->control # define scRdCapacity_setControl(this,inChar) \ ((scRdCapacity_S __FAR__ *)this)->control = (inChar) /*--------------------------- * Required Support Functions *---------------------------*/ # define scRdCapacity_size sizeof(scRdCapacity_S) # define scRdCapacity_clear(x) osdBzero(x,scRdCapacity_size) #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //scRdCapacity_S - end //struct - scReadWrite6_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines a SCSI 6 byte write command. // //--------------------------------------------------------------------------- #define STRUCT_NAME scReadWrite6_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define scReadWrite6_size 6 typedef unsigned char scReadWrite6_S[scReadWrite6_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } # define scReadWrite6_getOpCode(this) ((scReadWrite6_S __FAR__ *)(this))->getOpCode() uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } # define scReadWrite6_setOpCode(this,inChar) ((scReadWrite6_S __FAR__ *)(this))->setOpCode(inChar) uCHAR getLun() { return getU1(this,1); } # define scReadWrite6_getLun(this) ((scReadWrite6_S __FAR__ *)(this))->getLun() uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } # define scReadWrite6_setLun(this,inChar) ((scReadWrite6_S __FAR__ *)(this))->setLun(inChar) void orLun(uCHAR inChar) { orU1(this,1,inChar); } # define scReadWrite6_orLun(this,inChar) ((scReadWrite6_S __FAR__ *)(this))->orLun(inChar) void andLun(uCHAR inChar) { andU1(this,1,inChar); } # define scReadWrite6_andLun(this,inChar) ((scReadWrite6_S __FAR__ *)(this))->andLun(inChar) uLONG getLba() { return ((unsigned long)getU1(this,3)) | (((unsigned long)getU1(this,2))<<8) | (((unsigned long)(getU1(this,1)&0x1F))<<16); } # define scReadWrite6_getLba(this) ((scReadWrite6_S __FAR__ *)(this))->getLba() void setLba(uLONG inLong) { setU1(this,3,inLong); setU1(this,2,inLong >> 8); setU1(this,1,((inLong >> 16L) & 0x1F) | ((scReadWrite6_S __FAR__ *)(this))->getLun() & 0xE0); } # define scReadWrite6_setLba(this,inLong) ((scReadWrite6_S __FAR__ *)(this))->setLba(inLong) uSHORT getLength() { return getU1(this,4); } # define scReadWrite6_getLength(this) ((scReadWrite6_S __FAR__ *)(this))->getLength() uSHORT setLength(uCHAR inChar) { return setU1(this,4,inChar); } # define scReadWrite6_setLength(this,inChar) ((scReadWrite6_S __FAR__ *)(this))->setLength(inChar) uCHAR getControl() { return getU1(this,5); } # define scReadWrite6_getControl(this) ((scReadWrite6_S __FAR__ *)(this))->getControl() uCHAR setControl(uCHAR inChar) { return setU1(this,5,inChar); } # define scReadWrite6_setControl(this,inChar) ((scReadWrite6_S __FAR__ *)(this))->setControl(inChar) //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } # define scReadWrite6_clear(this) ((scReadWrite6_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE #elif (defined(_DPT_ACTIVE_ALIGNMENT)) /*----------------- * Access Functions *-----------------*/ #define scReadWrite6_getOpCode(x) getU1(x,0) #define scReadWrite6_setOpCode(x,y) setU1(x,0,y) #define scReadWrite6_getLun(x) getU1(x,0) #define scReadWrite6_setLun(x,y) setU1(x,0,y) #define scReadWrite6_orLun(x,y) orU1(x,0,y) #define scReadWrite6_andLun(x,y) andU1(x,0,y) #define scReadWrite6_getLba(x) (getU3(x,1)&0x1FFFFFL) /* The side effects of *this* macro are scary ... */ #define scReadWrite6_setLba(x,y) setU3(x,1,((unsigned long)(y) \ &0x1FFFFFL) | ((unsigned long) \ (getLun(x)&0xE0)<<16L)) #define scReadWrite6_getLength(x) getU1(x,4) #define scReadWrite6_setLength(x,y) setU1(x,4,y) #define scReadWrite6_getControl(x) getU1(x,5) #define scReadWrite6_setControl(x,y) setU1(x,5,y) /*--------------------------- * Required Support Functions *---------------------------*/ #define scReadWrite6_clear(x) osdBzero(x,scReadWrite6_size) //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; // SCSI opcode # define scReadWrite6_setOpCode(this) ((scReadWrite6_S __FAR__ *)this)->opCode # define scReadWrite6_getOpCode(this,inChar) \ ((scReadWrite6_S __FAR__ *)this)->opCode = (inChar) uCHAR lun; // Logical Unit # define scReadWrite6_getLun(this) ((scReadWrite6_S __FAR__ *)this)->lun # define scReadWrite6_setLun(this,inChar) \ ((scReadWrite6_S __FAR__ *)this)->lun = (inChar) # define scReadWrite6_orLun(this,inChar) \ ((scReadWrite6_S __FAR__ *)this)->lun |= (inChar) # define scReadWrite6_andLun(this,inChar) \ ((scReadWrite6_S __FAR__ *)this)->lun &= (inChar) uCHAR lba[2]; // start LBA # define scReadWrite6_getLba(this) ( \ ((unsigned long)((scReadWrite6_S __FAR__ *)this)->lba[1]) \ (((unsigned long)((scReadWrite6_S __FAR__ *)this)->lba[0]) << 8) \ (((unsigned long)(((scReadWrite6_S __FAR__ *)this)->lba[-1] & 0x1F)) << 16)) # define scReadWrite6_setLba(this,inLong) ( \ ((scReadWrite6_S __FAR__ *)this)->lba[1] = (inLong); \ ((scReadWrite6_S __FAR__ *)this)->lba[0] = ((inLong) >> 8); \ ((scReadWrite6_S __FAR__ *)this)->lba[-1] &= 0xE0; \ ((scReadWrite6_S __FAR__ *)this)->lba[-1] |= (((inLong) >> 16) & 0x1F)) uCHAR length; // # blocks to be transfered # define scReadWrite6_getLength(this) ((scReadWrite6_S __FAR__ *)this)->length # define scReadWrite6_setLength(this,inChar) \ ((scReadWrite6_S __FAR__ *)this)->length = (inChar) uCHAR control; // Control bits # define scReadWrite6_getControl(this) \ ((scReadWrite6_S __FAR__ *)this)->control # define scReadWrite6_setControl(this,inChar) \ ((scReadWrite6_S __FAR__ *)this)->control = (inChar) # define scReadWrite6_size sizeof(scReadWrite6_S) # define scReadWrite6_clear(x) osdBzero(x,scReadWrite6_size) #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //scReadWrite6_S - end //struct - scReadWrite_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines a SCSI 10 byte write command. // //--------------------------------------------------------------------------- #define STRUCT_NAME scReadWrite_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define scReadWrite_size 10 typedef unsigned char scReadWrite_S[scReadWrite_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 10 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } # define scReadWrite_getOpCode(this) ((scReadWrite_S __FAR__ *)(this))->getOpCode() uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } # define scReadWrite_setOpCode(this,inChar) ((scReadWrite_S __FAR__ *)(this))->setOpCode(inChar) uCHAR getLun() { return getU1(this,1); } # define scReadWrite_getLun(this) ((scReadWrite_S __FAR__ *)(this))->getLun() uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } # define scReadWrite_setLun(this,inChar) ((scReadWrite_S __FAR__ *)(this))->setLun(inChar) void orLun(uCHAR inChar) { orU1(this,1,inChar); } # define scReadWrite_orLun(this,inChar) ((scReadWrite_S __FAR__ *)(this))->orLun(inChar) void andLun(uCHAR inChar) { andU1(this,1,inChar); } # define scReadWrite_andLun(this,inChar) ((scReadWrite_S __FAR__ *)(this))->andLun(inChar) uLONG getLba() { return getU4(this,2); } # define scReadWrite_getLba(this) ((scReadWrite_S __FAR__ *)(this))->getLba() uLONG setLba(uLONG inLong) { return setU4(this,2,inLong); } # define scReadWrite_setLba(this,inLong) ((scReadWrite_S __FAR__ *)(this))->setLba(inLong) uLONG swapLba() { return osdSwap4((uLONG __FAR__ *)getUP1(this,2)); } uCHAR getReserved() { return getU1(this,6); } # define scReadWrite_getReserved(this) ((scReadWrite_S __FAR__ *)(this))->getReserved() uCHAR setReserved(uCHAR inChar) { return setU1(this,6,inChar); } # define scReadWrite_setReserved(this,inChar) ((scReadWrite_S __FAR__ *)(this))->setReserved(inChar) uSHORT getLength() { return getU2(this,7); } # define scReadWrite_getLength(this) ((scReadWrite_S __FAR__ *)(this))->getLength() uSHORT setLength(uSHORT inShort) { return setU2(this,7,inShort); } # define scReadWrite_setLength(this,inShort) ((scReadWrite_S __FAR__ *)(this))->setLength(inShort) uSHORT swapLength() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,7)); } uCHAR getControl() { return getU1(this,9); } # define scReadWrite_getControl(this) ((scReadWrite_S __FAR__ *)(this))->getControl() uCHAR setControl(uCHAR inChar) { return setU1(this,9,inChar); } # define scReadWrite_setControl(this,inChar) ((scReadWrite_S __FAR__ *)(this))->setControl(inChar) //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } # define scReadWrite_clear(this) ((scReadWrite_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapLba(); swapLength(); #endif } #undef STRUCT_SIZE #elif (defined(_DPT_ACTIVE_ALIGNMENT)) /*----------------- * Access Functions *-----------------*/ #define scReadWrite_getOpCode(x) getU1(x,0) #define scReadWrite_setOpCode(x,y) setU1(x,0,y) #define scReadWrite_getLun(x) getU1(x,1) #define scReadWrite_setLun(x,y) setU1(x,1,y) #define scReadWrite_orLun(x,y) orU1(x,1,y) #define scReadWrite_andLun(x,y) andU1(x,1,y) #define scReadWrite_getLba(x) getU4(x,2) #define scReadWrite_setLba(x,y) setU4(x,2,y) #define scReadWrite_getReserved(x) getU1(x,6) #define scReadWrite_setReserved(x,y) setU1(x,6,y) #define scReadWrite_getLength(x) getU2(x,7) #define scReadWrite_setLength(x,y) setU2(x,7,y) #define scReadWrite_getControl(x) getU1(x,9) #define scReadWrite_setControl(x, y) setU1(x,9,y) /*--------------------------- * Required Support Functions *---------------------------*/ #define scReadWrite_clear(x) osdBzero(x,scReadWrite_size) //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; // SCSI opcode # define scReadWrite_getOpCode(this) ((scReadWrite_S __FAR__ *)this)->opCode # define scReadWrite_setOpCode(this,inChar) \ ((scReadWrite_S __FAR__ *)this)->opCode = (inChar) uCHAR lun; # define scReadWrite_getLun(this) ((scReadWrite_S __FAR__ *)this)->lun # define scReadWrite_setLun(this,inChar) \ ((scReadWrite_S __FAR__ *)this)->lun = (inChar) # define scReadWrite_orLun(this,inChar) \ ((scReadWrite_S __FAR__ *)this)->lun |= (inChar) # define scReadWrite_andLun(this,inChar) \ ((scReadWrite_S __FAR__ *)this)->lun &= (inChar) uLONG lba; // start LBA # define scReadWrite_getLba(this) \ getU4(&(((scReadWrite_S __FAR__ *)this)->lba),0) # define scReadWrite_setLba(this,inLong) \ setU4(&(((scReadWrite_S __FAR__ *)this)->lba),0,inLong) uCHAR reserved; # define scReadWrite_getReserved(this) \ ((scReadWrite_S __FAR__ *)this)->reserved # define scReadWrite_setReserved(this,inChar) \ ((scReadWrite_S __FAR__ *)this)->reserved = (inChar) uSHORT length; // # blocks to be transfered # define scReadWrite_getLength(this) \ getU2(&(((scReadWrite_S __FAR__ *)this)->length),0) # define scReadWrite_setLength(this,inShort) \ setU2(&(((scReadWrite_S __FAR__ *)this)->length),0,inShort) uCHAR control; // Control bits # define scReadWrite_getControl(this) ((scReadWrite_S __FAR__ *)this)->control # define scReadWrite_setControl(this,inChar) \ ((scReadWrite_S __FAR__ *)this)->control = (inChar) /*--------------------------- * Required Support Functions *---------------------------*/ # define scReadWrite_size sizeof(scReadWrite_S) # define scReadWrite_clear(x) osdBzero(x,scReadWrite_size) #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //scReadWrite_S - end //struct - scReadWrite12_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines a SCSI 12 byte write command. // //--------------------------------------------------------------------------- #define STRUCT_NAME scReadWrite12_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define scReadWrite12_size 12 typedef unsigned char scReadWrite12_S[scReadWrite12_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 12 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } # define scReadWrite12_getOpCode(this) ((scReadWrite12_S __FAR__ *)(this))->getOpCode() uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } # define scReadWrite12_setOpCode(this,inChar) ((scReadWrite12_S __FAR__ *)(this))->setOpCode(inChar) uCHAR getLun() { return getU1(this,1); } # define scReadWrite12_getLun(this) ((scReadWrite12_S __FAR__ *)(this))->getLun() uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } # define scReadWrite12_setLun(this,inChar) ((scReadWrite12_S __FAR__ *)(this))->setLun(inChar) void orLun(uCHAR inChar) { orU1(this,1,inChar); } # define scReadWrite12_orLun(this,inChar) ((scReadWrite12_S __FAR__ *)(this))->orLun(inChar) void andLun(uCHAR inChar) { andU1(this,1,inChar); } # define scReadWrite12_andLun(this,inChar) ((scReadWrite12_S __FAR__ *)(this))->andLun(inChar) uLONG getLba() { return getU4(this,2); } # define scReadWrite12_getLba(this) ((scReadWrite12_S __FAR__ *)(this))->getLba() uLONG setLba(uLONG inLong) { return setU4(this,2,inLong); } # define scReadWrite12_setLba(this,inLong) ((scReadWrite12_S __FAR__ *)(this))->setLba(inLong) uLONG swapLba() { return osdSwap4((uLONG __FAR__ *)getUP1(this,2)); } uLONG getLength() { return getU4(this,6); } # define scReadWrite12_getLength(this) ((scReadWrite12_S __FAR__ *)(this))->getLength() uLONG setLength(uLONG inLong) { return setU4(this,6,inLong); } # define scReadWrite12_setLength(this,inShort) ((scReadWrite12_S __FAR__ *)(this))->setLength(inShort) uLONG swapLength() { return osdSwap4((uLONG __FAR__ *)getUP1(this,6)); } uCHAR getReserved() { return getU1(this,10); } # define scReadWrite12_getReserved(this) ((scReadWrite12_S __FAR__ *)(this))->getReserved() uCHAR setReserved(uCHAR inChar) { return setU1(this,10,inChar); } # define scReadWrite12_setReserved(this,inChar) ((scReadWrite12_S __FAR__ *)(this))->setReserved(inChar) uCHAR getControl() { return getU1(this,11); } # define scReadWrite12_getControl(this) ((scReadWrite12_S __FAR__ *)(this))->getControl() uCHAR setControl(uCHAR inChar) { return setU1(this,11,inChar); } # define scReadWrite12_setControl(this,inChar) ((scReadWrite12_S __FAR__ *)(this))->setControl(inChar) //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } # define scReadWrite12_clear(this) ((scReadWrite12_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapLba(); swapLength(); #endif } #undef STRUCT_SIZE #elif (defined(_DPT_ACTIVE_ALIGNMENT)) /*----------------- * Access Functions *-----------------*/ #define scReadWrite12_getOpCode(x) getU1(x,0) #define scReadWrite12_setOpCode(x,y) setU1(x,0,y) #define scReadWrite12_getLun(x) getU1(x,1) #define scReadWrite12_setLun(x,y) setU1(x,1,y) #define scReadWrite12_orLun(x,y) orU1(x,1,y) #define scReadWrite12_andLun(x,y) andU1(x,1,y) #define scReadWrite12_getLba(x) getU4(x,2) #define scReadWrite12_setLba(x,y) setU4(x,2,y) #define scReadWrite12_getLength(x) getU4(x,6) #define scReadWrite12_setLength(x,y) setU4(x,6,y) #define scReadWrite12_getReserved(x) getU1(x,10) #define scReadWrite12_setReserved(x,y) setU1(x,10,y) #define scReadWrite12_getControl(x) getU1(x,11) #define scReadWrite12_setControl(x, y) setU1(x,11,y) /*--------------------------- * Required Support Functions *---------------------------*/ #define scReadWrite12_clear(x) osdBzero(x,scReadWrite12_size) //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; // SCSI opcode # define scReadWrite12_setOpCode(this) \ ((scReadWrite12_S __FAR__ *)this)->opCode # define scReadWrite12_getOpCode(this,inChar) \ ((scReadWrite12_S __FAR__ *)this)->opCode = (inChar) uCHAR lun; # define scReadWrite12_getLun(this) ((scReadWrite12_S __FAR__ *)this)->lun # define scReadWrite12_setLun(this,inChar) \ ((scReadWrite12_S __FAR__ *)this)->lun = (inChar) # define scReadWrite12_orLun(this,inChar) \ ((scReadWrite12_S __FAR__ *)this)->lun |= (inChar) # define scReadWrite12_andLun(this,inChar) \ ((scReadWrite12_S __FAR__ *)this)->lun &= (inChar) uLONG lba; // start LBA # define scReadWrite12_setLba(this) \ getU4(&(((scReadWrite12_S __FAR__ *)this)->lba),0) # define scReadWrite12_getLba(this,inLong) \ setU4(&(((scReadWrite12_S __FAR__ *)this)->lba),0,inLong) uLONG length; // # blocks to be transfered # define scReadWrite12_getLength(this) \ getU4(&(((scReadWrite12_S __FAR__ *)this)->length),0) # define scReadWrite12_setLength(this,inLong) \ setU4(&(((scReadWrite12_S __FAR__ *)this)->length),0,inLong) uCHAR reserved; # define scReadWrite12_setReserved(this) \ ((scReadWrite12_S __FAR__ *)this)->reserved # define scReadWrite12_getReserved(this,inChar) \ ((scReadWrite12_S __FAR__ *)this)->reserved = (inChar) uCHAR control; // Control bits # define scReadWrite12_getControl(this) \ ((scReadWrite12_S __FAR__ *)this)->control # define scReadWrite12_setControl(this,inChar) \ ((scReadWrite12_S __FAR__ *)this)->control = (inChar) /*--------------------------- * Required Support Functions *---------------------------*/ # define scReadWrite12_size sizeof(scReadWrite12_S) # define scReadWrite12_clear(x) osdBzero(x,scReadWrite12_size) #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //scReadWrite12_S - end //struct - scFlash_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines a DPT flash memory access command. // //--------------------------------------------------------------------------- //action - definitions // Command the firmware to transfer into flash command mode #define FLASH_CMD_FLASH_MODE 0x00 // Read from the flash memory #define FLASH_CMD_READ 0x01 // Write to the flash memory #define FLASH_CMD_WRITE 0x02 // Erase the contents of the flash memory #define FLASH_CMD_ERASE 0x03 // Inquires the status of the flash memory #define FLASH_CMD_STATUS 0x04 // Indicates that all flash code has been written and // a checksum is to be computed #define FLASH_CMD_WRITE_DONE 0x05 // Instructs the HBA's firmware to reboot #define FLASH_CMD_RESTART 0x06 // Instructs the HBA's firmware to reboot without flash // checksum verification #define FLASH_CMD_TST_RESTART 0x07 // Gen 5 Firmware Region type and offset #define FLASH_REGION_FIRMWARE 0x00 #define FLASH_REGION_FIRMWARE_OFFSET 0x00 // Gen 5 BIOS Region type and offset #define FLASH_REGION_BIOS 0x01 #define FLASH_REGION_BIOS_OFFSET 0xc0000 // Gen 5 Utility Region type and offset #define FLASH_REGION_UTILITY 0x02 #define FLASH_REGION_UTILITY_OFFSET 0xc8000 // Gen 5 NVRAM default region and offset #define FLASH_REGION_NVRAM 0x03 #define FLASH_REGION_NVRAM_OFFSET 0x100000L // Gen 5 NVRAM default region and offset #define FLASH_REGION_SERIAL_NUM 0x04 #define STRUCT_NAME scFlash_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 12 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } # define scFlash_getOpCode(this) ((scFlash_S __FAR__ *)(this))->getOpCode() uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } # define scFlash_setOpCode(this,inChar) ((scFlash_S __FAR__ *)(this))->setOpCode(inChar) uCHAR getLun() { return getU1(this,1); } # define scFlash_getLun(this) ((scFlash_S __FAR__ *)(this))->getLun() uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } # define scFlash_setLun(this,inChar) ((scFlash_S __FAR__ *)(this))->setLun(inChar) void orLun(uCHAR inChar) { orU1(this,1,inChar); } # define scFlash_orLun(this,inChar) ((scFlash_S __FAR__ *)(this))->orLun(inChar) void andLun(uCHAR inChar) { andU1(this,1,inChar); } # define scFlash_andLun(this,inChar) ((scFlash_S __FAR__ *)(this))->andLun(inChar) // Flash command code - see definitions above uCHAR getAction() { return getU1(this,2); } # define scFlash_getAction(this) ((scFlash_S __FAR__ *)(this))->getAction() uCHAR setAction(uCHAR inChar) { return setU1(this,2,inChar); } # define scFlash_setAction(this,inChar) ((scFlash_S __FAR__ *)(this))->setAction(inChar) void orAction(uCHAR inChar) { orU1(this,2,inChar); } # define scFlash_orAction(this,inChar) ((scFlash_S __FAR__ *)(this))->orAction(inChar) void andAction(uCHAR inChar) { andU1(this,2,inChar); } # define scFlash_andAction(this,inChar) ((scFlash_S __FAR__ *)(this))->andAction(inChar) // Address within the flash to read/write // (This address is relative to the base address of the chip) uLONG getAddress() { return getU4(this,3); } # define scFlash_getAddress(this) ((scFlash_S __FAR__ *)(this))->getAddress() uLONG setAddress(uLONG inLong) { return setU4(this,3,inLong); } # define scFlash_setAddress(this,inLong) ((scFlash_S __FAR__ *)(this))->setAddress(inLong) uLONG __FAR__ *getAddressPtr() { return (uLONG __FAR__ *)getUP1(this,3); } # define scFlash_getAddressPtr(this) ((scFlash_S __FAR__ *)(this))->getAddressPtr() uLONG swapAddress() { return osdSwap4((uLONG __FAR__ *)getUP1(this,3)); } // Number of bytes to read/write from/to the flash memory uLONG getLength() { return getU4(this,7); } # define scFlash_getLength(this) ((scFlash_S __FAR__ *)(this))->getLength() uLONG setLength(uLONG inLong) { return setU4(this,7,inLong); } # define scFlash_setLength(this,inLong) ((scFlash_S __FAR__ *)(this))->setLength(inLong) uLONG swapLength() { return osdSwap4((uLONG __FAR__ *)getUP1(this,7)); } uCHAR getControl() { return getU1(this,11); } # define scFlash_getControl(this) ((scFlash_S __FAR__ *)(this))->getControl() uCHAR setControl(uCHAR inChar) { return setU1(this,11,inChar); } # define scFlash_setControl(this,inChar) ((scFlash_S __FAR__ *)(this))->setControl(inChar) //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapAddress(); swapLength(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; // SCSI opcode # define scFlash_getOpCode(this) ((scFlash_S __FAR__ *)(this))->opCode # define scFlash_setOpCode(this,inChar) (((scFlash_S __FAR__ *)(this))->opCode=(inChar)) uCHAR lun; # define scFlash_getLun(this) ((scFlash_S __FAR__ *)(this))->lun # define scFlash_setLun(this,inChar) (((scFlash_S __FAR__ *)(this))->lun=(inChar)) # define scFlash_orLun(this,inChar) (((scFlash_S __FAR__ *)(this))->lun|=(inChar)) # define scFlash_andLun(this,inChar) (((scFlash_S __FAR__ *)(this))->lun&=(inChar)) uCHAR action; // start LBA # define scFlash_getAction(this) ((scFlash_S __FAR__ *)(this))->action # define scFlash_setAction(this,inChar) (((scFlash_S __FAR__ *)(this))->action=(inChar)) # define scFlash_orAction(this,inChar) (((scFlash_S __FAR__ *)(this))->action|=(inChar)) # define scFlash_andAction(this,inChar) (((scFlash_S __FAR__ *)(this))->action&=(inChar)) uLONG address; # define scFlash_getAddress(this) ((scFlash_S __FAR__ *)(this))->address # define scFlash_setAddress(this,inLong) (((scFlash_S __FAR__ *)(this))->address=(inLong)) # define scFlash_getAddressPtr(this) &(((scFlash_S __FAR__ *)(this))->address) uLONG length; // # blocks to be transfered # define scFlash_getLength(this) ((scFlash_S __FAR__ *)(this))->length # define scFlash_setLength(this,inLong) (((scFlash_S __FAR__ *)(this))->length=(inLong)) # define scFlash_getLengthPtr(this) &(((scFlash_S __FAR__ *)(this))->length) uCHAR control; // Control bits # define scFlash_getControl(this) ((scFlash_S __FAR__ *)(this))->control # define scFlash_setControl(this,inChar) (((scFlash_S __FAR__ *)(this))->control=(inChar)) #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //scFlash_S - end //struct - scFormat_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines a SCSI low level format command. // //--------------------------------------------------------------------------- #define STRUCT_NAME scFormat_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getLun() { return getU1(this,1); } uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } void orLun(uCHAR inChar) { orU1(this,1,inChar); } void andLun(uCHAR inChar) { andU1(this,1,inChar); } uCHAR getVendorSpecific() { return getU1(this,2); } uCHAR setVendorSpecific(uCHAR inChar) { return setU1(this,2,inChar); } uSHORT getInterleave() { return getU2(this,3); } uSHORT setInterleave(uSHORT inShort) { return setU2(this,3,inShort); } uSHORT swapInterleave() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,3)); } uCHAR getControl() { return getU1(this,5); } uCHAR setControl(uCHAR inChar) { return setU1(this,5,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapInterleave(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; // SCSI opcode uCHAR lun; uCHAR vendorSpecific; // Vendor specific information uSHORT interleave; // Device interleave // 0 = Default // 1 = Consecutive LBAs placed in // contiguous ascending order // Other = Vendor Specific uCHAR control; // Control bits #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //scFormat_S - end //struct - scModeSense_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines the SCSI mode sense command // //--------------------------------------------------------------------------- //FLG_MDS_PAGECODE #define FLG_MDS_CURRENT 0x00 #define FLG_MDS_CHANGEABLE 0x40 #define FLG_MDS_DEFAULT 0x80 #define FLG_MDS_SAVED 0xc0 //lun // Disable block descriptors #define FLG_MDS_DBD 0x08 //pageCode // Page Code #define FLG_MDS_PAGECODE 0x3f // Page control #define FLG_MDS_CONTROL 0xc0 #define STRUCT_NAME scModeSense_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define scModeSense_size 10 typedef unsigned char scModeSense_S[scModeSense_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 10 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } # define scModeSense_getOpCode(this) ((scModeSense_S __FAR__ *)(this))->getOpCode() uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } # define scModeSense_setOpCode(this,inChar) ((scModeSense_S __FAR__ *)(this))->setOpCode(inChar) uCHAR getLun() { return getU1(this,1); } # define scModeSense_getLun(this) ((scModeSense_S __FAR__ *)(this))->getLun() uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } # define scModeSense_setLun(this,inChar) ((scModeSense_S __FAR__ *)(this))->setLun(inChar) void orLun(uCHAR inChar) { orU1(this,1,inChar); } # define scModeSense_orLun(this,inChar) ((scModeSense_S __FAR__ *)(this))->orLun(inChar) void andLun(uCHAR inChar) { andU1(this,1,inChar); } # define scModeSense_andLun(this,inChar) ((scModeSense_S __FAR__ *)(this))->andLun(inChar) uCHAR getPageCode() { return getU1(this,2); } # define scModeSense_getPageCode(this) ((scModeSense_S __FAR__ *)(this))->getPageCode() uCHAR setPageCode(uCHAR inChar) { return setU1(this,2,inChar); } # define scModeSense_setPageCode(this,inChar) ((scModeSense_S __FAR__ *)(this))->setPageCode(inChar) uCHAR getReserved1() { return getU1(this,3); } # define scModeSense_getReserved1(this) ((scModeSense_S __FAR__ *)(this))->getReserved1() uCHAR setReserved1(uCHAR inChar) { return setU1(this,3,inChar); } # define scModeSense_setReserved1(this,inChar) ((scModeSense_S __FAR__ *)(this))->setReserved1(inChar) uCHAR getReserved2() { return getU1(this,4); } # define scModeSense_getReserved2(this) ((scModeSense_S __FAR__ *)(this))->getReserved2() uCHAR setReserved2(uCHAR inChar) { return setU1(this,4,inChar); } # define scModeSense_setReserved2(this,inChar) ((scModeSense_S __FAR__ *)(this))->setReserved2(inChar) uCHAR getReserved3() { return getU1(this,5); } # define scModeSense_getReserved3(this) ((scModeSense_S __FAR__ *)(this))->getReserved3() uCHAR setReserved3(uCHAR inChar) { return setU1(this,5,inChar); } # define scModeSense_setReserved3(this,inChar) ((scModeSense_S __FAR__ *)(this))->setReserved3(inChar) uCHAR getReserved4() { return getU1(this,6); } # define scModeSense_getReserved1(this) ((scModeSense_S __FAR__ *)(this))->getReserved1() uCHAR setReserved4(uCHAR inChar) { return setU1(this,6,inChar); } # define scModeSense_setReserved1(this,inChar) ((scModeSense_S __FAR__ *)(this))->setReserved1(inChar) uSHORT getAllocLength() { return getU2(this,7); } # define scModeSense_getAllocLength(this) ((scModeSense_S __FAR__ *)(this))->getAllocLength() uSHORT setAllocLength(uSHORT inShort) { return setU2(this,7,inShort); } # define scModeSense_setAllocLength(this,inShort) ((scModeSense_S __FAR__ *)(this))->setAllocLength(inShort) uSHORT __FAR__ * getAllocLengthPtr() { return (uSHORT __FAR__ *)getUP1(this,7); } # define scModeSense_getAllocLengthPtr(this) ((scModeSense_S __FAR__ *)(this))->getAllocLengthPtr() uSHORT swapAllocLength() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,7)); } uCHAR getControl() { return getU1(this,9); } # define scModeSense_getControl(this) ((scModeSense_S __FAR__ *)(this))->getControl() uCHAR setControl(uCHAR inChar) { return setU1(this,9,inChar); } # define scModeSense_setControl(this,inChar) ((scModeSense_S __FAR__ *)(this))->setControl(inChar) //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } # define scModeSense_clear(this) ((scModeSense_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapAllocLength(); #endif } #undef STRUCT_SIZE #elif (defined(_DPT_ACTIVE_ALIGNMENT)) /*----------------- * Access Functions *-----------------*/ #define scModeSense_getOpCode(x) getU1(x,0) #define scModeSense_setOpCode(x,y) setU1(x,0,y) #define scModeSense_getLun(x) getU1(x,1) #define scModeSense_setLun(x,y) setU1(x,1,y) #define scModeSense_orLun(x,y) orU1(x,1,y) #define scModeSense_andLun(x,y) andU1(x,1,y) #define scModeSense_getPageCode(x) getU1(x,2) #define scModeSense_setPageCode(x,y) setU1(x,2,y) #define scModeSense_getReserved1(x) getU1(x,3) #define scModeSense_setReserved1(x,y) setU1(x,3,y) #define scModeSense_getReserved2(x) getU1(x,4) #define scModeSense_setReserved2(x,y) setU1(x,4,y) #define scModeSense_getReserved3(x) getU1(x,5) #define scModeSense_setReserved3(x,y) setU1(x,5,y) #define scModeSense_getReserved4(x) getU1(x,6) #define scModeSense_setReserved4(x,y) setU1(x,6,y) #define scModeSense_getAllocLength(x) getU2(x,7) #define scModeSense_getAllocLengthPtr(x) ((uSHORT __FAR__ *)getUP1(x,7)) #define scModeSense_setAllocLength(x,y) setU2(x,7,y) #define scModeSense_getControl(x) getU1(x,9) #define scModeSense_setControl(x,y) setU1(x,9,y) /*--------------------------- * Required Support Functions *---------------------------*/ #define scModeSense_clear(x) osdBzero(x,scModeSense_size) //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; # define scModeSense_getOpCode(this) ((scModeSense_S __FAR__ *)this)->opCode # define scModeSense_setOpCode(this,inChar) \ ((scModeSense_S __FAR__ *)this)->opCode = (inChar) uCHAR lun; # define scModeSense_getLun(this) ((scModeSense_S __FAR__ *)this)->lun # define scModeSense_setLun(this,inChar) \ ((scModeSense_S __FAR__ *)this)->lun = (inChar) # define scModeSense_orLun(this,inChar) \ ((scModeSense_S __FAR__ *)this)->lun |= (inChar) # define scModeSense_andLun(this,inChar) \ ((scModeSense_S __FAR__ *)this)->lun &= (inChar) uCHAR pageCode; # define scModeSense_getPageCode(this) \ ((scModeSense_S __FAR__ *)this)->pageCode # define scModeSense_setPageCode(this,inChar) \ ((scModeSense_S __FAR__ *)this)->pageCode = (inChar) uCHAR reserve1[4]; // Reserved # define scModeSense_getReserved1(this) \ ((scModeSense_S __FAR__ *)this)->reserve1[0] # define scModeSense_setReserved1(this,inChar) \ ((scModeSense_S __FAR__ *)this)->reserve1[0] = (inChar) # define scModeSense_getReserved2(this) \ ((scModeSense_S __FAR__ *)this)->reserve1[1] # define scModeSense_setReserved2(this,inChar) \ ((scModeSense_S __FAR__ *)this)->reserve1[1] = (inChar) # define scModeSense_getReserved3(this) \ ((scModeSense_S __FAR__ *)this)->reserve1[2] # define scModeSense_setReserved3(this,inChar) \ ((scModeSense_S __FAR__ *)this)->reserve1[2] = (inChar) # define scModeSense_getReserved4(this) \ ((scModeSense_S __FAR__ *)this)->reserve1[3] # define scModeSense_setReserved4(this,inChar) \ ((scModeSense_S __FAR__ *)this)->reserve1[3] = (inChar) uSHORT allocLength; // # return bytes allocated # define scModeSense_getAllocLength(this) \ getU2(&(((scModeSense_S __FAR__ *)this)->allocLength),0) # define scModeSense_getAllocLengthPtr(this) \ ((uSHORT __FAR__ *)getUP1(&(((scModeSense_S __FAR__ *)this)->allocLength),0)) # define scModeSense_setAllocLength(this,inShort) \ setU2(&(((scModeSense_S __FAR__ *)this)->allocLength),0,inShort) uCHAR control; # define scModeSense_getControl(this) ((scModeSense_S __FAR__ *)this)->control # define scModeSense_setControl(this,inChar) \ ((scModeSense_S __FAR__ *)this)->control = (inChar) /*--------------------------- * Required Support Functions *---------------------------*/ # define scModeSense_size sizeof(scModeSense_S) # define scModeSense_clear(x) osdBzero(x,scModeSense_size) #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //scModeSense_S - end //struct - scLogSense_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines the SCSI log sense command // //--------------------------------------------------------------------------- //lun // Save parameters #define FLG_LGS_SP 0x01 // Parameter page control #define FLG_LGS_PPC 0x02 //FLG_LGS_PAGECODE #define FLG_LGS_CURRENT 0x00 #define FLG_LGS_CHANGEABLE 0x40 #define FLG_LGS_DEFAULT 0x80 #define FLG_LGS_SAVED 0xc0 //lun // Disable block descriptors #define FLG_LGS_DBD 0x08 //pageCode // Page Code #define FLG_LGS_PAGECODE 0x3f // Page control #define FLG_LGS_CONTROL 0xc0 #define STRUCT_NAME scLogSense_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define scLogSense_size 10 typedef unsigned char scLogSense_S[scLogSense_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 10 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } # define scLogSense_getOpCode(this) ((scLogSense_S __FAR__ *)(this))->getOpCode() uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } # define scLogSense_setOpCode(this,inChar) ((scLogSense_S __FAR__ *)(this))->setOpCode(inChar) uCHAR getLun() { return getU1(this,1); } # define scLogSense_getLun(this) ((scLogSense_S __FAR__ *)(this))->getLun() uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } # define scLogSense_setLun(this,inChar) ((scLogSense_S __FAR__ *)(this))->setLun(inChar) void orLun(uCHAR inChar) { orU1(this,1,inChar); } # define scLogSense_orLun(this,inChar) ((scLogSense_S __FAR__ *)(this))->orLun(inChar) void andLun(uCHAR inChar) { andU1(this,1,inChar); } # define scLogSense_andLun(this,inChar) ((scLogSense_S __FAR__ *)(this))->andLun(inChar) uCHAR getPageCode() { return getU1(this,2); } # define scLogSense_getPageCode(this) ((scLogSense_S __FAR__ *)(this))->getPageCode() uCHAR setPageCode(uCHAR inChar) { return setU1(this,2,inChar); } # define scLogSense_setPageCode(this,inChar) ((scLogSense_S __FAR__ *)(this))->setPageCode(inChar) uCHAR getReserved1() { return getU1(this,3); } # define scLogSense_getReserved1(this) ((scLogSense_S __FAR__ *)(this))->getReserved1() uCHAR setReserved1(uCHAR inChar) { return setU1(this,3,inChar); } # define scLogSense_setReserved1(this,inChar) ((scLogSense_S __FAR__ *)(this))->setReserved1(inChar) uCHAR getReserved2() { return getU1(this,4); } # define scLogSense_getReserved2(this) ((scLogSense_S __FAR__ *)(this))->getReserved2() uCHAR setReserved2(uCHAR inChar) { return setU1(this,4,inChar); } # define scLogSense_setReserved2(this,inChar) ((scLogSense_S __FAR__ *)(this))->setReserved2(inChar) uSHORT getParamPtr() { return getU2(this,5); } # define scLogSense_getParamPtr(this) ((scLogSense_S __FAR__ *)(this))->getParamPtr() uSHORT setParamPtr(uSHORT inShort) { return setU2(this,5,inShort); } # define scLogSense_setParamPtr(this,inShort) ((scLogSense_S __FAR__ *)(this))->setParamPtr(inShort) uSHORT swapParamPtr() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,5)); } uSHORT getAllocLength() { return getU2(this,7); } # define scLogSense_getAllocLength(this) ((scLogSense_S __FAR__ *)(this))->getAllocLength() uSHORT setAllocLength(uSHORT inShort) { return setU2(this,7,inShort); } # define scLogSense_setAllocLength(this,inShort) ((scLogSense_S __FAR__ *)(this))->setAllocLength(inShort) uSHORT swapAllocLength() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,7)); } uCHAR getControl() { return getU1(this,9); } # define scLogSense_getControl(this) ((scLogSense_S __FAR__ *)(this))->getControl() uCHAR setControl(uCHAR inChar) { return setU1(this,9,inChar); } # define scLogSense_setControl(this,inShort) ((scLogSense_S __FAR__ *)(this))->setControl(inShort) //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } # define scLogSense_clear(this) ((scLogSense_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapParamPtr(); swapAllocLength(); #endif } #undef STRUCT_SIZE #elif (defined(_DPT_ACTIVE_ALIGNMENT)) /*----------------- * Access Functions *-----------------*/ #define scLogSense_getOpCode(x) getU1(x,0) #define scLogSense_setOpCode(x,y) setU1(x,0,y) #define scLogSense_getLun(x) getU1(x,1) #define scLogSense_setLun(x,y) setU1(x,1,y) #define scLogSense_orLun(x,y) orU1(x,1,y) #define scLogSense_andLun(x,y) andU1(x,1,y) #define scLogSense_getPageCode(x) getU1(x,2) #define scLogSense_setPageCode(x,y) setU1(x,2,y) #define scLogSense_getReserved1(x) getU1(x,3) #define scLogSense_setReserved1(x,y) setU1(x,3,y) #define scLogSense_getReserved2(x) getU1(x,4) #define scLogSense_setReserved2(x,y) setU1(x,4,y) #define scLogSense_getParamPtr(x) getU2(x,5) #define scLogSense_setParamPtr(x,y) setU2(x,5,y) #define scLogSense_getAllocLength(x) getU2(x,7) #define scLogSense_setAllocLength(x,y) setU2(x,7,y) #define scLogSense_getControl(x) getU1(x,9) #define scLogSense_setControl(x,y) setU1(x,9,y) /*--------------------------- * Required Support Functions *---------------------------*/ #define scLogSense_clear(x) osdBzero(x,scLogSense_size) //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; # define scLogSense_setOpCode(this) ((scLogSense_S __FAR__ *)this)->opCode # define scLogSense_getOpCode(this,inChar) \ ((scLogSense_S __FAR__ *)this)->opCode = (inChar) uCHAR lun; # define scLogSense_getLun(this) ((scLogSense_S __FAR__ *)this)->lun # define scLogSense_setLun(this,inChar) \ ((scLogSense_S __FAR__ *)this)->lun = (inChar) # define scLogSense_orLun(this,inChar) \ ((scLogSense_S __FAR__ *)this)->lun |= (inChar) # define scLogSense_andLun(this,inChar) \ ((scLogSense_S __FAR__ *)this)->lun &= (inChar) uCHAR pageCode; # define scLogSense_getPageCode(this) ((scLogSense_S __FAR__ *)this)->pageCode # define scLogSense_setPageCode(this,inChar) \ ((scLogSense_S __FAR__ *)this)->pageCode = (inChar) uCHAR reserve1[2]; // Reserved # define scLogSense_getReserved1(this) \ ((scLogSense_S __FAR__ *)this)->reserve1[0] # define scLogSense_setReserved1(this,inChar) \ ((scLogSense_S __FAR__ *)this)->reserve1[0] = (inChar) # define scLogSense_getReserved2(this) \ ((scLogSense_S __FAR__ *)this)->reserve1[1] # define scLogSense_setReserved2(this,inChar) \ ((scLogSense_S __FAR__ *)this)->reserve1[1] = (inChar) uSHORT paramPtr; // Parameter pointer # define scLogSense_getParamPtr(this) \ getU2(&(((scLogSense_S __FAR__ *)this)->paramPtr),0) # define scLogSense_setParamPtr(this,inShort) \ setU2(&(((scLogSense_S __FAR__ *)this)->paramPtr),0,inShort) uSHORT allocLength; // # return bytes allocated # define scLogSense_getAllocLength(this) \ getU2(&(((scLogSense_S __FAR__ *)this)->allocLength),0) # define scLogSense_setAllocLength(this,inShort) \ setU2(&(((scLogSense_S __FAR__ *)this)->allocLength),0,inShort) uCHAR control; # define scLogSense_getControl(this) ((scLogSense_S __FAR__ *)this)->control # define scLogSense_setControl(this,inChar) \ ((scLogSense_S __FAR__ *)this)->control = (inChar) /*--------------------------- * Required Support Functions *---------------------------*/ # define scLogSense_size sizeof(scLogSense_S) # define scLogSense_clear(x) osdBzero(x,scLogSense_size) #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //scLogSense_S - end //struct - scReadBuffer_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines a SCSI Read Buffer Command. // NOTE: This command uses three-byte numeric fields. // //--------------------------------------------------------------------------- //FLG_RDBUF_MODE // return header and buffer data #define RDBUF_HEADER_DATA 0x00 // vendor-specific interpretation of command #define RDBUF_VENDORSPEC 0x01 // return buffer data only #define RDBUF_DATA 0x02 // return buffer descriptor #define RDBUF_DESCRIPTOR 0x03 //lun // Mode for read buffer #define FLG_RDBUF_MODE 0x03 #define STRUCT_NAME scReadBuffer_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define scReadBuffer_size 10 typedef unsigned char scReadBuffer_S[scReadBuffer_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 10 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getLun() { return getS1(this,1); } uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } void orLun(uCHAR inChar) { orU1(this,1,inChar); } void andLun(uCHAR inChar) { andU1(this,1,inChar); } // Zero-based number of buffer to read uCHAR getBufferID() { return getU1(this,2); } uCHAR setBufferID(uCHAR inChar) { return setU1(this,2,inChar); } // Buffer offset - 3-byte integer uLONG getBufferOffset() { return getU3(this,3); } uLONG setBufferOffset(uCHAR inLong) { return setU3(this,3,inLong); } uLONG swapBufferOffset() { return swap3(3); } // # of bytes allocated for buffer data - 3-byte integer uLONG getAllocLength() { return getU3(this,6); } uLONG setAllocLength(uLONG inLong) { return setU3(this,6,inLong); } uLONG swapAllocLength() { return swap3(6); } uCHAR getControl() { return getU1(this,9); } uCHAR setControl(uCHAR inChar) { return setU1(this,9,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapBufferOffset(); swapAllocLength(); #endif } uLONG swap3(uLONG offset) { uLONG tmpLong = getU3(this,offset); osdSwap3(&tmpLong); return setU3(this,offset,tmpLong); } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; uCHAR lun; uCHAR bufferID; // Zero-based number of buffer to read uCHAR bufferOffset[3]; // Buffer offset - 3-byte integer uCHAR allocLength[3]; // # of bytes allocated for buffer data - 3-byte integer uCHAR control; // Control bits #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //scReadBuffer_S - end //struct - scWriteBuffer_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines a SCSI Write Buffer Command. // NOTE: This command uses three-byte numeric fields. // //--------------------------------------------------------------------------- //FLG_WRBUF_MODE // write header and buffer data #define WRBUF_HEADER_DATA 0x00 // vendor-specific interpretation of command #define WRBUF_VENDORSPEC 0x01 // write buffer data only #define WRBUF_DATA 0x02 // download microcode #define WRBUF_DOWNLOAD_CODE 0x04 // download microcode and save #define WRBUF_DL_SAVE_CODE 0x05 //lun // Mode for read buffer #define FLG_WRBUF_MODE 0x03 #define STRUCT_NAME scWriteBuffer_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define scWriteBuffer_size 10 typedef unsigned char scWriteBuffer_S[scWriteBuffer_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 10 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getOpCode() { return getU1(this,0); } uCHAR setOpCode(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getLun() { return getS1(this,1); } uCHAR setLun(uCHAR inChar) { return setU1(this,1,inChar); } void orLun(uCHAR inChar) { orU1(this,1,inChar); } void andLun(uCHAR inChar) { andU1(this,1,inChar); } // Zero-based number of buffer to read uCHAR getBufferID() { return getU1(this,2); } uCHAR setBufferID(uCHAR inChar) { return setU1(this,2,inChar); } // Buffer offset - 3-byte integer uLONG getBufferOffset() { return getU3(this,3); } uLONG setBufferOffset(uCHAR inLong) { return setU3(this,3,inLong); } uLONG swapBufferOffset() { return swap3(3); } // # of bytes allocated for buffer data - 3-byte integer uLONG getParamListLength() { return getU3(this,6); } uLONG setParamListLength(uLONG inLong) { return setU3(this,6,inLong); } uLONG swapParamListLength() { return swap3(6); } uCHAR getControl() { return getU1(this,9); } uCHAR setControl(uCHAR inChar) { return setU1(this,9,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapBufferOffset(); swapParamListLength(); #endif } uLONG swap3(uLONG offset) { uLONG tmpLong = getU3(this,offset); osdSwap3(&tmpLong); return setU3(this,offset,tmpLong); } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR opCode; uCHAR lun; uCHAR bufferID; // Zero-based number of buffer to read uCHAR bufferOffset[3]; // Buffer offset - 3-byte integer uCHAR paramListLength[3]; // # of bytes allocated for buffer data - 3-byte integer uCHAR control; // Control bits #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //scWriteBuffer_S - end //SCSI data buffer definitions........................ // Note: "sd" stands for "SCSI data" //struct - sdRequestSense_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines the SCSI Request Sense return data // //--------------------------------------------------------------------------- /* error */ #define ERROR_VALID 0x80 /* Error is valid */ #define ERROR_CLASS 0x70 /* Error Class */ #define ERROR_CODE 0x00 /* Error Code */ /* Extended Key */ #define KEY_FILEMARK 0x80 /* Only for sequential devices */ #define KEY_EOM 0x40 /* End of sequential media */ #define KEY_ILI 0x20 /* Incorrect length indicator */ #define KEY_SENSE 0x0f /* Sense Key: */ #define SENSE_NONE 0x00 /* No specific sense info */ #define SENSE_RECOVERED 0x01 /* Error recovered */ #define SENSE_NOT_READY 0x02 /* Device not ready */ #define SENSE_MEDIUM 0x03 /* Flaw in Media */ #define SENSE_HARDWARE 0x04 /* Self test failure */ #define SENSE_ILLEGAL 0x05 /* Illegal SCSI request */ #define SENSE_ATTENTION 0x06 /* Media changed */ #define SENSE_PROTECTED 0x07 /* Data protected, no access */ #define SENSE_BLANK 0x08 /* WORM detected blank */ #define SENSE_COPY_ABORTED 0x0A /* Copy aborted */ #define SENSE_ABORTED 0x0B /* Aborted command (retry) */ #define SENSE_EQUAL 0x0C /* Data is equal */ #define SENSE_OVERFLOW 0x0D /* Data in buffer not written */ #define SENSE_MISCOMPARE 0x0E /* Data is not equal */ #define STRUCT_NAME sdRequestSense_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined (_DPT_ACTIVE_ALIGNMENT)) # define sdRequestSense_size 8 typedef unsigned char sdRequestSense_S[sdRequestSense_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getError() { return getU1(this,0); } # define sdRequestSense_getError(this) ((sdRequestSense_S __FAR__ *)(this))->getError() uCHAR setError(uCHAR inChar) { return setU1(this,0,inChar); } # define sdRequestSense_setError(this,inChar) ((sdRequestSense_S __FAR__ *)(this))->setError(inChar) uCHAR getSegment() { return getU1(this,1); } # define sdRequestSense_getSegment(this) ((sdRequestSense_S __FAR__ *)(this))->getSegment() uCHAR setSegment(uCHAR inChar) { return setU1(this,1,inChar); } # define sdRequestSense_setSegment(this,inChar) ((sdRequestSense_S __FAR__ *)(this))->setSegment(inChar) uCHAR getKey() { return getU1(this,2); } # define sdRequestSense_getKey(this) ((sdRequestSense_S __FAR__ *)(this))->getKey() uCHAR setKey(uCHAR inChar) { return setU1(this,2,inChar); } # define sdRequestSense_setKey(this,inChar) ((sdRequestSense_S __FAR__ *)(this))->setKey(inChar) uLONG getInfo() { return getU4(this,3); } # define sdRequestSense_getInfo(this) ((sdRequestSense_S __FAR__ *)(this))->getInfo() uLONG setInfo(uCHAR inLong) { return setU4(this,3,inLong); } # define sdRequestSense_setInfo(this,inLong) ((sdRequestSense_S __FAR__ *)(this))->setInfo(inLong) uLONG swapInfo() { return osdSwap4((uLONG __FAR__ *)getUP1(this,3)); } uCHAR getLength() { return getU1(this,7); } # define sdRequestSense_getLength(this) ((sdRequestSense_S __FAR__ *)(this))->getLength() uCHAR setLength(uCHAR inChar) { return setU1(this,7,inChar); } # define sdRequestSense_setLength(this,inChar) ((sdRequestSense_S __FAR__ *)(this))->setLength(inChar) uCHAR __FAR__ * getAdditional() { return getUP1(this,8); } # define sdRequestSense_getAdditional(this) ((sdRequestSense_S __FAR__ *)(this))->getAdditional() //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } # define sdRequestSense_clear(this) ((sdRequestSense_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapInfo(); #endif } #undef STRUCT_SIZE #elif (defined(_DPT_ACTIVE_ALIGNMENT)) /*----------------- * Access Functions *-----------------*/ #define sdRequestSense_getError(x) getU1(x,0) #define sdRequestSense_setError(x,y) setU1(x,0,y) #define sdRequestSense_getSegment(x) getU1(x,1) #define sdRequestSense_getLba(x) (getU3(x,1)&0x1FFFFFL) #define sdRequestSense_setSegment(x,y) setU1(x,1,y) #define sdRequestSense_setLba(x,y) ( andU1(x,1,0xE0), \ orU1(x,1,((y)>>16)&0x1F), \ setU2(x,2,y)) #define sdRequestSense_getKey(x) getU1(x,2) #define sdRequestSense_setKey(x,y) setU1(x,2,y) #define sdRequestSense_getInfo(x) getU4(x,3) #define sdRequestSense_setInfo(x,y) setU4(x,3) #define sdRequestSense_getLength(x) getU1(x,7) #define sdRequestSense_setLength(x,y) setU1(x,7,y) #define sdRequestSense_getAdditional(x) getUP1(x,8) /*--------------------------- * Required Support Functions *---------------------------*/ #define sdRequestSense_clear(x) osdBzero(x,sdRequestSense_size) //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR error; // Error Code # define sdRequestSense_getError(this) \ ((sdRequestSense_S __FAR__ *)this)->error # define sdRequestSense_setError(this,inChar) \ ((sdRequestSense_S __FAR__ *)this)->error = (inChar) uCHAR segment; // Segment containing error # define sdRequestSense_getSegment(this) \ ((sdRequestSense_S __FAR__ *)this)->segment # define sdRequestSense_setSegment(this,inChar) \ ((sdRequestSense_S __FAR__ *)this)->segment = (inChar) uCHAR key; // Sense Key # define sdRequestSense_getKey(this) ((sdRequestSense_S __FAR__ *)this)->key # define sdRequestSense_setKey(this,inChar) \ ((sdRequestSense_S __FAR__ *)this)->key = (inChar) uLONG Info; // Detailed sense information # define sdRequestSense_getInfo(this) \ getU4(&(((sdRequestSense_S __FAR__ *)this)->address),0) # define sdRequestSense_setInfo(this,inLong) \ setU4(&(((sdRequestSense_S __FAR__ *)this)->address),0,inLong) uCHAR length; // Length of additional information # define sdRequestSense_getLength(this) \ ((sdRequestSense_S __FAR__ *)this)->length # define sdRequestSense_setLength(this,inChar) \ ((sdRequestSense_S __FAR__ *)this)->length = (inChar) uCHAR additional[1]; // Additional information # define sdRequestSense_getAdditional(this) \ ((sdRequestSense_S __FAR__ *)this)->additional /*--------------------------- * Required Support Functions *---------------------------*/ # define sdRequestSense_size sizeof(sdRequestSense_S) # define sdRequestSense_clear(x) osdBzero(x,sdRequestSense_size) #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //sdRequestSense_S - end //struct - sdInquiry_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines the SCSI inquiry return data. // //--------------------------------------------------------------------------- //peripheral - bits // Peripheral device type #define PERIPH_TYPE 0x1f // Peripheral qualifier #define PERIPH_QUAL 0xe0 //devType - bits // Device type modifier #define DEVTYPE_MODIFIER 0x7f // Removable media flag #define DEVTYPE_RMB 0x80 //version - bits // ANSI version supported #define VER_ANSI 0x07 // European Computer Manufacturers Association #define VER_ECMA 0x38 // International Organization for Standardization #define VER_ISO 0xc0 //miscFlag1 - bits // Response data format (1=SCSI-1,2=SCSI-2) #define MISC_RESPONSE 0x0f // Terminate I/O supported #define MISC_TRMIO 0x40 // Asynchronous event notification supported #define MISC_AEN 0x80 //reserved2 - bits [reserved in SCSI-2, but may be present in SCSI-2 devices anyway] // SCSI-3 Enclosure Services supported #define MISC_ENCSERV 0x40 //miscFlag2 - bits // Soft reset supported #define MISC_SOFT_RESET 0x01 // Command queueing supported #define MISC_CMD_QUEUE 0x02 // Linked commands supported #define MISC_LINK_CLGS 0x08 // Synchronous transfers supported #define MISC_SYNC_XFR 0x10 // 16 bit wide transfers supported #define MISC_BUS_WIDTH_16 0x20 // 32 bit wide transfers supported #define MISC_BUS_WIDTH_32 0x40 // Relative addressing supported #define MISC_REL_ADDR 0x80 #define STRUCT_NAME sdInquiry_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define sdInquiry_size 56 typedef unsigned char sdInquiry_S[sdInquiry_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define sdInquiry_size 255 #define STRUCT_SIZE sdInquiry_size //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getPeripheral() { return getU1(this,0); } # define sdInquiry_getPeripheral(this) ((sdInquiry_S __FAR__ *)(this))->getPeripheral() uCHAR setPeripheral(uCHAR inChar) { return setU1(this,0,inChar); } # define sdInquiry_setPeripheral(this,inChar) ((sdInquiry_S __FAR__ *)(this))->setPeripheral(inChar) uCHAR getDevType() { return getU1(this,1); } # define sdInquiry_getDevType(this) ((sdInquiry_S __FAR__ *)(this))->getDevType() uCHAR setDevType(uCHAR inChar) { return setU1(this,1,inChar); } # define sdInquiry_setDevType(this,inChar) ((sdInquiry_S __FAR__ *)(this))->setDevType(inChar) uCHAR getVersion() { return getU1(this,2); } # define sdInquiry_getVersion(this) ((sdInquiry_S __FAR__ *)(this))->getVersion() uCHAR setVersion(uCHAR inChar) { return setU1(this,2,inChar); } # define sdInquiry_setVersion(this,inChar) ((sdInquiry_S __FAR__ *)(this))->setVersion(inChar) uCHAR getMiscFlag1() { return getU1(this,3); } # define sdInquiry_getMiscFlag1(this) ((sdInquiry_S __FAR__ *)(this))->getMiscFlag1() uCHAR setMiscFlag1(uCHAR inChar) { return setU1(this,3,inChar); } # define sdInquiry_setMiscFlag1(this,inChar) ((sdInquiry_S __FAR__ *)(this))->setMiscFlag1(inChar) uCHAR getLength() { return getU1(this,4); } # define sdInquiry_getLength(this) ((sdInquiry_S __FAR__ *)(this))->getLength() uCHAR setLength(uCHAR inChar) { return setU1(this,4,inChar); } # define sdInquiry_setLength(this,inChar) ((sdInquiry_S __FAR__ *)(this))->setLength(inChar) uCHAR getReserved1() { return getU1(this,5); } # define sdInquiry_getReserved1(this) ((sdInquiry_S __FAR__ *)(this))->getReserved1() uCHAR setReserved1(uCHAR inChar) { return setU1(this,5,inChar); } # define sdInquiry_setReserved1(this,inChar) ((sdInquiry_S __FAR__ *)(this))->setReserved1(inChar) uCHAR getReserved2() { return getU1(this,6); } # define sdInquiry_getReserved2(this) ((sdInquiry_S __FAR__ *)(this))->getReserved2() uCHAR setReserved2(uCHAR inChar) { return setU1(this,6,inChar); } # define sdInquiry_setReserved2(this,inChar) ((sdInquiry_S __FAR__ *)(this))->setReserved2(inChar) uCHAR getMiscFlag2() { return getU1(this,7); } # define sdInquiry_getMiscFlag2(this) ((sdInquiry_S __FAR__ *)(this))->getMiscFlag2() uCHAR setMiscFlag2(uCHAR inChar) { return setU1(this,7,inChar); } # define sdInquiry_setMiscFlag2(this,inChar) ((sdInquiry_S __FAR__ *)(this))->setMiscFlag2(inChar) uCHAR __FAR__ * getVendorID() { return getUP1(this,8); } # define sdInquiry_getVendorID(this) ((sdInquiry_S __FAR__ *)(this))->getVendorID() uCHAR __FAR__ * getProductID() { return getUP1(this,16); } # define sdInquiry_getProductID(this) ((sdInquiry_S __FAR__ *)(this))->getProductID() uCHAR __FAR__ * getRevision() { return getUP1(this,32); } # define sdInquiry_getRevision(this) ((sdInquiry_S __FAR__ *)(this))->getRevision() uCHAR __FAR__ * getVendorExtra() { return getUP1(this,36); } # define sdInquiry_getVendorExtra(this) ((sdInquiry_S __FAR__ *)(this))->getVendorExtra() uCHAR __FAR__ * getReserved3() { return getUP1(this,56); } # define sdInquiry_getReserved3(this) ((sdInquiry_S __FAR__ *)(this))->getReserved3() //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } # define sdInquiry_clear(this) ((sdInquiry_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE #elif (defined(_DPT_ACTIVE_ALIGNMENT)) /*----------------- * Access Functions *-----------------*/ #define sdInquiry_getPeripheral(x) getU1(x,0) #define sdInquiry_setPeripheral(x,y) setU1(x,0,y) #define sdInquiry_getDevType(x) getU1(x,1) #define sdInquiry_setDevType(x,y) setU1(x,1,y) #define sdInquiry_getVersion(x) getU1(x,2) #define sdInquiry_setVersion(x,y) setU1(x,2,y) #define sdInquiry_getMiscFlag1(x) getU1(x,3) #define sdInquiry_setMiscFlag1(x,y) setU1(x,3,y) #define sdInquiry_getLength(x) getU1(x,4) #define sdInquiry_setLength(x,y) setU1(x,4,y) #define sdInquiry_getReserved1(x) getU1(x,5) #define sdInquiry_setReserved1(x,y) setU1(x,5,y) #define sdInquiry_getReserved2(x) getU1(x,6) #define sdInquiry_setReserved2(x,y) setU1(x,6,y) #define sdInquiry_getMiscFlag2(x) getU1(x,7) #define sdInquiry_setMiscFlag2(x,y) setU1(x,7,y) #define sdInquiry_getVendorID(x) getUP1(x,8) #define sdInquiry_getProductID(x) getUP1(x,16) #define sdInquiry_getRevision(x) getUP1(x,32) #define sdInquiry_getVendorExtra(x) getUP1(x,36) #define sdInquiry_getReserved3(x) getUP1(x,56) /*--------------------------- * Required Support Functions *---------------------------*/ #define sdInquiry_clear(x) osdBzero(x,sdInquiry_size) //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR peripheral; // Peripheral information # define sdInquiry_getPeripheral(this) ((sdInquiry_S __FAR__ *)this)->peripheral # define sdInquiry_setPeripheral(this,inChar) \ ((sdInquiry_S __FAR__ *)this)->peripheral = (inChar) uCHAR devType; // Device type flags # define sdInquiry_getDevType(this) ((sdInquiry_S __FAR__ *)this)->devType # define sdInquiry_setDevType(this,inChar) \ ((sdInquiry_S __FAR__ *)this)->devType = (inChar) uCHAR version; // Version information # define sdInquiry_getVersion(this) ((sdInquiry_S __FAR__ *)this)->version # define sdInquiry_setVersion(this,inChar) \ ((sdInquiry_S __FAR__ *)this)->version = (inChar) uCHAR miscFlag1; // Miscellaneous flags #1 # define sdInquiry_getMiscFlag1(this) ((sdInquiry_S __FAR__ *)this)->miscFlag1 # define sdInquiry_setMiscFlag1(this,inChar) \ ((sdInquiry_S __FAR__ *)this)->miscFlag1 = (inChar) uCHAR length; // # bytes in rest of message # define sdInquiry_getLength(this) ((sdInquiry_S __FAR__ *)this)->length # define sdInquiry_setLength(this,inChar) \ ((sdInquiry_S __FAR__ *)this)->length = (inChar) uCHAR reserved1; // Reserved # define sdInquiry_getReserved1(this) ((sdInquiry_S __FAR__ *)this)->reserved1 # define sdInquiry_setReserved1(this,inChar) \ ((sdInquiry_S __FAR__ *)this)->reserved1 = (inChar) uCHAR reserved2; // Reserved # define sdInquiry_getReserved2(this) ((sdInquiry_S __FAR__ *)this)->reserved2 # define sdInquiry_setReserved2(this,inChar) \ ((sdInquiry_S __FAR__ *)this)->reserved2 = (inChar) uCHAR miscFlag2; // Miscellaneous flags #2 # define sdInquiry_getMiscFlag2(this) ((sdInquiry_S __FAR__ *)this)->miscFlag2 # define sdInquiry_setMiscFlag2(this,inChar) \ ((sdInquiry_S __FAR__ *)this)->miscFlag2 = (inChar) uCHAR vendorID[8]; // Vendor identification # define sdInquiry_getVendorID(this) ((sdInquiry_S __FAR__ *)this)->vendorID uCHAR productID[16]; // Product identification # define sdInquiry_getProductID(this) ((sdInquiry_S __FAR__ *)this)->productID uCHAR revision[4]; // Product revision level # define sdInquiry_getRevision(this) ((sdInquiry_S __FAR__ *)this)->revision uCHAR vendorExtra[20];// Vendor unique # define sdInquiry_getVendorExtra(this) \ ((sdInquiry_S __FAR__ *)this)->vendorExtra uCHAR reserved3[40]; // Reserved # define sdInquiry_getReserved3(this) ((sdInquiry_S __FAR__ *)this)->reserved3 /*--------------------------- * Required Support Functions *---------------------------*/ # define sdInquiry_size sizeof(sdInquiry_S) # define sdInquiry_clear(x) osdBzero(x,sdInquiry_size) #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //sdInquiry_S - end //struct - sdRdCapacity_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines the SCSI read capacity return data. // //--------------------------------------------------------------------------- #define STRUCT_NAME sdRdCapacity_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define sdRdCapacity_size 8 typedef unsigned char sdRdCapacity_S[sdRdCapacity_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getMaxLBA() { return getU4(this,0); } # define sdRdCapacity_getMaxLBA(this) ((sdRdCapacity_S __FAR__ *)(this))->getMaxLBA() uLONG setMaxLBA(uLONG inLong) { return setU4(this,0,inLong); } # define sdRdCapacity_setMaxLBA(this,inLong) ((sdRdCapacity_S __FAR__ *)(this))->getMaxLBA(inLong) uLONG swapMaxLBA() { return osdSwap4((uLONG __FAR__ *)getUP1(this,0)); } uLONG getBlockSize() { return getU4(this,4); } # define sdRdCapacity_getBlockSize(this) ((sdRdCapacity_S __FAR__ *)(this))->getBlockSize() uLONG setBlockSize(uLONG inLong) { return setU4(this,4,inLong); } # define sdRdCapacity_setBlockSize(this,inLong) ((sdRdCapacity_S __FAR__ *)(this))->getBlockSize(inLong) uLONG swapBlockSize() { return osdSwap4((uLONG __FAR__ *)getUP1(this,4)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } # define sdRdCapacity_clear(this) ((sdRdCapacity_S __FAR__ *)(this))->clear() STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapMaxLBA(); swapBlockSize(); #endif } #undef STRUCT_SIZE #elif (defined(_DPT_ACTIVE_ALIGNMENT)) /*----------------- * Access Functions *-----------------*/ #define sdRdCapacity_getMaxLba(x) getU4(x,0) #define sdRdCapacity_setMaxLba(x,y) setU4(x,0,y) #define sdRdCapacity_getBlockSize(x) getU4(x,4) #define sdRdCapacity_setBlockSize(x,y) setU4(x,4,y) /*--------------------------- * Required Support Functions *---------------------------*/ #define sdRdCapacity_clear(x) osdBzero(x,sdRdCapacity_size) //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG maxLBA; // Last LBA (Logical Block Address) # define sdRdCapacity_getMaxLba(this) \ getU4(&(((sdRdCapacity_S __FAR__ *)this)->maxLBA),0) # define sdRdCapacity_setMaxLba(this,inLong) \ setU4(&(((sdRdCapacity_S __FAR__ *)this)->maxLBA),0,inLong) uLONG blockSize; // Size of each block # define sdRdCapacity_getBlockSize(this) \ getU4(&(((sdRdCapacity_S __FAR__ *)this)->blockSize),0) # define sdRdCapacity_setBlockSize(this,inLong) \ setU4(&(((sdRdCapacity_S __FAR__ *)this)->blockSize),0,inLong) # define sdRdCapacity_size sizeof(sdRdCapacity_S) # define sdRdCapacity_clear(this) osdBzero(this,sdRdCapacity_size) #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //sdRdCapacity_S - end // Hardware Array Structures.......................... //struct - hwaHWdata_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines the data returned by an NCR type hardware //array when returning vital product page 0xc0. // // Hardware Info Page // //--------------------------------------------------------------------------- //devType // SCSI device type #define FLG_DEV_TYPE 0x1f // SCSI device qualifier #define FLG_DEV_QUALIFY 0xe0 #define STRUCT_NAME hwaHWdata_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 158 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getDevType() { return getU1(this,0); } uCHAR setDevType(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getPageCode() { return getU1(this,1); } uCHAR setPageCode(uCHAR inChar) { return setU1(this,1,inChar); } uCHAR getReserved1() { return getU1(this,2); } uCHAR setReserved1(uCHAR inChar) { return setU1(this,2,inChar); } uCHAR getPageLength() { return getU1(this,3); } uCHAR setPageLength(uCHAR inChar) { return setU1(this,3,inChar); } uCHAR __FAR__ * getPageID() { return getUP1(this,4); } uCHAR getNumChannels() { return getU1(this,8); } uCHAR setNumChannels(uCHAR inChar) { return setU1(this,8,inChar); } uCHAR __FAR__ * getReserved2() { return getUP1(this,9); } uCHAR __FAR__ * getName() { return getUP1(this,16); } uCHAR __FAR__ * getPartNum() { return getUP1(this,80); } uCHAR __FAR__ * getSchemeNum() { return getUP1(this,96); } uCHAR __FAR__ * getSchemeRev() { return getUP1(this,108); } uCHAR __FAR__ * getSerialNum() { return getUP1(this,112); } uCHAR __FAR__ * getReserved3() { return getUP1(this,128); } uCHAR __FAR__ * getDate() { return getUP1(this,144); } uCHAR __FAR__ * getRevision() { return getUP1(this,152); } uCHAR __FAR__ * getIdentifier() { return getUP1(this,154); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR devType; // SCSI device type uCHAR pageCode; // Vital product page code (0xc0) uCHAR reserved1; // Reserved (0x00) uCHAR pageLength; // # bytes in rest of page (0x9a) uCHAR pageID[4]; // page identifier ("HWRE") uCHAR numChannels; // # channels supported uCHAR reserved2[7]; // Reserved (0x00) uCHAR name[64]; // Ascii - board name uCHAR partNum[16]; // Ascii - board part # uCHAR schemeNum[12]; // Ascii - schematic # uCHAR schemeRev[4]; // Ascii - schematic revision uCHAR serialNum[16]; // Ascii - board serial # uCHAR reserved3[16]; // Ascii - spaces uCHAR date[8]; // Ascii - date of manufacture uCHAR revision[2]; // Ascii - board revision level uCHAR identifier[4]; // Ascii - board identifier #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //hwaHWdata_S - end //struct - hwaFWdata_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines the data returned by an NCR type hardware //array when returning vital product page 0xc1. // // Firmware Info Page // //--------------------------------------------------------------------------- #define STRUCT_NAME hwaFWdata_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 14 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getDevType() { return getU1(this,0); } uCHAR setDevType(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getPageCode() { return getU1(this,1); } uCHAR setPageCode(uCHAR inChar) { return setU1(this,1,inChar); } uCHAR getReserved1() { return getU1(this,2); } uCHAR setReserved1(uCHAR inChar) { return setU1(this,2,inChar); } uCHAR getPageLength() { return getU1(this,3); } uCHAR setPageLength(uCHAR inChar) { return setU1(this,3,inChar); } uCHAR __FAR__ * getPageID() { return getUP1(this,4); } uCHAR __FAR__ * getVersion() { return getUP1(this,8); } uCHAR __FAR__ * getDate() { return getUP1(this,11); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ * next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ * prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR devType; // SCSI device type uCHAR pageCode; // Vital product page code (0xc1) uCHAR reserved1; // Reserved (0x00) uCHAR pageLength; // # bytes in rest of page uCHAR pageID[4]; // page identifier ("FWRE") uCHAR version[3]; // firmware version uCHAR date[3]; // firmware date #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //hwaFWdata_S - end //struct - hwaSWdata_S - start //--------------------------------------------------------------------------- // //Description: // // This structure defines the data returned by an NCR type hardware //array when returning vital product page 0xc2. // // Software Info Page // //--------------------------------------------------------------------------- #define STRUCT_NAME hwaSWdata_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 14 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getDevType() { return getU1(this,0); } uCHAR setDevType(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getPageCode() { return getU1(this,1); } uCHAR setPageCode(uCHAR inChar) { return setU1(this,1,inChar); } uCHAR getReserved1() { return getU1(this,2); } uCHAR setReserved1(uCHAR inChar) { return setU1(this,2,inChar); } uCHAR getPageLength() { return getU1(this,3); } uCHAR setPageLength(uCHAR inChar) { return setU1(this,3,inChar); } uCHAR __FAR__ * getPageID() { return getUP1(this,4); } uCHAR __FAR__ * getVersion() { return getUP1(this,8); } uCHAR __FAR__ * getDate() { return getUP1(this,11); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR devType; // SCSI device type uCHAR pageCode; // Vital product page code (0xc2) uCHAR reserved1; // Reserved (0x00) uCHAR pageLength; // # bytes in rest of page uCHAR pageID[4]; // page identifier ("SWRE") uCHAR version[3]; // firmware version uCHAR date[3]; // firmware date #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //hwaSWdata_S - end // Log Sense/Select data.............................. //struct - logHeader_S - start //--------------------------------------------------------------------------- // //Description: // // Header for a log sense data. // //--------------------------------------------------------------------------- #define STRUCT_NAME logHeader_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 5 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getPageCode() { return getU1(this,0); } uCHAR setPageCode(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getReserved() { return getU1(this,1); } uCHAR setreserved(uCHAR inChar) { return setU1(this,1,inChar); } uSHORT getPageLength() { return getU2(this,2); } uSHORT setPageLength(uSHORT inShort) { return setU2(this,2,inShort); } uSHORT swapPageLength() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,2)); } uCHAR __FAR__ * getParams() { return getUP1(this,4); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapPageLength(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR pageCode; // Log sense page code uCHAR reserved; // Reserved uSHORT pageLength; // # bytes following this byte uCHAR params[1]; // Log sense items #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //logHeader_S - end //struct - logParam_S - start //--------------------------------------------------------------------------- // //Description: // // A parameter within log sense data // //--------------------------------------------------------------------------- #define STRUCT_NAME logParam_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 5 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uSHORT getCode() { return getU2(this,0); } uSHORT setCode(uSHORT inShort) { return setU2(this,0,inShort); } uSHORT swapCode() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,0)); } uCHAR getFlags() { return getU1(this,2); } uCHAR setFlags(uCHAR inChar) { return setU1(this,2,inChar); } #if defined (SNI_MIPS) // For some strange reason sometimes log length is odd. // We make it even, so dptmgr can handle it. // This Fix should be verified later. michiz uCHAR getLength() { return (getU1(this,3)+1)&0xfe; } #else uCHAR getLength() { return getU1(this,3); } #endif uCHAR setLength(uCHAR inChar) { return setU1(this,3,inChar); } uCHAR __FAR__ * getData() { return getUP1(this,4); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapCode(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uSHORT code; // Log item code uCHAR flags; // flags uCHAR length; // # bytes following this byte uCHAR data[1]; // data bytes #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #define LGS_KEYCARD 0x08 // Key card present #define LGS_CACHEMODULE 0x04 // Cache module present #undef STRUCT_NAME //logParam_S - end //struct - modeHeader_S - start //--------------------------------------------------------------------------- // //Description: // // Header for mode sense data. // //--------------------------------------------------------------------------- //deviceParam - bit definitions // 1=Write protected #define FLG_LGS_WP 0x80 // 1=DPO & FUA bits supported #define FLG_LGS_D_F 0x10 #define STRUCT_NAME modeHeader_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uSHORT getDataLength() { return getU2(this,0); } uSHORT setDataLength(uSHORT inShort) { return setU2(this,0,inShort); } uSHORT swapDataLength() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,0)); } uCHAR getMediumType() { return getU1(this,2); } uCHAR setMediumType(uCHAR inChar) { return setU1(this,2,inChar); } uCHAR getDeviceParam() { return getU1(this,3); } uCHAR setDeviceParam(uCHAR inChar) { return setU1(this,3,inChar); } uCHAR __FAR__ * getReserved() { return getUP1(this,4); } uSHORT getDescrLength() { return getU2(this,6); } uSHORT setDescrLength(uSHORT inShort) { return setU2(this,6,inShort); } uSHORT swapDescrLength() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,6)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapDataLength(); swapDescrLength(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uSHORT dataLength; // # bytes following the header uCHAR mediumType; // Unique for each device type uCHAR deviceParam; // See bit definitions above uCHAR reserved[2]; // Reserved uSHORT descrLength; // # bytes of block descriptors #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //modeHeader_S - end //struct - modeHeader6_S - start //--------------------------------------------------------------------------- // //Description: // // Header for mode sense data. // //--------------------------------------------------------------------------- //deviceParam - bit definitions // 1=Write protected #define FLG_LGS_WP 0x80 // 1=DPO & FUA bits supported #define FLG_LGS_D_F 0x10 #define STRUCT_NAME modeHeader6_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 4 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getDataLength() { return getU1(this,0); } uCHAR setDataLength(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getMediumType() { return getU1(this,1); } uCHAR setMediumType(uCHAR inChar) { return setU1(this,1,inChar); } uCHAR getDeviceParam() { return getU1(this,2); } uCHAR setDeviceParam(uCHAR inChar) { return setU1(this,2,inChar); } uCHAR getDescrLength() { return getU1(this,3); } uCHAR setDescrLength(uCHAR inChar) { return setU1(this,3,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR dataLength; // # bytes following the header uCHAR mediumType; // Unique for each device type uCHAR deviceParam; // See bit definitions above uCHAR descrLength; // # bytes of block descriptors #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //modeHeader6_S - end //struct - modeParam_S - start //--------------------------------------------------------------------------- // //Description: // // Structure for mode page parameter header // //--------------------------------------------------------------------------- #define STRUCT_NAME modeParam_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 3 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getPageCode() { return getU1(this,0); } uCHAR setPageCode(uCHAR inChar) { return setU1(this,0,inChar); } void orPageCode(uCHAR inChar) { orU1(this,0,inChar); } void andPageCode(uCHAR inChar) { andU1(this,0,inChar); } uCHAR getLength() { return getU1(this,1); } uCHAR setLength(uCHAR inChar) { return setU1(this,1,inChar); } uCHAR __FAR__ * getData() { return getUP1(this,2); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR pageCode; // Page Code // (Mode sense bit 7=Parameters saveable) uCHAR length; // # bytes in data field uCHAR data[1]; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //modeParam_S - end //struct - ncrLAP1_S - start //--------------------------------------------------------------------------- // //Description: // // Structure for NCR logical array page #1 (mode page 0x2b) // //--------------------------------------------------------------------------- // flags #define LAP_NCR1_DAD 0x02 // Disable auto drive replacement // detection & reconstruct #define LAP_NCR1_VABORT 0x04 // Abort a verify on 1st error #define LAP_NCR1_VFIX 0x08 // Fix parity erros during verify #define LAP_NCR1_AEN 0x10 // Enable Asynchronous Event // Notification #define LAP_NCR1_PVFY 0x20 // Enable parity verification #define LAP_NCR1_WPVFY 0x40 // Enable write w/ parity verification #define STRUCT_NAME ncrLAP1_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 35 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getStatus() { return getU1(this,0); } uCHAR setStatus(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getRaidLevel() { return getU1(this,1); } uCHAR setRaidLevel(uCHAR inChar) { return setU1(this,1,inChar); } uCHAR getLsuType() { return getU1(this,2); } uCHAR setLsuType(uCHAR inChar) { return setU1(this,2,inChar); } uLONG getLsuBlockSize() { return getU4(this,3); } uLONG setLsuBlockSize(uLONG inLong) { return setU4(this,3,inLong); } uLONG swapLsuBlockSize() { return osdSwap4((uLONG __FAR__ *)getUP1(this,3));} uSHORT getCompBlockSize() { return getU2(this,7); } uSHORT setCompBlockSize(uSHORT inShort) { return setU2(this,7,inShort); } uSHORT swapCompBlockSize() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,7)); } uLONG getNumBlocks() { return getU4(this,9); } uLONG setNumBlocks(uLONG inLong) { return setU4(this,9,inLong); } uLONG swapNumBlocks() { return osdSwap4((uLONG __FAR__ *)getUP1(this,9)); } uLONG getVerifyErrCnt() { return getU4(this,13); } uLONG setVerifyErrCnt(uLONG inLong) { return setU4(this,13,inLong); } uLONG swapVerifyErrCnt() { return osdSwap4((uLONG __FAR__ *)getUP1(this,13)); } uLONG getStripeSize() { return getU4(this,17); } uLONG setStripeSize(uLONG inLong) { return setU4(this,17,inLong); } uLONG swapStripeSize() { return osdSwap4((uLONG __FAR__ *)getUP1(this,17)); } uCHAR getStripe0Size() { return getU1(this,21); } uCHAR setStripe0Size(uCHAR inChar) { return setU1(this,21,inChar); } uCHAR getCopyDir() { return getU1(this,22); } uCHAR setCopyDir(uCHAR inChar) { return setU1(this,22,inChar); } uCHAR getFlags() { return getU1(this,23); } uCHAR setFlags(uCHAR inChar) { return setU1(this,23,inChar); } void orFlags(uCHAR inChar) { orU1(this,23,inChar); } void andFlags(uCHAR inChar) { andU1(this,23,inChar); } uLONG getCompleted() { return getU4(this,24); } uLONG setCompleted(uLONG inLong) { return setU4(this,24,inLong); } uLONG swapCompleted() { return osdSwap4((uLONG __FAR__ *)getUP1(this,24)); } uCHAR getRbldFrequency() { return getU1(this,28); } uCHAR setRbldFrequency(uCHAR inChar) { return setU1(this,28,inChar); } uSHORT getRbldAmount() { return getU2(this,29); } uSHORT setRbldAmount(uSHORT inShort) { return setU2(this,29,inShort); } uSHORT swapRbldAmount() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,29)); } uCHAR getLunNum() { return getU1(this,31); } uCHAR setLunNum(uCHAR inChar) { return setU1(this,31,inChar); } uCHAR __FAR__ * getReserved3() { return getUP1(this,32); } uCHAR __FAR__ * getBitMap() { return getUP1(this,34); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapLsuBlockSize(); swapCompBlockSize(); swapNumBlocks(); swapVerifyErrCnt(); swapStripeSize(); swapCompleted(); swapRbldAmount(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR status; // Action/Status byte uCHAR raidLevel; // RAID level (0,1,3,5...) uCHAR lsuType; // 0=Regular, 1=Sub-LUN uLONG lsuBlockSize; // block size of LSU uSHORT compBlockSize; // component block size (mode sense only) uLONG numBlocks; // LSU number of blocks uLONG verifyErrCnt; // Verify error count uLONG stripeSize; // Stripe size (# LBAs per stripe) uCHAR stripe0Size; // Size of the first stripe uCHAR copyDir; // RAID-1 copy direction // Bits 7-6: // 00 = No copy direction specified // 01 = No copy direction specified // 10 = Target device w/ lower SCSI addr // 11 = Target device w/ higher SCSI addr uCHAR flags; // Miscellaneous flags uLONG completed; // Current reconstruct block completed uCHAR rbldFrequency; // Reconstruction frequency (Time to delay // in tenths of a second before the next // reconstruct burst) uSHORT rbldAmount; // # of blocks to reconstruct during each // reconstruct burst uCHAR lunNum; // For Add LUN = LUN # to create uCHAR reserved3[2]; // Reserved uCHAR bitMap[1]; // Component device bit map #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //ncrLAP1_S - end //struct - dptLAP1_S - start //--------------------------------------------------------------------------- // //Description: // // Structure for DPT logical array page #1 // //--------------------------------------------------------------------------- // flags #define DPT_LAP1_DAD 0x02 // Disable auto drive replacement // detection & reconstruct #define DPT_LAP1_AEN 0x10 // Enable Asynchronous Event // Notification #define DPT_LAP1_PVFY 0x20 // Enable parity verification #define DPT_LAP1_WPVFY 0x40 // Enable write w/ parity verification #define STRUCT_NAME dptLAP1_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 35 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getStatus() { return getU1(this,0); } uCHAR setStatus(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getRaidLevel() { return getU1(this,1); } uCHAR setRaidLevel(uCHAR inChar) { return setU1(this,1,inChar); } uCHAR getLsuType() { return getU1(this,2); } uCHAR setLsuType(uCHAR inChar) { return setU1(this,2,inChar); } uLONG getLsuBlockSize() { return getU4(this,3); } uLONG setLsuBlockSize(uLONG inLong) { return setU4(this,3,inLong); } uLONG swapLsuBlockSize() { return osdSwap4((uLONG __FAR__ *)getUP1(this,3));} uSHORT getCompBlockSize() { return getU2(this,7); } uSHORT setCompBlockSize(uSHORT inShort) { return setU2(this,7,inShort); } uSHORT swapCompBlockSize() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,7)); } uLONG getNumBlocks() { return getU4(this,9); } uLONG setNumBlocks(uLONG inLong) { return setU4(this,9,inLong); } uLONG swapNumBlocks() { return osdSwap4((uLONG __FAR__ *)getUP1(this,9)); } uLONG getVerifyErrCnt() { return getU4(this,13); } uLONG setVerifyErrCnt(uLONG inLong) { return setU4(this,13,inLong); } uLONG swapVerifyErrCnt() { return osdSwap4((uLONG __FAR__ *)getUP1(this,13)); } uLONG getLastECCblk() { return getU4(this,17); } uLONG setLastECCblk(uLONG inLong) { return setU4(this,17,inLong); } uLONG swapLastECCblk() { return osdSwap4((uLONG __FAR__ *)getUP1(this,17)); } uCHAR getStripe0Size() { return getU1(this,21); } uCHAR setStripe0Size(uCHAR inChar) { return setU1(this,21,inChar); } uCHAR getCopyDir() { return getU1(this,22); } uCHAR setCopyDir(uCHAR inChar) { return setU1(this,22,inChar); } uCHAR getFlags() { return getU1(this,23); } uCHAR setFlags(uCHAR inChar) { return setU1(this,23,inChar); } void orFlags(uCHAR inChar) { orU1(this,23,inChar); } void andFlags(uCHAR inChar) { andU1(this,23,inChar); } uLONG getCompleted() { return getU4(this,24); } uLONG setCompleted(uLONG inLong) { return setU4(this,24,inLong); } uLONG swapCompleted() { return osdSwap4((uLONG __FAR__ *)getUP1(this,24)); } uCHAR getRbldFrequency() { return getU1(this,28); } uCHAR setRbldFrequency(uCHAR inChar) { return setU1(this,28,inChar); } uSHORT getRbldAmount() { return getU2(this,29); } uSHORT setRbldAmount(uSHORT inShort) { return setU2(this,29,inShort); } uSHORT swapRbldAmount() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,29)); } uCHAR getLunNum() { return getU1(this,31); } uCHAR setLunNum(uCHAR inChar) { return setU1(this,31,inChar); } uCHAR getHbaIndex() { return getU1(this,32); } uCHAR setHbaIndex(uCHAR inChar) { return setU1(this,32,inChar); } uCHAR getSpinDownDelay() { return getU1(this,33); } uCHAR setSpinDownDelay(uCHAR inChar) { return setU1(this,33,inChar); } uCHAR __FAR__ * getCompList() { return getUP1(this,34); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapLsuBlockSize(); swapCompBlockSize(); swapNumBlocks(); swapVerifyErrCnt(); swapLastECCblk(); swapCompleted(); swapRbldAmount(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR status; // Action/Status byte uCHAR raidLevel; // RAID level (0,1,3,5...) uCHAR lsuType; // 0=Regular, 1=Sub-LUN uLONG lsuBlockSize; // # bytes per LBA (for the LSU) uSHORT compBlockSize; // component block size (mode sense only) uLONG numBlocks; // LSU number of blocks uLONG verifyErrCnt; // Verify error count uLONG lastECCblk; // Last SCSI ECC block to be converted uCHAR stripe0Size; // Size of the first stripe uCHAR copyDir; // RAID-1 copy direction // Bits 7-6: // 00 = No copy direction specified // 01 = No copy direction specified // 10 = Target device w/ lower SCSI addr // 11 = Target device w/ higher SCSI addr uCHAR flags; // Miscellaneous flags uLONG completed; // Current reconstruct block completed uCHAR rbldFrequency; // Reconstruction frequency (Time to delay // in tenths of a second before the next // reconstruct burst) uSHORT rbldAmount; // # of blocks to reconstruct during each // reconstruct burst uCHAR lunNum; // For Add LUN = LUN # to create uCHAR hbaIndex; // HBA index (slot) number (1-19) uCHAR spinDownDelay; // # seconds to wait to spin down a failed drive // (0=don't spin down) uCHAR compList[1]; // Component list // (HBA/Chan,ID/LUN,Stripe Size) #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //dptLAP1_S - end //struct - dptLAP1el_S - start //--------------------------------------------------------------------------- // //Description: // // Structure for DPT logical array page #1 component element. // //--------------------------------------------------------------------------- #define STRUCT_NAME dptLAP1el_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getHbaChan() { return getU1(this,0); } uCHAR setHbaChan(uCHAR inChar) { return setU1(this,0,inChar); } void orHbaChan(uCHAR inChar) { orU1(this,0,inChar); } void andHbaChan(uCHAR inChar) { andU1(this,0,inChar); } uCHAR getIdLun() { return getU1(this,1); } uCHAR setIdLun(uCHAR inChar) { return setU1(this,1,inChar); } void orIdLun(uCHAR inChar) { orU1(this,1,inChar); } void andIdLun(uCHAR inChar) { andU1(this,1,inChar); } uLONG getStripeSize() { return getU4(this,2); } uLONG setStripeSize(uLONG inLong) { return setU4(this,2,inLong); } uLONG swapStripeSize() { return osdSwap4((uLONG __FAR__ *)getUP1(this,2)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapStripeSize(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR hbaChan; // HBA and Channel # // Bits 7-3 = HBA // Bits 2-0 = Channel uCHAR idLun; // ID and LUN # // Bits 7-4 = ID // Bits 3-0 = LUN uLONG stripeSize; // Component stripe size (in blocks) #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //dptLAP1el_S - end //struct - dptLAP2_S - start //=========================================================================== // //Description: // // Structure for the DPT logical array page #2. LAP #2 utilizes //magic numbers instead of SCSI addresses to identify component //devices. // //--------------------------------------------------------------------------- //flags1 - bit definitions #define FLG_LAP2_IDPRIORITY 0xc0 #define FLG_LAP2_COPYDIR 0x30 #define FLG_LAP2_AVERIFY 0x04 #define FLG_LAP2_RBLD_BOOT 0x02 #define FLG_LAP2_RBLD_MINUTE 0x01 #define STRUCT_NAME dptLAP2_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 28 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getStatus() { return getU1(this,0); } uCHAR setStatus(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getRaidLevel() { return getU1(this,1); } uCHAR setRaidLevel(uCHAR inChar) { return setU1(this,1,inChar); } uCHAR getReserved1() { return getU1(this,2); } uCHAR setReserved1(uCHAR inChar) { return setU1(this,2,inChar); } uCHAR getNumComps() { return getU1(this,3); } uCHAR setNumComps(uCHAR inChar) { return setU1(this,3,inChar); } uLONG getLsuMagicNum() { return getU4(this,4); } uLONG setLsuMagicNum(uLONG inLong) { return setU4(this,4,inLong); } uLONG swapLsuMagicNum() { return osdSwap4((uLONG __FAR__ *)getUP1(this,4));} void andLsuMagicNum(uLONG inLong) { andU4(this,4,inLong); } uLONG getLsuCapacity() { return getU4(this,8); } uLONG setLsuCapacity(uLONG inLong) { return setU4(this,8,inLong); } uLONG swapLsuCapacity() { return osdSwap4((uLONG __FAR__ *)getUP1(this,8));} uSHORT getLsuBlockSize() { return getU2(this,12); } uSHORT setLsuBlockSize(uSHORT inShort) { return setU2(this,12,inShort); } uSHORT swapLsuBlockSize() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,12)); } uCHAR getReserved2() { return getU1(this,14); } uCHAR setReserved2(uCHAR inChar) { return setU1(this,14,inChar); } uCHAR getFlags1() { return getU1(this,15); } uCHAR setFlags1(uCHAR inChar) { return setU1(this,15,inChar); } void orFlags1(uCHAR inChar) { orU1(this,15,inChar); } void andFlags1(uCHAR inChar) { andU1(this,15,inChar); } uCHAR getReserved3() { return getU1(this,16); } uCHAR setReserved3(uCHAR inChar) { return setU1(this,16,inChar); } uCHAR getBkgdFreq() { return getU1(this,17); } uCHAR setBkgdFreq(uCHAR inChar) { return setU1(this,17,inChar); } uSHORT getBkgdAmount() { return getU2(this,18); } uSHORT setBkgdAmount(uSHORT inShort) { return setU2(this,18,inShort); } uSHORT swapBkgdAmount() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,18)); } uLONG getBlksComplete() { return getU4(this,20); } uLONG setBlksComplete(uLONG inLong) { return setU4(this,20,inLong); } uLONG swapBlksComplete() { return osdSwap4((uLONG __FAR__ *)getUP1(this,20));} uLONG getVerifyErrors() { return getU4(this,24); } uLONG setVerifyErrors(uLONG inLong) { return setU4(this,24,inLong); } uLONG swapVerifyErrors() { return osdSwap4((uLONG __FAR__ *)getUP1(this,24));} //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapLsuMagicNum(); swapLsuCapacity(); swapLsuBlockSize(); swapBkgdAmount(); swapBlksComplete(); swapVerifyErrors(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR status; uCHAR raidLevel; uCHAR reserved1; uCHAR numComps; uLONG lsuMagicNum; uLONG lsuCapacity; uSHORT lsuBlockSize; uCHAR reserved2; uCHAR flags1; uCHAR reserved3; uCHAR bkgdFreq; uSHORT bkgdAmount; uLONG blksComplete; uLONG verifyErrors; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //dptLAP2_S - end //struct - dptLAP2el_S - start //--------------------------------------------------------------------------- // //Description: // // Structure for DPT logical array page #2 component element. // //--------------------------------------------------------------------------- #define STRUCT_NAME dptLAP2el_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 26 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getPageCode() { return getU1(this,0); } uCHAR setPageCode(uCHAR inChar) { return setU1(this,0,inChar); } void orPageCode(uCHAR inChar) { orU1(this,0,inChar); } void andPageCode(uCHAR inChar) { andU1(this,0,inChar); } uCHAR getPageLength() { return getU1(this,1); } uCHAR setPageLength(uCHAR inChar) { return setU1(this,1,inChar); } uCHAR getStatus() { return getU1(this,2); } uCHAR setStatus(uCHAR inChar) { return setU1(this,2,inChar); } uCHAR getHBA() { return getU1(this,3); } uCHAR setHBA(uCHAR inChar) { return setU1(this,3,inChar); } uCHAR getChan() { return getU1(this,4); } uCHAR setChan(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR getLun() { return getU1(this,5); } uCHAR setLun(uCHAR inChar) { return setU1(this,5,inChar); } uLONG getID() { return getU4(this,6); } uLONG setID(uLONG inLong) { return setU4(this,6,inLong); } uLONG swapID() { return osdSwap4((uLONG __FAR__ *)getUP1(this,6)); } uLONG getMagicNum() { return getU4(this,10); } uLONG setMagicNum(uLONG inLong) { return setU4(this,10,inLong); } void andMagicNum(uLONG inLong) { andU4(this,10,inLong); } uLONG swapMagicNum() { return osdSwap4((uLONG __FAR__ *)getUP1(this,10)); } uLONG getCapacity() { return getU4(this,14); } uLONG setCapacity(uLONG inLong) { return setU4(this,14,inLong); } uLONG swapCapacity() { return osdSwap4((uLONG __FAR__ *)getUP1(this,14)); } uLONG getStartBlk() { return getU4(this,18); } uLONG setStartBlk(uLONG inLong) { return setU4(this,18,inLong); } uLONG swapStartBlk() { return osdSwap4((uLONG __FAR__ *)getUP1(this,18)); } uSHORT getStripeSize() { return getU2(this,22); } uSHORT setStripeSize(uSHORT inShort) { return setU2(this,22,inShort); } uSHORT swapStripeSize() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,22)); } uSHORT getReserved1() { return getU2(this,24); } uSHORT setReserved1(uSHORT inShort) { return setU2(this,24,inShort); } uSHORT swapReserved1() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,24)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapID(); swapMagicNum(); swapCapacity(); swapStartBlk(); swapStripeSize(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR pageCode; uCHAR pageLength; uCHAR status; uCHAR hba; uCHAR chan; uCHAR lun; uLONG id; uLONG magicNum; uLONG capacity; uLONG startBlk; uSHORT stripeSize; uSHORT reserved1; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //dptLAP2el_S - end //struct - dptLAP2segment_S - start //--------------------------------------------------------------------------- //Description: // Structure for DPT logical array page #2 LUN segment page (page code 0x33). //--------------------------------------------------------------------------- #define STRUCT_NAME dptLAP2segment_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 40 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getPageCode() { return getU1(this,0); } uCHAR setPageCode(uCHAR inChar) { return setU1(this,0,inChar); } void orPageCode(uCHAR inChar) { orU1(this,0,inChar); } void andPageCode(uCHAR inChar) { andU1(this,0,inChar); } uCHAR getPageLength() { return getU1(this,1); } uCHAR setPageLength(uCHAR inChar) { return setU1(this,1,inChar); } uCHAR getSegmentIndex() { return getU1(this,2); } uCHAR setSegmentIndex(uCHAR inChar) { return setU1(this,2,inChar); } uCHAR getSegmentCount() { return getU1(this,3); } uCHAR setSegmentCount(uCHAR inChar) { return setU1(this,3,inChar); } uCHAR getFlags1() { return getU1(this,4); } uCHAR setFlags1(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR getReserved1() { return getU1(this, 5); } uCHAR setReserved1(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR getReserved2() { return getU1(this,6); } uCHAR setReserved2(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR getReserved3() { return getU1(this,7); } uCHAR setReserved3(uCHAR inChar) { return setU1(this,7,inChar); } uLONG getOffsetHi() { return getU4(this,8); } uLONG setOffsetHi(uLONG inLong) { return setU4(this,8,inLong); } uLONG swapOffsetHi() { return osdSwap4((uLONG __FAR__ *)getUP1(this,8)); } uLONG getOffsetLo() { return getU4(this,12); } uLONG setOffsetLo(uLONG inLong) { return setU4(this,12,inLong); } uLONG swapOffsetLo() { return osdSwap4((uLONG __FAR__ *)getUP1(this,12)); } uLONG getSizeHi() { return getU4(this,16); } uLONG setSizeHi(uLONG inLong) { return setU4(this,16,inLong); } uLONG swapSizeHi() { return osdSwap4((uLONG __FAR__ *)getUP1(this,16)); } uLONG getSizeLo() { return getU4(this,20); } uLONG setSizeLo(uLONG inLong) { return setU4(this,20,inLong); } uLONG swapSizeLo() { return osdSwap4((uLONG __FAR__ *)getUP1(this,20)); } uCHAR __FAR__ * getName() { return getUP1(this,24); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapOffsetHi(); swapOffsetLo(); swapSizeHi(); swapSizeLo(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR pageCode; uCHAR pageLength; uCHAR segmentIndex; uCHAR segmentCount; uCHAR flags1; uCHAR reserved1; uCHAR reserved2; uCHAR reserved3; uLONG offsetHi; uLONG offsetLo; uLONG sizeHi; uLONG sizeLo; char name[16]; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //dptLAP2segment_S - end //struct - fmtDevPage_S - start //--------------------------------------------------------------------------- // //Description: // // Structure for mode sense/select format device page // //--------------------------------------------------------------------------- #define STRUCT_NAME fmtDevPage_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 22 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uSHORT getTracksZone() { return getU2(this,0); } uSHORT setTracksZone(uSHORT inShort) { return setU2(this,0,inShort); } uSHORT swapTracksZone() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,0)); } uSHORT getAltSectorsZone() { return getU2(this,2); } uSHORT setAltSectorsZone(uSHORT inShort) { return setU2(this,2,inShort); } uSHORT swapAltSectorsZone() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,2)); } uSHORT getAltTracksZone() { return getU2(this,4); } uSHORT setAltTracksZone(uSHORT inShort) { return setU2(this,4,inShort); } uSHORT swapAltTracksZone() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,4)); } uSHORT getAltTracksUnit() { return getU2(this,6); } uSHORT setAltTracksUnit(uSHORT inShort) { return setU2(this,6,inShort); } uSHORT swapAltTracksUnit() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,6)); } uSHORT getSectorsTrack() { return getU2(this,8); } uSHORT setSectorsTrack(uSHORT inShort) { return setU2(this,8,inShort); } uSHORT swapSectorsTrack() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,8)); } uSHORT getBytesSector() { return getU2(this,10); } uSHORT setBytesSector(uSHORT inShort) { return setU2(this,10,inShort); } uSHORT swapBytesSector() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,10)); } uSHORT getInterleave() { return getU2(this,12); } uSHORT setInterleave(uSHORT inShort) { return setU2(this,12,inShort); } uSHORT swapInterleave() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,12)); } uSHORT getTrackSkew() { return getU2(this,14); } uSHORT setTrackSkew(uSHORT inShort) { return setU2(this,14,inShort); } uSHORT swapTrackSkew() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,14)); } uSHORT getCylinderSkew() { return getU2(this,16); } uSHORT setCylinderSkew(uSHORT inShort) { return setU2(this,16,inShort); } uSHORT swapCylinderSkew() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,16)); } uCHAR getFlags() { return getU1(this,18); } uCHAR setFlags(uCHAR inChar) { return setU1(this,18,inChar); } uCHAR __FAR__ * getReserved() { return getUP1(this,19); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTracksZone(); swapAltSectorsZone(); swapAltTracksZone(); swapAltTracksUnit(); swapSectorsTrack(); swapBytesSector(); swapInterleave(); swapTrackSkew(); swapCylinderSkew(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uSHORT tracksZone; // Tracks per Zone uSHORT altSectorsZone; // Alternative sectors per zone uSHORT altTracksZone; // Alternative tracks per zone uSHORT altTracksUnit; // Alternative tracks per logical unit uSHORT sectorsTrack; // Sectors per track uSHORT bytesSector; // Data bytes per physical sector uSHORT interleave; // As specified in format CDB uSHORT trackSkew; // Track skew factor uSHORT cylinderSkew; // Cylinder skew factor uCHAR flags; // Miscellaneous flags uCHAR reserved[3]; // Reserved #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //fmtDevPage_S - end //struct - dptEmulation_S - start //--------------------------------------------------------------------------- // //Description: // // Structure for mode sense/select emulated drive page. // //--------------------------------------------------------------------------- #define STRUCT_NAME dptEmulation_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 16 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uSHORT getCylinders() { return getU2(this,0); } uSHORT setCylinders(uSHORT inShort) { return setU2(this,0,inShort); } uSHORT swapCylinders() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,0)); } uCHAR getHeads() { return getU1(this,2); } uCHAR setHeads(uCHAR inChar) { return setU1(this,2,inChar); } uCHAR getSectors() { return getU1(this,3); } uCHAR setSectors(uCHAR inChar) { return setU1(this,3,inChar); } uCHAR getReserved() { return getU1(this,4); } uCHAR setReserved(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR getStatus() { return getU1(this,5); } uCHAR setStatus(uCHAR inChar) { return setU1(this,5,inChar); } uSHORT getDriveType() { return getU2(this,6); } uSHORT setDriveType(uSHORT inShort) { return setU2(this,6,inShort); } uSHORT swapDriveType() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,6)); } uCHAR __FAR__ * getChanID0_P() { return getUP1(this,8); } uCHAR getChanID0() { return getU1(this,8); } uCHAR setChanID0(uCHAR inChar) { return setU1(this,8,inChar); } uCHAR getLun0() { return getU1(this,9); } uCHAR setLun0(uCHAR inChar) { return setU1(this,9,inChar); } uCHAR getChanID1() { return getU1(this,10); } uCHAR setChanID1(uCHAR inChar) { return setU1(this,10,inChar); } uCHAR getLun1() { return getU1(this,11); } uCHAR setLun1(uCHAR inChar) { return setU1(this,11,inChar); } uCHAR getChanID2() { return getU1(this,12); } uCHAR setChanID2(uCHAR inChar) { return setU1(this,12,inChar); } uCHAR getLun2() { return getU1(this,13); } uCHAR setLun2(uCHAR inChar) { return setU1(this,13,inChar); } uCHAR getChanID3() { return getU1(this,14); } uCHAR setChanID3(uCHAR inChar) { return setU1(this,14,inChar); } uCHAR getLun3() { return getU1(this,15); } uCHAR setLun3(uCHAR inChar) { return setU1(this,15,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapCylinders(); swapDriveType(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uSHORT cylinders; // # cylinders uCHAR heads; // # heads uCHAR sectors; // # sectors uCHAR reserved; // Reserved uCHAR status; // Bit mapped status // Bit 0 = Drive 0 (C:) = LunMap 0 // Bit 1 = Drive 1 (D:) = LunMap 1 // Bit 2 = Drive 2 (E:) = LunMap 2 // Bit 3 = Drive 3 (F:) = LunMap 3 // Bit 4 = Used with mode select // 1 = Add emulation // 0 = Remove emulation uSHORT driveType; // BIOS drive type uCHAR chanID0; // SCSI Channel/ID of emulated drive 0 uCHAR lun0; // SCSI LUN of emulated drive 0 uCHAR chanID1; // SCSI Channel/ID of emulated drive 1 uCHAR lun1; // SCSI LUN of emulated drive 1 uCHAR chanID2; // SCSI Channel/ID of emulated drive 2 uCHAR lun2; // SCSI LUN of emulated drive 2 uCHAR chanID3; // SCSI Channel/ID of emulated drive 3 uCHAR lun3; // SCSI LUN of emulated drive 3 #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //dptEmulation_S - end //struct - dptFlashStatus_S - start //--------------------------------------------------------------------------- // //Description: // // Data structure returned by a flash status command. // //--------------------------------------------------------------------------- //flags1 - bit definitions // 1 = Operational F/W checksum is valid #define FLASH_FLG_FW_CHKSUM 0x80 // 1 = Boot code checksum is valid #define FLASH_FLG_BOOT_CHKSUM 0x40 // 1 = HBA is in flash command mode (operational F/W is not active) #define FLASH_FLG_FLASH_MODE 0x01 //flags2 - bit definitions // 1 = Programming failure due to a timeout condition #define FLASH_FLG_TIMEOUT 0x80 // 1 = Programming failure due to non-0xff prior to programming #define FLASH_FLG_NO_FF 0x40 // 1 = Programming failure due to bad verification #define FLASH_FLG_VERIFY_FAIL 0x20 // 1 = Flash erase failure #define FLASH_FLG_ERASE_FAIL 0x08 // 1 = Invalid chip status #define FLASH_FLG_CHIP_INVALID 0x04 // 1 = Initial checksum calculations failed #define FLASH_FLG_CHECKSUM_FAIL 0x02 // 1 = Invalid flash address or data size specified #define FLASH_FLG_ADDR_INVALID 0x01 #define STRUCT_NAME dptFlashStatus_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 16 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getFlags1() { return getU1(this,0); } # define dptFlashStatus_getFlags1(this) ((dptFlashStatus_S __FAR__ *)(this))->getFlags1() uCHAR setFlags1(uCHAR inChar) { return setU1(this,0,inChar); } # define dptFlashStatus_setFlags1(this,inChar) ((dptFlashStatus_S __FAR__ *)(this))->setFlags1(inChar) void orFlags1(uCHAR inChar) { orU1(this,0,inChar); } # define dptFlashStatus_orFlags1(this,inChar) ((dptFlashStatus_S __FAR__ *)(this))->orFlags1(inChar) void andFlags1(uCHAR inChar) { andU1(this,0,inChar); } # define dptFlashStatus_andFlags1(this,inChar) ((dptFlashStatus_S __FAR__ *)(this))->andFlags1(inChar) // Miscellaneous status flags - see bit definitions above uCHAR getFlags2() { return getU1(this,1); } # define dptFlashStatus_getFlags2(this) ((dptFlashStatus_S __FAR__ *)(this))->getFlags2() uCHAR setFlags2(uCHAR inChar) { return setU1(this,1,inChar); } # define dptFlashStatus_setFlags2(this,inChar) ((dptFlashStatus_S __FAR__ *)(this))->setFlags2(inChar) void orFlags2(uCHAR inChar) { orU1(this,1,inChar); } # define dptFlashStatus_orFlags2(this,inChar) ((dptFlashStatus_S __FAR__ *)(this))->orFlags2(inChar) void andFlags2(uCHAR inChar) { andU1(this,1,inChar); } # define dptFlashStatus_andFlags2(this,inChar) ((dptFlashStatus_S __FAR__ *)(this))->andFlags2(inChar) // Firmware type (210,215...) uSHORT getFWtype() { return getU2(this,2); } # define dptFlashStatus_getFWtype(this) ((dptFlashStatus_S __FAR__ *)(this))->getFWtype() uSHORT setFWtype(uSHORT inShort) { return setU2(this,2,inShort); } # define dptFlashStatus_setFWtype(this,inShort) ((dptFlashStatus_S __FAR__ *)(this))->setFWtype(inShort) uSHORT swapFWtype() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,2)); } // Total size of the physical flash chip (in bytes) uLONG getFlashSize() { return getU4(this,4); } # define dptFlashStatus_getFlashSize(this) ((dptFlashStatus_S __FAR__ *)(this))->getFlashSize() uLONG setFlashSize(uLONG inLong) { return setU4(this,4,inLong); } # define dptFlashStatus_setFlashSize(this,inLong) ((dptFlashStatus_S __FAR__ *)(this))->setFlashSize(inLong) uLONG swapFlashSize() { return osdSwap4((uLONG __FAR__ *)getUP1(this,4)); } // Size of the available flash memory (in bytes) uLONG getBurnSize() { return getU4(this,8); } # define dptFlashStatus_getBurnSize(this) ((dptFlashStatus_S __FAR__ *)(this))->getBurnSize() uLONG setBurnSize(uLONG inLong) { return setU4(this,8,inLong); } # define dptFlashStatus_setBurnSize(this,inLong) ((dptFlashStatus_S __FAR__ *)(this))->setBurnSize(inLong) uLONG swapBurnSize() { return osdSwap4((uLONG __FAR__ *)getUP1(this,8)); } // Approximate time it takes to program the flash (in seconds) uSHORT getProgramTime() { return getU2(this,12); } # define dptFlashStatus_getProgramTime(this) ((dptFlashStatus_S __FAR__ *)(this))->getProgramTime() uSHORT setProgramTime(uSHORT inShort) { return setU2(this,12,inShort); } # define dptFlashStatus_setProgramTime(this,inShort) ((dptFlashStatus_S __FAR__ *)(this))->setProgramTime(inShort) uSHORT swapProgramTime() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,12)); } // Approximate time it takes to erase the flash (in seconds) uSHORT getEraseTime() { return getU2(this,14); } # define dptFlashStatus_getEraseTime(this) ((dptFlashStatus_S __FAR__ *)(this))->getEraseTime() uSHORT setEraseTime(uSHORT inShort) { return setU2(this,14,inShort); } # define dptFlashStatus_setEraseTime(this,inShort) ((dptFlashStatus_S __FAR__ *)(this))->setEraseTime(inShort) uSHORT swapEraseTime() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,14)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapFWtype(); swapFlashSize(); swapBurnSize(); swapProgramTime(); swapEraseTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else // Miscellaneous status flags - see bit definitions above uCHAR flags1; # define dptFlashStatus_getFlags1(this) ((dptFlashStatus_S __FAR__ *)(this))->flags1 # define dptFlashStatus_setFlags1(this,uChar) (((dptFlashStatus_S __FAR__ *)(this))->flags1=(uChar)) # define dptFlashStatus_orFlags1(this,uChar) (((dptFlashStatus_S __FAR__ *)(this))->flags1|=(uChar)) # define dptFlashStatus_andFlags1(this,uChar) (((dptFlashStatus_S __FAR__ *)(this))->flags1&=(uChar)) // Miscellaneous status flags - see bit definitions above uCHAR flags2; # define dptFlashStatus_getFlags2(this) ((dptFlashStatus_S __FAR__ *)(this))->flags2 # define dptFlashStatus_setFlags2(this,uChar) (((dptFlashStatus_S __FAR__ *)(this))->flags2=(uChar)) # define dptFlashStatus_orFlags2(this,uChar) (((dptFlashStatus_S __FAR__ *)(this))->flags2|=(uChar)) # define dptFlashStatus_andFlags2(this,uChar) (((dptFlashStatus_S __FAR__ *)(this))->flags2&=(uChar)) // Firmware type (210,215...) uSHORT fwType; # define dptFlashStatus_getFWtype(this) ((dptFlashStatus_S __FAR__ *)(this))->fwType # define dptFlashStatus_setFWtype(this,uShort) (((dptFlashStatus_S __FAR__ *)(this))->fwType=(uShort)) // Total size of the physical flash chip (in bytes) uLONG flashSize; # define dptFlashStatus_getFlashSize(this) ((dptFlashStatus_S __FAR__ *)(this))->flashSize # define dptFlashStatus_setFlashSize(this,uShort) (((dptFlashStatus_S __FAR__ *)(this))->flashSize=(uShort)) // Size of the available flash memory (in bytes) uLONG burnSize; # define dptFlashStatus_getBurnSize(this) ((dptFlashStatus_S __FAR__ *)(this))->burnSize # define dptFlashStatus_setBurnSize(this,uShort) (((dptFlashStatus_S __FAR__ *)(this))->burnSize=(uShort)) // Approximate time it takes to program the flash (in seconds) uSHORT programTime; # define dptFlashStatus_getProgramTime(this) ((dptFlashStatus_S __FAR__ *)(this))->programTime # define dptFlashStatus_setProgramTime(this,uShort) (((dptFlashStatus_S __FAR__ *)(this))->programTime=(uShort)) // Approximate time it takes to erase the flash (in seconds) uSHORT eraseTime; # define dptFlashStatus_getEraseTime(this) ((dptFlashStatus_S __FAR__ *)(this))->eraseTime # define dptFlashStatus_setEraseTime(this,uShort) (((dptFlashStatus_S __FAR__ *)(this))->eraseTime=(uShort)) #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //dptFlashStatus_S - end //struct - dptScheduleDiag_S - start //--------------------------------------------------------------------------- // //Description: // // Data structure used to schedule a firmware level diagnostic. // //--------------------------------------------------------------------------- //testType - definitions #define DIAG_TST_SCHEDULE 0x0f #define DIAG_TST_STOP 0x10 #define DIAG_TST_PROGRESS 0x11 #define DIAG_TST_EXCLUSION 0x //flags - bit definitions // 1 = The media read or read/write test should be performed // sequentially on all sectors #define DIAG_FLG_ALL_SECTORS 0x40 // 1 = The diagnostic is targeted for a physical device #define DIAG_FLG_PHYSICAL 0x20 #define STRUCT_NAME dptScheduleDiag_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 20 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- // Diagnostic test type - see definitions above uCHAR getTestType() { return getU1(this,0); } uCHAR setTestType(uCHAR inChar) { return setU1(this,0,inChar); } // Miscellaneous status flags - see bit definitions above uCHAR getFlags() { return getU1(this,1); } uCHAR setFlags(uCHAR inChar) { return setU1(this,1,inChar); } void orFlags(uCHAR inChar) { orU1(this,1,inChar); } void andFlags(uCHAR inChar) { andU1(this,1,inChar); } // Maximum error count prior to stopping the diagnostic uSHORT getMaxErrCnt() { return getU2(this,2); } uSHORT setMaxErrCnt(uSHORT inShort) { return setU2(this,2,inShort); } uSHORT swapMaxErrCnt() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,2)); } // Number of test iterations to perform // - If random sectors, iterations = # blocks // - Else, iterations = # test cycles uLONG getIterations() { return getU4(this,4); } uLONG setIterations(uLONG inLong) { return setU4(this,4,inLong); } uLONG swapIterations() { return osdSwap4((uLONG __FAR__ *)getUP1(this,4)); } // Absolute start time (seconds since Jan. 1, 1970) // - If zero, start immediately uLONG getStartTime() { return getU4(this,8); } uLONG setStartTime(uLONG inLong) { return setU4(this,8,inLong); } uLONG swapStartTime() { return osdSwap4((uLONG __FAR__ *)getUP1(this,8)); } // Added to absolute start time to determine next start time // - If zero, the test will execute 1 time only uLONG getRepeatRate() { return getU4(this,12); } uLONG setRepeatRate(uLONG inLong) { return setU4(this,12,inLong); } uLONG swapRepeatRate() { return osdSwap4((uLONG __FAR__ *)getUP1(this,12)); } // Time until the test begins (in minutes) // (Only valid on diagnostic query - read only) uLONG getCountDown() { return getU4(this,16); } uLONG setCountDown(uLONG inLong) { return setU4(this,16,inLong); } uLONG swapCountDown() { return osdSwap4((uLONG __FAR__ *)getUP1(this,16)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapMaxErrCnt(); swapIterations(); swapStartTime(); swapRepeatRate(); swapCountDown(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else // Diagnostic test type - see definitions above uCHAR testType; // Miscellaneous status flags - see bit definitions above uCHAR flags; // Maximum error count prior to stopping the diagnostic uSHORT maxErrCnt; // Number of test iterations to perform // - If random sectors, iterations = # blocks // - Else, iterations = # test cycles uLONG iterations; // Absolute start time (seconds since Jan. 1, 1970) // - If zero, start immediately uLONG startTime; // Added to absolute start time to determine next start time // - If zero, the test will execute 1 time only uLONG repeatRate; // Time until the test begins (in minutes) // (Only valid on diagnostic query - read only) uLONG countDown; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //dptScheduleDiag_S - end //struct - dptDiagProgress_S - start //--------------------------------------------------------------------------- // //Description: // // Data structure used to return the status of a firmware based //diagnostic. // //--------------------------------------------------------------------------- #define STRUCT_NAME dptDiagProgress_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 25 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- // Diagnostic test type - see definitions above uCHAR getTestType() { return getU1(this,0); } uCHAR setTestType(uCHAR inChar) { return setU1(this,0,inChar); } // Miscellaneous status flags - see bit definitions above uCHAR getFlags() { return getU1(this,1); } uCHAR setFlags(uCHAR inChar) { return setU1(this,1,inChar); } void orFlags(uCHAR inChar) { orU1(this,1,inChar); } void andFlags(uCHAR inChar) { andU1(this,1,inChar); } // Maximum error count prior to stopping the diagnostic uSHORT getMaxErrCnt() { return getU2(this,2); } uSHORT setMaxErrCnt(uSHORT inShort) { return setU2(this,2,inShort); } uSHORT swapMaxErrCnt() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,2)); } // Number of test iterations to perform // - If random sectors, iterations = # blocks // - Else, iterations = # test cycles uLONG getIterations() { return getU4(this,4); } uLONG setIterations(uLONG inLong) { return setU4(this,4,inLong); } uLONG swapIterations() { return osdSwap4((uLONG __FAR__ *)getUP1(this,4)); } // Current test iteration number uLONG getCurIteration() { return getU4(this,8); } uLONG setCurIteration(uLONG inLong) { return setU4(this,8,inLong); } uLONG swapCurIteration() { return osdSwap4((uLONG __FAR__ *)getUP1(this,8)); } // Current test error count uLONG getCurNumErrors() { return getU4(this,12); } uLONG setCurNumErrors(uLONG inLong) { return setU4(this,12,inLong); } uLONG swapCurNumErrors() { return osdSwap4((uLONG __FAR__ *)getUP1(this,12)); } // Current block number uLONG getFirstErrBlk() { return getU4(this,16); } uLONG setFirstErrBlk(uLONG inLong) { return setU4(this,16,inLong); } uLONG swapFirstErrBlk() { return osdSwap4((uLONG __FAR__ *)getUP1(this,16)); } // Current block number (last block number completed) uLONG getCurBlock() { return getU4(this,20); } uLONG setCurBlock(uLONG inLong) { return setU4(this,20,inLong); } uLONG swapCurBlock() { return osdSwap4((uLONG __FAR__ *)getUP1(this,20)); } // Percent complete uCHAR getPercent() { return getU1(this,24); } uCHAR setPercent(uCHAR inChar) { return setU1(this,24,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapMaxErrCnt(); swapIterations(); swapCurIteration(); swapCurNumErrors(); swapFirstErrBlk(); swapCurBlock(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else // Diagnostic test type - see definitions above uCHAR testType; // Miscellaneous status flags - see bit definitions above uCHAR flags; // Maximum error count prior to stopping the diagnostic uSHORT maxErrCnt; // Number of test iterations to perform // - If random sectors, iterations = # blocks // - Else, iterations = # test cycles uLONG iterations; // Current test iteration number uLONG curIteration; // Current test error count uLONG curNumErrors; // Current block number uLONG firstErrBlk; // Current block number (last block number completed) uLONG curBlock; // Percent complete uCHAR percent; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //dptDiagProgress_S - end //struct - requestSense_S - start //--------------------------------------------------------------------------- // //Description: // // Defines the standard SCSI request sense structure. // //--------------------------------------------------------------------------- //errorCode - definitions #define RS_VALID 0x80 // Valid bit = SCSI-2 format #define RS_ERR_CURRENT 0x70 // Mandatory #define RS_ERR_DEFERRED 0x71 // Optional #define RS_ERR_VENDOR_UNIQUE 0x7f //senseKey - definitions #define RS_FILEMARK 0x80 // Used with SASD devices #define RS_EOM 0x40 // End or medium (SASD, printers) #define RS_ILI 0x20 // Incorect length #define RS_RESERVED1 0x10 #define RS_SENSE_KEY 0x0f //senseKeySpecific - bit definitions #define RS_SKSV 0x80 // Sense key specific = SCSI-2 format #define STRUCT_NAME requestSense_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 20 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- // Error code - see definitions above uCHAR getErrorCode() { return getU1(this,0); } uCHAR setErrorCode(uCHAR inChar) { return setU1(this,0,inChar); } // Segment # if req sense response to copy, compare, or copy & verify uCHAR getSegmentNum() { return getU1(this,1); } uCHAR setSegmentNum(uCHAR inChar) { return setU1(this,1,inChar); } // Sense key (bits 0-3), flags (bits 4-7) - see bit definitions above uCHAR getSenseKey() { return getU1(this,2); } uCHAR setSenseKey(uCHAR inChar) { return setU1(this,2,inChar); } void orSenseKey(uCHAR inChar) { orU1(this,2,inChar); } void andSenseKey(uCHAR inChar) { andU1(this,2,inChar); } // Command specific information uLONG getInfo() { return getU4(this,3); } uLONG setInfo(uLONG inLong) { return setU4(this,3,inLong); } uLONG swapInfo() { return osdSwap4((uLONG __FAR__ *)getUP1(this,3)); } // Additional sense length uCHAR getAddSenseLen() { return getU1(this,7); } uCHAR setAddSenseLen(uCHAR inChar) { return setU1(this,7,inChar); } // Command specific information uLONG getCmdInfo() { return getU4(this,8); } uLONG setCmdInfo(uLONG inLong) { return setU4(this,8,inLong); } uLONG swapCmdInfo() { return osdSwap4((uLONG __FAR__ *)getUP1(this,8)); } // Additional sense code uCHAR getAddSenseCode() { return getU1(this,12); } uCHAR setAddSenseCode(uCHAR inChar) { return setU1(this,12,inChar); } // Additional sense code qualifier uCHAR getAddSenseCodeQ() { return getU1(this,13); } uCHAR setAddSenseCodeQ(uCHAR inChar) { return setU1(this,13,inChar); } // Find replaceable unit code uCHAR getFindReplaceUnit() { return getU1(this,14); } uCHAR setFindReplaceUnit(uCHAR inChar) { return setU1(this,14,inChar); } // 3 bytes of sense key specific info uCHAR __FAR__ * getSenseKeySpecific() { return getUP1(this,15); } // Additional sense bytes uCHAR __FAR__ * getAddSenseBytes() { return getUP1(this,18); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapInfo(); swapCmdInfo(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else // Error code - see definitions above uCHAR errorCode; // Segment # if req sense response to copy, compare, or copy & verify uCHAR segmentNum; // Sense key (bits 0-3), flags (bits 4-7) - see bit definitions above uCHAR senseKey; // Command specific information uLONG info; // Additional sense length uCHAR addSenseLen; // Command specific information uLONG cmdInfo; // Additional sense code uCHAR addSenseCode; // Additional sense code qualifier uCHAR addSenseCodeQ; // Find replaceable unit code uCHAR findReplaceUnit; // 3 bytes of sense key specific info uCHAR senseKeySpecific[3]; // Additional sense bytes (The length of this field is actually // defined by the AddSenseLen field) uCHAR addSenseBytes[2]; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //requestSense_S - end //struct - dptArrayLimits_S - start //--------------------------------------------------------------------------- // //Description: // // Defines the array limits structure returned by firmware in //log page 0x33 parameter code 0x0e. // //--------------------------------------------------------------------------- #define STRUCT_NAME dptArrayLimits_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 22 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- // Maximum number of arrays supported uCHAR getMaxArrays() { return getU1(this,0); } uCHAR setMaxArrays(uCHAR inChar) { return setU1(this,0,inChar); } // Maximum number of components in a RAID-0 array uCHAR getR0maxComps() { return getU1(this,1); } uCHAR setR0maxComps(uCHAR inChar) { return setU1(this,1,inChar); } // Maximum number of components in a RAID-3 or RAID-5 array uCHAR getR35maxComps() { return getU1(this,2); } uCHAR setR35maxComps(uCHAR inChar) { return setU1(this,2,inChar); } // Reserved for future expansion uCHAR getReserved1() { return getU1(this,3); } uCHAR setReserved1(uCHAR inChar) { return setU1(this,3,inChar); } // Minimum RAID-0 stripe size supported uSHORT getR0minStripe() { return getU2(this,4); } uSHORT setR0minStripe(uSHORT inShort) { return setU2(this,4,inShort); } uSHORT swapR0minStripe() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,4)); } // Maximum RAID-0 stripe size supported uSHORT getR0maxStripe() { return getU2(this,6); } uSHORT setR0maxStripe(uSHORT inShort) { return setU2(this,6,inShort); } uSHORT swapR0maxStripe() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,6)); } // Default RAID-0 stripe size supported uSHORT getR0defStripe() { return getU2(this,8); } uSHORT setR0defStripe(uSHORT inShort) { return setU2(this,8,inShort); } uSHORT swapR0defStripe() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,8)); } // Minimum RAID-3 stripe size supported uSHORT getR3minStripe() { return getU2(this,10); } uSHORT setR3minStripe(uSHORT inShort) { return setU2(this,10,inShort); } uSHORT swapR3minStripe() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,10)); } // Maximum RAID-3 stripe size supported uSHORT getR3maxStripe() { return getU2(this,12); } uSHORT setR3maxStripe(uSHORT inShort) { return setU2(this,12,inShort); } uSHORT swapR3maxStripe() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,12)); } // Default RAID-3 stripe size supported uSHORT getR3defStripe() { return getU2(this,14); } uSHORT setR3defStripe(uSHORT inShort) { return setU2(this,14,inShort); } uSHORT swapR3defStripe() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,14)); } // Minimum RAID-5 stripe size supported uSHORT getR5minStripe() { return getU2(this,16); } uSHORT setR5minStripe(uSHORT inShort) { return setU2(this,16,inShort); } uSHORT swapR5minStripe() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,16)); } // Maximum RAID-5 stripe size supported uSHORT getR5maxStripe() { return getU2(this,18); } uSHORT setR5maxStripe(uSHORT inShort) { return setU2(this,18,inShort); } uSHORT swapR5maxStripe() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,18)); } // Default RAID-5 stripe size supported uSHORT getR5defStripe() { return getU2(this,20); } uSHORT setR5defStripe(uSHORT inShort) { return setU2(this,20,inShort); } uSHORT swapR5defStripe() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,20)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapR0minStripe(); swapR0maxStripe(); swapR0defStripe(); swapR3minStripe(); swapR3maxStripe(); swapR3defStripe(); swapR5minStripe(); swapR5maxStripe(); swapR5defStripe(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else // Maximum number of arrays supported uCHAR maxArrays; // Maximum number of components in a RAID-0 array uCHAR r0maxComps; // Maximum number of components in a RAID-3 or RAID-5 array uCHAR r35maxComps; // Reserved for future expansion uCHAR reserved1; // Minimum RAID-0 stripe size supported uSHORT r0minStripe; // Maximum RAID-0 stripe size supported uSHORT r0maxStripe; // Default RAID-0 stripe size supported uSHORT r0defStripe; // Minimum RAID-3 stripe size supported uSHORT r3minStripe; // Maximum RAID-3 stripe size supported uSHORT r3maxStripe; // Default RAID-3 stripe size supported uSHORT r3defStripe; // Minimum RAID-5 stripe size supported uSHORT r5minStripe; // Maximum RAID-5 stripe size supported uSHORT r5maxStripe; // Default RAID-5 stripe size supported uSHORT r5defStripe; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //dptArrayLimits_S - end // stand-by server types #if 0 // Oh Billy billy billy berule! const uCHAR SERVER_TYPE_NONE = 0; const uCHAR SERVER_TYPE_MONITOR = 1; const uCHAR SERVER_TYPE_ORIGINAL = 2; const uCHAR SERVER_TYPE_BACKUP = 3; const uCHAR SERVER_TYPE_GOOD_SHUTDOWN = 4; const uCHAR SERVER_TYPE_OS_PASS_THRU = 5; const uCHAR SERVER_TYPE_MISSED_BEAT = 6; const uCHAR SERVER_TYPE_GETTING_DEVS = 7; // real server takeover types const uCHAR SERVER_TAKEOVER_ASK = 0; const uCHAR SERVER_TAKEOVER_HOSTILE = 1; const uCHAR SERVER_TAKEOVER_TRADE = 2; // channel redirect bits const uCHAR CHAN_REDIRECT_DISABLE = 0x80; const uCHAR CHAN_REDIRECT_CHANGE = 0x40; const uCHAR CHAN_REDIRECT_MASK = 0x07; // Firmware Feature enable bits const uCHAR FEATURE_JBOD = 0x01; const uCHAR FEATURE_ALARM = 0x02; // soc flags const uCHAR FLG_SOC_ASK_TO_BOOT = 0x01; #else # define SERVER_TYPE_NONE ((const uCHAR)0) # define SERVER_TYPE_MONITOR ((const uCHAR)1) # define SERVER_TYPE_ORIGINAL ((const uCHAR)2) # define SERVER_TYPE_BACKUP ((const uCHAR)3) # define SERVER_TYPE_GOOD_SHUTDOWN ((const uCHAR)4) # define SERVER_TYPE_OS_PASS_THRU ((const uCHAR)5) # define SERVER_TYPE_MISSED_BEAT ((const uCHAR)6) # define SERVER_TYPE_GETTING_DEVS ((const uCHAR)7) // real server takeover types # define SERVER_TAKEOVER_ASK ((const uCHAR)0) # define SERVER_TAKEOVER_HOSTILE ((const uCHAR)1) # define SERVER_TAKEOVER_TRADE ((const uCHAR)2) // channel redirect bits # define CHAN_REDIRECT_DISABLE ((const uCHAR)0x80) # define CHAN_REDIRECT_CHANGE ((const uCHAR)0x40) # define CHAN_REDIRECT_MASK ((const uCHAR)0x07) // Firmware Feature enable bits # define FEATURE_JBOD ((const uCHAR)0x01) # define FEATURE_ALARM ((const uCHAR)0x02) // OEMFlags 3 # define OEM3_DOMINO ((const uCHAR)0x01) # define OEM3_MWI_DIS ((const uCHAR)0x02) # define OEM3_64DAC ((const uCHAR)0x04) # define OEM3_WOLFPACK ((const uCHAR)0x08) # define OEM3_WOLFPACK_FUA ((const uCHAR)0x10) // soc flags # define FLG_SOC_ASK_TO_BOOT ((const uCHAR)0x01) #endif //struct - dptNVRAM_S - start //--------------------------------------------------------------------------- // //Description: // // Defines the array limits structure returned by firmware in //log page 0x33 parameter code 0x0e. // //--------------------------------------------------------------------------- #define STRUCT_NAME dptNVRAM_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 128 // These constants were added because the dptNVRAM_S (which receives its info from firmware) // holds information for channel (or bus) 3 in a different place. These constants reflect the // offsets within the structure that will be used to point to the correct place. ECE 12/19 #define CHAN3IDINFO 25 #define CHAN3XFRRATE 26 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- // the version of the nvram table uCHAR getVersion() { return getU1(this,0); } uCHAR setVersion(uCHAR inChar) { return setU1(this,0,inChar); } // misc flags uCHAR getMiscFlags() { return getU1(this,1); } uCHAR setMiscFlags(uCHAR inChar) { return setU1(this,1,inChar); } void andMiscFlags(uCHAR inChar) { andU1(this,1,inChar); } void orMiscFlags(uCHAR inChar) { orU1(this, 1, inChar); } // oem flags uCHAR getOEMflags() { return getU1(this,2); } uCHAR setOEMflags(uCHAR inChar) { return setU1(this,2,inChar); } void andOEMflags(uCHAR inChar) { andU1(this,2,inChar); } void orOEMflags(uCHAR inChar) { orU1(this,2,inChar); } // irq uCHAR getIRQcontrol() { return getU1(this,3); } uCHAR setIRQcontrol(uCHAR inChar) { return setU1(this,3,inChar); } // bus mastering options uCHAR getBusMasterControl() { return getU1(this,4); } uCHAR setBusMasterControl(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR getBusMasterBurst() { return getU1(this,5); } uCHAR setBusMasterBurst(uCHAR inChar) { return setU1(this,5,inChar); } // base io address uSHORT getIOaddr() { return getU2(this, 6); } uSHORT setIOaddr(uSHORT inShort) { return setU2(this, 6, inShort); } void swapIOaddr() { osdSwap2((uSHORT __FAR__ *)getUP1(this,6)); } // id if the HBA on a channel // The dptNVRAM_S contains information for the fourth channel (chan == 3) // in a non-contiguous area of the structure. Hence the need for the if statements. -- ECE 12/19 uCHAR getChanID(uCHAR chan){ if (chan == 3) return getU1(this, CHAN3IDINFO); else return getU1(this, 8+chan); } uCHAR setChanID(uCHAR chan, uCHAR inChar){ if (chan == 3) return setU1(this,8+chan,CHAN3IDINFO); else return setU1(this,8+chan,inChar); } // scsi transfer rate/channel // The dptNVRAM_S contains information for the fourth channel (chan == 3) // in a non-contiguous area of the structure. Hence the need for the if statement. -- ECE 12/19 uCHAR getXfrRate(uCHAR chan){ if (chan == 3) return getU1(this, CHAN3XFRRATE); else return getU1(this, 11+chan); } uCHAR setXfrRate(uCHAR chan, uCHAR inChar){ if (chan == 3) return setU1(this, CHAN3XFRRATE, inChar); else return setU1(this, 11+chan, inChar); } // caching parameters uCHAR getPercentDirty() { return getU1(this,14); } uCHAR setPercentDirty(uCHAR inChar) { return setU1(this,14,inChar); } uCHAR getLookAhead() { return getU1(this,15); } uCHAR setLookAhead(uCHAR inChar) { return setU1(this,15,inChar); } // spin down delay uCHAR getSpinDown() { return getU1(this,16); } uCHAR setSpinDown(uCHAR inChar) { return setU1(this,16,inChar); } // command queuing uCHAR getCmdQueueDisable() { return getU1(this,17); } uCHAR setCmdQueueDisable(uCHAR inChar) { return setU1(this,17,inChar); } // termpwr disable uCHAR getTERMPWRdisable() { return getU1(this,18); } uCHAR setTERMPWRdisable(uCHAR inChar) { return setU1(this,18,inChar); } // termination disabled uCHAR getTerminationDisable() { return getU1(this,19); } uCHAR setTerminationDisable(uCHAR inChar) { return setU1(this,19,inChar); } // auto termination uCHAR getAutoTermDisable() { return getU1(this,20); } uCHAR setAutoTermDisable(uCHAR inChar) { return setU1(this,20,inChar); } // extern cable detection uCHAR getExtCableDetect() { return getU1(this,21); } uCHAR setExtCableDetect(uCHAR inChar) { return setU1(this,21,inChar); } // Because of swapping resulting from Access Disable, we will need // to access the following in a `confusing' manner. uCHAR getDecFaultDisable() { return getU1(this,23); } uCHAR setDecFaultDisable(uCHAR inChar) { return setU1(this,23,inChar); } uCHAR getSafTeDisable() { return getU1(this,22); } uCHAR setSafTeDisable(uCHAR inChar) { return setU1(this,22,inChar); } uCHAR getSesDisable() { return getU1(this,25); } uCHAR setSesDisable(uCHAR inChar) { return setU1(this,25,inChar); } // LSU update access disable uSHORT getAccessDisable(uCHAR chan) { return getU2(this,22+(2*chan)); } uSHORT setAccessDisable(uCHAR chan, uSHORT inShort) { return setU2(this,22+(2*chan),inShort); } void swapAccessDisable(uCHAR chan) { osdSwap2((uSHORT __FAR__ *)getUP1(this,22+(2*chan))); } // background exclusion period begin uCHAR getExclusionStart() { return getU1(this,28); } uCHAR setExclusionStart(uCHAR inChar) { return setU1(this,28,inChar); } // background exclusion period end uCHAR getExclusionStop() { return getU1(this,29); } uCHAR setExclusionStop(uCHAR inChar) { return setU1(this,29,inChar); } // back ground task busrt size uSHORT getBurstSize() { return getU2(this,30); } uSHORT setBurstSize(uSHORT inShort) { return setU2(this,30,inShort); } void swapBusrtSize() { osdSwap2((uSHORT __FAR__ *)getUP1(this,30)); } // back ground bust freq uCHAR getBurstFreq() { return getU1(this,32); } uCHAR setBurstFreq(uCHAR inChar) { return setU1(this,32,inChar); } // max number of busy's before reset uCHAR getMaxBusy() { return getU1(this,33); } uCHAR setMaxBusy(uCHAR inChar) { return setU1(this,33,inChar); } // write back delay uSHORT getWriteBackDelay() { return getU2(this,34); } uSHORT setWriteBackDelay(uSHORT inShort) { return setU2(this,34,inShort); } void swapWriteBackDelay() { osdSwap2((uSHORT __FAR__ *)getUP1(this,34)); } uCHAR getScanDelay() { return getU1(this,36); } uCHAR setScanDelay(uCHAR inChar) { return setU1(this,36,inChar); } // reserved for FW uCHAR __FAR__ * getReservedFW() { return getUP1(this,37); } uCHAR getChanRedirect(uCHAR chan) { return getU1(this,37+chan); } uCHAR setChanRedirect(uCHAR chan, uCHAR newVal){ return setU1(this,37+chan, newVal); } // scsi high termination diable uCHAR getHighTermDisable() { return getU1(this,40); } uCHAR setHighTermDisable(uCHAR inChar) { return setU1(this,40,inChar); } // scam disable uCHAR getScamDisable() { return getU1(this,41); } uCHAR setScamDisable(uCHAR inChar) { return setU1(this,41,inChar); } // diable wide negotiation uCHAR getWide() { return getU1(this,42); } uCHAR setWide(uCHAR inChar) { return setU1(this,42,inChar); } // high temp uCHAR getHighTemp() { return getU1(this,43); } uCHAR setHighTemp(uCHAR inChar) { return setU1(this,43,inChar); } // very high temp uCHAR getVeryHighTemp() { return getU1(this,44); } uCHAR setVeryHighTemp(uCHAR inChar) { return setU1(this,44,inChar); } // hba rights uCHAR getRights() { return getU1(this,45); } uCHAR setRights(uCHAR inChar) { return setU1(this,45,inChar); } // reserved uCHAR __FAR__ * getReserved() { return getUP1(this,46); } // more smartrom flags uCHAR getOEMflags3() { return getU1(this,48); } uCHAR setOEMflags3(uCHAR inChar) { return setU1(this,48,inChar); } void orOEMflags3(uCHAR inChar) { orU1(this, 48, inChar); } void andOEMflags3(uCHAR inChar) { andU1(this,48,inChar); } // Firmware feature enable flags uCHAR getFeatureEnable() { return getU1(this,49); } uCHAR setFeatureEnable(uCHAR inChar) { return setU1(this,49,inChar); } // selection timeout timeout uCHAR getSelectionTimeout() { return getU1(this,50); } uCHAR setSelectionTimeout(uCHAR inChar) { return setU1(this,50,inChar); } // more oem flags uCHAR getOEMflags2() { return getU1(this,51); } uCHAR setOEMflags2(uCHAR inChar) { return setU1(this,51,inChar); } void andOEMflags2(uCHAR inChar) { andU1(this,51,inChar); } void orOEMflags2(uCHAR inChar) { orU1(this,51,inChar); } // LSU write access diable uSHORT getWriteDisable(uCHAR chan) { return getU2(this,52+(2*chan)); } uSHORT setWriteDisable(uCHAR chan, uSHORT inShort) { return setU2(this,52+(2*chan),inShort); } void swapWriteDisable(uCHAR chan) { osdSwap2((uSHORT __FAR__ *)getUP1(this,52+(2*chan))); } // LSU read access disable uSHORT getReadDisable(uCHAR chan) { return getU2(this,58+(2*chan)); } uSHORT setReadDisable(uCHAR chan, uSHORT inShort) { return setU2(this,58+(2*chan),inShort); } void swapReadDisable(uCHAR chan) { osdSwap2((uSHORT __FAR__ *)getUP1(this,58+(2*chan))); } // smartrom flags uCHAR getSRflags() { return getU1(this,64); } uCHAR setSRflags(uCHAR inChar) { return setU1(this,64,inChar); } void andSRflags(uCHAR inChar) { andU1(this,64,inChar); } void orSRflags(uCHAR inChar) { orU1(this, 64, inChar); } // more smartrom flags uCHAR getSRflags2() { return getU1(this,65); } uCHAR setSRflags2(uCHAR inChar) { return setU1(this,65,inChar); } void andSRflags2(uCHAR inChar) { andU1(this,65,inChar); } void orSRflags2(uCHAR inChar) { orU1(this, 65, inChar); } // reserved for smartrom uCHAR __FAR__ * getSRreserved() { return getUP1(this,71); } // LSU read access disable uSHORT getSOCforceAccess(uCHAR chan) { return getU2(this,72+(2*chan)); } uSHORT setSOCforceAccess(uCHAR chan, uSHORT inShort) { return setU2(this,72+(2*chan),inShort); } void swapSOCforceAccess(uCHAR chan) { osdSwap2((uSHORT __FAR__ *)getUP1(this,72+(2*chan))); } // get the ID of the remote controler on chan X uCHAR getRemoteSOCid(uCHAR chan) { uCHAR rtnVal; uCHAR offset = chan; if (chan) offset--; rtnVal = getU1(this, 78 + offset); if (chan == 0 || chan == 2) rtnVal >>= 4; else rtnVal &= 0x0f; return rtnVal; } uCHAR setRemoteSOCid(uCHAR chan, uCHAR newVal) { uCHAR rtnVal; uCHAR offset = chan; if (chan) offset--; // get the old value rtnVal = getU1(this, 78 + offset); if (chan == 0 || chan == 2) { newVal <<= 4; rtnVal &= 0x0f; } else rtnVal &= 0xf0; rtnVal |= newVal; setU1(this, 78 + offset, rtnVal); return rtnVal; } // get the bits that say there is no remote hba on this channel uCHAR getNoRemoteSOC() { return((uCHAR)(getU1(this, 79) & 0x0f)); } uCHAR setNoRemoteSOC(uCHAR newVal) { uCHAR oldVal = (uCHAR)(getU1(this, 79) & 0xf0); newVal |= oldVal; return setU1(this, 79, newVal); } // reserved for FW uCHAR __FAR__ * getFWreserved() { return getUP1(this,80); } // soc flags uCHAR getSOCflags() { return getU1(this, 97); } uCHAR setSOCflags(uCHAR in) { return setU1(this, 97, in); } uCHAR getServerType() { return getU1(this, 98); } uCHAR setServerType(uCHAR in) { return setU1(this, 98, in); } uLONG getServerID() { return getU4(this, 99); } uLONG setServerID(uLONG in) { return setU4(this, 99, in); } void swapServerID() { osdSwap4((uLONG __FAR__ *)getUP1(this,99)); } // real server takeover types uCHAR getServerTakeover() { return getU1(this,103); } uCHAR setServerTakeover(uCHAR in) { return setU1(this,103,in); } // ascii info uCHAR __FAR__ * getASCII() { return getUP1(this,104); } // serial number uCHAR __FAR__ * getSerialNumber() { return getUP1(this,112); } // check sum uCHAR getCheckSum() { return getU1(this,127); } uCHAR setCheckSum(uCHAR inChar) { return setU1(this,127,inChar); } void computeChecksum() # if (defined(dptNVRAM_computeChecksum)) ; # else { uCHAR cs = 0; uCHAR __FAR__ *p = (uCHAR __FAR__ *)filler; for(int i = 0; i < 127; i++) cs += *p++; setCheckSum(((uCHAR)((~cs & 0xFF) + 1))); } # endif //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapIOaddr(); swapAccessDisable(0); swapAccessDisable(1); swapAccessDisable(2); swapBusrtSize(); swapWriteBackDelay(); swapWriteDisable(0); swapWriteDisable(1); swapWriteDisable(2); swapReadDisable(0); swapReadDisable(1); swapReadDisable(2); swapSOCforceAccess(0); swapSOCforceAccess(1); swapSOCforceAccess(2); swapServerID(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR version; uCHAR miscFlagBits; uCHAR oemFlagBits; uCHAR irqControlByte; uCHAR busMasterControlByte; uCHAR busMasterTransferRate; uSHORT hbaIO; uCHAR hbaID[3]; uCHAR hbaTransfer[3]; uCHAR maxDirty; uCHAR maxLookAhead; uCHAR unused; uCHAR cmdQueueDisable; uCHAR termPowerDisable; uCHAR termDisable; uCHAR autoTermEnable; uCHAR cableDetection; // // This is the old Gen4 array. It has to do with Server On Call. uSHORT scsiIDdisable[3]; // // For Gen5 these values have been re-defined. Since we don't use // these values for Gen4 Storage Manager, it won't hurt to change them // // uCHAR DecFaultDisable; // uCHAR SafTeDisable; // uCHAR SesDisable; // uCHAR hbaID4; // uCHAR hbaTransfer4; // uCHAR unUsed; uCHAR bgExclusionStart; uCHAR bgExclusionEnd; uSHORT bgBurstSize; uCHAR bgBurstFrequency; uCHAR reservedX; uSHORT wbDelay; uCHAR reservedY[4]; uCHAR highByteTermDisable; uCHAR scamDisable; uCHAR wideNegDisable; uCHAR tempHighThreshold; uCHAR tempVeryHighThreshold; uCHAR hbaRights; uCHAR fwReserved[3]; uCHAR fwFeatureEnable; uCHAR fwSelectionTimeout; uCHAR moreOEMFlags; uSHORT lsuWAdisabled[3]; uSHORT lsuRAdisabled[3]; uCHAR sromReserved[6]; uCHAR swReserved[10]; uCHAR fwReserved2[18]; uCHAR serverType; uLONG serverID; uCHAR serverTakeover; uCHAR asciiInfo[8]; uCHAR serialNumber[15]; uCHAR checksum; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //struct - dptHeartbeat_S - start //--------------------------------------------------------------------------- // //Description: // // the structure for the heartbeat used by the standby server // // //--------------------------------------------------------------------------- #define STRUCT_NAME dptHeartbeat_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 164 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR isValid() { return (getU1(this, 0) == 0xbb); } void makeValid() { setU1(this, 0, 0xbb); } // the time of the heartbeat uLONG getTime() { return getU4(this,1); } uLONG setTime(uLONG inLong) { return setU4(this,1,inLong); } void swapTime() { osdSwap4((uLONG __FAR__ *)getUP1(this,1)); } uCHAR getServerType() { return getU1(this,5); } uCHAR setServerType(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR __FAR__ * getServerName() { return getUP1(this,6); } void setServerName(uCHAR __FAR__ * in_P) { strcpy((char __FAR__ *) &filler[6], (char __FAR__ *) in_P); } uLONG getServerOS() { return getU4(this,135); } uLONG setServerOS(uLONG inLong) { return setU4(this,135,inLong); } void swapServerOS() { osdSwap4((uLONG __FAR__ *)getUP1(this,135)); } uCHAR __FAR__ * getServerVersion() { return getUP1(this,139); } void setServerVersion(uCHAR __FAR__ *in_P) { strcpy((char __FAR__ *) &filler[139], (char __FAR__ *) in_P); } uLONG getID() { return getU4(this, 159); } uLONG setID(uLONG in) { return setU4(this, 159, in); } void swapID() { osdSwap4((uLONG __FAR__ *)getUP1(this,159)); } uCHAR getPad() { return getU1(this, 163); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); swapServerOS(); swapID(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR validity; uLONG time; uCHAR serverType; uCHAR serverName[129]; uLONG serverOS; uCHAR serverVersion[20]; uLONG serverID; uCHAR filler; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //struct - dptExpandArrayPage_S - start //--------------------------------------------------------------------------- // //Description: // // mode page 39, expand array // // //--------------------------------------------------------------------------- #define STRUCT_NAME dptExpandArrayPage_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 34 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getRaidType() { return getU1(this,0); } uCHAR setRaidType(uCHAR in) { return setU1(this,0, in); } uCHAR getOptions() { return getU1(this,1); } uCHAR setOptions(uCHAR in) { return setU1(this,1,in); } uCHAR __FAR__ * getReserved() { return getUP1(this,4); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR raidType; uCHAR options; uCHAR reserved[32]; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //struct - dptExpandArrayComps_S - start //--------------------------------------------------------------------------- // //Description: // // the component list for mode page 0x39 // // //--------------------------------------------------------------------------- #define STRUCT_NAME dptExpandArrayComp_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 16 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getChanID() { return getU1(this,0); } uCHAR setChanID(uCHAR inChar) { return setU1(this,0,inChar); } uCHAR getLUN() { return getU1(this,1); } uCHAR setLUN(uCHAR inChar) { return setU1(this,1,inChar); } uCHAR getExtendedId() { return getU1(this,2); } uCHAR setExtendedId(uCHAR inChar) { return setU1(this,2,inChar); } uCHAR getReserved1() { return getU1(this,3); } uCHAR setReserved1(uCHAR inChar) { return setU1(this,3,inChar); } uLONG getMagicNum() { return getU4(this,4); } uLONG setMagicNum(uLONG inLong) { return setU4(this,4,inLong); } void andMagicNum(uLONG inLong) { andU4(this,4,inLong); } uLONG swapMagicNum() { return osdSwap4((uLONG __FAR__ *)getUP1(this,4)); } uCHAR __FAR__ * getReserved2() { return getUP1(this,8); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapMagicNum(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR chanID; uCHAR lun; uCHAR extendedId; uCHAR reserved1; uLONG magicNum; uCHAR reserved[8]; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME // multi initiator actions #define MI_SPINDOWN_DRIVES 0 #define MI_RELEASE_RIGHTS 1 #define MI_ACQUIRE_RIGHTS 2 // multi initiator action flags // hba will do a scsi bus reset at boot #define MI_RESET_AT_BOOT 0x40 // the hba (as target) will negotiate for synchronus transfers #define MI_TARGET_SYNCH_TRANS 0x20 // the hba (as target) will negotiate for wide transfer #define MI_TARGET_WIDE_TRANS 0x10 // the hba is allowed to act in target mode on the scsi bus #define MI_ACT_AS_TARGET 0x08 //struct - dptMultiInitPage_S - start //--------------------------------------------------------------------------- // //Description: // // this is the release/acquire page for multi initiator // // //--------------------------------------------------------------------------- #define STRUCT_NAME dptMultiInitPage_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getAction() { return getU1(this,0); } uCHAR setAction(uCHAR in) { return setU1(this,0, in); } uCHAR getFlags() { return getU1(this,1); } uCHAR setFlags(uCHAR in) { return setU1(this,1, in); } void orFlags(uCHAR in) { orU1(this,1,in); } void andFlags(uCHAR in) { andU1(this,1,in); } uLONG getReserved() { return getU4(this,2); } uLONG setReserved(uLONG in) { return setU4(this,2,in); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR action; uCHAR flags; uLONG reserved; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME // LSU state // A OK! #define MI_LSU_STATE_OPTIMAL 0x00 // drive failed, lsu degraded #define MI_LSU_STATE_DEGRADED 0x01 // rebuild in progress #define MI_LSU_STATE_REBUILD 0x02 // lsu dead, call a taxadermist #define MI_LSU_STATE_DEAD 0x04 // verify in progress #define MI_LSU_STATE_VERIFY 0x0a // initial build #define MI_LSU_STATE_BUILD 0x0b // verify/fix #define MI_LSU_STATE_VFIX 0x1a // verify/stop on error #define MI_LSU_STATE_VSTOP 0x2a // new array, awaiting initial build #define MI_LSU_STATE_AWAITING 0x54 // flags to determine rights for a LSU // this LSU is shared with other HBAs #define MI_RIGHTS_SHARED 0x80 // the HBA will lock the LSU when executing commands that will change data (writes) #define MI_RIGHTS_LOCK_AT_DATA_CHANGE 0x40 // read access to the LSU #define MI_RIGHTS_READ_ACCESS 0x01 // write access to a LSU #define MI_RIGHTS_WRITE_ACCESS 0x02 // able to write to the reserved block #define MI_RIGHTS_UPDATE_RSRVD 0x04 //struct - dptMultiInitList_S - start //--------------------------------------------------------------------------- // //Description: // // the LSU list for the multi initiator page // // //--------------------------------------------------------------------------- #define STRUCT_NAME dptMultiInitList_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 4 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uCHAR getChanID() { return getU1(this,0); } uCHAR setChanID(uCHAR in) { return setU1(this,0,in); } uCHAR getFlags() { return getU1(this,1); } uCHAR setFlags(uCHAR in) { return setU1(this,1,in); } void orFlags(uCHAR in) { orU1(this,1,in); } void andFlags(uCHAR in) { andU1(this,1,in); } uCHAR getStatus() { return getU1(this,2); } uCHAR setStatus(uCHAR in) { return setU1(this,2,in); } uCHAR getExtendedId() { return getU1(this,3); } uCHAR setExtendedId(uCHAR in) { return setU1(this,3,in); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uCHAR chanID; uCHAR flags; uCHAR status; uCHAR extendedId; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //struct - dptMultiInitList_S - start //--------------------------------------------------------------------------- // //Description: // // the LSU list for the multi initiator page // // //--------------------------------------------------------------------------- #define STRUCT_NAME dptHBAenviron_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 48 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- // a value of 0xffffffff means there was no avail. data // temps are in celcius uLONG getCurTemp() { return getU4(this,0); } uLONG setCurTemp(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapCurTemp() { return osdSwap4((uLONG __FAR__ *)getUP1(this,0)); } uLONG getHighTempThresh() { return getU4(this,4); } uLONG setHighTempThresh(uLONG inLong) { return setU4(this,4,inLong); } uLONG swapHighTempThresh() { return osdSwap4((uLONG __FAR__ *)getUP1(this,4)); } uLONG getVeryHighTempThresh() { return getU4(this,8); } uLONG setVeryHighTempThresh(uLONG inLong) { return setU4(this,8,inLong); } uLONG swapVeryHighTempThresh() { return osdSwap4((uLONG __FAR__ *)getUP1(this,8)); } uLONG getCurVolt() { return getU4(this,12); } uLONG setCurVolt(uLONG inLong) { return setU4(this,12,inLong); } uLONG swapCurVolt() { return osdSwap4((uLONG __FAR__ *)getUP1(this,12)); } uLONG getHighTempCount() { return getU4(this,16); } uLONG setHighTempCount(uLONG inLong) { return setU4(this,16,inLong); } uLONG swapHighTempCount() { return osdSwap4((uLONG __FAR__ *)getUP1(this,16)); } uLONG getHighTempLast() { return getU4(this,20); } uLONG setHighTempLast(uLONG inLong) { return setU4(this,20,inLong); } uLONG swapHighTempLast() { return osdSwap4((uLONG __FAR__ *)getUP1(this,20)); } uLONG getVeryHighTempCount() { return getU4(this,24); } uLONG setVeryHighTempCount(uLONG inLong) { return setU4(this,24,inLong); } uLONG swapVeryHighTempCount() { return osdSwap4((uLONG __FAR__ *)getUP1(this,24)); } uLONG getVeryHighTempLast() { return getU4(this,28); } uLONG setVeryHighTempLast(uLONG inLong) { return setU4(this,28,inLong); } uLONG swapVeryHighTempLast() { return osdSwap4((uLONG __FAR__ *)getUP1(this,28)); } uLONG getLowVoltCount() { return getU4(this,32); } uLONG setLowVoltCount(uLONG inLong) { return setU4(this,32,inLong); } uLONG swapLowVoltCount() { return osdSwap4((uLONG __FAR__ *)getUP1(this,32)); } uLONG getLowVoltLast() { return getU4(this,36); } uLONG setLowVoltLast(uLONG inLong) { return setU4(this,36,inLong); } uLONG swapLowVoltLast() { return osdSwap4((uLONG __FAR__ *)getUP1(this,36)); } uLONG getHightVoltCount() { return getU4(this,40); } uLONG setHightVoltCount(uLONG inLong) { return setU4(this,40,inLong); } uLONG swapHightVoltCount() { return osdSwap4((uLONG __FAR__ *)getUP1(this,40)); } uLONG getHightVoltLast() { return getU4(this,44); } uLONG setHightVoltLast(uLONG inLong) { return setU4(this,44,inLong); } uLONG swapHightVoltLast() { return osdSwap4((uLONG __FAR__ *)getUP1(this,44)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapCurTemp(); swapHighTempThresh(); swapVeryHighTempThresh(); swapCurVolt(); swapHighTempCount(); swapHighTempLast(); swapVeryHighTempCount(); swapVeryHighTempLast(); swapLowVoltCount(); swapLowVoltLast(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG curTemp; uLONG highTempThresh; uLONG veryHighTempThresh; uLONG curVolt; uLONG highTempCount; uLONG highTempLast; uLONG veryHighTempCount; uLONG veryHighTempLast; uLONG lowVoltCount; uLONG lowVoltLast; uLONG highVoltCount; uLONG highVoltLast; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //struct - dptBatteryModePage_S - start //--------------------------------------------------------------------------- //Description: // This structure defines the battery information returned by //firmware in mode page 0x3C. //--------------------------------------------------------------------------- // Flags - bit definitions #define BATTERY_FORCED_WRITE_THROUGH 0x0001 #define STRUCT_NAME dptBatteryModePage_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 88 ///----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- // Status uSHORT getStatus() { return getU2(this,0); } uSHORT setStatus(uSHORT inShort) { return setU2(this,0,inShort); } uSHORT swapStatus() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,0)); } // Current (millamps) uSHORT getCurrent() { return getU2(this,2); } uSHORT setCurrent(uSHORT inShort) { return setU2(this,2,inShort); } uSHORT swapCurrent() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,2)); } // Voltage (millivolts) uSHORT getVoltage() { return getU2(this,4); } uSHORT setVoltage(uSHORT inShort) { return setU2(this,4,inShort); } uSHORT swapVoltage() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,4)); } // Design capacity (milliamp-hours) uSHORT getDesignCapacity() { return getU2(this,6); } uSHORT setDesignCapacity(uSHORT inShort) { return setU2(this,6,inShort); } uSHORT swapDesignCapacity() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,6)); } // Full charge capacity (milliamp-hours) uSHORT getFullChargeCapacity() { return getU2(this,8); } uSHORT setFullChargeCapacity(uSHORT inShort) { return setU2(this,8,inShort); } uSHORT swapFullChargeCapacity() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,8)); } // Remaining capacity (milliamp-hours) uSHORT getRemainingCapacity() { return getU2(this,10); } uSHORT setRemainingCapacity(uSHORT inShort) { return setU2(this,10,inShort); } uSHORT swapRemainingCapacity() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,10)); } // Remaining time (minutes) // - This value is a function of current draw or estimated current draw uSHORT getRemainingTime() { return getU2(this,12); } uSHORT setRemainingTime(uSHORT inShort) { return setU2(this,12,inShort); } uSHORT swapRemainingTime() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,12)); } // Temperature (degrees celcius) uSHORT getTemperature() { return getU2(this,14); } uSHORT setTemperature(uSHORT inShort) { return setU2(this,14,inShort); } uSHORT swapTemperature() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,14)); } // Maintenance cycle count (# of times a maintenance calibration has been performed) // - Resets with every Initial Calibration command uSHORT getMaintenanceCycleCount() { return getU2(this,16); } uSHORT setMaintenanceCycleCount(uSHORT inShort) { return setU2(this,16,inShort); } uSHORT swapMaintenanceCycleCount() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,16)); } // Hardware design version uSHORT getHwDesignVersion() { return getU2(this,18); } uSHORT setHwDesignVersion(uSHORT inShort) { return setU2(this,18,inShort); } uSHORT swapHwDesignVersion() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,18)); } // Manufacture Date // Bits 0-4 = Day of month (1-31) // Bits 5-8 = Month (1-12) // Bits 9-15 = Year (biased by 1980) uSHORT getManufactureDate() { return getU2(this,20); } uSHORT setManufactureDate(uSHORT inShort) { return setU2(this,20,inShort); } uSHORT swapManufactureDate() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,20)); } //------------------------- // Tunable Threshold Values //------------------------- // Auto write through threshold (minutes remaining) // - Determines when the controller goes into write-through mode uSHORT getWriteThruThreshold() { return getU2(this,22); } uSHORT setWriteThruThreshold(uSHORT inShort) { return setU2(this,22,inShort); } uSHORT swapWriteThruThreshold() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,22)); } // Predictive failure threshold (minutes remaining) uSHORT getPredictiveFailureThreshold() { return getU2(this,24); } uSHORT setPredictiveFailureThreshold(uSHORT inShort) { return setU2(this,24,inShort); } uSHORT swapPredictiveFailureThreshold() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,24)); } // Flags - see bit definitions above uCHAR getFlags() { return getU1(this,26); } uCHAR setFlags(uCHAR in) { return setU1(this,26,in); } void orFlags(uCHAR in) { orU1(this,26,in); } void andFlags(uCHAR in) { andU1(this,26,in); } // reserved uCHAR getReserve1() { return getU1(this,27); } uCHAR setReserve1(uCHAR in) { return setU1(this,27,in); } void orReserve1(uCHAR in) { orU1(this,27,in); } void andReserve1(uCHAR in) { andU1(this,27,in); } // Threshold enable flags - see bit definitions above uSHORT getThresholdEnable() { return getU2(this,28); } uSHORT setThresholdEnable(uSHORT inShort) { return setU2(this,28,inShort); } uSHORT swapThresholdEnable() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,28)); } // Reserved - for long-word alignment uSHORT getMaxRemainingTime() { return getU2(this,30); } uSHORT setMaxRemainingTime(uSHORT inShort) { return setU2(this,30,inShort); } uSHORT swapMaxRemainingTime() { return osdSwap2((uSHORT __FAR__ *)getUP1(this,30)); } //------------------ // Calibration Dates //------------------ // Date of last maintenance calibration (seconds since midnight Jan. 1, 1970 UMT - 'C' time()) uLONG getMaintenanceDate() { return getU4(this,32); } uLONG setMaintenanceDate(uLONG inLong) { return setU4(this,32,inLong); } uLONG swapMaintenanceDate() { return osdSwap4((uLONG __FAR__ *)getUP1(this,32)); } // Date of last initial calibration (seconds since midnight Jan. 1, 1970 UMT - 'C' time()) uLONG getInitialCalibrationDate() { return getU4(this,36); } uLONG setInitialCalibrationDate(uLONG inLong) { return setU4(this,36,inLong); } uLONG swapInitialCalibrationDate() { return osdSwap4((uLONG __FAR__ *)getUP1(this,36)); } //------------- // ASCII fields //------------- char __FAR__ * getDeviceChemistry() { return getSP1(this,40); } char __FAR__ * getManufacturerName() { return getSP1(this,56); } char __FAR__ * getDeviceName() { return getSP1(this,72); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapStatus(); swapCurrent(); swapVoltage(); swapDesignCapacity(); swapFullChargeCapacity(); swapRemainingCapacity(); swapRemainingTime(); swapTemperature(); swapMaintenanceCycleCount(); swapHwDesignVersion(); swapManufactureDate(); swapWriteThruThreshold(); swapPredictiveFailureThreshold(); swapThresholdEnable(); swapMaxRemainingTime(); swapMaintenanceDate(); swapInitialCalibrationDate(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uSHORT status; uSHORT current; uSHORT voltage; uSHORT designCapacity; uSHORT fullChargeCapacity; uSHORT remainingCapacity; uSHORT remainingTime; uSHORT temperature; uSHORT maintenanceCycleCount; uSHORT hwDesignVersion; uSHORT manufactureDate; uSHORT writeThruThreshold; uSHORT predictiveFailureThreshold; uSHORT normalThreshold; uSHORT thresholdEnable; uSHORT maxRemainingTime; uLONG maintenanceDate; uLONG initialCalibrationDate; char deviceChemistry[16]; char manufacturerName[16]; char deviceName[16]; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //dptBatteryModePage_S - end //struct - driveSizeTable_S - start //--------------------------------------------------------------------------- //Description: // This structure defines the drive size table structure. This //structure is used to group drives into capacity ranges. // //***Note: This structure has a variable size. The base size of 8 //does not include the limit entry array. //--------------------------------------------------------------------------- #define STRUCT_NAME driveSizeTable_S #ifdef __cplusplus struct STRUCT_NAME { #elif (defined(_DPT_ACTIVE_ALIGNMENT)) # define driveSizeTable_size 8 typedef unsigned char driveSizeTable_S[driveSizeTable_size]; #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[8]; //----------------- // Access Functions //----------------- // Maximum number of entries supported uLONG getMaxEntries() { return getU4(this,0); } uLONG setMaxEntries(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapMaxEntries() { return osdSwap4((uLONG __FAR__ *)getUP1(this,0)); } // Maximum number of entries supported uLONG getNumEntries() { return getU4(this,4); } uLONG setNumEntries(uLONG inLong) { return setU4(this,4,inLong); } uLONG swapNumEntries() { return osdSwap4((uLONG __FAR__ *)getUP1(this,4)); } // Maximum number of entries supported uLONG getEntry(uLONG index) { return getU4(this,8+(index<<2)); } uLONG setEntry(uLONG index, uLONG inLong) { return setU4(this,8+(index<<2),inLong); } uLONG swapEntry(uLONG index) { return osdSwap4((uLONG __FAR__ *)getUP1(this,8+(index<<2))); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { osdBzero(this,STRUCT_SIZE); } STRUCT_NAME __FAR__ *next() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } STRUCT_NAME __FAR__ *prev() { return ((STRUCT_NAME __FAR__ *)(((uCHAR __FAR__ *)this)+STRUCT_SIZE)); } void swapToBigEndian(); void swapFromBigEndian(); #undef STRUCT_SIZE #elif (defined (_DPT_ACTIVE_ALIGNMENT)) /* Mark's 'C' macros would go here */ #else uLONG maxEntries; uLONG numEntries; uLONG entry[1]; #endif #ifdef __cplusplus }; #elif (!defined(_DPT_ACTIVE_ALIGNMENT)) } STRUCT_NAME; #endif #undef STRUCT_NAME //driveSizeTable_S - end #ifndef NO_UNPACK #if defined (_DPT_AIX) #pragma options align=reset #elif defined (UNPACK_FOUR) #pragma pack(4) #else #pragma pack() #endif // aix #endif // no_unpack #endif // __DPT_SCSI_H raidutils-0.0.6.orig/include/dptalign.h0000664000175000000620000006531410044153305017742 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPTALIGN_HPP #define __DPTALIGN_HPP //File - DPTALIGN.HPP //*************************************************************************** // //Description: // // This file contains the class definitions to implement active //alignment/endian data structures. // //Author: Doug Anderson //Date: 5/3/95 // //Notes: //------ // 1. AAE = Active Alignment and Endian // //*************************************************************************** //------------- //Include Files //------------- #include "mem.h" #include "osd_util.h" #ifndef __FAR__ # ifdef __BORLANDC__ # define __FAR__ far # else # define __FAR__ # endif #endif /* * Description: Support macros for active alignment * Requires: * osdLocal2(x) * osdLocal4(x) */ #if (!defined(osdLocal2)) /* * Name: osdLocal2(pointer) * Description: Local byte order to Big Endian Format for short words. * Could be replaced with an OS defined localization routine, macro or * inline. */ # if (defined(_DPT_BIG_ENDIAN)) # if (defined(_DPT_STRICT_ALIGN)) # define osdLocal2(x) ((unsigned short)(((unsigned char __FAR__*)(x))[1]) \ + (((unsigned short)(((unsigned char __FAR__*)(x))[0])) << 8)) # else # define osdLocal2(x) (*((unsigned short __FAR__ *)(x))) # endif # define osdSLocal2(x) ((unsigned short)(((unsigned char __FAR__ *)(x))[0])\ + (((unsigned short)(((unsigned char __FAR__*)(x))[1])) << 8)) # else # if (defined(_DPT_STRICT_ALIGN)) # define osdSLocal2(x) ((unsigned short)(((unsigned char __FAR__ *)(x))[0])\ + (((unsigned short)(((unsigned char __FAR__*)(x))[1])) << 8)) # else # define osdSLocal2(x) (*((unsigned short __FAR__ *)(x))) # endif # define osdLocal2(x) ((unsigned short)(((unsigned char __FAR__*)(x))[1]) \ + (((unsigned short)(((unsigned char __FAR__*)(x))[0])) << 8)) # endif #endif #if (!defined(osdLocal3)) /* * Name: osdLocal3(pointer) * Description: Local byte order to Big Endian Format for long words. * Could be replaced with an OS defined localization routine, macro or * inline. */ # if (defined(_DPT_BIG_ENDIAN)) # if (defined(_DPT_STRICT_ALIGN)) # define osdLocal3(x) ((unsigned long)osdLocal2(((unsigned char __FAR__ *) \ (x)+1)) + (((unsigned long)(((unsigned char __FAR__ *)(x))[0])) << 16)) # else # define osdLocal3(x) (*((unsigned long __FAR__ *)(x))) # endif # else # define osdLocal3(x) ((unsigned long)osdLocal2(((unsigned char __FAR__ *) \ (x)+1)) + (((unsigned long)(((unsigned char __FAR__ *)(x))[0])) << 16)) # endif #endif #if (!defined(osdLocal4)) /* * Name: osdLocal4(pointer) * Description: Local byte order to Big Endian Format for long words. * Could be replaced with an OS defined localization routine, macro or * inline. */ # if (defined(_DPT_BIG_ENDIAN)) # if (defined(_DPT_STRICT_ALIGN)) # define osdLocal4(x) ((unsigned long)osdLocal2(((unsigned char __FAR__ *)\ (x)+2)) + (((unsigned long)((unsigned char __FAR__ *)(x))[1]) << 16) \ + (((unsigned long)((unsigned char __FAR__ *)(x))[0]) << 24)) # else # define osdLocal4(x) (*(unsigned long __FAR__ *)(x)) # endif # define osdSLocal4(x) ((unsigned long)osdSLocal2(((unsigned char __FAR__ *)\ (x)+0)) + (((unsigned long)((unsigned char __FAR__ *)(x))[2]) << 16) \ + (((unsigned long)((unsigned char __FAR__ *)(x))[3]) << 24)) # else # if (defined(_DPT_STRICT_ALIGN)) # define osdSLocal4(x) ((unsigned long)osdSLocal2(((unsigned char __FAR__ *)\ (x)+0)) + (((unsigned long)((unsigned char __FAR__ *)(x))[2]) << 16) \ + (((unsigned long)((unsigned char __FAR__ *)(x))[3]) << 24)) # else # define osdSLocal4(x) (*(unsigned long __FAR__ *)(x)) # endif # define osdLocal4(x) ((unsigned long)osdLocal2(((unsigned char __FAR__ *) \ (x)+2)) + (((unsigned long)((unsigned char __FAR__ *)(x))[1]) << 16) \ + (((unsigned long)((unsigned char __FAR__ *)(x))[0]) << 24)) # endif #endif //-------------------- // Function Prototypes //-------------------- #ifdef __cplusplus extern "C" { #endif #if (defined(MINIMAL_BUILD)) # if (!defined(_DPT_ARC)) extern uSHORT _osdSwap2(uSHORT); extern uLONG _osdSwap3(uLONG); extern uLONG _osdSwap4(uLONG); # define osdSwap2(addr) (*((uSHORT *)(addr))=_osdSwap2(*((uSHORT *)(addr)))) # define osdSwap3(addr) { uLONG val=_osdSwap3(*((uLONG *)(addr))); dptSetV3(addr,0,val); } # define osdSwap4(addr) (*((uLONG *)(addr))=_osdSwap4(*((uLONG *)(addr)))) # endif # if (defined(_DPT_STRICT_ALIGN)) # if (defined(_DPT_BIG_ENDIAN)) # define dptGetV2(in_P,byteOffset)\ ((uSHORT)(*(((uCHAR *)(in_P))+(byteOffset)+1)\ |(((uSHORT)*(((uCHAR *)(in_P))+(byteOffset)))<<8))) # define dptSetV2(in_P,byteOffset,newValue) (\ *(((uCHAR *)(in_P))+(byteOffset)+1) = (uCHAR)(newValue),\ *(((uCHAR *)(in_P))+(byteOffset)) = (uCHAR)((newValue) >> 8),\ (newValue)) # define dptOrV2(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)+1) |= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)) |= (uCHAR)((newValue) >> 8) # define dptAndV2(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)+1) &= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)) &= (uCHAR)((newValue) >> 8) # define dptXorV2(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)+1) ^= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)) ^= (uCHAR)((newValue) >> 8) # define dptGetV3(in_P,byteOffset)\ ((uLONG)(((uSHORT)(*(((uCHAR *)(in_P))+(byteOffset)+2)\ |(((uSHORT)*(((uCHAR *)(in_P))+(byteOffset)+1))<<8)))) |(((uLONG)*(((uCHAR *)(in_P))+(byteOffset)))<<16)) # define dptGetV4(in_P,byteOffset)\ ((uLONG)((uSHORT)(*(((uCHAR *)(in_P))+(byteOffset)+3)\ |(((uSHORT)*(((uCHAR *)(in_P))+(byteOffset)+2))<<8)))\ |(((uLONG)((uSHORT)(*(((uCHAR *)(in_P))+(byteOffset)+1)\ |(((uSHORT)*(((uCHAR *)(in_P))+(byteOffset)))<<8))))<<16L)) # define dptSetV4(in_P,byteOffset,newValue) (\ *(((uCHAR *)(in_P))+(byteOffset)+3) = (uCHAR)(newValue),\ *(((uCHAR *)(in_P))+(byteOffset)+2) = (uCHAR)((newValue) >> 8),\ *(((uCHAR *)(in_P))+(byteOffset)+1) = (uCHAR)((newValue) >> 16),\ *(((uCHAR *)(in_P))+(byteOffset)) = (uCHAR)((newValue) >> 24),\ (newValue)) # define dptOrV4(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)+3) |= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+2) |= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)+1) |= (uCHAR)((newValue) >> 16);\ *(((uCHAR *)(in_P))+(byteOffset)) |= (uCHAR)((newValue) >> 24) # define dptAndV4(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)+3) &= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+2) &= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)+1) &= (uCHAR)((newValue) >> 16);\ *(((uCHAR *)(in_P))+(byteOffset)) &= (uCHAR)((newValue) >> 24) # define dptXorV4(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)+3) ^= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+2) ^= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)+1) ^= (uCHAR)((newValue) >> 16);\ *(((uCHAR *)(in_P))+(byteOffset)) ^= (uCHAR)((newValue) >> 24) # else # define dptGetV2(in_P,byteOffset)\ ((uSHORT)(*(((uCHAR *)(in_P))+(byteOffset))\ |(((uSHORT)*(((uCHAR *)(in_P))+(byteOffset)+1))<<8))) # define dptSetV2(in_P,byteOffset,newValue) (\ *(((uCHAR *)(in_P))+(byteOffset)) = (uCHAR)(newValue),\ *(((uCHAR *)(in_P))+(byteOffset)+1) = (uCHAR)((newValue) >> 8),\ (newValue)) # define dptOrV2(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)) |= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) |= (uCHAR)((newValue) >> 8) # define dptAndV2(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)) &= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) &= (uCHAR)((newValue) >> 8) # define dptXorV2(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)) ^= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) ^= (uCHAR)((newValue) >> 8) # define dptGetV3(in_P,byteOffset)\ (((uLONG)((uSHORT)(*(((uCHAR *)(in_P))+(byteOffset))\ |(((uSHORT)*(((uCHAR *)(in_P))+(byteOffset)+1))<<8))))\ |(((uLONG)*(((uCHAR *)(in_P))+(byteOffset)+2))<<16)) # define dptGetV4(in_P,byteOffset)\ ((uLONG)((uSHORT)(*(((uCHAR *)(in_P))+(byteOffset))\ |(((uSHORT)*(((uCHAR *)(in_P))+(byteOffset)+1))<<8)))\ |(((uLONG)((uSHORT)(*(((uCHAR *)(in_P))+(byteOffset)+2)\ |(((uSHORT)*(((uCHAR *)(in_P))+(byteOffset)+3))<<8))))<<16L)) # define dptSetV4(in_P,byteOffset,newValue) (\ *(((uCHAR *)(in_P))+(byteOffset)) = (uCHAR)(newValue),\ *(((uCHAR *)(in_P))+(byteOffset)+1) = (uCHAR)((newValue) >> 8),\ *(((uCHAR *)(in_P))+(byteOffset)+2) = (uCHAR)((newValue) >> 16),\ *(((uCHAR *)(in_P))+(byteOffset)+3) = (uCHAR)((newValue) >> 24),\ (newValue)) # define dptOrV4(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)) |= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) |= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)+2) |= (uCHAR)((newValue) >> 16);\ *(((uCHAR *)(in_P))+(byteOffset)+3) |= (uCHAR)((newValue) >> 24) # define dptAndV4(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)) &= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) &= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)+2) &= (uCHAR)((newValue) >> 16);\ *(((uCHAR *)(in_P))+(byteOffset)+3) &= (uCHAR)((newValue) >> 24) # define dptXorV4(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)) ^= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) ^= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)+2) ^= (uCHAR)((newValue) >> 16);\ *(((uCHAR *)(in_P))+(byteOffset)+3) ^= (uCHAR)((newValue) >> 24) # endif # else /* !_DPT_STRICT_ALIGN */ # define dptGetV2(in_P,byteOffset)\ *((uSHORT *)(((uCHAR *)(in_P))+(byteOffset))) # define dptSetV2(in_P,byteOffset,newValue)\ (dptGetV2(in_P,byteOffset) = (uSHORT)(newValue)) # define dptOrV2(in_P,byteOffset,newValue)\ (void)(dptGetV2(in_P,byteOffset) |= (uSHORT)(newValue)) # define dptAndV2(in_P,byteOffset,newValue)\ (void)(dptGetV2(in_P,byteOffset) &= (uSHORT)(newValue)) # define dptXorV2(in_P,byteOffset,newValue)\ (void)(dptGetV2(in_P,byteOffset) ^= (uSHORT)(newValue)) # define dptGetV3(in_P,byteOffset)\ (*((uLONG *)(((uCHAR *)(in_P))+(byteOffset)))&0x00FFFFFFL) # define dptGetV4(in_P,byteOffset)\ (*((uLONG *)(((uCHAR *)(in_P))+(byteOffset)))) # define dptSetV4(in_P,byteOffset,newValue)\ (dptGetV4(in_P,byteOffset) = (uLONG)(newValue)) # define dptOrV4(in_P,byteOffset,newValue)\ (void)(dptGetV4(in_P,byteOffset) |= (uLONG)(newValue)) # define dptAndV4(in_P,byteOffset,newValue)\ (void)(dptGetV4(in_P,byteOffset) &= (uLONG)(newValue)) # define dptXorV4(in_P,byteOffset,newValue)\ (void)(dptGetV4(in_P,byteOffset) ^= (uLONG)(newValue)) # endif /* !_DPT_STRICT_ALIGN */ # ifdef _DPT_BIG_ENDIAN # define dptSetV3(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)+2) = (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) = (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)) = (uCHAR)((newValue) >> 16) # define dptOrV3(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)+2) |= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) |= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)) |= (uCHAR)((newValue) >> 16) # define dptAndV3(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)+2) &= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) &= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)) &= (uCHAR)((newValue) >> 16) # define dptXorV3(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)+2) ^= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) ^= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)) ^= (uCHAR)((newValue) >> 16) # else /* !_DPT_BIG_ENDIAN */ # define dptSetV3(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)) = (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) = (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)+2) = (uCHAR)((newValue) >> 16) # define dptOrV3(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)) |= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) |= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)+2) |= (uCHAR)((newValue) >> 16) # define dptAndV3(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)) &= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) &= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)+2) &= (uCHAR)((newValue) >> 16) # define dptXorV3(in_P,byteOffset,newValue)\ *(((uCHAR *)(in_P))+(byteOffset)) ^= (uCHAR)(newValue);\ *(((uCHAR *)(in_P))+(byteOffset)+1) ^= (uCHAR)((newValue) >> 8);\ *(((uCHAR *)(in_P))+(byteOffset)+2) ^= (uCHAR)((newValue) >> 16) # endif #endif /* MINIMAL_BUILD */ #if (!defined(dptGetV2)) uLONG dptGetV2(void __FAR__ *,uLONG); #endif #if (!defined(dptSetV2)) uLONG dptSetV2(void __FAR__ *,uLONG,uLONG); #endif #if (!defined(dptOrV2)) void dptOrV2(void __FAR__ *,uLONG,uLONG); #endif #if (!defined(dptAndV2)) void dptAndV2(void __FAR__ *,uLONG,uLONG); #endif #if (!defined(dptXorV2)) void dptXorV2(void __FAR__ *,uLONG,uLONG); #endif #if (!defined(dptGetV3)) uLONG dptGetV3(void __FAR__ *,uLONG); #endif #if (!defined(dptSetV3)) uLONG dptSetV3(void __FAR__ *,uLONG,uLONG); #endif #if (!defined(dptOrV3)) void dptOrV3(void __FAR__ *,uLONG,uLONG); #endif #if (!defined(dptAndV3)) void dptAndV3(void __FAR__ *,uLONG,uLONG); #endif #if (!defined(dptXorV3)) void dptXorV3(void __FAR__ *,uLONG,uLONG); #endif #if (!defined(dptGetV4)) uLONG dptGetV4(void __FAR__ *,uLONG); #endif #if (!defined(dptSetV4)) uLONG dptSetV4(void __FAR__ *,uLONG,uLONG); #endif #if (!defined(dptOrV4)) void dptOrV4(void __FAR__ *,uLONG,uLONG); #endif #if (!defined(dptAndV4)) void dptAndV4(void __FAR__ *,uLONG,uLONG); #endif #if (!defined(dptXorV4)) void dptXorV4(void __FAR__ *,uLONG,uLONG); #endif #ifdef __cplusplus }; #endif //------------------- // Macros Definitions //------------------- // Get/Set/Or/And/Xor a signed char at the specified offset #define getS1(in_P,byteOffset) *(((char __FAR__ *)(in_P))+(byteOffset)) #define setS1(in_P,byteOffset,newValue) \ (*(((char __FAR__ *)(in_P))+(byteOffset)) = (char)(newValue)) #define orS1(in_P,byteOffset,newValue) \ (*(((char __FAR__ *)(in_P))+(byteOffset)) |= (char)(newValue)) #define andS1(in_P,byteOffset,newValue) \ (*(((char __FAR__ *)(in_P))+(byteOffset)) &= (char)(newValue)) #define xorS1(in_P,byteOffset,newValue) \ (*(((char __FAR__ *)(in_P))+(byteOffset)) ^= (char)(newValue)) // Get/Set/Or/And/Xor an unsigned char at the specified offset #define getU1(in_P,byteOffset) *(((unsigned char __FAR__ *)(in_P))+(byteOffset)) #define setU1(in_P,byteOffset,newValue) \ (*(((unsigned char __FAR__ *)(in_P))+(byteOffset)) = (unsigned char)(newValue)) #define orU1(in_P,byteOffset,newValue) \ (*(((unsigned char __FAR__ *)(in_P))+(byteOffset)) |= (unsigned char)(newValue)) #define andU1(in_P,byteOffset,newValue) \ (*(((unsigned char __FAR__ *)(in_P))+(byteOffset)) &= (unsigned char)(newValue)) #define xorU1(in_P,byteOffset,newValue) \ (*(((unsigned char __FAR__ *)(in_P))+(byteOffset)) ^= (unsigned char)(newValue)) // Return a signed char pointer to the specified offset #define getSP1(in_P,byteOffset) (((char __FAR__ *)(in_P))+byteOffset) // Return an unsigned char pointer to the specified offset #define getUP1(in_P,byteOffset) (((unsigned char __FAR__ *)(in_P))+byteOffset) // Get/Set/Or/And/Xor an unsigned char at the specified offset // These macros properly typecast the return values from the // 2 byte get and set functions #define getS2(in_P,byteOffset) ((short) dptGetV2(in_P,byteOffset)) #define setS2(in_P,byteOffset,newValue) \ ((short) dptSetV2(in_P,byteOffset,newValue)) #define orS2(in_P,byteOffset,newValue) dptOrV2(in_P,byteOffset,newValue) #define andS2(in_P,byteOffset,newValue) dptAndV2(in_P,byteOffset,newValue) #define xorS2(in_P,byteOffset,newValue) dptXorV2(in_P,byteOffset,newValue) #define getU2(in_P,byteOffset) ((unsigned short) dptGetV2(in_P,byteOffset)) #define setU2(in_P,byteOffset,newValue) \ ((unsigned short) dptSetV2(in_P,byteOffset,newValue)) #define orU2(in_P,byteOffset,newValue) dptOrV2(in_P,byteOffset,newValue) #define andU2(in_P,byteOffset,newValue) dptAndV2(in_P,byteOffset,newValue) #define xorU2(in_P,byteOffset,newValue) dptXorV2(in_P,byteOffset,newValue) #define getUP2(in_P,byteOffset) ((unsigned short __FAR__ *)(((unsigned char __FAR__ *)(in_P))+(byteOffset))) // Convert to BIG Endian from local format #define getBU2(x,y) ((unsigned short)osdLocal2((unsigned short __FAR__ *) \ getUP1(x,y))) #if (!defined(setBU2)) # define setBU2(x,y,z) { unsigned short hold = (unsigned short)(z); \ *((unsigned short __FAR__ *)getUP1(x,y)) \ = osdLocal2(&hold); \ } #endif // Convert to LITTLE Endian from local format #define getLU2(x,y) ((unsigned short)osdSLocal2((unsigned short __FAR__ *) \ getUP1(x,y))) #if (!defined(setLU2)) # define setLU2(x,y,z) { unsigned short hold = (unsigned short)(z); \ *((unsigned short __FAR__ *)getUP1(x,y)) \ = osdSLocal2(&hold); \ } #endif // These macros properly typecast the return values from the // 3 byte get and set functions #define getU3(in_P,byteOffset) dptGetV3(in_P,byteOffset) #define setU3(in_P,byteOffset,newValue) dptSetV3(in_P,byteOffset,newValue) #define orU3(in_P,byteOffset,newValue) dptOrV3(in_P,byteOffset,newValue) #define andU3(in_P,byteOffset,newValue) dptAndV3(in_P,byteOffset,newValue) #define xorU3(in_P,byteOffset,newValue) dptXorV3(in_P,byteOffset,newValue) // Convert to BIG Endian from local format #define getBU3(x,y) ((unsigned long)osdLocal3((unsigned long __FAR__ *) \ getUP1(x,y))) #if (!defined(setBU3)) # if (defined(_DPT_BIG_ENDIAN)) # define setBU3(x,y,z) \ { unsigned long hold = z; \ *(getUP1(x,y)) = (unsigned char)(hold >> 16L); \ *((unsigned short __FAR__ *)(getUP1(x,y) + 1)) \ = (unsigned short)hold; \ } # else # define setBU3(x,y,z) \ { unsigned long hold = z; \ *(getUP1(x,y) + 0) = (unsigned char)(hold >> 16) ; \ *(getUP1(x,y) + 1) = (unsigned char)(hold >> 8L); \ *(getUP1(x,y) + 2) = (unsigned char)(hold); \ } # endif #endif // These macros properly typecast the return values from the // 4 byte get and set functions #define getS4(in_P,byteOffset) ((long) dptGetV4(in_P,byteOffset)) #define setS4(in_P,byteOffset,newValue) \ ((long) dptSetV4(in_P,byteOffset,newValue)) #define orS4(in_P,byteOffset,newValue) dptOrV4(in_P,byteOffset,newValue) #define andS4(in_P,byteOffset,newValue) dptAndV4(in_P,byteOffset,newValue) #define xorS4(in_P,byteOffset,newValue) dptXorV4(in_P,byteOffset,newValue) #define getU4(in_P,byteOffset) dptGetV4(in_P,byteOffset) #define setU4(in_P,byteOffset,newValue) \ dptSetV4(in_P,byteOffset,newValue) #define orU4(in_P,byteOffset,newValue) dptOrV4(in_P,byteOffset,newValue) #define andU4(in_P,byteOffset,newValue) dptAndV4(in_P,byteOffset,newValue) #define xorU4(in_P,byteOffset,newValue) dptXorV4(in_P,byteOffset,newValue) #define getUP4(in_P,byteOffset) ((unsigned long __FAR__ *)(((unsigned char __FAR__ *)(in_P))+(byteOffset))) // Convert to BIG Endian from local format #define getBU4(x,y) ((unsigned long)osdLocal4((unsigned long __FAR__ *) \ getUP1(x,y))) #if (!defined(setBU4)) # define setBU4(x,y,z) { unsigned long hold = z; \ *((unsigned long __FAR__ *)getUP1(x,y)) \ = osdLocal4(&hold); \ } #endif // Convert to LITTLE Endian from local format #define getLU4(x,y) ((unsigned long)osdSLocal4((unsigned long __FAR__ *) \ getUP1(x,y))) #if (!defined(setLU4)) # define setLU4(x,y,z) { unsigned long hold = z; \ *((unsigned long __FAR__ *)getUP1(x,y)) \ = osdSLocal4(&hold); \ } #endif // These macros deal with bit fields #define getL24bit1(w,x,y) ((unsigned long)((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] \ + ((((unsigned long)((unsigned char __FAR__ *)(&((w)->x)))[1+(y)]) << 8) & 0xFF00) \ + ((((unsigned long)((unsigned char __FAR__ *)(&((w)->x)))[2+(y)]) << 16) & 0xFF0000)) #define setL24bit1(w,x,y,z) ((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] = (unsigned char)(z); \ ((unsigned char __FAR__ *)(&((w)->x)))[1+(y)] = (unsigned char)((z) >> 8) & 0xFF; \ ((unsigned char __FAR__ *)(&((w)->x)))[2+(y)] = (unsigned char)((z) >> 16) & 0xFF #define getL16bit(w,x,y) ((unsigned short)((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] \ + ((((unsigned short)((unsigned char __FAR__ *)(&((w)->x)))[1+(y)]) << 8) & 0xFF00)) #define setL16bit(w,x,y,z) ((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] = (unsigned char)(z); \ ((unsigned char __FAR__ *)(&((w)->x)))[1+(y)] = (unsigned char)((z) >> 8) & 0xFF #define getL16bit2(w,x,y) ((unsigned short)((unsigned char __FAR__ *)(&((w)->x)))[2+(y)] \ + ((((unsigned short)((unsigned char __FAR__ *)(&((w)->x)))[3+(y)]) << 8) & 0xFF00)) #define setL16bit2(w,x,y,z) ((unsigned char __FAR__ *)(&((w)->x)))[2+(y)] = (unsigned char)(z); \ ((unsigned char __FAR__ *)(&((w)->x)))[3+(y)] = (unsigned char)((z) >> 8) & 0xFF // y is the number of bytes from beg of ulong to get upper 4 bit of the addressed byte #define getL4bit(w,x,y) \ ((unsigned char)(((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] >> 4) & 0x0f) #define setL4bit(w,x,y,z) ((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] &= 0xF0; \ ((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] |= ((z) << 4) & 0xF0 // y is number of bytes from beg of ulong #define getL1bit(w,x,y) \ ((unsigned char)(((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] ) & 0x01) #define setL1bit(w,x,y,z) ((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] &= 0xFE; \ ((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] |= (z) & 0x01 #define getL1bit1(w,x,y) \ ((unsigned char)(((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] >> 1) & 0x01) #define setL1bit1(w,x,y,z) ((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] &= 0xFD; \ ((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] |= (z << 1) & 0x02 // 12 bit at the first 12 bits of a long word #define getL12bit(w,x,y) ((unsigned short)((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] \ + ((((unsigned short)((unsigned char __FAR__ *)(&((w)->x)))[1+(y)]) << 8) & 0xF00)) #define setL12bit(w,x,y,z) ((unsigned char __FAR__ *)(&((w)->x)))[0+(y)] = (unsigned char)(z); \ ((unsigned char __FAR__ *)(&((w)->x)))[1+(y)] &= 0xF0; \ ((unsigned char __FAR__ *)(&((w)->x)))[1+(y)] |= (unsigned char)((z) >> 8) & 0xF // 12 bit after another 12 bit in long word #define getL12bit1(w,x,y) (((unsigned short)((unsigned char __FAR__ *)(&((w)->x)))[1+(y)]) >> 4 \ + ((((unsigned short)((unsigned char __FAR__ *)(&((w)->x)))[2+(y)]) << 4) )) #define setL12bit1(w,x,y,z) ((unsigned char __FAR__ *)(&((w)->x)))[1+(y)] &= 0x0F; \ ((unsigned char __FAR__ *)(&((w)->x)))[1+(y)] |= (unsigned char)((z) & 0xF) << 4; \ ((unsigned char __FAR__ *)(&((w)->x)))[2+(y)] = (unsigned char)((z) >> 8) // 12 at the 3rd byte in a long word #define getL12bit2(w,x,y) ((unsigned short)((unsigned char __FAR__ *)(&((w)->x)))[2+(y)] \ + ((((unsigned short)((unsigned char __FAR__ *)(&((w)->x)))[3+(y)]) << 8) & 0xF00)) #define setL12bit2(w,x,y,z) ((unsigned char __FAR__ *)(&((w)->x)))[2+(y)] = (unsigned char)(z); \ ((unsigned char __FAR__ *)(&((w)->x)))[3+(y)] &= 0xF0; \ ((unsigned char __FAR__ *)(&((w)->x)))[3+(y)] |= (unsigned char)((z) >> 8) & 0xF #define getL8bit(w,x,y) (*(((unsigned char __FAR__ *)(&((w)->x))) + y)) #define setL8bit(w,x,y,z) (*(((unsigned char __FAR__ *)(&((w)->x))) + y) = (z)) #endif raidutils-0.0.6.orig/include/dptsig.h0000664000175000000620000005353410044153305017433 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPTSIG_H_ #define __DPTSIG_H_ #ifdef _SINIX_ADDON #include "dpt.h" #endif /* DPT SIGNATURE SPEC AND HEADER FILE */ /* Signature Version 1 (sorry no 'A') */ /* to make sure we are talking the same size under all OS's */ typedef unsigned char sigBYTE; typedef unsigned short sigWORD; #if (defined(_MULTI_DATAMODEL) && defined(sun) && !defined(_ILP32)) typedef uint32_t sigLONG; #else typedef unsigned long sigLONG; #endif /* * use sigWORDLittleEndian for: * dsCapabilities * dsDeviceSupp * dsAdapterSupp * dsApplication * use sigLONGLittleEndian for: * dsOS * so that the sig can be standardised to Little Endian */ #if (defined(_DPT_BIG_ENDIAN)) # define sigWORDLittleEndian(x) ((((x)&0xFF)<<8)|(((x)>>8)&0xFF)) # define sigLONGLittleEndian(x) \ ((((x)&0xFF)<<24) | \ (((x)&0xFF00)<<8) | \ (((x)&0xFF0000L)>>8) | \ (((x)&0xFF000000L)>>24)) #else # define sigWORDLittleEndian(x) (x) # define sigLONGLittleEndian(x) (x) #endif /* must make sure the structure is not word or double-word aligned */ /* --------------------------------------------------------------- */ /* Borland will ignore the following pragma: */ /* Word alignment is OFF by default. If in the, IDE make */ /* sure that Options | Compiler | Code Generation | Word Alignment */ /* is not checked. If using BCC, do not use the -a option. */ #ifndef NO_PACK #if defined (_DPT_AIX) #pragma options align=packed #else #pragma pack(1) #endif /* aix */ #endif /* For the Macintosh */ #if STRUCTALIGNMENTSUPPORTED #pragma options align=mac68k #endif /* Current Signature Version - sigBYTE dsSigVersion; */ /* ------------------------------------------------------------------ */ #define SIG_VERSION 1 /* Processor Family - sigBYTE dsProcessorFamily; DISTINCT VALUES */ /* ------------------------------------------------------------------ */ /* What type of processor the file is meant to run on. */ /* This will let us know whether to read sigWORDs as high/low or low/high. */ #define PROC_INTEL 0x00 /* Intel 80x86 */ #define PROC_MOTOROLA 0x01 /* Motorola 68K */ #define PROC_MIPS4000 0x02 /* MIPS RISC 4000 */ #define PROC_MIPS PROC_MIPS4000 /* MIPS RISC */ #define PROC_ALPHA 0x03 /* DEC Alpha */ #define PROC_POWERPC 0x04 /* IBM Power PC */ #define PROC_i960 0x05 /* Intel i960 */ #define PROC_ULTRASPARC 0x06 /* SPARC processor */ /* Specific Minimim Processor - sigBYTE dsProcessor; FLAG BITS */ /* ------------------------------------------------------------------ */ /* Different bit definitions dependent on processor_family */ /* PROC_INTEL: */ #define PROC_8086 0x01 /* Intel 8086 */ #define PROC_286 0x02 /* Intel 80286 */ #define PROC_386 0x04 /* Intel 80386 */ #define PROC_486 0x08 /* Intel 80486 */ #define PROC_PENTIUM 0x10 /* Intel 586 aka P5 aka Pentium */ #define PROC_SEXIUM 0x20 /* Intel 686 aka P6 aka Pentium Pro or MMX */ #define PROC_ITANIUM 0x40 /* Intel Itanium 64 bit */ /* PROC_i960: */ #define PROC_960RX 0x01 /* Intel 80960RP/RD */ #define PROC_960HX 0x02 /* Intel 80960HA/HD/HT */ #define PROC_960RN 0x03 /* Intel 80960RN/RM */ #define PROC_960RS 0x04 /* Intel 80960RS */ #define PROC_80303 0x05 /* Intel 80303 (ZION) */ /* PROC_MOTOROLA: */ #define PROC_68000 0x01 /* Motorola 68000 */ #define PROC_68010 0x02 /* Motorola 68010 */ #define PROC_68020 0x04 /* Motorola 68020 */ #define PROC_68030 0x08 /* Motorola 68030 */ #define PROC_68040 0x10 /* Motorola 68040 */ /* PROC_POWERPC */ #define PROC_PPC601 0x01 /* PowerPC 601 */ #define PROC_PPC603 0x02 /* PowerPC 603 */ #define PROC_PPC604 0x04 /* PowerPC 604 */ /* PROC_MIPS */ #define PROC_R4000 0x01 /* MIPS R4000 */ #define PROC_RM7000 0x02 /* MIPS RM7000 */ /* Filetype - sigBYTE dsFiletype; DISTINCT VALUES */ /* ------------------------------------------------------------------ */ #define FT_EXECUTABLE 0 /* Executable Program */ #define FT_SCRIPT 1 /* Script/Batch File??? */ #define FT_HBADRVR 2 /* HBA Driver */ #define FT_OTHERDRVR 3 /* Other Driver */ #define FT_IFS 4 /* Installable Filesystem Driver */ #define FT_ENGINE 5 /* DPT Engine */ #define FT_COMPDRVR 6 /* Compressed Driver Disk */ #define FT_LANGUAGE 7 /* Foreign Language file */ #define FT_FIRMWARE 8 /* Downloadable or actual Firmware */ #define FT_COMMMODL 9 /* Communications Module */ #define FT_INT13 10 /* INT 13 style HBA Driver */ #define FT_HELPFILE 11 /* Help file */ #define FT_LOGGER 12 /* Event Logger */ #define FT_INSTALL 13 /* An Install Program */ #define FT_LIBRARY 14 /* Storage Manager Real-Mode Calls */ #define FT_RESOURCE 15 /* Storage Manager Resource File */ #define FT_MODEM_DB 16 /* Storage Manager Modem Database */ #define FT_DMI 17 /* DMI component interface */ /* Filetype flags - sigBYTE dsFiletypeFlags; FLAG BITS */ /* ------------------------------------------------------------------ */ #define FTF_DLL 0x01 /* Dynamic Link Library */ #define FTF_NLM 0x02 /* Netware Loadable Module */ #define FTF_OVERLAYS 0x04 /* Uses overlays */ #define FTF_DEBUG 0x08 /* Debug version */ #define FTF_TSR 0x10 /* TSR */ #define FTF_SYS 0x20 /* DOS Loadable driver */ #define FTF_PROTECTED 0x40 /* Runs in protected mode */ #define FTF_APP_SPEC 0x80 /* Application Specific */ #define FTF_ROM (FTF_SYS|FTF_TSR) /* Special Case */ /* OEM - sigBYTE dsOEM; DISTINCT VALUES */ /* ------------------------------------------------------------------ */ #define OEM_DPT 0 /* DPT */ #define OEM_ATT 1 /* ATT */ #define OEM_NEC 2 /* NEC */ #define OEM_ALPHA 3 /* Alphatronix */ #define OEM_AST 4 /* AST */ #define OEM_OLIVETTI 5 /* Olivetti */ #define OEM_SNI 6 /* Siemens/Nixdorf */ #define OEM_SUN 7 /* SUN Microsystems */ #define OEM_ADAPTEC 8 /* Adaptec */ /* Operating System - sigLONG dsOS; FLAG BITS */ /* ------------------------------------------------------------------ */ #define OS_DOS 0x00000001 /* PC/MS-DOS */ #define OS_WINDOWS 0x00000002 /* Microsoft Windows 3.x */ #define OS_WINDOWS_NT 0x00000004 /* Microsoft Windows NT */ #define OS_OS2M 0x00000008 /* OS/2 1.2.x,MS 1.3.0,IBM 1.3.x - Monolithic */ #define OS_OS2L 0x00000010 /* Microsoft OS/2 1.301 - LADDR */ #define OS_OS22x 0x00000020 /* IBM OS/2 2.x */ #define OS_NW286 0x00000040 /* Novell NetWare 286 */ #define OS_NW386 0x00000080 /* Novell NetWare 386 */ #define OS_GEN_UNIX 0x00000100 /* Generic Unix */ #define OS_SCO_UNIX 0x00000200 /* SCO Unix */ #define OS_ATT_UNIX 0x00000400 /* ATT Unix */ #define OS_UNIXWARE 0x00000800 /* USL Unix */ #define OS_INT_UNIX 0x00001000 /* Interactive Unix */ #define OS_SOLARIS 0x00002000 /* SunSoft Solaris */ #define OS_QNX 0x00004000 /* QNX for Tom Moch */ #define OS_NEXTSTEP 0x00008000 /* NeXTSTEP/OPENSTEP/MACH */ #define OS_BANYAN 0x00010000 /* Banyan Vines */ #define OS_OLIVETTI_UNIX 0x00020000/* Olivetti Unix */ #define OS_MAC_OS 0x00040000 /* Mac OS */ #define OS_WINDOWS_95 0x00080000 /* Microsoft Windows '95 */ #define OS_NW4x 0x00100000 /* Novell Netware 4.x */ #define OS_BSDI_UNIX 0x00200000 /* BSDi Unix BSD/OS 2.0 and up */ #define OS_AIX_UNIX 0x00400000 /* AIX Unix */ #define OS_FREE_BSD 0x00800000 /* FreeBSD Unix */ #define OS_LINUX 0x01000000 /* Linux */ #define OS_DGUX_UNIX 0x02000000 /* Data General Unix */ #define OS_SINIX_N 0x04000000 /* SNI SINIX-N */ #define OS_PLAN9 0x08000000 /* ATT Plan 9 */ #define OS_TSX 0x10000000 /* SNH TSX-32 */ #define OS_WINDOWS_98 0x20000000 /* Microsoft Windows '98 */ #define OS_NW5x 0x40000000 /* Novell Netware 5x */ #define OS_OTHER 0x80000000 /* Other */ /* Capabilities - sigWORD dsCapabilities; FLAG BITS */ /* ------------------------------------------------------------------ */ #define CAP_RAID0 0x0001 /* RAID-0 */ #define CAP_RAID1 0x0002 /* RAID-1 */ #define CAP_RAID3 0x0004 /* RAID-3 */ #define CAP_RAID5 0x0008 /* RAID-5 */ #define CAP_SPAN 0x0010 /* Spanning */ #define CAP_PASS 0x0020 /* Provides passthrough */ #define CAP_OVERLAP 0x0040 /* Passthrough supports overlapped commands */ #define CAP_ASPI 0x0080 /* Supports ASPI Command Requests */ #define CAP_ABOVE16MB 0x0100 /* ISA Driver supports greater than 16MB */ #define CAP_EXTEND 0x8000 /* Extended info appears after description */ #ifdef SNI_MIPS #define CAP_CACHEMODE 0x1000 /* dpt_force_cache is set in driver */ #endif /* Devices Supported - sigWORD dsDeviceSupp; FLAG BITS */ /* ------------------------------------------------------------------ */ #define DEV_DASD 0x0001 /* DASD (hard drives) */ #define DEV_TAPE 0x0002 /* Tape drives */ #define DEV_PRINTER 0x0004 /* Printers */ #define DEV_PROC 0x0008 /* Processors */ #define DEV_WORM 0x0010 /* WORM drives */ #define DEV_CDROM 0x0020 /* CD-ROM drives */ #define DEV_SCANNER 0x0040 /* Scanners */ #define DEV_OPTICAL 0x0080 /* Optical Drives */ #define DEV_JUKEBOX 0x0100 /* Jukebox */ #define DEV_COMM 0x0200 /* Communications Devices */ #define DEV_OTHER 0x0400 /* Other Devices */ #define DEV_ALL 0xFFFF /* All SCSI Devices */ /* Adapters Families Supported - sigWORD dsAdapterSupp; FLAG BITS */ /* ------------------------------------------------------------------ */ #define ADF_2001 0x0001 /* PM2001 */ #define ADF_2012A 0x0002 /* PM2012A */ #define ADF_PLUS_ISA 0x0004 /* PM2011,PM2021 */ #define ADF_PLUS_EISA 0x0008 /* PM2012B,PM2022 */ #define ADF_SC3_ISA 0x0010 /* PM2021 */ #define ADF_SC3_EISA 0x0020 /* PM2022,PM2122, etc */ #define ADF_SC3_PCI 0x0040 /* SmartCache III PCI */ #define ADF_SC4_ISA 0x0080 /* SmartCache IV ISA */ #define ADF_SC4_EISA 0x0100 /* SmartCache IV EISA */ #define ADF_SC4_PCI 0x0200 /* SmartCache IV PCI */ #define ADF_SC5_PCI 0x0400 /* Fifth Generation I2O products */ /* * Combinations of products */ #define ADF_ALL_2000 (ADF_2001|ADF_2012A) #define ADF_ALL_PLUS (ADF_PLUS_ISA|ADF_PLUS_EISA) #define ADF_ALL_SC3 (ADF_SC3_ISA|ADF_SC3_EISA|ADF_SC3_PCI) #define ADF_ALL_SC4 (ADF_SC4_ISA|ADF_SC4_EISA|ADF_SC4_PCI) #define ADF_ALL_SC5 (ADF_SC5_PCI) /* All EATA Cacheing Products */ #define ADF_ALL_CACHE (ADF_ALL_PLUS|ADF_ALL_SC3|ADF_ALL_SC4) /* All EATA Bus Mastering Products */ #define ADF_ALL_MASTER (ADF_2012A|ADF_ALL_CACHE) /* All EATA Adapter Products */ #define ADF_ALL_EATA (ADF_2001|ADF_ALL_MASTER) #define ADF_ALL ADF_ALL_EATA /* Application - sigWORD dsApplication; FLAG BITS */ /* ------------------------------------------------------------------ */ #define APP_DPTMGR 0x0001 /* DPT Storage Manager */ #define APP_ENGINE 0x0002 /* DPT Engine */ #define APP_SYTOS 0x0004 /* Sytron Sytos Plus */ #define APP_CHEYENNE 0x0008 /* Cheyenne ARCServe + ARCSolo */ #define APP_MSCDEX 0x0010 /* Microsoft CD-ROM extensions */ #define APP_NOVABACK 0x0020 /* NovaStor Novaback */ #define APP_AIM 0x0040 /* Archive Information Manager */ /* Requirements - sigBYTE dsRequirements; FLAG BITS */ /* ------------------------------------------------------------------ */ #define REQ_SMARTROM 0x01 /* Requires SmartROM to be present */ #define REQ_DPTDDL 0x02 /* Requires DPTDDL.SYS to be loaded */ #define REQ_HBA_DRIVER 0x04 /* Requires an HBA driver to be loaded */ #define REQ_ASPI_TRAN 0x08 /* Requires an ASPI Transport Modules */ #define REQ_ENGINE 0x10 /* Requires a DPT Engine to be loaded */ #define REQ_COMM_ENG 0x20 /* Requires a DPT Communications Engine */ /* ------------------------------------------------------------------ */ /* Requirements - sigWORD dsFirmware; FLAG BITS */ /* ------------------------------------------------------------------ */ #define dsFirmware dsApplication #define FW_DNLDSIZE16_OLD 0x0000 /* 0..3 DownLoader Size 16K - TO SUPPORT OLD IMAGES */ #define FW_DNLDSIZE16k 0x0000 /* 0..3 DownLoader Size 16k */ #define FW_DNLDSIZE16 0x0001 /* 0..3 DownLoader Size 16K */ #define FW_DNLDSIZE32 0x0002 /* 0..3 DownLoader Size 32K */ #define FW_DNLDSIZE64 0x0004 /* 0..3 DownLoader Size 64K */ #define FW_DNLDSIZE0 0x000f /* 0..3 DownLoader Size 0K - NONE */ #define FW_DNLDSIZE_NONE 0x000F /* 0..3 DownLoader Size - NONE */ /* Code Offset is position of the code within the ROM CODE Segment */ #define FW_DNLDR_TOP 0x0000 /* 12 DownLoader Position (0=Top, 1=Bottom) */ #define FW_DNLDR_BTM 0x1000 /* 12 DownLoader Position (0=Top, 1=Bottom) Dominator */ #define FW_LOAD_BTM 0x0000 /* 13 Code Offset (0=Btm, 1=Top) MIPS */ #define FW_LOAD_TOP 0x2000 /* 13 Code Offset (0=Btm, 1=Top) i960 */ #define FW_SIG_VERSION1 0x0000 /* 15..14 Version Bits 0=Ver1 */ #define FW_SIG_VERSION2 0x4000 /* 15..14 Version Bits 1=Ver2 */ /* 0..3 Downloader Size (Value * 16K) 4 5 6 7 8 9 10 11 12 Downloader Position (0=Top of Image 1= Bottom of Image (Dominator) ) 13 Load Offset (0=BTM (MIPS) -- 1=TOP (960) ) 14..15 F/W Sig Version (0=Ver1) */ /* ------------------------------------------------------------------ */ /* Sub System Vendor IDs - The PCI Sub system and vendor IDs for each */ /* Adaptec Raid controller */ /* ------------------------------------------------------------------ */ #define PM1554U2_SUB_ID 0xC0011044 #define PM1654U2_SUB_ID 0xC0021044 #define PM1564U3_1_SUB_ID 0xC0031044 #define PM1564U3_2_SUB_ID 0xC0041044 #define PM1554U2_NOACPI_SUB_ID 0xC0051044 #define PM2554U2_SUB_ID 0xC00A1044 #define PM2654U2_SUB_ID 0xC00B1044 #define PM2664U3_1_SUB_ID 0xC00C1044 #define PM2664U3_2_SUB_ID 0xC00D1044 #define PM2554U2_NOACPI_SUB_ID 0xC00E1044 #define PM2654U2_NOACPI_SUB_ID 0xC00F1044 #define PM3754U2_SUB_ID 0xC0141044 #define PM3755U2B_SUB_ID 0xC0151044 #define PM3755F_SUB_ID 0xC0161044 #define PM3757U2_1_SUB_ID 0xC01E1044 #define PM3757U2_2_SUB_ID 0xC01F1044 #define PM3767U3_2_SUB_ID 0xC0201044 #define PM3767U3_4_SUB_ID 0xC0211044 #define PM2865U3_1_SUB_ID 0xC0281044 #define PM2865U3_2_SUB_ID 0xC0291044 #define PM2865F_SUB_ID 0xC02A1044 #define ADPT2000S_1_SUB_ID 0xC03C1044 #define ADPT2000S_2_SUB_ID 0xC03D1044 #define ADPT2000F_SUB_ID 0xC03E1044 #define ADPT3000S_1_SUB_ID 0xC0461044 #define ADPT3000S_2_SUB_ID 0xC0471044 #define ADPT3000F_SUB_ID 0xC0481044 #define ADPT5000S_1_SUB_ID 0xC0501044 #define ADPT5000S_2_SUB_ID 0xC0511044 #define ADPT5000F_SUB_ID 0xC0521044 #define ADPT1000UDMA_SUB_ID 0xC05A1044 #define ADPT1000UDMA_DAC_SUB_ID 0xC05B1044 #define ADPTI2O_DEVICE_ID 0xa501 #define ADPTDOMINATOR_DEVICE_ID 0xa511 #define ADPTDOMINATOR_SUB_ID_START 0xC0321044 #define ADPTDOMINATOR_SUB_ID_END 0xC03b1044 /* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */ /* * You may adjust dsDescription_size with an override to a value less than * 50 so that the structure allocates less real space. */ #if (!defined(dsDescription_size)) # define dsDescription_size 50 #endif typedef struct dpt_sig { char dsSignature[6]; /* ALWAYS "dPtSiG" */ sigBYTE dsSigVersion; /* signature version (currently 1) */ sigBYTE dsProcessorFamily; /* what type of processor */ sigBYTE dsProcessor; /* precise processor */ sigBYTE dsFiletype; /* type of file */ sigBYTE dsFiletypeFlags; /* flags to specify load type, etc. */ sigBYTE dsOEM; /* OEM file was created for */ sigLONG dsOS; /* which Operating systems */ sigWORD dsCapabilities; /* RAID levels, etc. */ sigWORD dsDeviceSupp; /* Types of SCSI devices supported */ sigWORD dsAdapterSupp; /* DPT adapter families supported */ sigWORD dsApplication; /* applications file is for */ sigBYTE dsRequirements; /* Other driver dependencies */ sigBYTE dsVersion; /* 1 */ sigBYTE dsRevision; /* 'J' */ sigBYTE dsSubRevision; /* '9' ' ' if N/A */ sigBYTE dsMonth; /* creation month */ sigBYTE dsDay; /* creation day */ sigBYTE dsYear; /* creation year since 1980 (1993=13) */ /* description (NULL terminated) */ char dsDescription[dsDescription_size]; } dpt_sig_S; /* 32 bytes minimum - with no description. Put NULL at description[0] */ /* 81 bytes maximum - with 49 character description plus NULL. */ #if defined __bsdi__ #ifndef PACK #define PACK __attribute__ ((packed)) #endif typedef struct dpt_sig_Packed { char dsSignature[6] PACK; /* ALWAYS "dPtSiG" */ sigBYTE dsSigVersion PACK; /* signature version (currently 1) */ sigBYTE dsProcessorFamily PACK; /* what type of processor */ sigBYTE dsProcessor PACK; /* precise processor */ sigBYTE dsFiletype PACK; /* type of file */ sigBYTE dsFiletypeFlags PACK; /* flags to specify load type, etc. */ sigBYTE dsOEM PACK; /* OEM file was created for */ sigLONG dsOS PACK; /* which Operating systems */ sigWORD dsCapabilities PACK; /* RAID levels, etc. */ sigWORD dsDeviceSupp PACK; /* Types of SCSI devices supported */ sigWORD dsAdapterSupp PACK; /* DPT adapter families supported */ sigWORD dsApplication PACK; /* applications file is for */ sigBYTE dsRequirements PACK; /* Other driver dependencies */ sigBYTE dsVersion PACK; /* 1 */ sigBYTE dsRevision PACK; /* 'J' */ sigBYTE dsSubRevision PACK; /* '9' ' ' if N/A */ sigBYTE dsMonth PACK; /* creation month */ sigBYTE dsDay PACK; /* creation day */ sigBYTE dsYear PACK; /* creation year since 1980 (1993=13) */ /* description (NULL terminated) */ char dsDescription[dsDescription_size] PACK; } dpt_sig_S_Packed; #define PACKED_SIG_SIZE sizeof(dpt_sig_S_Packed) #endif /* This line added at Roycroft's request */ /* Microsoft's NT compiler gets confused if you do a pack and don't */ /* restore it. */ #ifndef NO_UNPACK #if defined (_DPT_AIX) #pragma options align=reset #elif defined (UNPACK_FOUR) #pragma pack(4) #else #pragma pack() #endif /* aix */ #endif /* For the Macintosh */ #if STRUCTALIGNMENTSUPPORTED #pragma options align=reset #endif #endif raidutils-0.0.6.orig/include/drv_busy.hpp0000664000175000000620000000727010044153305020332 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DRV_BUSY_HPP #define __DRV_BUSY_HPP /* * UNIX based drive busy checking routine. * * 1999/02/11 salyzyn@dpt.com * Initial creation */ #include "ctlr_map.hpp" class DPTDriveBusy : public DPTControllerMap { #if defined _DPT_NETWARE public: #endif typedef struct DPTDriveBusyDeviceList { struct DPTDriveBusyDeviceList * Next; struct DPTDriveBusyDeviceList * Link; int Major; int Minor; char Name[1]; } DPTDeviceList; #if !defined _DPT_NETWARE public: #endif DPTDriveBusy() {} ~DPTDriveBusy() {} /* Methods */ int drvBusy(int hba, int bus, int target, int lun); private: int newDeviceList (DPTDeviceList ** List, char * name); void deleteDeviceList (DPTDeviceList * List); /* Inherited from DPTControllerMap */ char* Strdup(char* String) { return DPTControllerMap::Strdup(String); } char* getTargetString(int hba, int bus, int target, int lun) { return DPTControllerMap::getTargetString(hba, bus, target, lun); } char* getTargetPath(int hba, int bus, int target, int lun) { return DPTControllerMap::getTargetPath(hba, bus, target, lun); } FILE * SafePopenRead(char* commands) { return DPTControllerMap::SafePopenRead(commands); } int SafePclose(FILE* fp) { return DPTControllerMap::SafePclose(fp); } #if (defined(_DPT_WIN_NT)) enum DPTControllerMap::PathExists PathExists(char* path) { return DPTControllerMap::PathExists(path); } #elif defined _DPT_NETWARE enum PathExists_t PathExists(char*path) { return DPTControllerMap::PathExists(path); } #else enum PathExists PathExists(char* path) { return DPTControllerMap::PathExists(path); } #endif }; extern "C" { extern int drv_busy(int hba, int bus, int target, int lun); } #endif /* __DRV_BUSY_HPP */ raidutils-0.0.6.orig/include/eng_osd.h0000664000175000000620000002621510044153306017554 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __ENG_OSD_H #define __ENG_OSD_H //File - ENG_OSD.H //*************************************************************************** // //Description: // // This file contains definitions for the OS dependent layer of the //DPT engine. // //Author: Doug Anderson //Date: 4/7/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "osd_util.h" #include "dpt_eata.h" #include "dptsig.h" #include "sys_info.h" #include "eng_std.h" //Definitions - Defines & Constants ----------------------------------------- // Total amount of memory allocated by the engine for the // controller description list #define OSD_CTLR_DESCR_SZ 2048 //Definitions - Structure --------------------------------------------------- // This structure defines the CCB that is passed from the engine to // the OS dependent layer of the engine. // osdFlags - bit definitions // 1=The OS specific layer should not wait for a command // to complete before returning #define FLG_CCB_OSD_NO_WAIT 0x0002 // 1=The EATA CP bytes have been reversed (1=Yes,0=No) #define FLG_CCB_OSD_REVERSED 0x0004 // engFlags - bit definitions // 1=This CCB is in use #define FLG_CCB_ENG_IN_USE 0x0001 // 1=This CCB is a RAID command #define FLG_CCB_ENG_RAID 0x0002 // 1=This CCB is an event logger command #define FLG_CCB_ENG_LOGGER 0x0004 // 1=Do not set the EATA physical bit #define FLG_CCB_ENG_NO_PHYS 0x0008 #ifdef __cplusplus struct dptCCB_S { #else // DPT CCB (Command Control Block) structure typedef struct dptCCBstruct { #endif //--------- Driver Specific Data ------------ eataCP_S eataCP; // EATA command packet uCHAR ctlrStatus; // Controller status uCHAR scsiStatus; // SCSI status uSHORT ctlrNum; // Target controller #ifdef __cplusplus void (*osdPost_P)(struct dptCCB_S *); #else void (*osdPost_P)(struct dptCCBstruct *); #endif uSHORT drvrFlags; // Flags used by the driver //--------- Engine OS Dependent Layer Data -- void (*engPost_P)(void *); uSHORT osdFlags; // Flags used by OS dependent layer //--------- Engine Specific Data ------------ void (*appPost_P)(void *); uSHORT engFlags; // Flags used by the engine #ifdef __cplusplus //---------- Portability Additions ----------- in sp_eosd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptCCB_S; #endif //--------------------------------------------------------- // Controller description structure used by pre-PCI drivers //--------------------------------------------------------- // This structure defines the data returned by the OS dependent layer // of the engine when a request is made to get a list of controllers // in the system. //flag1 - bit definitions same as EATA read config. flag1 //flag2 - bit definitions same as EATA read config. flag2 //flag3 - bit definitions // 1=A secondary EISA controller does not also respond to ISA // address 0x1f0 or 0x170 #define FLG_OSD_NO_ISA 0x01 //flag4 - bit definitions // Determines if the ASCII information fields are valid #define FLG_OSD_ASCII_VALID 0x01 #ifdef __cplusplus struct oldDrvrHBAinfo_S { #else // Controller Description returned in controller list typedef struct { #endif // Controller's base address uLONG baseAddr; // Controller number - used by the driver uCHAR ctlrNum; // Indicates if the controller is primary (1) or secondary (0) uCHAR primary; // 4 bytes of the ID PAL access_U idPAL; eataSP_S *sp_P; uCHAR eataVersion; // EATA version level supported // bits 7-4 = version level // bits 3-0 = 0 uCHAR scsiID; // Controller's SCSI ID (All Channels)(LUN==0) uSHORT padLength; // Extra CP bytes sent (PIO only, DMA = 0) uLONG cpLength; // # valid Command Packet bytes uLONG spLength; // # valid Status Packet bytes uSHORT queueSize; // Max. # CPs that can be queued uLONG sgSize; // Max. # Scatter Gather table entries // (8 bytes each) uCHAR irqNum; // Interrupt request # uCHAR drqNum; // DRQ index (0,5,6,7) uCHAR flag1; // See bit definitions above uCHAR flag2; // See bit definitions above uCHAR flag3; // See bit definitions above uCHAR flag4; // See bit definitions above // This ASCII information is valid if the FLG_CTLR_ASCII_VALID bit is set char vendorID[10]; // Ascii string char productID[18]; // Ascii string char revision[6]; // Ascii string #ifdef __cplusplus //---------- Portability Additions ----------- in sp_eosd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } oldDrvrHBAinfo_S; #endif //----------------------------------------------------- // Controller description structure used by PCI drivers (and later) //----------------------------------------------------- #ifdef _DPT_ARC #ifdef __cplusplus extern "C" { #endif # include "vendor.h" #ifdef __cplusplus } #endif #endif /* _DPT_ARC */ //hbaFlags - bit definitions // If set, valid pciBusNum & pciDeviceNum #define FLG_OSD_PCI_VALID 0x0001 // If set, the controller supports DMA transfers #define FLG_OSD_DMA 0x0002 // this is an i2o board #define FLG_OSD_I2O 0x0004 #ifdef __cplusplus struct drvrHBAinfo_S { #else typedef struct { #endif uSHORT length; // Remaining length of this #if (defined(MINIMAL_BUILD)) uLONG baseAddr; uSHORT blinkState; // Blink LED state (0=Not in blink LED) uCHAR drvrHBAnum; uCHAR pciBusNum; uCHAR pciDeviceNum; uCHAR hbaFlags; uCHAR Interrupt; #else uSHORT drvrHBAnum; // Relative HBA # used by the driver uLONG baseAddr; // Base I/O address uSHORT blinkState; // Blink LED state (0=Not in blink LED) uCHAR pciBusNum; // PCI Bus # (Optional) uCHAR pciDeviceNum; // PCI Device # (Optional) uSHORT hbaFlags; // Miscellaneous HBA flags uSHORT Interrupt; // Interrupt set for this device. #endif # if (defined(_DPT_ARC)) uLONG baseLength; ADAPTER_OBJECT *AdapterObject; LARGE_INTEGER DmaLogicalAddress; PVOID DmaVirtualAddress; LARGE_INTEGER ReplyLogicalAddress; PVOID ReplyVirtualAddress; # elif (!defined(MINIMAL_BUILD)) uLONG reserved1; // Reserved for future expansion uLONG reserved2; // Reserved for future expansion uLONG reserved3; // Reserved for future expansion # endif #ifdef __cplusplus //---------- Portability Additions ----------- in sp_eosd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } drvrHBAinfo_S; #endif //============================== // OS Dependent Engine Functions //============================== #ifdef __cplusplus extern "C" { #endif // Called when the engine is brought into scope (loaded) DPT_RTN_T osdOpenEngine(void); // Called when the engine is brought out of scope (unloaded) DPT_RTN_T osdCloseEngine(void); // Determines if the specified I/O method is supported DPT_RTN_T osdIOrequest(uSHORT); // Called when a connection is established void osdConnected(uSHORT); // Called when a disconnect occurs void osdDisconnected(uSHORT); // Return the driver's DPT signature structure // On the way in numSigs tells the osd how many dpt_sig_S's will fit in the buffer // and on the way out it tell the engine how many were actually put in DPT_RTN_T osdGetDrvrSig(uSHORT, dpt_sig_S *, uLONG *numSigs); // Returns information about the local machine uLONG osdGetSysInfo(sysInfo_S *); // Returns a list of DPT HBAs DPT_RTN_T osdGetCtlrs(uSHORT,uSHORT *,drvrHBAinfo_S *); // Send a CCB to an HBA DPT_RTN_T DPT_EXPORT osdSendCCB(uSHORT,dptCCB_S *); // Determine if an HBA is in a blink LED state uLONG osdCheckBLED(uSHORT,uSHORT *); // Update OS device database (i.e. for AIX ODM) uSHORT osdUpdateOSConfig(void); // Execute a logger command //dz DPT_RTN_T osdLoggerCmd(DPT_MSG_T,void *,uSHORT,uLONG,uSHORT); DPT_RTN_T osdLoggerCmd(DPT_MSG_T,void *, void *,uSHORT,uLONG,uLONG); // Allocate I/O memory (to eliminate double buffering) void * osdAllocIO(uLONG); // Free I/O memory void osdFreeIO(void *); // tells the osd to increment its MSG_RAID_HW_ENABLE count void osdIncrementEnableCount(); // get ths MSG_RAID_HW_ENABLE count from the osd uLONG osdGetEnableCount(); #ifdef _SINIX_ADDON DPT_RTN_T osdGetLBA(uSHORT, uSHORT, uSHORT, uLONG *, uCHAR *, uLONG); #endif #ifdef __cplusplus }; #endif //---------------------------------------------------- #endif // __ENG_OSD_H raidutils-0.0.6.orig/include/eng_std.h0000664000175000000620000006631010044153305017560 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __ENG_STD_H #define __ENG_STD_H //File - ENG_STD.H //*************************************************************************** // //Description: // // This file contains standard structure and type definitions used //throughout the DPT engine. // //Author: Doug Anderson //Date: 3/4/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "osd_util.h" #ifndef NO_PACK #if defined (_DPT_AIX) #pragma options align=packed #else #pragma pack(1) #endif // aix #endif // no unpack //======================================================================== // Amount of space to reserve when RAID-0, RAID-3, & RAID-5 arrays are created #define RESERVED_SPACE_RAID 0x0800 // 1M, 2048 blocks // Amount of space to reserve on stand alone drives, RAID-1, & Hot-Spares #define RESERVED_SPACE_DISK 0x0011 // 1M, 2048 blocks // Amount of space to reserve on Solaris partitioned stand alone drives #define RESERVED_SPACE_SOLARIS 0x0011 // 8k, 17 blocks //======================================================================== // I/O methods specified using MSG_CONNECT // No I/O is to be performed #define DPT_IO_NONE 0x0000 // I/O should be standard DPT driver pass through #define DPT_IO_PASS_THRU 0x0001 // I/O should be direct EATA I/O #define DPT_IO_EATA_DIRECT 0x0002 //======================================================================== #ifndef _DPT_ENG_TYPES #define _DPT_ENG_TYPES // Unique # assigned to each DPT object typedef unsigned long DPT_TAG_T; // Message commands; see messages.h typedef unsigned long DPT_MSG_T; // Message return codes; see rtncodes.h typedef unsigned long DPT_RTN_T; #endif // dpt eng types // Define a type that is a pointer to the DPT engine entry function typedef DPT_RTN_T (*DPT_ENG_ENTRY_FN_T)(DPT_TAG_T,DPT_MSG_T,DPT_TAG_T,void *,void *,uLONG); //======================================================================== // DPT ID structure #ifdef __cplusplus struct dptID_S { #else typedef struct { #endif DPT_TAG_T tag; // This object's tag uSHORT type; // Type of engine object #ifdef __cplusplus //---------- Portability Additions ----------- in sp_estd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptID_S; #endif // c++ //======================================================================== // States a physical drive can be forced into (MSG_FORCE_STATE) #define FORCE_OPTIMAL 0x00 #define FORCE_WARNING 0x05 #define FORCE_FAILED 0x03 #define FORCE_REPLACED 0x24 //======================================================================== // HBA I/O address structure #ifdef __cplusplus union dptIOaddr_U { #else typedef union { #endif #if defined(__GNUC__) struct std { #else struct { #endif #if defined(_DPT_BIG_ENDIAN) uSHORT isa; // ISA I/O address uSHORT eisa; // EISA I/O address #else uSHORT eisa; // EISA I/O address uSHORT isa; // ISA I/O address #endif } std; uLONG pci; // PCI I/O address #ifdef __cplusplus }; #else } dptIOaddr_U; #endif //======================================================================== // HBA ID bytes #ifdef __cplusplus union dptHBAid_U { #else typedef union { #endif struct { uSHORT vendor; // PCI vendor ID uSHORT product; // PCI product ID } pci; uCHAR eisaPAL[4]; // EISA ID PAL #ifdef __cplusplus }; #else } dptHBAid_U; #endif //======================================================================== // This structure defines a partition definition #ifdef __cplusplus struct partition_S { #else typedef struct { #endif uCHAR bootable; // 0x80 = Bootable, 0x00 = Non-bootable uCHAR startHead; // Starting Head # uCHAR startSector; // Starting Sector # (2 MSBs of cylinder #) uCHAR startCylinder; // Starting Cylinder # uCHAR opSys; // Operating system indicator // 0x00 = Unknown // 0x01 = DOS w/ 12 bit FAT // 0x02 = XENIX // 0x04 = DOS w/ 16 bit FAT // 0x05 = DOS extended partition // 0x06 = // 0x63 = UNIX // 0x64 = Novell // 0x75 = PCIX // 0xdb = CP/M // 0xff = BBT uCHAR endHead; // Ending Head # uCHAR endSector; // Ending Sector # (2 MSBs of cylinder #) uCHAR endCylinder; // Ending Cylinder # uLONG precedeSectors; // # Sectors preceding this sector uLONG numSectors; // # Sectors in this partition #ifdef __cplusplus //---------- Portability Additions ----------- in sp_estd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } partition_S; #endif // c++ // This structure defines a disk boot record #ifdef __cplusplus struct bootRecord_S { #else typedef struct { #endif uCHAR execCode[3]; // Jump to executable code uCHAR systemID[8]; // OEM name & version // Start BPB (BIOS Parameter Block) (offset = 0x0b) uSHORT sectorSize; // # bytes per sector uCHAR clusterSize; // # of sectors per cluster uSHORT numReserved; // # of sectors in reserved area uCHAR numFATs; // # of FATs on disk uSHORT rootSize; // # of root directory entries uSHORT numSectors; // Total # of sectors of this partition // (If this entry is 0, use numSectors2) uCHAR mediaDescr; // DOS media desriptor byte uSHORT sectorsFAT; // # of sectors per FAT uSHORT sectorsTrack; // # of sectors per track uSHORT numHeads; // # of heads uSHORT hiddenSectors; // # of hidden sectors // End BPB uLONG numSectors2; // Total # of sectors (If > 32Mb partition) uCHAR physNum; // Physical drive # uCHAR reserved1; // Reserved uCHAR signature; // Signature byte (0x29) uCHAR serialNum[4]; // Volume serial # uCHAR label[11]; // Volume label uCHAR reserved2[8]; // Reserved #ifdef __cplusplus //---------- Portability Additions ----------- in sp_estd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } bootRecord_S; #endif // c++ // This structure defines a fixed disk sector zero #ifdef __cplusplus struct sectorZero_S { #else typedef struct { #endif uCHAR filler[0x1be]; // Skip up to the partition table partition_S partition[4]; // Up to 4 valid partitions uSHORT signature; // Partition signature (0xaa55) // Offset 0x1fe = 0x55 // Offset 0x1ff = 0xaa #ifdef __cplusplus //---------- Portability Additions ----------- in sp_estd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } sectorZero_S; #endif // c++ //======================================================================== // Size of the user buffer (userBuff) used in EV_SET_INFO & EV_GET_INFO #define USER_BUFF_SIZE 4 //------------------------------------------------------------------------ // SCSI Devices....................................... // Direct Access Device #define DPT_SCSI_DASD 0x0000 // Sequential Access Device #define DPT_SCSI_SASD 0x0001 #define DPT_SCSI_PRINTER 0x0002 #define DPT_SCSI_PROCESSOR 0x0003 // Write Once Read Multiple Device #define DPT_SCSI_WORM 0x0004 // Compact Disc Device #define DPT_SCSI_CD_ROM 0x0005 #define DPT_SCSI_SCANNER 0x0006 #define DPT_SCSI_OPTICAL 0x0007 // Medium Changer Device #define DPT_SCSI_JUKEBOX 0x0008 #define DPT_SCSI_COMMUNICATION 0x0009 #define DPT_SCSI_GRAPHICS_1 0x000a #define DPT_SCSI_GRAPHICS_2 0x000b // Storage Array Controller Device [SCSI-3 SCC] #define DPT_SCSI_SCC 0x000c // Enclosure Services Device [SCSI-3 SES] #define DPT_SCSI_SES 0x000d // Device type unknown #define DPT_SCSI_UNKNOWN 0x001f // Reserved for SM Pro--MSS #define DPT_SCSI_PRO_ROOT 0x0020 #define DPT_SCSI_PRO_CONNECTION 0x0021 // Last SCSI device type #define DPT_SCSI_DEVICES 0x00ff // SCSI Managers...................................... // SCSI driver #define DPT_SCSI_DRVR 0x0100 // SCSI Host Bus Adapter #define DPT_SCSI_HBA 0x0300 // SCSI Bridge Controller Device #define DPT_SCSI_BCD 0x0500 // RAID Bridge Controller Device #define DPT_RAID_BCD 0x0700 // DPT object types................................... // Any DPT engine object #define DPT_ANY_OBJECT 0x3000 // Any DPT engine manager #define DPT_ANY_MANAGER 0x2000 // Any DPT engine device #define DPT_ANY_DEVICE 0x1000 // Perform a search by RAID type #define DPT_RAID_TYPE 0x5000 // Type modifiers..................................... // "ORed" with an above type to specify any type // except a specific type #define DPT_EXCEPT 0x8000 //------------------------------------------------------------------------ // SCSI address #ifdef __cplusplus struct dptCaddr_S { #else typedef struct { #endif uCHAR hba; // Host Bus Adapter uCHAR chan; // SCSI channel uCHAR id; // SCSI ID uCHAR lun; // SCSI LUN #ifdef __cplusplus //---------- Portability Additions ----------- in sp_estd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptCaddr_S; #endif // c++ //------------------------------------------------------------------------ // SCSI device capacity #ifdef __cplusplus struct dptCcapacity_S { #else typedef struct { #endif uLONG blockSize; // Size of each logical block uLONG maxLBA; // Last available logical block address uLONG maxPhysLBA; // Last physical logical block address #ifdef __cplusplus //---------- Portability Additions ----------- in sp_estd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptCcapacity_S; #endif // c++ //------------------------------------------------------------------------ // DPT engine object status //display #define DSPLY_STAT_OPTIMAL 0 // No flag #define DSPLY_STAT_WARNING 1 // Yellow #define DSPLY_STAT_FAILED 2 // Red #define DSPLY_STAT_IMPACTED 3 // White #define DSPLY_STAT_ABSENT 4 // Black #define DSPLY_STAT_GHOST 5 // Special blue #define DSPLY_STAT_BUILD 6 // Blue - Build or Format Required // or in progress #define DSPLY_STAT_MISSING 7 // Black - Should exist but doesn't //flags // 1=The object was artificially created with an absent object message. #define FLG_STAT_ARTIFICIAL 0x01 // 1=The object actually exists in hardware #define FLG_STAT_REAL 0x02 // 1=An HBA's alarm is on #define FLG_STAT_ALARM_ON 0x04 // 1=The object is performing diagnostics #define FLG_STAT_DIAGNOSTICS 0x08 // 1=The object has changed SCSI addresses or is from another system #define FLG_STAT_ADDR_CHANGE 0x10 // The main and sub status fields reflect Logical Array Page status #define FLG_STAT_LAP 0x20 // The main and sub status fields reflect Physical Array Page status #define FLG_STAT_PAP 0x40 // 1=The object is ready (Test Unit Ready = Ready) #define FLG_STAT_READY 0x80 //-------------------------------- //PAP (Physical Array Page) Status //-------------------------------- // Note: PAPM_ = values for status.main if status.flags & FLG_STAT_PAP is set // Note: PAPS_ = values for status.sub if status.flags & FLG_STAT_PAP is set // Optimal Drive #define PAPM_OPTIMAL 0x00 #define PAPS_OPTIMAL 0x00 // Drive is optimal #define PAPS_SSMISSING 0x01 // Security stamp missing #define PAPS_REDUNDANT_CTLR 0x07 // Redundant ctlr store invalid // Non-existent drive #define PAPM_NON_EXISTENT 0x01 #define PAPS_NON_EXISTENT 0x00 // Non-existent drive #define PAPS_NS_CHAN 0x01 // Non-supported channel #define PAPS_NS_ID 0x02 // Non-supported ID #define PAPS_NS_CHAN_ID 0x03 // Non-supported channel & ID // Unconfigured drive #define PAPM_UNCONFIGURED 0x02 #define PAPS_UNCONFIGURED 0x00 // Unconfigured drive #define PAPS_NOT_BUILT 0x01 // Arrayed but not built // Failed drive #define PAPM_FAILED 0x03 #define PAPS_FAILED 0x00 // Failed drive #define PAPS_COMPONENT_FAIL 0x01 // Component failure #define PAPS_TUR_FAIL 0x02 // Test Unit Ready failure #define PAPS_BUILD_FAIL 0x03 // Build failure #define PAPS_WRITE_FAIL 0x04 // Write failure #define PAPS_FORCE_FAIL 0x05 // User forced failure (PAP select) #define PAPS_START_FAIL 0x06 // Start of day failure // Replaced drive #define PAPM_REPLACED 0x04 #define PAPS_NO_ACTION 0x00 // No action in progress #define PAPS_BUILD 0x01 // Build initiated #define PAPS_REBUILD 0x02 // Rebuild initiated // Drive in warning condition #define PAPM_WARNING 0x05 #define PAPS_WARNING 0x00 // Drive warning #define PAPS_VERIFY_FAIL 0x01 // Array verify failed // Parameter mismatch drive #define PAPM_PARAMETER_MISMATCH 0x06 #define PAPS_PARAMETER_MISMATCH 0x00 // No info available #define PAPS_SECTOR_SIZE 0x01 // Wrong sector size #define PAPS_CAPACITY 0x02 // Wrong capacity #define PAPS_MODE_PARAMS 0x03 // Incorrect mode paramters #define PAPS_SERIAL_NUM 0x04 // Wrong ctlr serial # #define PAPS_CHAN_MISMATCH 0x05 // Channel mismatch #define PAPS_ID_MISMATCH 0x06 // ID mismatch // HBA at the channel/ID #define PAPM_HBA 0x07 #define PAPS_HBA 0x00 // HBA at the specified channel/ID // Array build #define PAPM_BUILD 0x08 #define PAPS_BUILD_INIT 0x00 // Build initiated #define PAPS_BUILD_EXPAND 0x01 // array being expanded // Incorrect drive replacement #define PAPM_BAD_REPLACEMENT 0x09 #define PAPS_WRONG_DRIVE 0x00 // Wrong drive replaced // #define PAPM_UNINITIALIZED 0x0a // // Verify in progress #define PAPM_VERIFY 0x0b #define PAPS_VERIFY 0x00 // Verify in progress #define PAPS_VERIFY_FIX 0x01 // Verify/Fix in progress // RAID table does not exist #define PAPM_NO_RAID_TABLE 0x0c #define PAPS_NO_RAID_TABLE 0x00 // RAID table does not exist //-------------------------------- // LAP (Logical Array Page) Status //-------------------------------- // Note: LAPM_ = values for status.main if status.flags & FLG_STAT_LAP is set // Note: LAPS_ = values for status.sub if status.flags & FLG_STAT_LAP is set // Optimal LSU (logical storage unit) #define LAPM_OPTIMAL 0x00 #define LAPS_OPTIMAL 0x00 // Optimal LSU #define LAPS_PARAM_MISMATCH 0x01 // Paramter mismatch #define LAPS_REPLACED_FORMAT 0x04 // Replaced RAID-0 drive formatting // Degraded LSU #define LAPM_DEGRADED 0x01 #define LAPS_FAILED 0x00 // Component drive failed // #define LAPS_PARAM_MISMATCH 0x01 // Paramter mismatch // #define LAPS_CHAN_MISMATCH 0x02 // Channel mismatch // #define LAPS_ID_MISMATCH 0x03 // ID mismatch // #define LAPS_REPLACED_FORMAT 0x04 // Replaced RAID-0 drive formatting #define LAPS_COMPONENT_FAIL 0x08 // Component failure // Rebuilding (reconstructing) LSU #define LAPM_REBUILD 0x02 #define LAPS_REBUILD 0x00 // Rebuild initiated // #define LAPS_PARAM_MISMATCH 0x01 // Paramter mismatch // #define LAPS_CHAN_MISMATCH 0x02 // Channel mismatch // #define LAPS_COMPONENT_FAIL 0x08 // Component failure // Array Expansion #define LAPM_EXPAND 0x03 #define LAPS_EXPAND 0x00 // array expanding // Failed (dead) LSU #define LAPM_FAILED 0x04 #define LAPS_MULTIPLE_DRIVES 0x00 // Multiple drive failures // #define LAPS_PARAM_MISMATCH 0x01 // Paramter mismatch // #define LAPS_CHAN_MISMATCH 0x02 // Channel mismatch // #define LAPS_ID_MISMATCH 0x03 // ID mismatch #define LAPS_BUILD 0x04 // Build in progress #define LAPS_BUILD_REQUIRED 0x05 // Awaiting build #define LAPS_WRONG_REPLACE 0x07 // Replaced wrong drive // #define LAPS_COMPONENT_FAIL 0x08 // Component failure // Array in warning #define LAPM_WARN 0x05 #define LAPS_VERIFY_FAIL 0x00 // Verify failed // Verifying #define LAPM_VERIFY 0x0a #define LAPS_VERIFY 0x00 // Verify in progress #define LAPS_VERIFY_FIX 0x01 // Verify/Fix in progress // Building LSU #define LAPM_BUILD 0x0b #define LAPS_BUILD_INIT 0x00 // Build initiated // RAID table does not exist #define LAPM_NO_RAID_TABLE 0x0c #define LAPS_NO_RAID_TABLE 0x00 // RAID table does not exist //-------------------- // Other status values //-------------------- // Note: No flags required for these states to be valid //main - Physical device stats #define PMAIN_STAT_FORMAT 0x7f //sub - Physical device stats #define PSUB_STAT_IN_PROGRESS 0x00 #define PSUB_STAT_CLEARING 0x01 #define PSUB_STAT_FMT_FAILED 0x02 #define PSUB_STAT_CLR_FAILED 0x03 // The HBA is in flash program mode #define SMAIN_FLASH_MODE 0xff // HBA status.sub values when in flash mode // Indicates that the flash must be initialized before it can be written #define SSUB_FLASH_INIT 0x01 // Indicates that the flash has been initialized and may be written #define SSUB_FLASH_WRITE 0x02 // The device has an active F/W level diagnostic #define SMAIN_FW_DIAGNOSTIC 0xef // The firmware diagnostic test types #define SSUB_BUFFER_READ 0x01 #define SSUB_BUFFER_RW 0x02 #define SSUB_MEDIA_READ 0x03 #define SSUB_MEDIA_RW 0x04 #define SSUB_VERIFY 0x05 #define SSUB_REBUILD 0x06 #define SSUB_BUILD 0x07 #define SSUB_EXPAND 0x08 // Indicates that an HBA is in blink LED mode #define SMAIN_BLINK_LED 0xfb #ifdef __cplusplus struct dptCstatus_S { #else typedef struct { #endif uCHAR display; // Display status uCHAR flags; // Status flags - see bit definitions above uCHAR main; // Main status code uCHAR sub; // Sub-status code #ifdef __cplusplus //---------- Portability Additions ----------- in sp_estd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptCstatus_S; #endif // c++ //------------------------------------------------------------------------ // Emulated drive parameters #ifdef __cplusplus struct dptCemuParam_S { #else typedef struct { #endif uSHORT cylinders; // # cylinders uCHAR heads; // # heads uCHAR sectors; // # sectors uSHORT driveType; // BIOS drive type #ifdef __cplusplus //---------- Portability Additions ----------- in sp_estd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptCemuParam_S; #endif // c++ //------------------------------------------------------------------- // DPT RAID types #define RAID_NONE 0xffff #define RAID_0 0x00 #define RAID_1 0x01 #define RAID_3 0x03 #define RAID_5 0x05 #define RAID_HOT_SPARE 0xfe #define RAID_REDIRECT 0xff // Expand Array option flags: #define FLG_EXPAND_ARRAY_REMOVE 0x01 //------------------------------------------------------------------- // This structure is the header used when creating a new RAID device. // This header should precede the array's component list. //control // 1=Use individual stripe size, 0=Use global stripe size... #define FLG_RCTL_STRIPE 0x0001 // 1=Use individual number of stripes, 0=Use global device size... #define FLG_RCTL_SIZE 0x0002 // 1=Use specified SCSI address, 0=Compute SCSI address #define FLG_RCTL_ADDR 0x0004 // 1=Use the specified order for the component devices // 0=Place the components in SCSI address order #define FLG_RCTL_ORDER 0x0008 // 1=Force stripe size to be a multiple of the underlying stripe size // (Only valid if FLG_RCTL_CAPACITY_OPT==1) // 0=Fully optimize for capacity #define FLG_RCTL_SS_MULTIPLE 0x0010 // 1=Optimize for capacity when varying stripe sizes are permitted // 0=Optimize for performance when varying stripe sizes are permitted // (Proportionate distribution of spindles) #define FLG_RCTL_CAPACITY_OPT 0x0020 #ifdef __cplusplus struct raidHeader_S { #else typedef struct { #endif uSHORT control; // Control flags - see bit definitions above uSHORT refNum; // RAID definition reference # uLONG size; // Size of resultant RAID device uLONG stripeSize; // Stripe size for each component dptCaddr_S addr; // Resultant address for the new device #ifdef __cplusplus //---------- Portability Additions ----------- in sp_estd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } raidHeader_S; #endif // c++ //------------------------------------------------------------------- // This structure is used to create the component list when creating // a new RAID device. #ifdef __cplusplus struct raidCompList_S { #else typedef struct { #endif DPT_TAG_T tag; // Tag of the component device uLONG startLBA; // Startinf logical block address uLONG stripeSize; // Stripe size for this component uLONG numStripes; // # of stripes for this component #ifdef __cplusplus //---------- Portability Additions ----------- in sp_estd.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } raidCompList_S; #endif // c++ // flags for DSM files #define FLG_DSM_FLAGS_VALID 0xbeef #define FLG_DSM_DONT_RECOMPUTE_ARRAYS 0x0001 //------------------------------------------------------------------------ #ifndef NO_UNPACK #if defined (_DPT_AIX) #pragma options align=reset #elif defined (UNPACK_FOUR) #pragma pack(4) #else #pragma pack() #endif // aix #endif // no unpack #endif // __ENG_STD_H raidutils-0.0.6.orig/include/eng_std.hpp0000664000175000000620000002063710044153307020124 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __ENG_STD_HPP #define __ENG_STD_HPP //File - ENG_STD.HPP //*************************************************************************** // //Description: // // This file contains standard class and structure definitions used //throughout the DPT engine. This file is contains C++ specific syntax. // //Author: Doug Anderson //Date: 5/10/94 // //Editors: // //Remarks: // // //*************************************************************************** //============== // Include Files //============== #include "eng_std.h" #if ((defined(_DPT_MSDOS) || defined (_DPT_WIN_3X)) && !defined(__QNX__)) # include #endif #ifndef NO_PACK #if defined (_DPT_AIX) #pragma options align=packed #else #pragma pack(1) #endif // aix #endif // no unpack //==================== // Byte swap functions //==================== void reverseBytes(void *,uSHORT); inline short reverseBytes(short &inShort) { return (osdSwap2((uSHORT *)&inShort)); }; inline uSHORT reverseBytes(uSHORT &inShort) { return (osdSwap2(&inShort)); }; #if defined (_DPT_32_BIT) || defined (_PRE_PROCESS) inline int reverseBytes(int &inInt) { return (osdSwap4((uLONG *)&inInt)); }; inline uINT reverseBytes(uINT &inInt) { return (osdSwap4((uLONG *)&inInt)); }; #else inline int reverseBytes(int &inInt) { return (osdSwap2((uSHORT *)&inInt)); }; inline uINT reverseBytes(uINT &inInt) { return (osdSwap2((uSHORT *)&inInt)); }; #endif inline long reverseBytes(DPT_UNALIGNED long &inLong) { return (osdSwap4((uLONG *)&inLong)); } inline uLONG reverseBytes(DPT_UNALIGNED uLONG &inLong) { return (osdSwap4(&inLong)); } //================================= // Convert a far pointer to a uLONG //================================= #if defined (_DPT_32_BIT) inline uLONG ptrToLong(void *in_P) { #else inline uLONG ptrToLong(void far *in_P) { #endif #if defined (_DPT_32_BIT) || defined (_PRE_PROCESS) return ((uLONG) in_P); #else void far * ptr = in_P; return ( (((uLONG)FP_SEG(ptr))<<4) + FP_OFF(ptr) ); #endif } //================================= // Convert a uLONG to a far pointer //================================= inline void * longToPtr(uLONG inLong) { #if defined (_DPT_32_BIT) || defined (_PRE_PROCESS) return ((void *) inLong); #else return ( (void *) MK_FP((uINT)((inLong>>4)&0xf000),(uINT)(inLong&0xffff)) ); #endif } //Struct - dptAddr_S - start //=========================================================================== // //Description: // // This class adds a constructor and other support functions to //the dptCaddr_S structure. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- struct dptAddr_S : public dptCaddr_S { // Constructor/Destructor............................. dptAddr_S(); // Other Functions.................................... // Return the SCSI address as an unsigned long uLONG getLong(); // Overload the comparison operators uSHORT operator< (dptAddr_S addr) { return (getLong() (dptAddr_S addr) { return (getLong()>addr.getLong()); } // Overload the comparison operators uSHORT operator== (dptAddr_S addr) { return (getLong()==addr.getLong()); } // Overload the comparison operators uSHORT operator<= (dptAddr_S addr) { return (getLong()<=addr.getLong()); } // Overload the comparison operators uSHORT operator>= (dptAddr_S addr) { return (getLong()>=addr.getLong()); } }; //dptAddr_S - end //Struct - dptCapacity_S - start //=========================================================================== // //Description: // // This class adds a constructor to the dptCcapacity_S structure. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- struct dptCapacity_S : public dptCcapacity_S { // Constructor/Destructor............................. dptCapacity_S(); }; //dptAddr_S - end //Struct - dptStatus_S - start //=========================================================================== // //Description: // // This class adds functions to the dptCstatus_S structure. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- struct dptStatus_S : public dptCstatus_S { // Constructor/Destructor............................. dptStatus_S(); // Return the SCSI address as an unsigned long uLONG getLong(); }; //dptDescr_S - end //Struct - dptEmuParam_S - start //=========================================================================== // //Description: // // This class adds functions to the dptCemuParam_S structure. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- struct dptEmuParam_S : public dptCemuParam_S { // Constructor/Destructor............................. dptEmuParam_S(); }; #if (defined(_DPT_NETWARE)) # define dptEmuParam_size 6 // Watcom 9.5 gets sizeof wrong #else # define dptEmuParam_size sizeof(dptEmuParam_S) #endif //dptEmuParam_S - end //Struct - dptDescr_S - start //=========================================================================== // //Description: // // This class adds functions to the dptCdescr_S structure. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- struct dptDescr_S { // Data............................................... #include "descrip.hh" // Constructor/Destructor............................. dptDescr_S(); // Other Functions.................................... // NULL terminates all ASCII strings void terminate(); // Convert all description strings to upper case void toUpper(); //---------- Portability Additions ----------- in eng_std.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; //dptDescr_S - end #ifndef NO_UNPACK #if defined (_DPT_AIX) #pragma options align=reset #elif defined (UNPACK_FOUR) #pragma pack(4) #else #pragma pack() #endif // aix #endif // no unpack #endif // __ENG_STD_HPP raidutils-0.0.6.orig/include/engine.h0000664000175000000620000000566610044153305017411 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __ENGINE_H #define __ENGINE_H //File - ENGINE.H //*************************************************************************** // //Description: // // This file contains the function prototypes for the global //engine functions that may be exported. // //Author: Doug Anderson //Date: 5/26/94 // //Editors: // //Remarks: // // //*************************************************************************** #include "osd_util.h" #include "eng_std.h" #ifdef _DPT_WIN_NT #include "eng_osd.h" #endif //Prototypes - function ----------------------------------------------------- #ifdef __cplusplus extern "C" { #endif #if defined (_DPT_ERGO) || defined (_DPT_MSDOS) #ifdef _DPT_ENGINE DPT_RTN_T DPT_EXPORT DPT_StartEngine(void); DPT_RTN_T DPT_EXPORT DPT_StopEngine(void); #else DPT_RTN_T DPT_IMPORT DPT_StartEngine(void); DPT_RTN_T DPT_IMPORT DPT_StopEngine(void); #endif #else DPT_RTN_T DPT_StartEngine(void); DPT_RTN_T DPT_StopEngine(void); #endif #ifdef _DPT_ENGINE DPT_RTN_T DPT_EXPORT DPT_Engine(DPT_TAG_T,DPT_MSG_T,DPT_TAG_T,void *,void *,uLONG); #elif !defined(_MANUAL_DLL_LOAD) DPT_RTN_T DPT_IMPORT DPT_Engine(DPT_TAG_T,DPT_MSG_T,DPT_TAG_T,void *,void *,uLONG); #ifdef _DPT_WIN_NT DPT_RTN_T DPT_IMPORT DPT_PassThru(uSHORT,dptCCB_S *); #endif #endif #ifdef __cplusplus }; #endif #endif raidutils-0.0.6.orig/include/engmsg.h0000664000175000000620000000366310044153306017420 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef __cplusplus extern "C" { #endif int MessageDPTEngine(int EngineMsgKey,int msqID,int EngineMessage, int SecondsToWait); int CheckForEngine(int EngineMsgKey,int Clear,int SecondsToWait); /* allows comm engine to attach to engine's msg queue */ int CheckForCommEng(int EngineMsgKey,int Clear,int SecondsToWait); #ifdef __cplusplus } /* extern c */ #endif raidutils-0.0.6.orig/include/findpath.h0000664000175000000620000000524010044153305017725 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 12/11/98 * ***************************************************************************** * * File Name: findpath.h * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * *****************************************************************************/ #if (defined(__cplusplus)) extern "C" { #endif /*** INCLUDES ***/ #if (defined(NEXT)) # include #elif (defined(_WIN32) || defined(_DPT_WIN_NT)) # define F_OK 0 # undef X_OK # define X_OK 4 /* An executable under NT is just readable */ # define W_OK 2 # define R_OK 4 # include #else # include #endif /*** PROCEDURE PROTOTYPE ***/ #if (!defined(__PMT)) # define __PMT(x) x #endif #if (!defined(CONST)) # define CONST const #endif char * FindPath __PMT((CONST char * file, int mode)); char * AddSearchArgv __PMT((char * search)); char * AddSearch __PMT((char * searchLeft, CONST char * searchRight)); char * FindPathWithSearch __PMT((CONST char * file, int mode, CONST char * search)); #if (defined(__cplusplus)) } #endif raidutils-0.0.6.orig/include/funcs.h0000664000175000000620000000552110044153306017251 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - FUNCS.H //*************************************************************************** // //Description: // This Function Contains Miscalaneous Functions Used By The Unix // Applications, Including Some Of The Library Calls That Are Found // In DOS, But Not In Unix. // //Author: //Date: // //Editors: // //Remarks: // // //*************************************************************************** #ifndef __FUNCS_H #define __FUNCS_H //Include Files ------------------------------------------------------------- #ifdef __cplusplus extern "C" { #endif #if defined(__UNIX__) || defined (_DPT_UNIX) char *strupr( char *String ); char *strlwr( char *String ); int stricmp(char *String1, char *String2); int strnicmp(char *String1, char *String2, int maxlen); int strcmpi(char *, char *); char * strnset(char *, char, int); // provide for compatibility #define strncmpi(x, y, z) strnicmp(x, y, z) #define strcmpi(x, y) stricmp(x, y) #endif uCHAR AsciiDigetsToHexByte( char *String ); void InvertBytes(uCHAR *Source,uCHAR *Dest,uSHORT InvertCount); char *LongToAscii(uLONG Value,char *String,uSHORT Base); void dptr_PrintMem(uCHAR *Addr,int Count); #ifdef __cplusplus } /* extern c */ #endif #endif // __FUNCS_H raidutils-0.0.6.orig/include/get_info.h0000664000175000000620000007640610044153305017736 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __GET_INFO_H #define __GET_INFO_H //File - GET_INFO.H //*************************************************************************** // //Description: // // This file contains the structure definitions for the information //associated with various engine objects. This information is returned //by the message MSG_GET_INFO. // //Author: Doug Anderson //Date: 3/14/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "eng_std.h" #ifndef NO_PACK #if defined (_DPT_AIX) #pragma options align=packed #else #pragma pack(1) #endif // aix #endif // Engine compatability indicator #ifndef __cplusplus #define DPT_ENGINE_COMPATIBILITY 4 #else const uLONG DPT_ENGINE_COMPATIBILITY = 4; #endif //======================================================================== // Channel info structure returned by MSG_GET_CHAN_INFO //pc13Flags1 - bit definitions (same as lower 8 bits of dptChanInfo_S::flags) #define FLG_CHAN2_DIF 0x01 // If 1, Differential SCSI #define FLG_CHAN2_WIDE 0x02 // If 1, 16 Bit Wide SCSI #define FLG_CHAN2_EXT 0x04 // If 1, Speed limited to 5MHz if external cable is attached #define FLG_CHAN2_QUE 0x08 // If 1, command queueing is disabled #define FLG_CHAN2_SRS 0x10 // If 1, hardware for SmartRAID (DEC) Storage Subsystem present #define FLG_CHAN2_NOSS 0x20 // If 1, storage subsystem signals are invalid. #define FLG_CHAN2_SWAP 0x40 // If 1, drive has been swapped (cleared after read). #define FLG_CHAN2_SHLF 0x80 // If 1, shelf (storage subsystem) is in failed state. //pc13Flags2 - bit definitions (same as upper 8 bits of dptChanInfo_S::flags) #define FLG_CHAN2_FIBRE 0x01 // If 1, Fiber Channel (1 Ghz) #define FLG_CHAN2_ATRM 0x02 // If 1, Auto Termination is supported #define FLG_CHAN2_SAFTE 0x04 // If 1, a SAFTE device is on the bus #define FLG_CHAN2_SES 0x08 // If 1, an SES device is on the bus #define FLG_CHAN2_UDMA 0x10 // If 1, SCSI chip is talking to UDMA drives #define FLG_CHAN2_ULTR80 0x20 // If 1, Ultra-3 SCSI (REQ/ACK rate is actually 40Mhz, but data rate is 80Mhz) #define FLG_CHAN2_ULTR40 0x40 // If 1, Ultra-2 SCSI #define FLG_CHAN2_ULTRA 0x80 // If 1, Ultra SCSI //pc13Flags3 - bit definitions #define FLG_CHAN2_ECON 0x01 // Set to ONE if External SCSI Cable is connected. * #define FLG_CHAN2_ICON 0x02 // Set to ONE if Internal SCSI Cable is connected. * // (ICON and ECON will be ZERO for Fiber type ports. Some models of SCSI HBA's do not support cable detect feature and these bits will be seen as ZERO even when a cable is connected.) #define FLG_CHAN2_TERMP 0x04 // Set to ONE if this channel supports software controlled setting of termination power #define FLG_CHAN2_NOHT 0x08 // Set if High-Only Termination is not supported //pc13Flags4 - bit definitions #define FLG_CHAN2_ULTR160 0x01 // If 1, Ultra 320 (REQ/ACK rate is actually 80Mhz, but data rate is 160Mhz) #define FLG_CHAN2_ULTR320 0x02 // If 1, Ultra 640 (REQ/ACK rate is actually 160Mhz, but data rate is 320Mhz) #define FLG_CHAN2_SATA 0x04 // Serial ATA #ifdef __cplusplus struct dptChanInfo2_S { #else typedef struct { #endif uLONG chanNum; // The channel # (relative to the HBA, ie. 0-n) uLONG length; // The byte length of the fields that follow uCHAR pc13Flags1; // From log page 0x33 parameter code 0x0d uCHAR pc13Flags2; // From log page 0x33 parameter code 0x0d uCHAR pc13Speed; // From log page 0x33 parameter code 0x0d uCHAR pc13ScamIdMap1; // From log page 0x33 parameter code 0x0d uCHAR pc13ScamIdMap2; // From log page 0x33 parameter code 0x0d uCHAR pc13Flags3; // From log page 0x33 parameter code 0x0d uCHAR pc13Flags4; // From log page 0x33 parameter code 0x0d uCHAR pc13Reserved[9];// Reserved for log page 0x33 parameter code 0x0d extensions uLONG hbaId; // The HBA's SCSI ID on this channel uLONG maxXfrSpeed; // The maximum data transfer speed support by this channel (in Mbytes/sec) uLONG reserved[4]; #ifdef __cplusplus }; #else } dptChanInfo2_S; #endif //======================================================================== //flags1 - bit definitions #define FLG_SEG_CACHE_DISABLE 0x01 #define FLG_SEG_PREDICTIVE_ENABLE 0x02 #define FLG_SEG_WRITE_THRU 0x04 #ifdef __cplusplus struct arraySegment_S { #else typedef struct { #endif uCHAR flags1; // see bit definitions above uCHAR reserved1; uCHAR reserved2; uCHAR reserved3; uLONG offsetHi; // Upper 32 bits of the starting block offset uLONG offsetLo; // Lower 32 bits of the starting block offset uLONG sizeHi; // Upper 32 bit of the block size uLONG sizeLo; // Lower 32 bits of the block size char name_A[16]; // A user assigned name for the array #ifdef __cplusplus }; #else } arraySegment_S; #endif //======================================================================== // DPT progress structure - Used with MSG_RAID_GET_PROGRESS #ifdef __cplusplus struct dptProgress_S { #else typedef struct { #endif uLONG curBlk; // Current block # uLONG lastBlk; // Last block # dptCstatus_S status; // Updated device status uLONG errCount; // Verify error count // Added for firmware based diagnostics uLONG totalIterations; // Total # iterations to be performed uLONG curIteration; // Current iteration number uLONG firstErrorBlk; // Physical block # of first error uCHAR diagType; // Diagnostic type uCHAR diagFlags; // Diagnostic flags uSHORT maxErrors; // Maximum error count uCHAR percent; // Percent complete (from firmware) #ifdef __cplusplus //---------- Portability Additions ----------- in sp_ginfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptProgress_S; #endif //======================================================================== // Basic engine object information #ifdef __cplusplus struct dptBasic_S { #else typedef struct { #endif #include "basic.hh" #ifdef __cplusplus //---------- Portability Additions ----------- in sp_ginfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptBasic_S; #endif //======================================================================== //objType // Bit: Description: // ---- ------------ // 15 RAID: The object is capable of executing RAID messages. // 14 I/O: (Managers only) - The manager is capable of sending // a CCB to hardware. // 13 Absent: (Managers only) - The manager is can create // absent objects. // 12 List: (Devices only) // 1=The device originates in a logical list // 0=The device originates in a physical list // 11-9 Manager Type: // 000 = Driver Manager // 001 = HBA Manager // 010 = BCD Manager (Bridge Controller Device) // 8 1=The object is a manager // 0=The object is a device // 7-0 Device Type: See SCSI device types //------------------------------------------------------------------------ // Size of dptName field (16 valid chars) #define DPT_NAME_SIZE 16 //flags - dptBasicInfo_S // 1=The device is suppressed #define FLG_DEV_SUPPRESSED 0x0001 // 1=The device was deliberately suppressed #define FLG_DEV_SUP_DESIRED 0x0002 // 1=The device is an emulated drive #define FLG_DEV_EMULATED 0x0004 // 1=The device is emulated drive 1 (D:) // 0=The device is emulated drive 0 (C:) #define FLG_DEV_EMU_01 0x0008 // 1=The device has removeable media #define FLG_DEV_REMOVEABLE 0x0010 // 1=The device originates in a logical device list // 0=The device originates in a physical object list #define FLG_DEV_LOGICAL 0x0020 // 1=A valid partition table was found on the device #define FLG_DEV_PTABLE 0x0040 // 1=A valid DPT reserve block was detected at the end of the drive #define FLG_DEV_RESERVE_BLOCK 0x0080 // 1=The HBA supports cache only features #define FLG_DEV_HBA_CACHE 0x0100 // 1=Downloaded firmware code exists on this drive #define FLG_DEV_DFW 0x0200 // 1=The previous SCSI address field is valid #define FLG_DEV_PADDR_VALID 0x0400 // 1=This device is protected by DPT's ECC algorithm #define FLG_DEV_ECC_PROTECTED 0x0800 // 1=The RAID specific data is valid #define FLG_DEV_RAID_VALID 0x1000 // 1=The next RAID manager tag is valid #define FLG_DEV_RAID_NEXT_MGR 0x2000 // 1=The device is a component of another RAID device // (The RAID parent information is valid) #define FLG_DEV_RAID_COMPONENT 0x4000 // 1=The device is protected by a Hot Spare #define FLG_DEV_HS_PROTECTED 0x8000 //flags2 - bit definitions // 1=This drive cannot change its block size // Note: If this flag is not set, the block size may or may not // be changeable. If this flag is set, the block size is not // changeable. #define FLG_DEV_BLK_SZ_NO_CHG 0x0001 // 1=DPT firmware's SMART emulation is enabled #define FLG_DEV_SMART_EMULATION 0x0002 // 1=The device's SMART feature is enabled #define FLG_DEV_SMART_ACTIVE 0x0004 // this device is a real array that has had devices added to it #define FLG_DEV_ARRAY_EXPANDED 0x0008 // this is a device that has been added to a real array #define FLG_DEV_EXPANDED_COMPONENT 0x0010 // this is a SAF-TE device #define FLG_DEV_SAFTE 0x0020 // this device supports SCSI-3 Enclosure Services (SES) commands #define FLG_DEV_SES 0x0040 #ifdef _SINIX_ADDON // Flag to indicate, that diagnostics verify (SSUB_VERIFY) does not work. used for the ux2 FW sent to SNI #define FLG_DEV_NO_VERIFY 0x0100 #endif // 1=A Solaris partition was detected #define FLG_DEV_SOLARIS_PARTITION 0x0200 // Configured as a manual JBOD configured drive #define FLG_DEV_MANUAL_JBOD_CONFIGURED 0x0400 // 1=This device is a physical device that is a component of a real // array that has been deleted in the engine but still exists in // hardware. (This flag is primarily useful inside the // engine) #define FLG_DEV_ARRAY_COMPONENT 0x4000 // 1=This device is a physical device that is a component of an // array that has not been saved to hardware. (This flag is // primarily useful inside the engine) #define FLG_DEV_NEW_COMPONENT 0x8000 //flags3 - bit definitions #define FLG_DEV_WIDE16 0x00000001 // A 16 bit wide parallel SCSI device #define FLG_DEV_FIBRE 0x00000002 // A Fibre Channel device #define FLG_DEV_UNUSED 0x00000004 // currently undefined #define FLG_DEV_P2_ACTIVE 0x00000008 // Path 2 active #define FLG_DEV_P1_ACTIVE 0x00000010 // Path 1 active #define FLG_DEV_P2_CHAN_NUM 0x000000E0 // Path 2 channel # (for dual loop fibre) #define FLG_DEV_SPEED_VALID 0x00000100 // If set, busSpeed & first byte of flags3 are valid #define FLG_DEV_RES_CONFLICT 0x40000000 // A SCSI reservation conflict was returned #define FLG_DEV_SPUN_DOWN 0x80000000 // Device is spun down //p2Flags - bit definitions #define FLG_DEV_P2_ID 0x7F // Path 2 SCSI ID #define FLG_DEV_P2_VALID 0x80 // Path 2 is valid (the device has two access paths) //udmaModes #define UDMA_MODE_33 2 #define UDMA_MODE_45 3 #define UDMA_MODE_66 4 #define UDMA_MODE_100 5 #define UDMA_MODE_133 6 #ifdef __cplusplus struct dptDevInfo_S { #else typedef struct { #endif #include "basic.hh" #include "device.hh" #include "raid_dev.hh" #undef PACK #if (defined(__GNUC__)) # define PACK __attribute__ ((packed)) #else #define PACK #endif uSHORT flags2; // Supplemental flags word uSHORT hbaIndex; // HBA index # (slot #) uSHORT hbaFlags; // HBA flags - see bit definitions below #if defined (_DPT_STRICT_ALIGN) uSHORT sniAdjust3; #endif uLONG magicNum PACK; // RAID magic # uLONG hbaTag PACK; // Reserved for future expansion uLONG flags3 PACK; // Miscellaneous flags - see bit definitions above uSHORT busSpeed PACK; // Negotiated bus speed (in Mhz) uCHAR p2Flags PACK; // Path 2 flags - see bit definitions above uCHAR reserved4 PACK; // Reserved for future expansion uLONG availableCapacity PACK; // Reserved for future expansion uCHAR udmaModeSupported;// The maximum UDMA mode supported uCHAR udmaModeSelected; // The current operational UDMA mode // UDMA mode 5 = 100 Mbyte/sec // UDMA mode 4 = 66 Mbyte/sec // UDMA mode 3 = 45 Mbyte/sec // UDMA mode 2 = 33 Mbyte/sec uCHAR reserved7; // Reserved for future expansion uCHAR scheduledDiag; // Type of scheduled diagnostic // 0 = No diagnostic scheduled // 1 = Buffer Read // 2 = Buffer Read/Write // 3 = Media Read // 4 = Media Read/Write uSHORT phyBlockSize; // This device's physical block (sector) size #if defined (_DPT_STRICT_ALIGN) uCHAR extra[10]; // Extra bytes for future expansion #else uCHAR extra[8]; // Extra bytes for future expansion #endif #ifdef __cplusplus //---------- Portability Additions ----------- in sp_ginfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptDevInfo_S; #endif //------------------------------------------------------------------------ //status - battery status values #define BATTERY_STAT_NO_BATTERY 0x0000 // No battery was detected #define BATTERY_STAT_TRICKLE_CHARGE 0x0001 // Battery is fully charged #define BATTERY_STAT_FAST_CHARGE 0x0002 // Battery is charging #define BATTERY_STAT_DISCHARGE 0x0003 // Battery is discharging #define BATTERY_STAT_BAD 0x0004 // A full-charge is less than predictive failure threshold #define BATTERY_STAT_PRED_FAIL 0x0005 // Predictive failure battery #define BATTERY_STAT_STARTUP 0x0007 // Battery is starting up #define BATTERY_STAT_OPERATIONAL 0x0008 // Battery is fully charged #define BATTERY_STAT_INIT_CHARGE 0x8002 // Initial calibration charge #define BATTERY_STAT_INIT_DISCHARGE 0x8003 // Initial calibration discharge #define BATTERY_STAT_INIT_RECHARGE 0x8102 // Initial calibration recharge #define BATTERY_STAT_MAINTENANCE_CHARGE 0x4002 // Maintenance calibration charge #define BATTERY_STAT_MAINTENANCE_DISCHARGE 0x4003 // Maintenence calibration discharge //thresholdEnable - bit definitions #define BATTERY_ENABLE_AUTO_WRITE_THRU 0x0001 #define BATTERY_ENABLE_PREDICTIVE_FAILURE 0x0002 //flags - bit definitions #define BATTERY_FLAG_FORCED_WRITE_THROUGH 0x0001 // MSG_GET_BATTERY_INFO #ifdef __cplusplus struct dptBatteryInfo_S { #else typedef struct { #endif uLONG status; // See status value above uLONG current; // Current draw (milliamps) uLONG voltage; // Voltage level (millivolts) uLONG designCapacity; // milliamp-hours uLONG fullChargeCapacity; // milliamp-hours uLONG remainingCapacity; // milliamp-hours uLONG remainingTime; // minutes uLONG maxRemainingTime; // minutes uLONG temperature; // degrees celcius uLONG maintenanceCycleCount; // Number of times maintenance calibration has been run (resets with every initial calibration) uLONG hwDesignVersion; // Hardware design version // Date of manufacture uCHAR manufactureDay; // Day of month (1-31) uCHAR manufactureMonth; // Month (1-12) uCHAR manufactureYear; // Year (biased by 1980) // Flags - see bit definitions above uCHAR flags; // miscellaneous flags // Threshold values uLONG writeThruThreshold; // When to enter auto write through mode (minutes remaining) uLONG predictiveFailureThreshold; // (minutes remaining) uLONG reserved4; // reserved uLONG thresholdEnable; // See bit definitions above // Date of last maintenance calibration uCHAR maintenanceDay; // Day of month (1-31) uCHAR maintenanceMonth; // Month (1-12) uCHAR maintenanceYear; // Year (biased by 1980) uCHAR reserved2; // reserved for long-word alignment // Date of last initial calibration uCHAR initCalibDay; // Day of month (1-31) uCHAR initCalibMonth; // Month (1-12) uCHAR initCalibYear; // Year (biased by 1980) uCHAR reserved3; // reserved for long-word alignment // ASCII fields char deviceChemistry[16]; // ASCII (ie. "NiMH") char manufacturerName[16]; // ASCII char deviceName[16]; // ASCII #ifdef __cplusplus }; #else } dptBatteryInfo_S; #endif // MSG_SET_BATTERY_INFO #ifdef __cplusplus struct dptBatteryThreshold_S { #else typedef struct { #endif uLONG writeThruThreshold; // When to enter auto write through mode (minutes remaining) uLONG predictiveFailureThreshold; // (minutes remaining) uLONG reserved; // reserved uLONG thresholdEnable; // See bit definitions above #ifdef __cplusplus }; #else } dptBatteryThreshold_S; #endif //------------------------------------------------------------------------ // Size of the channel info array in dptHBAinfo_S #define NUM_CHAN_INFO 3 //flags - bit definitions // DEC Storage sub-system status signals #define FLG_CHAN_SUBSYS_FAILED 0x0001 #define FLG_CHAN_SUBSYS_SWAP 0x0002 #define FLG_CHAN_SUBSYS_VALID 0x0004 // 1 = H/W is on the HBA to support the DEC storage sub-system #define FLG_CHAN_SUBSYS_HW 0x0008 // 1 = Command queueing enabled #define FLG_CHAN_CMD_QUEUE 0x0010 // 1=External cable attached (Speed limited to 5Mb/sec) #define FLG_CHAN_EXTERNAL 0x0020 // 1=16 bit wide SCSI #define FLG_CHAN_WIDE_16 0x0040 // 1=Differential SCSI #define FLG_CHAN_DIFFERENTIAL 0x0080 // 1=Fibre #define FLG_CHAN_FIBRE 0x0100 // 1=Auto-termination supported #define FLG_CHAN_AUTO_TERM 0x0200 // 1=A SAFTE device is on the bus #define FLG_CHAN_SAFTE 0x0400 // 1=An SES device is on the bus #define FLG_CHAN_SES 0x0800 // 1=UDMA #define FLG_CHAN_UDMA 0x1000 // 1=Ultra SCSI - 80 #define FLG_CHAN_ULTRA_80 0x2000 // 1=Ultra SCSI - 40 #define FLG_CHAN_ULTRA_40 0x4000 // 1=Ultra SCSI #define FLG_CHAN_ULTRA 0x8000 #ifdef __cplusplus struct dptChanInfo_S { #else typedef struct { #endif uSHORT flags; // See bit definitions above uSHORT scamIdMap; // If bit for ID is set, device supports SCAM uCHAR scsiBusSpeed; // 5, 10, 20 Mb/sec uCHAR hbaID; // the HBA's SCSI ID for this channel; #ifdef __cplusplus //---------- Portability Additions ----------- in sp_ginfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptChanInfo_S; #endif //------------------------------------------------------------------------ //raidSupport - bit definitions #define FLG_RAID_0 0x0001 #define FLG_RAID_1 0x0002 #define FLG_RAID_3 0x0008 #define FLG_RAID_5 0x0020 #define FLG_RAID_REDIRECT 0x4000 #define FLG_RAID_HOT_SPARE 0x8000 //flags - dptBasicInfo_S // 1=Primary HBA, 0=Secondary HBA #define FLG_HBA_PRIMARY 0x0001 // 1=HBA supports overlapped commands #define FLG_HBA_OVERLAP 0x0002 // 1=HBA supports SCSI target mode #define FLG_HBA_TGT_MODE 0x0004 // 1=HBA supports DMA #define FLG_HBA_DMA 0x0008 // 1=SmartRom is enabled on this HBA #define FLG_HBA_SMARTROM 0x0010 // 1=Differential SCSI #define FLG_HBA_DIFFERENTIAL 0x0020 // 1=16 bit wide SCSI #define FLG_HBA_WIDE_16 0x0040 // 1=External cable attached (Speed limited to 5Mb/sec) #define FLG_HBA_EXTERNAL 0x0080 // 1=DPT chipset, 0=Standard HBA board #define FLG_HBA_CHIPSET 0x0100 // 1=The FW supports downloadable FW // Note: This flag is no longer supported #define FLG_HBA_DOWNLOAD_FW 0x0200 // 1=The HBA is equipped with flash memory to hold F/W and SmartRom code #define FLG_HBA_FLASH_MEM 0x0400 // 1=The FW and board support ECC #define FLG_HBA_ECC_SUPPORTED 0x0800 // 1=DPT's ECC algorithm is enabled on all 528 byte sector size drives #define FLG_HBA_ECC_ENABLED 0x1000 // 1=The FW responds to RAID commands #define FLG_HBA_RAID_FW 0x2000 // 1=HBA is capable of configuring RAID devices // (RAID module, Cache Module, FW responds to RAID commands) #define FLG_HBA_RAID_CAPABLE 0x4000 // 1=HBA is able to configure RAID devices // (FLG_HBA_RAID_CAPABLE && at least 1 DASD device attached) #define FLG_HBA_RAID_READY 0x8000 //modules // Module in memory bank #0 // If FLG_MOD_CM401X = On board memory module // else if FLG_MOD_CM4000 = SIMM bank #0 #define FLG_MOD_MEM_BANK0 0x0001 // Module in memory bank #1 // If FLG_MOD_CM401X = MX board // else if FLG_MOD_CM4000 = SIMM bank #1 #define FLG_MOD_MEM_BANK1 0x0002 // Module in memory bank #2 // If FLG_MOD_CM401X = MX board bay #1 // else if FLG_MOD_CM4000 = SIMM bank #2 #define FLG_MOD_MEM_BANK2 0x0004 // Module in memory bank #3 // If FLG_MOD_CM401X = MX board bay #2 // else if FLG_MOD_CM4000 = SIMM bank #3 #define FLG_MOD_MEM_BANK3 0x0008 // A SmartCache IV RAID/Cache module is installed (SIMM version) #define FLG_MOD_RC4040 0x0010 // A SmartCache IV RAID/Cache module is installed (DIMM fold back version) #define FLG_MOD_RC4041 0x0020 // Single channel SCSI expansion module attached #define FLG_MOD_SX1 0x0080 // Dual channel SCSI expansion module attached #define FLG_MOD_SX2 0x0100 // Battery backup unit attached #define FLG_MOD_BBU 0x0200 // Integrated (built in) cache module #define FLG_MOD_CMI 0x0400 // Integrated (built in) RAID module #define FLG_MOD_DMI 0x0800 // CM4000 Cache Module #define FLG_MOD_CM4000 0x1000 // CM401X Cache module #define FLG_MOD_CM401X 0x2000 // DM4000 RAID module #define FLG_MOD_DM4000 0x4000 // DM401X RAID module #define FLG_MOD_DM401X 0x8000 // NOTE: On Gen 5 boards, if FLG_MOD_CM4000 and FLG_MOD_DM4000 are both set, // it indicates that an RA module is attached //busType #define HBA_BUS_ISA 0x0000 #define HBA_BUS_EISA 0x0001 #define HBA_BUS_PCI 0x0002 //flags2 - bit definitions // DEC Storage sub-system status signals #define FLG_HBA_SUBSYS_FAILED 0x00000001 #define FLG_HBA_SUBSYS_SWAP 0x00000002 #define FLG_HBA_SUBSYS_VALID 0x00000004 // 1 = H/W is on the HBA to support the DEC storage sub-system #define FLG_HBA_SUBSYS_HW 0x00000008 // 1 = F/W supports the interpret format command // (Allows for terminate immediate & auto-clearing of the drive) #define FLG_HBA_INTERPRET_FMT 0x00000100 // 1 = The HBA is disabled (in PCI config...) #define FLG_HBA_DISABLED 0x00000200 // 1 = A drive has been detected with an ECC size error #define FLG_HBA_ECC_SIZE_ERR 0x00000400 // 1 = The HBA is a SmartCache IV PCB #define FLG_HBA_SC4 0x00000800 // 1 = The HBA supports auto-termination of the narrow SCSI bus #define FLG_HBA_AUTO_TERM 0x00001000 // 1 = There is NV RAM present on the board #define FLG_HBA_NVRAM 0x00002000 // 1 = Firmware based diagnostics are supported #define FLG_HBA_DIAGNOSTICS 0x4000L // 1 = Firmware supports SMART emulation #define FLG_HBA_SMART_EMULATION 0x00008000 // 1 = Ultra SCSI #define FLG_HBA_ULTRA 0x00010000 // 1= The HBA supports SCAM on one or more busses #define FLG_HBA_SCAM 0x00020000 // 1 = the hba is cabaple of expanding arrays #define FLG_HBA_EXPAND_ARRAY 0x00040000 // 1 = the hba has a temperature probe chip #define FLG_HBA_TEMP_PROBE 0x00080000 // 1 = the hba supports tuneable spin up times #define FLG_HBA_VAR_SPIN_UP 0x00100000 // 1 = The HBA is an I2O HBA. #define FLG_HBA_I2O 0x00200000L // Firmware supports // 1. The second version of log page 0x36 // 2. The second version of the physical array page // 3. Fibre SCSI ID packing if 2 or fewer SCSI buses on the HBA // (using the upper 2 channel bits as extended ID bits) #define FLG_HBA_I2O_VER2 0x00400000L // 1 = Predictive caching supported. #define FLG_HBA_PREDICTIVE 0x00800000L // 1 = No audible alarm on the controller #define FLG_HBA_NO_ALARM 0x01000000L // Configured as a manual JBOD configured drive #define FLG_HBA_MANUAL_JBOD_ACTIVE 0x02000000 // Wolfpack cluster mode is enabled #define FLG_HBA_CLUSTER_MODE 0x04000000 // Dedicated HotSpares supported #define FLG_HBA_DEDICATED_HOTSPARE 0x10000000 //raidFlags - bit definitions // 1 = The HBA should check to rebuild arrays at boot time #define FLG_RBLD_BOOT_CHECK 0x0001 // 1 = Partition tables will not be destroyed when arrays are // created or deleted #define FLG_PART_ZAP_DISABLED 0x0002 // 1 = LUN segmenting is supported #define FLG_SEG_SUPPORTED 0x0004 // 1 = 64 bit LUN segmenting fields are support #define FLG_SEG_64 0x0008 //fwFlags - bit definitions #define FLG_BAT_LOW 0x80 // Batteries below 3.0 vdc (may need to be replaced or are not fully charged) #define FLG_BAT_NA 0x40 // Battereis not attached #define FLG_BAT_SUPPORTED 0x20 // Batteries supported #define FLG_MEM_NOSIM 0x08 // Simm sockets not available #define FLG_MEM_EMBEDED_ECC 0x04 // Embedded Memory is ECC #define FLG_MEM_PARITY_ERR 0x02 // Memory parity error has occurred #define FLG_MEM_EMBEDED 0x01 // Memory is embedded // Data returned from MSG_GET_INFO targeted for an HBA #ifdef __cplusplus struct dptHBAinfo_S { #else typedef struct { #endif #include "basic.hh" #include "mgr.hh" #include "hba.hh" uCHAR extraChan[6]; // Extra bytes reserved for 5th channel or other use if necessary uCHAR hostBusInfo; // Host bus info returned from firmware // Bits 7-6 = bus width // 00 = unknown // 01 = 32 bit // 10 = 64 bit // 11 = 128 bit // Bits 5-4 = undefined // Bits 3-0 = bus type (maximum speed capable by the controller) // 0x0 = unknown // 0x1 = PCI 33 // 0x2 = PCI 66 // 0x3 = PCI 100 // 0x4 = PCIX // 0x5 = INFINIBAND // 0x7 - 0xf = undefined uCHAR fwFlags; // Firmware flags - see bit definitions above uCHAR extra[4]; // Extra bytes for future expansion #ifdef __cplusplus //---------- Portability Additions ----------- in sp_ginfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptHBAinfo_S; #endif //-------------------------------------------------- // HBA data field definitions used with MSG_SET_INFO //-------------------------------------------------- #define DF_RBLD_FREQUENCY 0x0001 // uSHORT #define DF_RBLD_AMOUNT 0x0002 // uSHORT #define DF_RBLD_RATE 0x0003 // (Rebuild Frequency and Amount) #define DF_RBLD_POLL_FREQ 0x0003 // uSHORT #define DF_RBLD_BOOT_CHECK 0x0004 // uSHORT #define DF_SPIN_DOWN_DELAY 0x0005 // uSHORT // if non-zero, disable partition table zapping // else, enable partition table zapping #define DF_DISABLE_PART_ZAP 0x0006 // uSHORT //------------------------------------------------------------------------ // flags - dptBasicInfo_S // 1=Redundant controllers #define FLG_BCD_REDUNDANT 0x0008 // 1=This is an NCR type RAID bridge controller // (The RAID specific data is valid) #define FLG_BCD_RAID_VALID 0x1000 // Data returned from MSG_GET_INFO targeted for a BCD #ifdef __cplusplus struct dptBCDonlyInfo_S { #else typedef struct { #endif #include "basic.hh" #include "mgr.hh" #ifdef __cplusplus //---------- Portability Additions ----------- in sp_ginfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptBCDonlyInfo_S; #endif // Data returned from MSG_GET_INFO targeted for a RAID BCD #ifdef __cplusplus struct dptBCDinfo_S { #else typedef struct { #endif #include "basic.hh" #include "mgr.hh" #include "raid_bcd.hh" #ifdef __cplusplus //---------- Portability Additions ----------- in sp_ginfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT_PORTABLE //-------------------------------------------- }; #else } dptBCDinfo_S; #endif //======================================================================== #ifndef NO_UNPACK #if defined (_DPT_AIX) #pragma options align=reset #elif defined (UNPACK_FOUR) #pragma pack(4) #else #pragma pack() #endif // aix #endif // no unpack #endif // __GET_INFO_H raidutils-0.0.6.orig/include/hba.hh0000664000175000000620000000755110044153305017041 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ // Data unique to every engine HBA #undef PACK #if (defined(__GNUC__)) # define PACK __attribute__ ((packed)) #else #define PACK #endif dptIOaddr_U ioAddr PACK; // EISA/ISA/PCI address uSHORT drvrRefNum; // Number by which the driver ref- // erences this HBA #if defined (_DPT_STRICT_ALIGN) uSHORT sniAdjust4; #endif dptHBAid_U id PACK; // EISA = ID PAL bytes // ISA = Not used // PCI = vendor ID, product ID uSHORT drqNum; // DRQ # (0,5,6,7,0xffff=invalid) uSHORT irqNum; // IRQ # (0-15,0xffff=invalid) // Bit #8: 1=Level, 0=Edge uSHORT modules; // Modules attached to this HBA #if defined (_DPT_STRICT_ALIGN) uSHORT sniAdjust5; #endif uLONG memSize PACK; // Total amount of RAM uLONG eventLogCtl PACK; // Event Log control word // Host to HBA bus speed (3 char NULL terminated ASCII - Mb/sec) uCHAR busSpeed[4]; // Host to HBA bus type - see definitions in get_set.h uCHAR busType; // SCSI bus transfer speed (5, 10, 20 Mb/sec) uCHAR scsiBusSpeed; // CPU speed (Mhz) uCHAR cpuSpeed; // 680XX uCHAR cpuType; // Size of each memory bank (Mbytes) uCHAR memBank[4]; // FW type based on board model (070,230...) uSHORT fwType; #if defined (_DPT_STRICT_ALIGN) uSHORT sniAdjust7; #endif // More flags - see bit definitions above uLONG flags2 PACK; uCHAR busNum; // PCI Bus # uCHAR devFnNum; // PCI Device/Function # uCHAR raidID; // Software selectable RAID ID # uCHAR slotID; // Slot specific RAID ID # dptChanInfo_S chanInfo[NUM_CHAN_INFO] PACK; // SCSI channel info (multi-channel boards) uCHAR excludeStart; uCHAR excludeEnd; uSHORT currVoltage; // Current Voltage uSHORT currTemperature; // Current temperature (celcius - low bit is .5) uSHORT maxMajorStripe; // Maximum major stripe size returned by firmware (log page 0x33, param 0x0e) uSHORT freeRaidEntries; // Number of available RAID entries for array creation uSHORT batteryStatus; // Battery status - values defined in dptBatteryInfo_S uCHAR batteryFlags; // Bit definitions defined in dptBatteryInfo_S uCHAR batteryReserved; uSHORT maxRaidComponents; // Maximum number of component devices in an array dptChanInfo_S chan4; // Info for bus #4 raidutils-0.0.6.orig/include/hba_log.h0000664000175000000620000026160710044153305017536 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __HBA_LOG_H #define __HBA_LOG_H //File - HBA_LOG.H //*************************************************************************** // //Description: // // This file contains structure definitions for the HBA logging //parameters. // //Author: Doug Anderson //Date: 5/6/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #include "dptalign.h" #endif #ifndef NO_PACK #if defined (_DPT_AIX) #pragma options align=packed #else #pragma pack(1) #endif // aix #endif //Definitions - Defines & Constants ----------------------------------------- //Definitions - Structure & Typedef ----------------------------------------- // Note: parameter - 0xLXXX // L = Severity Level // XXX = Defines data portion of the parameter //------------------------------------------------------------------------ // Typical DPT event log entry #define STRUCT_NAME hl_Standard_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 4 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR * getData() { return getUP1(this,4); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else // The time the event occurred uLONG time; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Header parameter - 0xf001 #define STRUCT_NAME hl_Header_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 12 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getMaxLogSize() { return getU4(this,0); } uLONG setMaxLogSize(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapMaxLogSize() { return osdSwap4((uLONG *)getUP1(this,0)); } uLONG getNumParams() { return getU4(this,4); } uLONG setNumParams(uLONG inLong) { return setU4(this,4,inLong); } uLONG swapNumParams() { return osdSwap4((uLONG *)getUP1(this,4)); } uLONG getNewParams() { return getU4(this,8); } uLONG setNewParams(uLONG inLong) { return setU4(this,8,inLong); } uLONG swapNewParams() { return osdSwap4((uLONG *)getUP1(this,8)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapMaxLogSize(); swapNumParams(); swapNewParams(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else // # of bytes reserved in HBA RAM for the log buffer uLONG maxLogSize; // # parameters currently stored in the log uLONG numParams; // # parameters added to the log since the last log sense uLONG newParams; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Log overflow parameter - 0xf002 #define STRUCT_NAME hl_Overflow_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 4 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else // The time the overflow occurred uLONG time; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Bad SCSI status parameter - 0xL003 #define STRUCT_NAME hl_SCSIstat_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 20 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getUnused() { return getU1(this,6); } uCHAR setUnused(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR getStatus() { return getU1(this,7); } uCHAR setStatus(uCHAR inChar) { return setU1(this,7,inChar); } uCHAR orStatus(uCHAR inChar) { return orU1(this,7,inChar); } uCHAR andStatus(uCHAR inChar) { return andU1(this,7,inChar); } uCHAR * getScsiCDB() { return getUP1(this,8); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanID; uCHAR scsiLUN; uCHAR unUsed; uCHAR status; // SCSI status uCHAR scsiCDB[12]; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Request sense parameter - 0xL004 #define STRUCT_NAME hl_ReqSense_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 24 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR * getData() { return getUP1(this,6); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanID; uCHAR scsiLUN; uCHAR data[18]; // Request sense data #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // HBA error parameter - 0xL005 #define STRUCT_NAME hl_HBAerr_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getHbaError() { return getU1(this,6); } uCHAR setHbaError(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR getSystemError() { return getU1(this,7); } uCHAR setSystemError(uCHAR inChar) { return setU1(this,7,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanID; uCHAR scsiLUN; uCHAR hbaError; // Controller status uCHAR systemError; // System integrity error #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Reassign block parameter - 0xL006 #define STRUCT_NAME hl_Reassign_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 12 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getUnused() { return getU1(this,6); } uCHAR setUnused(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR getHost() { return getU1(this,7); } uCHAR setHost(uCHAR inChar) { return setU1(this,7,inChar); } uLONG getBlockNum() { return getU4(this,8); } uLONG setBlockNum(uLONG inLong) { return setU4(this,8,inLong); } uLONG swapBlockNum() { return osdSwap4((uLONG *)getUP1(this,8)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); swapBlockNum(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanID; uCHAR scsiLUN; uCHAR unUsed; uCHAR host; uLONG blockNum; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // RAM Error parameter - 0xL007 //flags - bit definition #define FLG_HL_CHAN 0x10 // Includes Channel as well as ID and LUN #define FLG_HL_SCSI 0x08 // ECC error on the SCSI bus #define FLG_HL_CORR 0x04 // Determines if correction was applied #define FLG_HL_ECC 0x02 #define FLG_HL_PARITY 0x01 #define STRUCT_NAME hl_RAMerr_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 12 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getIdLun() { return getU1(this,4); } uCHAR setIdLun(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orIdLun(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andIdLun(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getFlags() { return getU1(this,5); } uCHAR setFlags(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orFlags(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andFlags(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getBitNum() { return getU1(this,6); } uCHAR setBitNum(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR orBitNum(uCHAR inChar) { return orU1(this,6,inChar); } uCHAR andBitNum(uCHAR inChar) { return andU1(this,6,inChar); } uCHAR getAddrValid() { return getU1(this,7); } uCHAR setAddrValid(uCHAR inChar) { return setU1(this,7,inChar); } uCHAR orAddrValid(uCHAR inChar) { return orU1(this,7,inChar); } uCHAR andAddrValid(uCHAR inChar) { return andU1(this,7,inChar); } uLONG getAddr() { return getU4(this,8); } uLONG setAddr(uLONG inLong) { return setU4(this,8,inLong); } uLONG swapAddr() { return osdSwap4((uLONG *)getUP1(this,8)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); swapAddr(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR idLun; uCHAR flags; uCHAR bitNum; // Bit #7 = Bit valid uCHAR addrValid; // Bit #7 = Address valid uLONG addr; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Time change parameter - 0xL008 #define STRUCT_NAME hl_Time_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getNewTime() { return getU4(this,0); } uLONG setNewTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapNewTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uLONG getOldTime() { return getU4(this,4); } uLONG setOldTime(uLONG inLong) { return setU4(this,4,inLong); } uLONG swapOldTime() { return osdSwap4((uLONG *)getUP1(this,4)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapNewTime(); swapOldTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG newTime; uLONG oldTime; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Array config. update parameter - 0xL009 #define STRUCT_NAME hl_ArrayCfg_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 10 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getUnused() { return getU1(this,4); } uCHAR setUnused(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR getLevel() { return getU1(this,5); } uCHAR setLevel(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orLevel(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andLevel(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getChanId() { return getU1(this,6); } uCHAR setChanId(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,6,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,6,inChar); } uCHAR getScsiLun() { return getU1(this,7); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,7,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,7,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,7,inChar); } uCHAR getUnused2() { return getU1(this,8); } uCHAR setUnused2(uCHAR inChar) { return setU1(this,8,inChar); } uCHAR getAction() { return getU1(this,9); } uCHAR setAction(uCHAR inChar) { return setU1(this,9,inChar); } uCHAR orAction(uCHAR inChar) { return orU1(this,9,inChar); } uCHAR andAction(uCHAR inChar) { return andU1(this,9,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR unUsed; uCHAR level; // Bit #1 = Firmware level, Bit #0 = Software level uCHAR chanID; uCHAR scsiLUN; uCHAR unUsed2; uCHAR action; // Array action #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Major status change - 0xL00b #define STRUCT_NAME hl_MajorStat_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 10 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getUnused() { return getU1(this,4); } uCHAR setUnused(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR getChanId() { return getU1(this,5); } uCHAR setChanId(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getScsiLun() { return getU1(this,6); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,6,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,6,inChar); } uCHAR getLevel() { return getU1(this,7); } uCHAR setLevel(uCHAR inChar) { return setU1(this,7,inChar); } uCHAR getOldStatus() { return getU1(this,8); } uCHAR setOldStatus(uCHAR inChar) { return setU1(this,8,inChar); } uCHAR getNewStatus() { return getU1(this,9); } uCHAR setNewStatus(uCHAR inChar) { return setU1(this,9,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR unUsed; uCHAR chanID; // Bits 7-5 = SCSI channel // Bits 4-0 = SCSI ID uCHAR scsiLun; // SCSI LUN uCHAR level; // 0 = Physical Device Status // 1 = FW logical // 2 = SW logical uCHAR oldStatus; // Old status uCHAR newStatus; // New status #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Data inconsistency parameter - 0xL00c #define STRUCT_NAME hl_DataIC_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 12 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uLONG getBlockNum() { return getU4(this,6); } uLONG setBlockNum(uLONG inLong) { return setU4(this,6,inLong); } uLONG swapBlockNum() { return osdSwap4((uLONG *)getUP1(this,6)); } uSHORT getBlockCount() { return getU2(this,10); } uSHORT setBlockCount(uSHORT inShort) { return setU2(this,10,inShort); } uSHORT swapBlockCount() { return osdSwap2((uSHORT *)getUP1(this,10)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); swapBlockNum(); swapBlockCount(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanID; uCHAR scsiLUN; uLONG blockNum; uSHORT blockCount; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Host command recieved parameter - 0xL00d #define STRUCT_NAME hl_HCrcved_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 32 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getCpFlag1() { return getU1(this,6); } uCHAR setCpFlag1(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR orCpFlag1(uCHAR inChar) { return orU1(this,6,inChar); } uCHAR andCpFlag1(uCHAR inChar) { return andU1(this,6,inChar); } uCHAR getfwFlag2() { return getU1(this,7); } uCHAR setfwFlag2(uCHAR inChar) { return setU1(this,7,inChar); } uCHAR orfwFlag2(uCHAR inChar) { return orU1(this,7,inChar); } uCHAR andfwFlag2(uCHAR inChar) { return andU1(this,7,inChar); } uCHAR * getScsiCDB() { return getUP1(this,8); } uLONG getVirtualCPaddr() { return getU4(this,20); } uLONG setVirtualCPaddr(uLONG inLong) { return setU4(this,20,inLong); } uLONG swapVirtualCPaddr() { return osdSwap4((uLONG *)getUP1(this,20)); } uLONG getDmaAddr() { return getU4(this,24); } uLONG setDmaAddr(uLONG inLong) { return setU4(this,24,inLong); } uLONG swapDmaAddr() { return osdSwap4((uLONG *)getUP1(this,24)); } uLONG getDmaLength() { return getU4(this,28); } uLONG setDmaLength(uLONG inLong) { return setU4(this,28,inLong); } uLONG swapDmaLength() { return osdSwap4((uLONG *)getUP1(this,28)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); swapVirtualCPaddr(); swapDmaAddr(); swapDmaLength(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanID; uCHAR scsiLUN; uCHAR cpFlag1; // EATA CP byte #0 (Din,Dout...) uCHAR fwFlag2; // Firmware specific flags uCHAR scsiCDB[12]; uLONG virtualCPaddr; uLONG dmaAddr; uLONG dmaLength; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // SCSI command sent to device parameter - 0xL00e #define STRUCT_NAME hl_SCSIcmd_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 20 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getUnused() { return getU1(this,6); } uCHAR setUnused(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR getFlags() { return getU1(this,7); } uCHAR setFlags(uCHAR inChar) { return setU1(this,7,inChar); } uCHAR orFlags(uCHAR inChar) { return orU1(this,7,inChar); } uCHAR andFlags(uCHAR inChar) { return andU1(this,7,inChar); } uCHAR * getScsiCDB() { return getUP1(this,8); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanID; uCHAR scsiLUN; uCHAR unUsed; uCHAR flags; // Bit #1 = Prior, Bit #0 = Misc. uCHAR scsiCDB[12]; // SCSI CDB #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Lock Start/Stop parameter - 0xL00f #define STRUCT_NAME hl_Lock_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getStart() { return getU1(this,4); } uCHAR setStart(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orStart(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andStart(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getUnused() { return getU1(this,5); } uCHAR setUnused(uCHAR inChar) { return setU1(this,5,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR start; // Bit #0, 1=Start, 0=Stop uCHAR unUsed; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // DEC Array Component Failure - 0xL010 // DEC Array Fully Functional - 0xL011 #define STRUCT_NAME hl_decArray_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 4 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Non-crashable drive failure - 0xL0012 // When a drive not in a RAID-1 or RAID-5 fails #define STRUCT_NAME hl_driveFailure_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanID; uCHAR scsiLUN; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Low Voltage Detected - 0xL013 // Normal Voltage Restored - 0xL014 // High Voltage Detected - 0xL015 #define STRUCT_NAME hl_voltage_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 4 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Normal Temperature Restored - 0xL016 // High Temperature Detected - 0xL017 // Very High Temperature Detected - 0xL018 #define STRUCT_NAME hl_temperature_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 4 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Diagnostics Start/Stop - 0xL001A #define STRUCT_NAME hl_diagStartStop_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getCode() { return getU1(this,6); } uCHAR setCode(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR orCode(uCHAR inChar) { return orU1(this,6,inChar); } uCHAR andCode(uCHAR inChar) { return andU1(this,6,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanId; uCHAR lun; uCHAR code; uCHAR empty; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // SMART threshold reached - 0xL001B #define STRUCT_NAME hl_smartThreshold_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getCode() { return getU1(this,6); } uCHAR setCode(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR orCode(uCHAR inChar) { return orU1(this,6,inChar); } uCHAR andCode(uCHAR inChar) { return andU1(this,6,inChar); } uCHAR getReserved() { return getU1(this,7); } uCHAR setReserved(uCHAR inChar) { return setU1(this,7,inChar); } uCHAR orReserved(uCHAR inChar) { return orU1(this,7,inChar); } uCHAR andReserved(uCHAR inChar) { return andU1(this,7,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanID; uCHAR scsiLUN; uCHAR smartcode; uCHAR reserved; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Scheduled Diagnostics Start/Cancel/Failed - 0xL001C #define STRUCT_NAME hl_scheduledDiag_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getCode() { return getU1(this,6); } uCHAR setCode(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR orCode(uCHAR inChar) { return orU1(this,6,inChar); } uCHAR andCode(uCHAR inChar) { return andU1(this,6,inChar); } uCHAR getReserved() { return getU1(this,7); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanId; uCHAR lun; uCHAR code; uCHAR empty; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Debug Event - 0xL001D #define STRUCT_NAME hl_debug_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 4 // variable size (4 bytes minimum) //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR * getData() { return getUP1(this,4); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME // Debug Event - 0xL001F #define STRUCT_NAME hl_expandArray_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 12 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getOptions() { return getU1(this,6); } uCHAR setOptions(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR getRAIDtype() { return getU1(this,7); } uCHAR setRAIDtype(uCHAR inChar) { return setU1(this,7,inChar); } uSHORT getStripeSize() { return getU2(this,8); } uSHORT setStripeSize(uSHORT inChar) { return setU2(this,8,inChar); } uSHORT swapStripeSize() { return osdSwap2((uSHORT *)getUP1(this,8)); } uSHORT getReserved() { return getU2(this,10); } uSHORT setReserved(uSHORT inChar) { return setU2(this,10,inChar); } uSHORT swapReserved() { return osdSwap2((uSHORT *)getUP1(this,10)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); swapStripeSize(); swapReserved(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanId; uCHAR lun; uCHAR options; uCHAR raidType; uSHORT stripeSize; uSHORT reserved; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME #define HB_ERROR_READ 0 #define HB_ERROR_WRITE 1 #define SERVER_STATUS_FAILED 0 #define SERVER_STATUS_REAL_TAKEOVER 1 #define SERVER_STATUS_AS_REAL 2 #define SERVER_STATUS_AS_BACKUP 3 #define SERVER_STATUS_NOT_REDUNDANT 4 #define SERVER_STATUS_REDUNDANT 5 #define SERVER_STATUS_BECOME_REAL 6 //------------------------------------------------------------------------ // server Status Change - 0xL0020 AND heartbeat read/write failure 0xL021 the change is interp'ed // differently #define STRUCT_NAME hl_serverStatus_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 134 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChange() { return getU1(this,4); } uCHAR setChange(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR * getServerName() { return getUP1(this,5); } void setServerName(uCHAR *inChar) { memcpy(&this->filler[5],inChar, 129); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR change; uCHAR serverName[129]; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME // format complete - 0xL0022 #define STRUCT_NAME hl_formatDone_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getCode() { return getU1(this,6); } uCHAR setCode(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR getReserved() { return getU1(this,7); } uCHAR setReserved(uCHAR inChar) { return setU1(this,7,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanId; uCHAR lun; uCHAR code; uCHAR empty; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // SAF-TE Event Structure, Component Malfunction - 0xL0024 // SAF-TE Event Structure, Component Operational - 0xL0025 #define STRUCT_NAME SafTe_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR getCode() { return getU1(this,5); } uCHAR setCode(uCHAR inChar) { return setU1(this,5,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanId; uCHAR code; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // SES Event Structure, Component Malfunction - 0xL0026 // SES Event Structure, Component Operational - 0xL0027 #define SEC_TYPE_UNSPECIFIED 0x00 // 00 Unspecified #define SEC_TYPE_DEVICE 0x01 // 01 Device #define SEC_TYPE_PWR_SUPPY 0x02 // 02 Power Supply #define SEC_TYPE_COOLING_ELE 0x03 // 03 Cooling Element #define SEC_TYPE_TEMP_SENSOR 0x04 // 04 Temperature Sensor #define SEC_TYPE_DOOR_LOCK 0x05 // 05 Door Lock #define SEC_TYPE_AUDIBLE_ALARM 0x06 // 06 Audible Alarm #define SEC_TYPE_ESCE 0x07 // 07 Enclosure Services Controller Electronics #define SEC_TYPE_SCC_CONTRLR_ELEC 0x08 // 08 SCC Controller Electronics #define SEC_TYPE_NONVOLATILE_CACHE 0x09 // 09 Nonvolatile Cache #define SEC_TYPE_UPS 0x0b // 0B Uninterruptible Power Supply #define SEC_TYPE_DISPLAY 0x0c // 0C Display #define SEC_TYPE_KEY_PAD_DEV 0x0d // 0D Key Pad Entry Device #define SEC_TYPE_SCSI_PORT_TRANS 0x0f // 0F SCSI Port/Transceiver #define SEC_TYPE_LANGUAGE 0x10 // 10 Language #define SEC_TYPE_COMM_PORT 0x11 // 11 Communication Port #define SEC_TYPE_VOLTAGE_SENSOR 0x12 // 12 Voltage Sensor #define SEC_TYPE_CURRENT_SENSOR 0x13 // 13 Current Sensor #define SEC_TYPE_SCSI_TARGET_PORT 0x14 // 14 SCSI Target Port #define SEC_TYPE_SCSI_INIT_PORT 0x15 // 15 SCSI Initiator Port #define SEC_TYPE_SIMP_SUB_ENCLOSURE 0x16 // 16 Simple Sub-enclosure #define SEC_STATUS_UNSUPPORTED 0x00 // 00 Unsupported #define SEC_STATUS_OK 0x01 // 01 Ok #define SEC_STATUS_CRITICAL 0x02 // 02 Critical #define SEC_STATUS_NONCRITICAL 0x03 // 03 Noncritical #define SEC_STATUS_UNRECOVERABLE 0x04 // 04 Unrecoverable #define SEC_STATUS_NOT_INSTALLED 0x05 // 05 Not Installed #define SEC_STATUS_UNKNOWN 0x06 // 06 Unknown #define SEC_STATUS_UNAVAILABLE 0x07 // 07 Unavailable #define STRUCT_NAME Ses_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR getType() { return getU1(this,5); } uCHAR setType(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR getIndex() { return getU1(this,6); } uCHAR setIndex(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR getStatus() { return getU1(this,7); } uCHAR setStatus(uCHAR inChar) { return setU1(this,7,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanId; uCHAR Type; uCHAR Index; uCHAR Status; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // SES Event Structure, Enclosure Temperature High/Low/Normal - 0xL0028 #define STRUCT_NAME SesTemp_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR getTempSensorIndex() { return getU1(this,5); } uCHAR setTempSensorIndex(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR getTemp() { return((uCHAR)(getU1(this,6) + 20)); } uCHAR setTemp(uCHAR inChar) { return setU1(this,6,inChar - 20); } uCHAR getStatus() { return getU1(this,7); } uCHAR setStatus(uCHAR inChar) { return setU1(this,7,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanId; uCHAR TempSensorIndex; uCHAR Temp; uCHAR Status; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // BBU Failures - 0xL0031 // Reset Data Retention - 0xL0031 #define STRUCT_NAME ResetDataRetention_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 76 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uLONG getStatusFlags() { return getU4(this,4); } uLONG swapStatusFlags() { return osdSwap4((uLONG *)getUP1(this,4)); } uLONG getDirtyBlockCount() { return getU4(this,8); } uLONG swapDirtyBlockCount() { return osdSwap4((uLONG *)getUP1(this,8)); } uLONG * getData() { return getUP4(this,12); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); swapStatusFlags(); swapDirtyBlockCount(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uLONG statusFlags; uLONG dirtyBlockCount; uLONG dataValue[16]; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Bad Data Block - 0xL003e // Bad Parity Block - 0xL003f // Bad Data List Full - 0xL0040 // Bad Parity List Full - 0xL0041 #define STRUCT_NAME BlockList_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 12 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getReserved1() { return getU1(this,6); } uCHAR setReserved1(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR getReserved2() { return getU1(this,7); } uCHAR setReserved2(uCHAR inChar) { return setU1(this,7,inChar); } uLONG getBlockNumber() { return getU4(this,8); } uLONG setBlockNumber(uLONG inLong) { return setU4(this,8,inLong); } uLONG swapBlockNumber() { return osdSwap4((uLONG *)getUP1(this,8)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); swapBlockNumber(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanId; uCHAR lun; uCHAR reserved1; uCHAR reserved2; uLONG blockNumber; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Write Back Failure Structure - 0xL0042 #define STRUCT_NAME WriteBackFailue_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 14 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanId() { return getU1(this,4); } uCHAR setChanId(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanId(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanId(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getScsiLun() { return getU1(this,5); } uCHAR setScsiLun(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orScsiLun(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andScsiLun(uCHAR inChar) { return andU1(this,5,inChar); } uCHAR getReserved1() { return getU1(this,6); } uCHAR setReserved1(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR getReserved2() { return getU1(this,7); } uCHAR setReserved2(uCHAR inChar) { return setU1(this,7,inChar); } uLONG getBlockNumber() { return getU4(this,8); } uLONG setBlockNumber(uLONG inLong) { return setU4(this,8,inLong); } uLONG swapBlockNumber() { return osdSwap4((uLONG *)getUP1(this,8)); } uSHORT getBlockCount() { return getU2(this,12); } uSHORT setBlockCount(uSHORT inShort) { return setU2(this,12,inShort); } uSHORT swapBlockCount() { return osdSwap2((uSHORT *)getUP1(this,12)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); swapBlockNumber(); swapBlockCount(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR chanId; uCHAR lun; uCHAR reserved1; uCHAR reserved2; uLONG blockNumber; uSHORT blockCount; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Battery Status Change - 0xL0043 #define STRUCT_NAME BatteryEvent_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uSHORT getOldState() { return getU2(this,4); } uSHORT setOldState(uSHORT inShort) { return setU2(this,4,inShort); } uSHORT swapOldState() { return osdSwap2((uSHORT *)getUP1(this,4)); } uSHORT getNewState() { return getU2(this,6); } uSHORT setNewState(uSHORT inShort) { return setU2(this,6,inShort); } uSHORT swapNewState() { return osdSwap2((uSHORT *)getUP1(this,6)); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); swapOldState(); swapNewState(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uSHORT oldState; uSHORT newState; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Cache Writeback Status Change - 0xL0044 #define CACHE_WRITE_THRU 0 #define CACHE_WRITE_BACK 1 #define STRUCT_NAME CacheChangeEvent_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getOldState() { return getU1(this,4); } uCHAR setOldState(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orOldState(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andOldState(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getNewState() { return getU1(this,5); } uCHAR setNewState(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR orNewState(uCHAR inChar) { return orU1(this,5,inChar); } uCHAR andNewState(uCHAR inChar) { return andU1(this,5,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Bus Reset Occured - 0xL0045 #define STRUCT_NAME BusReset_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getInfoByte() { return getU1(this,4); } uCHAR setInfoByte(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orInfoByte(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andInfoByte(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getReserved() { return getU1(this,5); } uCHAR setReserved(uCHAR inChar) { return setU1(this,5,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR infoByte; uCHAR reserved; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Fibre Loop Event - 0xL0046 #define STRUCT_NAME FibreLoop_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getReserved() { return getU1(this,4); } uCHAR setReserved(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR getP2ExtendedDeviceId() { return getU1(this,5); } uCHAR setP2ExtendedDeviceId(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR getChannelByte() { return getU1(this,6); } uCHAR setChannelByte(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR orChannelByte(uCHAR inChar) { return orU1(this,6,inChar); } uCHAR andChannelByte(uCHAR inChar) { return andU1(this,6,inChar); } uCHAR getInfoByte() { return getU1(this,7); } uCHAR setInfoByte(uCHAR inChar) { return setU1(this,7,inChar); } uCHAR orInfoByte(uCHAR inChar) { return orU1(this,7,inChar); } uCHAR andInfoByte(uCHAR inChar) { return andU1(this,7,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR reserved; uCHAR ExtendedDeviceId; uCHAR ChannelByte; uCHAR infoByte; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Bus Reset Occured - 0xL0050 #define STRUCT_NAME BatteryCalibrate_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getInfoByte() { return getU1(this,4); } uCHAR setInfoByte(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orInfoByte(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andInfoByte(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getReserved() { return getU1(this,5); } uCHAR setReserved(uCHAR inChar) { return setU1(this,5,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR infoByte; uCHAR reserved; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // HDM/ISP Channel event - 0xL0051 #define STRUCT_NAME HdmIspChannel_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getInfoByte() { return getU1(this,4); } uCHAR setInfoByte(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orInfoByte(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andInfoByte(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getReserved() { return getU1(this,5); } uCHAR setReserved(uCHAR inChar) { return setU1(this,5,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR infoByte; uCHAR reserved; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Domain validation & scsi device down speed event - 0xL0052 // SPC chip had to auto down speed a device. #define STRUCT_NAME SpcDownSpeed_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanIdByte() { return getU1(this,4); } uCHAR setChanIdByte(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanIdByte(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanIdByte(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getLUNByte() { return getU1(this,5); } uCHAR setLUNByte(uCHAR inChar) { return setU1(this,5,inChar); } uCHAR getInfoByte() { return getU1(this,6); } uCHAR setInfoByte(uCHAR inChar) { return setU1(this,6,inChar); } uCHAR orInfoByte(uCHAR inChar) { return orU1(this,6,inChar); } uCHAR andInfoByte(uCHAR inChar) { return andU1(this,6,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR ChanIdByte; uCHAR LUNByte; uCHAR infoByte; uCHAR ReservedByte; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Enclosure Existence Event - 0xL0053 // Generated when the existence of an enclosure is detected or // when communication with an enclosure is lost. #define STRUCT_NAME EnclosureExist_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanIdByte() { return getU1(this,4); } uCHAR setChanIdByte(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanIdByte(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanIdByte(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getEnclosureByte() { return getU1(this, 5); } uCHAR setEnclosureByte(uCHAR inChar) { return setU1(this,5, inChar); } uCHAR orEnclosureByte(uCHAR inChar) { return orU1(this,5, inChar); } uCHAR andEnclosureByte(uCHAR inChar) { return andU1(this,5, inChar); } uCHAR getInfoByte() { return getU1(this, 6); } uCHAR setInfoByte(uCHAR inChar) { return setU1(this,6, inChar); } uCHAR orInfoByte(uCHAR inChar) { return orU1(this,6, inChar); } uCHAR andInfoByte(uCHAR inChar) { return andU1(this,6, inChar); } uCHAR getReasonByte() { return getU1(this,7); } uCHAR setReasonByte(uCHAR inChar) { return setU1(this,7, inChar); } uCHAR orReasonByte(uCHAR inChar) { return orU1(this, 7, inChar); } uCHAR andReasonByte(uCHAR inChar) { return andU1(this, 7, inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR ChanIdByte; uCHAR EnclosureByte; uCHAR InfoByte; uCHAR ReasonByte; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // BlinkLED Event - 0xL0055 // Generated when a BlinkLED is encountered #define STRUCT_NAME BlinkLED_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 8 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getBlinkTypeByte() { return getU1(this,4); } uCHAR setBlinkTypeByte(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR getBlinkCodeByte() { return getU1(this, 5); } uCHAR setBlinkCodeByte(uCHAR inChar) { return setU1(this,5, inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR BlinkTypeByte; uCHAR BlinkCodeByte; uCHAR Reserved0; uCHAR Reserved1; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ // Rebuild Drive Too Small Event - 0xL0057 // Generated when a spare or replacement drive is too small to be rebuild for an array. #define STRUCT_NAME DriveTooSmall_S #ifdef __cplusplus struct STRUCT_NAME { #else typedef struct { #endif //-------------------- // If active alignment... //-------------------- #if defined (__cplusplus) && defined (_DPT_ACTIVE_ALIGNMENT) #define STRUCT_SIZE 6 //----------- // Bogus data //----------- uCHAR filler[STRUCT_SIZE]; //----------------- // Access Functions //----------------- uLONG getTime() { return getU4(this,0); } uLONG setTime(uLONG inLong) { return setU4(this,0,inLong); } uLONG swapTime() { return osdSwap4((uLONG *)getUP1(this,0)); } uCHAR getChanIdByte() { return getU1(this,4); } uCHAR setChanIdByte(uCHAR inChar) { return setU1(this,4,inChar); } uCHAR orChanIdByte(uCHAR inChar) { return orU1(this,4,inChar); } uCHAR andChanIdByte(uCHAR inChar) { return andU1(this,4,inChar); } uCHAR getLUNByte() { return getU1(this,5); } uCHAR setLUNByte(uCHAR inChar) { return setU1(this,5,inChar); } //--------------------------- // Required Support Functions //--------------------------- static uLONG size() { return STRUCT_SIZE; } void clear() { memset(this,0,STRUCT_SIZE); } STRUCT_NAME * next() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } STRUCT_NAME * prev() { return ((STRUCT_NAME *)(((uCHAR *)this)+STRUCT_SIZE)); } void scsiSwap() { #ifndef _DPT_BIG_ENDIAN swapTime(); #endif } #undef STRUCT_SIZE //----------------------------- // Else assume static alignment... //----------------------------- #else uLONG time; uCHAR ChanIdByte; uCHAR LUNByte; uCHAR infoByte; uCHAR ReservedByte1; uCHAR ReservedByte2; #endif #ifdef __cplusplus }; #else } STRUCT_NAME; #endif #undef STRUCT_NAME //------------------------------------------------------------------------ #ifndef NO_UNPACK #if defined (_DPT_AIX) #pragma options align=reset #elif defined (UNPACK_FOUR) #pragma pack(4) #else #pragma pack(1) #endif // aix #endif #endif raidutils-0.0.6.orig/include/hba_log.hpp0000664000175000000620000000733310044153305020070 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __HBA_LOG_HPP #define __HBA_LOG_HPP //File - HBA_LOG.HPP //*************************************************************************** // //Description: // // This function defines the dptHBAlog_C class. This class is used //to access an HBA's event log. // //Author: Doug Anderson //Date: 6/4/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "dpt_log.hpp" #include "hba_log.h" #ifndef NO_PACK #if defined (_DPT_AIX) #pragma options align=packed #else #pragma pack(1) #endif // aix #endif //class - dptHBAlog_C - start //=========================================================================== // //Description: // // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptHBAlog_C : public dptSCSIlog_C { public: dptHBAlog_C(); // Data............................................... // Byte offset to next valid parameter in the log buffer uSHORT fwEventBytes; // Byte offset to the current parameter uSHORT curEventBytes; protected: // Virtual Functions.................................. // Called from reverseAllParams() for each parameter encountered. // - Allows the data portion of each parameter to be reversed virtual void reverseParam(); // Initialize log page specific variables virtual void calcInit(); // Calculate log page specific variables virtual void calcInfo(); virtual void curOffsetInit(); // Calculate the byte offset of the current parameter virtual void calcCurOffset(); public: // Return Private Data................................ // Return the total # of FW event bytes read uSHORT eventBytes() { return (fwEventBytes); } // Return the byte offset of the current parameter uSHORT curOffset() { return (curEventBytes); } }; //dptHBAlog_C - end #ifndef NO_UNPACK #if defined (_DPT_AIX) #pragma options align=reset #elif defined (UNPACK_FOUR) #pragma pack(4) #else #pragma pack() #endif // aix #endif #endif raidutils-0.0.6.orig/include/lockunix.h0000664000175000000620000000437110044153305017770 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * UNIX locking mechanism */ #if (defined(__cplusplus)) extern "C" { #endif #if (!defined(__P)) # define __P(x) x #endif /* * Establish a lock * returns negative on failure * 0 upon successfull lock * positive on someone else owning the lock. */ int MkLock __P((char * name)); /* * Cleanup on exit */ void RmLock __P((char * name)); /* * Change who (pid) owns the lock (done within a daemon fork). */ void ChLock __P((char * name, int pid)); /* * Check for an existing lock * returns negative on failure (retry again later, task likely exiting) * 0 if no one is locked * positive if someone owns the lock. */ int IsLock __P((char * name)); #if (defined(__cplusplus)) } #endif raidutils-0.0.6.orig/include/mem.h0000664000175000000620000000422210044153306016706 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __MEM_H #define __MEM_H //File - MEM.H //*************************************************************************** // //Description: // // This file was created for compatability with the Watcom C++ compiler. // //Author: Doug Anderson //Date: 10/19/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #if defined (_SINIX) #include #endif // sinix #include #endif raidutils-0.0.6.orig/include/messages.h0000664000175000000620000030261410044153306017745 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __MESSAGES_H #define __MESSAGES_H //File - MESSAGES.H //*************************************************************************** // //Description: // // This file contains constant definitions for DPT engine messages. // //Author: Doug Anderson //Date: 10/7/92 // //Editors: // //Remarks: // // //*************************************************************************** //************************************************************************* // DPT Engine Messages //************************************************************************* // #define MSG_ENGINE_TEST_ON 0x0100L // // Description: // Turn ON engine testing functions of the DPT engine. // // Target Types: 0 // Input Data: None // Return Data: None // #define MSG_ENGINE_TEST_OFF 0x0101L // // Description: // Turn OFF engine testing functions of the DPT engine. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- //========================================================================== // Engine/Connection messages //========================================================================== // #define MSG_CONNECT 0x0010L // // Description: // Connect an external source to the DPT engine. // // Connect an external source to the DPT comm. engine or a //comm. engine end point. // // Target Types: 0 // Input Data: None // Return Data: Connection tag (DPT_TAG_T) //-------------------------------------------------------------------------- // #define MSG_DISCONNECT 0x0011L // // Description: // Disconnect an external source from the DPT engine. // // Disconnect from the current communication engine end point. //This message allows a user to disconnect from comm. end points one //end point at a time. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- //========================================================================== // Object acquisition messages //========================================================================== // #define MSG_IO_SCAN_SYSTEM 0x0014L // // Description: // Search the system hardware for all SCSI objects in the system. // This function will find all HBA's and SCSI devices in the system. // // Note: // 1. This function destroys the current configuration prior to // scanning for SCSI objects. // 2. This is equivalent to a MSG_IO_SCAN_PHYSICALS followed by // a MSG_IO_SCAN_LOGICALS // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_IO_SCAN_HBAS 0x00f1L // // Description: // Search the system hardware for all HBAs in the system. This // message will not look for any other physical or logical devices. // // Note: // 1. This function destroys the current configuration prior to // scanning for SCSI objects. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_IO_SCAN_PHYSICALS 0x0015L // // Description: // Search the system hardware for all physical SCSI objects in // the system. This function will find all HBA's and all physical // SCSI devices in the system. // // Note: // 1. This function destroys the current configuration prior to // scanning for SCSI objects. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_IO_SCAN_LOGICALS 0x0016L // // Description: // Search the system hardware for all logical SCSI objects in // the system. This function requires that a MSG_IO_SCAN_PHYSICALS // was previously performed. // // Note: // 1. This function does not destroy the current configuration. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- //========================================================================== // Object ID retrieval messages //========================================================================== // #define MSG_ID_PHYSICALS 0x0017L // // Description: // Return the ID structure of all objects of the specified type //that are found in the target manager's physical object list // // Target Types: Any Manager // Input Data: Object type (uSHORT) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_VISIBLES 0x0018L // // Description: // Return the ID structure of all objects of the specified type //that are visible to the target manager at the physical level. // // Target Types: Any manager // Input Data: Object type (uSHORT) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_ALL_PHYSICALS 0x0019L // // Description: // Return the ID structure of all objects of the specified type //that are found in the target manager's physical object list or any //lower level manager's physical object list. // // Target Types: Any manager // Input Data: Object type (uSHORT) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_LOGICALS 0x001aL // // Description: // Return the ID structure of all objects of the specified type //that are found in the target manager's logical device list // // Target Types: Any manager // Input Data: Object type (uSHORT) // RAID type (uSHORT-optional if DPT_RAID_TYPE) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_ALL_LOGICALS 0x001bL // // Description: // Return the ID structure of all objects of the specified type //that are found in the target manager's logical device list. For each //device found, the device's component list is traversed. The IDs of //all objects of the specified type that are found in the device's //component list are returned also. // // Target Types: Any manager // Input Data: Object type (uSHORT) // RAID type (uSHORT-optional if DPT_RAID_TYPE) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_COMPONENTS 0x001cL // // Description: // Returns the ID structure of all devices of the specified type //that are (RAID) components of the target device. // // Target Types: Any RAID device // Input Data: Object type (uSHORT) // RAID type (uSHORT-optional if DPT_RAID_TYPE) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_ALL_COMPONENTS 0x001dL // // Description: // Returns the ID structure of all devices of the specified type //that are (RAID) components of the target device. For each device //found, the device's component list is traversed. // // Target Types: Any RAID device // Input Data: Object type (uSHORT) // RAID type (uSHORT-optional if DPT_RAID_TYPE) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_HIDDEN_DEVICES 0x001eL // // Description: // Returns the ID structure of all non-component devices that are // not visible to the OS. // // Target Types: 0 // Input Data: None // Return Data: List of hidden devices (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_BY_VENDOR 0x001fL // // Description: // Return the ID structure of all engine objects that have the //specified ASCII string in their vendorID field. // // Search Type: (Default = 0, Trailing spaces are always ignored) // ------------ // 0 = Specified string must match vendor ID exactly // 1 = Match specified string to 1st characters of vendor ID // - Ignore any trailing characters in the vendor ID // 2 = Find specified string anywhere in the vendor ID // (sub-string search) // // Target Types: 0 // Input Data: ASCII string (List of bytes) // Search type (Optional) (uCHAR) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_BY_PRODUCT 0x0020L // // Description: // Return the ID structure of all engine objects that have the //specified ASCII string in their productID field. // // Search Type: (Default = 0, Trailing spaces are always ignored) // ------------ // 0 = Specified string must match product ID exactly // 1 = Match specified string to 1st characters of product ID // - Ignore any trailing characters in the product ID // 2 = Find specified string anywhere in the product ID // (sub-string search) // // Target Types: 0 // Input Data: ASCII string // Search type (Optional) (uCHAR) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_BY_REVISION 0x0021L // // Description: // Return the ID structure of all engine objects that have the //specified ASCII string in their revision field. // // Search Type: (Default = 0, Trailing spaces are always ignored) // ------------ // 0 = Specified string must match revision exactly // 1 = Match specified string to 1st characters of revision // - Ignore any trailing characters in the revision // 2 = Find specified string anywhere in the revision // (sub-string search) // // Target Types: 0 // Input Data: ASCII string // Search type (Optional) (uCHAR) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_BY_VENDOR_EXTRA 0x0022L // // Description: // Return the ID structure of all engine objects that have the //specified ASCII string in their vendorExtra field. // // Search Type: (Default = 0, Trailing spaces are always ignored) // ------------ // 0 = Specified string must match vendorExtra exactly // 1 = Match specified string to 1st characters of vendorExtra // - Ignore any trailing characters in the vendorExtra // 2 = Find specified string anywhere in the vendorExtra // (sub-string search) // // Target Types: 0 // Input Data: ASCII string // Search type (Optional) (uCHAR) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_BY_DPT_NAME 0x0023L // // Description: // Return the ID structure of all engine devices that have the //specified ASCII string in their dptName field. // // Search Type: (Default = 0, Trailing spaces are always ignored) // ------------ // 0 = Specified string must match DPT name exactly // 1 = Match specified string to 1st characters of DPT name // - Ignore any trailing characters in the DPT name // 2 = Find specified string anywhere in the DPT name // (sub-string search) // // Target Types: 0 // Input Data: ASCII string // Search type (Optional) (uCHAR) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_BY_SCSI_ADDR 0x0024L // // Description: // Return the ID structure of all engine objects with the specified //SCSI address. // // An optional address mask can be specified to prevent //the use of specific address fields: (Default mask = 0) // Mask bit: If set, ignore: // --------- --------------- // 0 SCSI LUN // 1 SCSI ID // 2 SCSI Channel // 3 SCSI HBA // // Return: // ------- // 7-6 00 = Managers & Devices // 01 = Managers & Devices // 10 = Devices Only // 11 = Managers Only // // // An optional level can be specified to further qualify the address //search with a logical level. If a level is specified, only objects //with a matching address at the specified logical level will be returned. // Logical Level: // -------------- // 0 = Driver Logical // 1 = Driver Physical / HBA Logical // 2 = HBA Physical / BCD Logical // 3 = BCD Physical // 0xff = All that match the address/mask (Default) // // Note: If all address fields are ignored, this message can be used to // return the IDs of all objects, devices, or managers -OR- all // objects, devices, or managers at the specified logical level. // (However, the IDs may not be in SCSI address order) // // Target Types: 0 // Input Data: SCSI addr (dptSOaddr_S), // mask (uCHAR-optional) // level (uCHAR-optional) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ID_BY_STATUS 0x0025L // // Description: // Return the ID structure of all engine objects with the specified //status. // // An optional mask can be specified to prevent the use of specific //status fields: (Default mask = 0) // Mask bit: If set, ignore: // --------- --------------- // 0 Sub status // 1 Main status // 2 Flag field // 3 Display Status // // Return: // ------- // 7-6 00 = Managers & Devices // 01 = Managers & Devices // 10 = Devices Only // 11 = Managers Only // // Target Types: 0 // Input Data: SCSI addr (dptSOaddr_S), // mask (uCHAR-optional) // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- //========================================================================== // RAID related messages //========================================================================== // #define MSG_RAID_NEW 0x0026L // // Description: // Create a new RAID device. // // Target Types: Any RAID manager // Input Data: raidHeader_S // List of raidCompList_S // Return Data: ID of the new RAID device (dptID_S) //-------------------------------------------------------------------------- // #define MSG_RAID_GHOST 0x0027L // // Description: // Create a new RAID drive without checking any requirements. // // Target Types: Any RAID manager // Input Data: raidHeader_S // List of raidCompList_S // Return Data: ID of the new RAID device (dptID_S) //-------------------------------------------------------------------------- //NOT_IN_API - Unimplemented #define MSG_RAID_DEFINE 0x0028L // // Description: // Define a new RAID type using any of the criteria currently // available in the engine. // // Target Types: Any RAID manager // Input Data: Reference # (uSHORT) // RAID definition (raidDefinition_S) // Return Data: None //-------------------------------------------------------------------------- //NOT_IN_API - Unimplemented #define MSG_RAID_GET_DEF 0x0029L // // Description: // Returns the RAID definition structure for the specified RAID // reference #. If no RAID reference # is specified, all currently // defined RAID reference numbers are returned. // // Target Types: Any RAID manager // Input Data: Reference # (uSHORT) // Return Data: raidDefinition_S //-------------------------------------------------------------------------- //NOT_IN_API - Unimplemented #define MSG_RAID_SET_PARAMS 0x002aL // // Description: // Setup the RAID control structure for the specified RAID reference #. // The RAID control structure is used when creating a new RAID drive. // // Target Types: Any RAID manager // Input Data: Reference # (uSHORT) // Return Data: None //-------------------------------------------------------------------------- //NOT_IN_API - Unimplemented #define MSG_RAID_GET_PARAMS 0x002bL // // Description: // Returns the RAID control structure for the specified RAID // reference #. // // Target Types: Any RAID manager // Input Data: RAID type (uSHORT) // Return Data: raidCtl_S //-------------------------------------------------------------------------- //NOT_IN_API - Unimplemented #define MSG_RAID_RESTRICT 0x002cL // // Description: // Restrict the target device from being a component of a RAID device. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: None //-------------------------------------------------------------------------- //NOT_IN_API - Unimplemented #define MSG_RAID_UNRESTRICT 0x002dL // // Description: // Undo a MSG_RAID_RESTRICT message. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_RAID_HW_ENABLE 0x002eL // // Description: // Attempt to set the system hardware to the current configuration. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- //NOT_IN_API - Unimplemented #define MSG_RAID_GET_MAP 0x002fL // // Description: // Returns the RAID use map for a SCSI device. If no data is // returned, the device is not a component of another RAID drive. // // Note: // 1. This message should be targeted at component drives. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: List of RAID maps (raidMap_S) //-------------------------------------------------------------------------- // #define MSG_RAID_BUILD 0x0030L // // Description: // Start a destructive build. // // Note: // 1. This message should be targeted at RAID devices. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_RAID_REBUILD 0x0031L // // Description: // Start a non-destructive build. // // Note: // 1. This message should be targeted at RAID devices. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_RAID_VERIFY 0x0032L // // Description: // Verify the data integrity of a RAID device. // // Note: // 1. This message should be targeted at RAID devices. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_RAID_VERIFY_FIX 0x0033L // // Description: // Verify the data integrity of a RAID device. // Fix any errors found. // // Note: // 1. This message should be targeted at RAID devices. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // Not supported in 5th gen. firmware #define MSG_RAID_VERIFY_ABORT 0x0034L // // Description: // Verify the data integrity of a RAID device. // Abort if any errors found. // // Note: // 1. This message should be targeted at RAID devices. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_RAID_ABORT 0x0035L // // Description: // Abort a build, rebuild, or verify operation. // // Note: // 1. This message should be targeted at RAID devices. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_DIAG_GET_PROGRESS 0x0037L #define MSG_RAID_GET_PROGRESS 0x0037L // // Description: // Get the progress of an outstanding RAID build, rebuild, or // verify or the progress of a firmware based diagnostic. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: Last LBA completed (uLONG) // Max. LSU LBA (uLONG) // Device Status (dptCstatus_S) // Verify Error Count (uLONG) // --- New Additions for F/W diags --- // Total iterations (uLONG) // Current iteration (uLONG) // Physical Block # of first error // Diagnostic test type (uCHAR) // Diagnostic flags (0x40 = Sequential Sectors) // Maximum Error Count (uSHORT) //-------------------------------------------------------------------------- // Obsolete - See MSG_SET_INFO & the file GET_INFO.H // #define MSG_RAID_SET_RATE 0x0038L // // Description: // Set the rate for build, rebuild, or verify operations performed // by the target manager. // // Target Types: Any RAID Manager // Input Data: Rebuild Frequency (uSHORT - tenths of a second) // Rebuild Amount (uSHORT - # blocks per burst) // Return Data: None //-------------------------------------------------------------------------- //========================================================================== // HBA control messages //========================================================================== // #define MSG_ALARM_ON 0x0039L // // Description: // Turn an HBA's alarm on. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_ALARM_OFF 0x003aL // // Description: // Turn an HBA's alarm off. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: None //-------------------------------------------------------------------------- //NOT_IN_API - Unimplemented #define MSG_RESET 0x003bL // // Description: // Reset an object. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_RESET_SCSI_BUS 0x003cL // // Description: // Reset a device's SCSI bus. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_GET_LOG_PAGE 0x003dL // // Description: // Returns the specified log page. // // Target Types: DPT_SCSI_HBA // Input Data: Log page code (uCHAR) // Log flags (uCHAR) // bit #7-#6 = reserved (must be zero) // bit #5 = Do not set physical bit (force physical bit // cleared when targeting physical devices) // bit #4-#1 = reserved (must be zero) // bit #0, 1 = Read log (do not clear) // 0 = Clear entire log after the read // Offset (Optional - uSHORT) // Control Byte (uCHAR) - The SCSI control byte // bit #7 = Async, if set don't return until one or // more events are in the log. // bit #6 = Read & Clear, if set clear the events // returned but preserve unread events. // bit #5-#0 = reserved (must be zero) // // Return Data: Log page data //-------------------------------------------------------------------------- // #define MSG_GET_MODE_PAGE 0x003eL // // Description: // Returns the specified mode page. // // Target Types: All // Input Data: Mode page code (uCHAR) // Mode flags (uCHAR) // Bit 7 = Use a 10 byte mode sense CDB // Bit 6 = Force the interpret bit to be set // Bits 5 = Do not set physical bit (force physical bit // cleared when targeting physical devices) // Bits 4-2 = Unused // Bits 1,0 = PC (Page Control) // 00 = Current Values // 01 = Changeable Values // 10 = Default Values // 11 = Saved Values // Return Data: Filler (2 bytes - always zero) // Mode page data // // Note: A 6 byte mode sense SCSI CDB will be used unless bit #7 is set // in the flags byte. //-------------------------------------------------------------------------- // #define MSG_QUIET 0x003fL // // Description: // Prevent accesses to all devices attached to the target HBA. // // Target Types: DPT_SCSI_HBA // Input Data: Blink Drive (uSHORT) // 0=Blink Target Drive, Non-zero=Blink all but target drive // Return Data: None //-------------------------------------------------------------------------- // #define MSG_UNQUIET 0x0040L // // Description: // Enable accesses to all devices attached to the target HBA. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: None //-------------------------------------------------------------------------- //NOT_IN_API - Unimplemented in F/W #define MSG_RELOCK_DRIVES 0x0041L // // Description: // Causes the HBA to re-read the RAID tables from disk and //configure the system accordingly. This command only needs to be //issued if the RAID tables are changed directly by an outside source //that does not go thru the HBA firmware (blowit, blowend...). // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_GET_TIME 0x0042L // // Description: // Get the HBA's time. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: HBA's time (uLONG) //-------------------------------------------------------------------------- // #define MSG_SET_TIME 0x0043L // // Description: // Set the HBA's time. // // Target Types: DPT_SCSI_HBA // Input Data: new time (uLONG) // Return Data: None //-------------------------------------------------------------------------- // #define MSG_CALIBRATE_BATTERY 0x00e4L // // Description: // Starts a backup battery calibration process. An initial //calibration takes the battery through a charge-discharge-recharge //cycle where a maintenance calibration takes the battery through //a discharge-charge cycle. // // Target Types: DPT_SCSI_HBA // Input Data: uCHAR (0 = Initial calibration) // (1 = Maintenance calibration) // Return Data: None //========================================================================== // Absent object messages //========================================================================== // #define MSG_ABS_NEW_OBJECT 0x0044L // // Description: // Create an absent SCSI object. // // Target Types: Any SCSI manager // Input Data: set info structure for the device type (optional) // Return Data: ID of new object (dptID_S) //-------------------------------------------------------------------------- // #define MSG_ABS_SET_INFO 0x0045L // // Description: // Set information about an object. // // Target Types: All // Input Data: The object's information structure // Return Data: None //-------------------------------------------------------------------------- //========================================================================== // Messages to get/set object data //========================================================================== // #define MSG_GET_INFO 0x0046L // // Description: // Returns an engine object's information structure. // //--- Future ----------------------------------------------------------- // Return information from an engine object. If no input data //type is specified, all the object's data is returned. If one or more //data types are specified, the data structures associated with the //specified data types are returned sequentially. //--- End Future ------------------------------------------------------- // // Target Types: All // Input Data: List of data types to be returned // (Optional - uSHORT array) // Return Data: The object's information structure //-------------------------------------------------------------------------- // #define MSG_GET_USER_BUFF 0x0047L // // Description: // Return's the target object's user information buffer. // // Target Types: All // Input Data: None // Return Data: uCHAR userBuff[USER_BUFF_SIZE] //-------------------------------------------------------------------------- // #define MSG_SET_USER_BUFF 0x0048L // // Description: // Sets the target object's user information buffer. // // Target Types: All // Input Data: uCHAR userBuff[USER_BUFF_SIZE] // Return Data: None //-------------------------------------------------------------------------- // #define MSG_GET_DPT_NAME 0x0049L // // Description: // Gets the target device's DPT name field // // Target Types: Any device // Input Data: None // Return Data: uCHAR dptName[DPT_NAME_SIZE] //-------------------------------------------------------------------------- // #define MSG_SET_DPT_NAME 0x004aL // // Description: // Sets the target device's DPT name field // // Target Types: Any device // Input Data: uCHAR dptName[DPT_NAME_SIZE] // Return Data: None //-------------------------------------------------------------------------- // #define MSG_GET_ENGINE_SIG 0x004bL // // Description: // Returns the engine's DPT signature. // // Target Types: Any device // Input Data: None // Return Data: dpt_sig_S //-------------------------------------------------------------------------- // #define MSG_GET_DRIVER_SIG 0x004cL // // Description: // Returns the driver's DPT signature. // // Target Types: Any device // Input Data: None // Return Data: dpt_sig_S //-------------------------------------------------------------------------- // #define MSG_GET_SYSTEM_INFO 0x004dL // // Description: // Returns the system information structure // // Target Types: Any device // Input Data: None // Return Data: System information //-------------------------------------------------------------------------- // #define MSG_GET_IO_STATS 0x004eL // // Description: // Returns I/O statistics information for the target object. // // Target Types: DPT_SCSI_DASD // DPT_SCSI_HBA // Input Data: None // Return Data: Statistics Information // If DPT_SCSI_DASD = devStats_S // If DPT_SCSI_HBA = hbaStats_S //-------------------------------------------------------------------------- // #define MSG_CLEAR_IO_STATS 0x004fL // // Description: // Clears the I/O statistics information for the target object. // // Target Types: DPT_SCSI_DASD // DPT_SCSI_HBA // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_GET_HBA_STATS 0x0050L // // Description: // Returns HBA specific statistics information. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: Statistics Information // If DPT_SCSI_DASD = devStats_S // If DPT_SCSI_HBA = hbaStats_S //-------------------------------------------------------------------------- // #define MSG_CLEAR_HBA_STATS 0x0051L // // Description: // Clears the HBA specific statistics information. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_GET_BATTERY_INFO 0x00e2L // // Description: // Gets the backup battery information structure. // // Target Types: DPT_SCSI_HBA // Input Data: uCHAR (optional - returns current values if not specified) // 0 = Get current values // 1 = Get default values // Return Data: dptBatteryInfo_S //-------------------------------------------------------------------------- // #define MSG_SET_BATTERY_THRESHOLDS 0x00e3L // // Description: // Gets the backup battery information structure. // // Target Types: DPT_SCSI_HBA // Input Data: dptBatteryThreshold_S // Return Data: None //-------------------------------------------------------------------------- //========================================================================== // SCSI device messages //========================================================================== // #define MSG_FORCE_STATE 0x0052L // // Description: // Force an HBA physical device into a specified state. // // Target Types: DPT_SCSI_DEVICE // Input Data: Desired State (BYTE) // FORCE_OPTIMAL // FORCE_WARNING // FORCE_FAILED // FORCE_REPLACED // Return Data: None //-------------------------------------------------------------------------- // #define MSG_UPDATE_STATUS 0x0056L // // Description: // Update the target object's status. // // Target Types: DPT_SCSI_DEVICE // Input Data: None // Return Data: dptStatus_S //-------------------------------------------------------------------------- // #define MSG_UPDATE_ALL_STATUS 0x0057L // // Description: // Update the status of all object's attached to this manager // and all sub-manager's. // // Target Types: Any DPT Manager // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_SCSI_CMD 0x0058L // // Description: // Send a SCSI command to an object (pass through). // // Target Types: All // Input Data: controlFlags (uSHORT) // Bit #: Description: // ------ ------------ // 0 SCSI Bus Reset // 1 HBA initialize // 2-4 reserved by EATA // 5 Interpret override // 6 Data Out // 7 Data In // 8 Do not set physical bit (force physical bit // cleared when targeting physical devices) // 9-14 reserved (unused) // 15 RAID command (Set SW/FW bits) // dataLength (uLONG) // scsiCDB (12 bytes) // write data (if Data Out is set) // Return Data: read data (if Data In is set) //-------------------------------------------------------------------------- // #define MSG_SCSI_READ 0x0059L // // Description: // Perform a SCSI read command to a device. // // Target Types: DPT_SCSI_DEVICE // Input Data: Start LBA (uLONG) // # of blocks (uSHORT) // Return Data: Data read from the target device //-------------------------------------------------------------------------- // #define MSG_SCSI_WRITE 0x005aL // // Description: // Perform a SCSI write command to a device. // // Target Types: DPT_SCSI_DEVICE // Input Data: Start LBA (uLONG) // # of blocks (uSHORT) // Data to write to the target device // Return Data: None // //-------------------------------------------------------------------------- // #define MSG_SCSI_FORMAT 0x005bL // // Description: // Issue a SCSI format command to a device. This will perform // the device's default format which may or may not include a // certification process depending on the device. // // Note: In order to specify an initialization pattern, a block size // must be specified. Specify a block size of zero if the block // size should not be set. // // Note: This message will return MSG_RTN_COMPLETED if the format // successfully completed. MSG_RTN_STARTED will be returned // if the format was successfully started and is in progress. // If the return immediate bit was set but the command could // not return immediately, the format cmd will still be issued, // but it will not return until the format has completed. // // Target Types: DPT_SCSI_DEVICE // Input Data: Control Flags (uSHORT) // Bit: Description, If set... // ---- ---------------------- // 0 Disable certification // 1 Return immediate // (if possible - check return code) // 3 Allow drive to compute # sectors/track // Block Size (Sector Size) (Optional - uSHORT) // (Zero = No change) // Initialization pattern (Optional - uSHORT) // Return Data: None //-------------------------------------------------------------------------- // // #define MSG_SET_EMULATION 0x005dL // // Description: // Sets the emulation parameters for a device. To remove //emulation parameters from a drive send this message with cylinders = 0. // // Target Types: DPT_SCSI_DEVICE // Input Data: Drive # (uSHORT) (1=D:, 0=C:) // Emulated Parameters (dptCemuParam_S) // Return Data: None //-------------------------------------------------------------------------- //NOT_IN_API #define MSG_SET_RB_BUFFER 0x005eL // // Description: // Save a 128 byte buffer to the reserve block of the target drive. // // Target Types: DPT_SCSI_DASD // Input Data: 128 byte buffer (uCHAR[128]) // Return Data: None //-------------------------------------------------------------------------- //NOT_IN_API #define MSG_GET_RB_BUFFER 0x005fL // // Description: // Read a 128 byte buffer from the reserve block of the target drive. // // Target Types: DPT_SCSI_DASD // Input Data: None // Return Data: 128 byte buffer (uCHAR[128]) //-------------------------------------------------------------------------- #define MSG_CHECK_BUSY 0x00f0L // // Description: // Determines if a device is busy. A device may be flagged as //busy because it is mounted in the operating system or otherwise //in a state which indicates the device should not be included in //an array. If this message is sent to an HBA object, the busy //checking logic is initialized/re-initialized. This message will //return a MSG_RTN_IGNORED status if the engine doesn't support the //busy logic. // // Target Types: DPT_SCSI_DASD // DPT_SCSI_HBA // Input Data: None // Return Data: uLONG Busy // 0 = Not busy // 1 = Busy //-------------------------------------------------------------------------- //========================================================================== // Miscellaneous Messages //========================================================================== // #define MSG_DELETE 0x0060L // // Description: // Attempts to delete the target object. // // Note: // 1. If targeted for a RAID device, its components are restored // as individual devices. // // Target Types: All // Input Data: Tag of object to be deleted (DPT_TAG_T) // Return Data: None //------------------------------------------------------------------------ // #define MSG_DELETE_ALL 0x0061L // // Description: // Deletes all objects in the connection except the driver. // // // Target Types: 0 // Input Data: None // Return Data: None //------------------------------------------------------------------------ // #define MSG_GET_CONFIG 0x0062L // // Description: // Returns the system configuration as a binary data stream. // // // Target Types: 0 // Input Data: None // Return Data: System Configuration (binary data) //------------------------------------------------------------------------ // #define MSG_SET_CONFIG 0x0063L // // Description: // Loads the system configuration from a binary data stream. // // // Target Types: 0 // Input Data: System Configuration (binary data) // Return Data: None //------------------------------------------------------------------------ // #define MSG_RAID_SET_CONFIG 0x0064L // // Description: // Overlay the specified RAID configuration onto the current //system configuration. // // // Target Types: 0 // Input Data: System Configuration (binary data) // Return Data: None //========================================================================== // DPT Event Logger Messages //========================================================================== // #define MSG_LOG_READ 0x0065L // // Description: // Non-destructively read the target HBA's event log. // // Target Types: DPT_SCSI_HBA // Input Data: offset (optional - uLONG) // Return Data: HBA event log information //-------------------------------------------------------------------------- // #define MSG_LOG_CLEAR 0x0066L // // Description: // Clear the target HBA's event log. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_LOG_SET_HBA_FILTER 0x0067L // // Description: // Set the target HBA's event log control word. // // Target Types: DPT_SCSI_HBA // Input Data: Event log control word (uLONG) // Save to NV flag (optional - uCHAR) // 0 = Temporary change (do not save to NV) // 1 = Save change to NV (Default) // Return Data: None //-------------------------------------------------------------------------- // #define MSG_LOG_SET_STATUS 0x0068L // // Description: // Set the DPT event logger's event filter. // // Target Types: DPT_SCSI_HBA // Input Data: Event logger filter // Save to NV flag (optional - uCHAR) // 0 = Temporary change (do not save to NV) // 1 = Save change to NV (Default) // Return Data: None //-------------------------------------------------------------------------- // #define MSG_LOG_REGISTER 0x0069L // // Description: // Register the DPT event logger with the engine. This message //should only be sent by the DPT logger when it is prepared to log //events. // // Target Types: 0 // Input Data: OS dependent // Return Data: None //-------------------------------------------------------------------------- // #define MSG_LOG_UNREGISTER 0x006aL // // Description: // Unregister the DPT event logger from the engine. This message //should only be sent by the DPT logger when it can no longer log events. //After this message is sent to the engine, all MSG_LOG_READ requests //with go directly to the HBA's event log. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_LOG_LOAD 0x006bL // // Description: // Requests that the DPT event logger be loaded. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_LOG_UNLOAD 0x006cL // // Description: // Requests that the DPT event logger be unloaded. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_LOG_START 0x006dL // // Description: // Requests that the DPT event logger begins logging events. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_LOG_STOP 0x006eL // // Description: // Requests that the DPT event logger stops logging events. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_LOG_GET_STATUS 0x006fL // // Description: // Gets the DPT event logger status. // // Target Types: 0 // Input Data: None // Return Data: Event logger status (filter level, logger loaded...) //-------------------------------------------------------------------------- // #define MSG_LOG_GET_SIG 0x0070L // // Description: // Gets the DPT event logger signature structure. // // Target Types: 0 // Input Data: None // Return Data: Event logger signature (dpt_sig_S) //-------------------------------------------------------------------------- // #define MSG_RAID1_SET_TARGET 0x0071L // // Description: // Sets the target device as the target drive for a RAID-1 //rebuild (copy) operation. This message should be issued after the //RAID-1 device has been created in the engine but before a //MSG_RAID_HW_ENABLE has been issued. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_DIAGNOSTICS_ON 0x0072L // // Description: // Indicates that the target object is performing diagnostics. // // Target Types: Any Object // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_DIAGNOSTICS_OFF 0x0073L // // Description: // Clears the diagnostics in progress flag. // // Target Types: Any Object // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_DEL_ALL_EMULATION 0x0074L // // Description: // Deletes all emulated drives from the system. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_LOG_SAVE_PARMS 0x0075L // // Description: // Instructs the DPT logger to save its parameters. // // Target Types: 0 // Input Data: None // Return Data: Event logger status (filter level, logger loaded...) //-------------------------------------------------------------------------- // #define MSG_DOWNLOAD_FW 0x0076L // // Description: // Downloads FW code to an HBA's non-removeable DASD devices. // // Target Types: 0 // Input Data: Download cmd (uLONG) // if (downLoadCmd==FWD_INITIALIZE) { // Number of blocks (512 bytes) of FW code to // be downloaded (uSHORT) // } // else if (downLoadCmd==FWD_ABORT) { // Nothing // } // else { // FW Code (Data buffer) // } // // Return Data: None // Maximum size of downloadable FW code #define FW_CODE_BLKS 0x0100 // Download cmd values: // Used to initialize a FW download #define FWD_INITIALIZE 0x80000000L // Used to abort a FW download #define FWD_ABORT 0xc0000000L //-------------------------------------------------------------------------- // #define MSG_DEACTIVATE_FW 0x0077L // // Description: // Remove the downloaded firmware from the target HBA's drives. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- //NOT_IN_API - Automatically done by the engine at scan time #define MSG_RESERVE_BLOCKS 0x0078L // // Description: // Reserve blocks at the end of the target device for use by DPT. // Reserved blocks are used for storing non-volatile config. info, // a RAID table, and downloaded FW code. // // Target Types: 0 // Input Data: Number of Blocks to reserve (uSHORT) // Return Data: None //-------------------------------------------------------------------------- // #define MSG_GET_COMPATABILITY 0x0079L // // Description: // Returns the engine compatability indicator. The first engine //released did not support this message. All subsequent releases of //the DPT engine will increment the compatability indicator, if the //engine changes in some way as to make it incompatable with //applications written for an older engine. Reasons for incompatability //would include a change in the data structures returned by the engine. // // // Target Types: 0 // Input Data: None // Return Data: Engine compatability indicator (uLONG) //-------------------------------------------------------------------------- // #define MSG_SET_MODE_PAGE 0x007bL // // Description: // Sends the specified mode page to the target object. // // Target Types: All // Input Data: Mode flags (uCHAR) // Bit 7 = Use a 10 byte mode sense CDB // Bit 6 = Force the interpret bit to be set // Bits 5 = Do not set physical bit (force physical bit // cleared when targeting physical devices) // Bits 4-2 = Unused // Bit 1 = Do not set page format bit // Bit 0 = Do not set save page bit // Unused (uCHAR) // Mode page data // Return Data: None // // Note: A 6 byte mode select SCSI CDB will be used unless bit #7 is set // in the flags byte or if there is more than 0xfb bytes of mode // page data //-------------------------------------------------------------------------- // #define MSG_SET_INFO 0x007cL // // Description: // Set an engine object's data structure. Set's the specified //data structure for the target engine object. A valid data type //must be specified for this command to complete successfully. // // Target Types: All // Input Data: Data Type (uSHORT) // Data structure (For the specified data type) // Return Data: None // //-------------------------------------------------------------------------- // #define MSG_GET_NV_INFO 0x007dL // // Description: // Gets the contents of the target HBA's non-volatile memory. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: Contents of the target HBA's non-volatile // memory. (128 bytes) // //-------------------------------------------------------------------------- // #define MSG_SET_NV_INFO 0x007eL // // Description: // Sets the contents of the target HBA's non-volatile memory. //The engine will automatiically compute the checksum prior to //writing the data to the NV RAM. This message should be used in //conjunction with MSG_GET_NV_INFO to modify an HBA's non-volatile //RAM. // // Target Types: DPT_SCSI_HBA // Input Data: Contents of the target HBA's non-volatile // memory. (128 bytes) // Return Data: None // //-------------------------------------------------------------------------- // #define MSG_ID_ALL_HIDDEN 0x007fL // // Description: // Returns the ID structure of all non-component devices that are // not visible to the OS. For each device found, the device's component // list is traversed. // // Target Types: 0 // Input Data: None // Return Data: List of hidden devices (dptID_S) // //-------------------------------------------------------------------------- //NOT_IN_API - Only meaningful to the DPT statistics logger #define MSG_STATS_LOG_REGISTER 0x0080L // // Description: // Register the DPT stats logger with the engine. This message // should only be sent by the DPT stats logger when it is prepared to // log events. // // Target Types: 0 // Input Data: OS dependent // Return Data: None //-------------------------------------------------------------------------- //NOT_IN_API - Only meaningful to the DPT statistics logger #define MSG_STATS_LOG_UNREGISTER 0x0081L // // Description: // Unregister the DPT stats logger from the engine. This message // should only be sent by the DPT stats logger when it can no longer // log events. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_STATS_LOG_GET_STATUS 0x0082L // // Description: // Returns the control structures used to control the stats // collecting behavior of the specifed target. // // Target Types: DPT_SCSI_HBA or DPT_SCSI_DASD // Input Data: None // Return Data: List of control structures (StatControl_S) //-------------------------------------------------------------------------- // #define MSG_STATS_LOG_SET_STATUS 0x0083L // // Description: // Sets the stats collecting behavior of the specified // target object. // // Target Types: DPT_SCSI_HBA or DPT_SCSI_DASD // Input Data: Stat group number (uLONG) // Collection frequency flag (uLONG) // Record data flags (uLONG) // Return Data: None //-------------------------------------------------------------------------- // #define MSG_STATS_LOG_READ 0x0084L // // Description: // Sets the stats collecting behavior of the specified // target object. // // Target Types: DPT_SCSI_HBA or DPT_SCSI_DASD // Input Data: Stat group number (uLONG) // Collection frequency flag (uLONG) // Record data flags (uLONG) // // optional - Starting time (dptTime_S) // optional - Ending time (dptTime_S) // // Return Data: StatsHeader_S // Requested info //-------------------------------------------------------------------------- // #define MSG_FLASH_SWITCH_INTO 0x0085L // // Description: // Attempts to switch the target HBA from operational mode // into flash mode. // // Note: // 1. It is not necesary to issue this command prior to programming // the flash since the first write command will automatically // switch into flash mode and erase the flash. // // 2. In flash mode the HBA will only respond to flash related commands // and the standard SCSI inquiry command. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_FLASH_SWITCH_OUT_OF 0x0086L // // Description: // Attempts to switch the target HBA from flash mode into // operational mode. This message causes firmware to perform // a "cold" boot. Since firmware is going through its normal // power up boot process if a flash checksum failure is detected, // the boot code could keep the HBA in flash mode. // If a non-zero input (to engine) byte is specified, the firmware // will attempt to switch into operational mode by-passing the flash // checksum verification. This allows the flash programming software // to burn the flash, switch to operational mode to verify correct // firmware functionality, switch back into flash mode, then burn the // flash checksum. This insures that the checksum is only written // if the firmware that was burned into the flash is operational // (at least operational enough to switch back into flash mode). // // Target Types: DPT_SCSI_HBA // Input Data: Skip Checksum Test (uCHAR) // Return Data: None //-------------------------------------------------------------------------- // #define MSG_FLASH_WRITE 0x0087L // // Description: // Writes the specified data to the HBA's flash memory. Each // successive MSG_FLASH_WRITE command writes to the flash memory // starting where the previous MSG_FLASH_WRITE command left off. // The DPT engine will automatic verify each write to the flash // memory. The number of bytes written with each MSG_FLASH_WRITE // message must be an even multiple of 512 (512, 1024, 1536, 2048...) // // Note: // 1. The first write command issued will cause the firmware // to switch into flash mode and erase the flash memory. // // 2. If the first write command fails with an ERR_FLASH_SWITCH_MODES // return code, the firmware was unable to switch into flash // mode for one of the following reasons: // A. There was dirty cache data // B. There was an active build, rebuild, verify, or diagnostic // C. There was some other outstanding condition that could // have caused data corruption if a mode switch was made. // If unable to switch into flash mode, insure that all builds, // rebuilds, verifies, and diagnostics are stopped and try again. // // 3. In flash mode the HBA will only respond to flash related commands // and the standard SCSI inquiry command. // // Target Types: DPT_SCSI_HBA // Input Data: Data to be written to the flash // Return Data: None //-------------------------------------------------------------------------- // #define MSG_FLASH_WR_NO_VERIFY 0x0088L // // Description: // This message is identical to the MSG_FLASH_WRITE message // except the engine will not verify each write to the flash memory. // // Target Types: DPT_SCSI_HBA // Input Data: Data to be written to the flash // Return Data: None //-------------------------------------------------------------------------- // #define MSG_FLASH_WRITE_DONE 0x0089L // // Description: // This message must be sent to the HBA after all data has // been written to the flash memory. This message causes flash // memory checksums to be computed for data integrity purposes. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_FLASH_READ 0x008aL // // Description: // This message reads the specified number of bytes from // the specified offset within the HBA's flash memory. This flash // command is supported from operational mode. // // Target Types: DPT_SCSI_HBA // Input Data: Offset (uLONG) // Number of bytes (uLONG) // Return Data: Flash data //-------------------------------------------------------------------------- // #define MSG_FLASH_STATUS 0x008bL // // Description: // This message returns detailed status information about // the HBA's flash memory. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: flash write offset (uLONG) // f/w status 0 (uLONG) // 0 = Partial status info is contained in the // following dptFlashStatus_S // 1 = Complete status info is contained in the // following dptFlashStatus_S // flash status (dptFlashStatus_S) //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // No longer supported #define MSG_DIAG_SCHEDULE 0x008cL // // Description: // Schedules a firmware level diagnostic to be performed on // the target device. // // Target Types: DPT_SCSI_DASD (F/W Array or F/W physical only) // Input Data: Test Type (uCHAR) // 1 = Buffer Read // 2 = Buffer Read/Write // 3 = Media Read // 4 = Media Read/Write // Flags (uCHAR) // 0x010 = Random sectors (Applies to media tests only) // Maximum Error Count (uSHORT) // Number of Iterations (uLONG) // If random sectors = # sectors to test // If sequential sectors = # complete test iterations // If zero = perform test indefinately (forever) // Start Time (uLONG) - Absolute time in seconds // since Jan. 1, 1970 // If zero = Start test immediately // Repeat Rate (uLONG) - In seconds, This number // is added to the absolute start time to // determine the next start time // If zero = Execute test 1 time only // Return Data: None //-------------------------------------------------------------------------- // No longer supported #define MSG_DIAG_UNSCHEDULE 0x008dL // // Description: // This message unschedules a diagnostic on a device. This // message deletes a diagnostic scheduled with MSG_DIAG_SCHEDULE. // // Target Types: DPT_SCSI_DASD (F/W Array or F/W physical only) // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // No longer supported #define MSG_DIAG_STOP 0x008eL // // Description: // This message stops an active diagnostic on the target device. // This message will not unschedule the diagnostic, it merely stops // the diagnostic until the next scheduled start time. // // Target Types: DPT_SCSI_DASD (F/W Array or F/W physical only) // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // No longer supported #define MSG_DIAG_EXCLUDE 0x008fL // // Description: // Sets an exclusion period in which no firmware based diagnostics // and no RAID rebuilds or verifies can be performed. // // Target Types: DPT_SCSI_HBA // Input Data: Start of exclusion period (uCHAR) // 24hr counter w/ 1 hour resolution // Ex. 0 = 12:00am (Midnight) // 1 = 1:00am // 2 = 2:00am // 12 = 12:00pm (Noon) // 23 = 11:00pm // Values greater than 23 are invalid // End of exclusion period (uCHAR) // Same units as above // Return Data: None //-------------------------------------------------------------------------- // No longer supported #define MSG_DIAG_GET_SCHEDULE 0x0090L // // Description: // Returns firmware based diagnostic scheduling information // for the target device. This command should only be issued // if dptDevInfo_S.scheduledDiag is non-zero (a diagnostic is // scheduled). // // Target Types: DPT_SCSI_DASD (F/W Array or F/W physical only) // Input Data: None // Return Data: Test Type (uCHAR) // 1 = Buffer Read // 2 = Buffer Read/Write // 3 = Media Read // 4 = Media Read/Write // Flags (uCHAR) // 0x40 = All sectors sequentially // (else random sectors) // (Applies to media tests only) // Maximum Error Count (uSHORT) // Number of Iterations (uLONG) // If random sectors = # sectors to test // If sequential sectors = # complete test iterations // If zero = perform test indefinately (forever) // Start Time (uLONG) - Absolute time in seconds // since Jan. 1, 1970 // If zero = Start test immediately // Repeat Rate (uLONG) - In seconds, This number // is added to the absolute start time to // determine the next start time // If zero = Execute test 1 time only // Time until test begins (in minutes) (uSHORT) //-------------------------------------------------------------------------- // #define MSG_RAID_GET_LIMITS 0x0091L // // Description: // Returns an HBA's RAID array limit information. // // Target Types: DPT_SCSI_HBA // Input Data: None // Return Data: Firmware array limit info (dptArrayLimits_S) //-------------------------------------------------------------------------- // #define MSG_SMART_EMUL_ON 0x0092L // // Description: // Turns SMART emulation on for the target device. // // Target Types: DPT_SCSI_DASD // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_SMART_EMUL_OFF 0x0093L // // Description: // Turn SMART emulation off for the target device. // // Target Types: DPT_SCSI_DASD // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_FLASH_SET_REGION 0x0094L // // Description: // This message sets the region to flash for Gen 5 HBA // // Target Types: DPT_SCSI_HBA // Input Data: Region to flash (uLONG) // 0 = Firmware // 1 = BIOS // 2 = Utility // 3 = NVRAM // 4 = Serial number // BootBlockSize (uLONG) - firmware image only // Bits 0-7 = BootBlockSize in 16k units // Bit 13 = If set bottom aligned f/w image // else top aligned f/w image (bit 0x2000) // ImageSize in bytes (uLONG) - firmware image only // Return Data: None //-------------------------------------------------------------------------- // #define MSG_RESERVE_DEVICE 0x00f2L // // Description: // Issue a SCSI "reserve" command to a device to obtain exlcusive //access to the device. This commands will only succeed if the device //is not already reserved by another host. This message may target //physical drives, arrays, or HBAs. If an HBA is targeted, the HBA //attempts to gain exlusive access to all devices. If an array is //targeted, the HBA attempts to gain exclusive access to all underlying //physical drives. // // Target Types: DPT_SCSI_HBA, DPT_SCSI_DASD // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_RELEASE_DEVICE 0x00f3L // // Description: // Issue a SCSI "release" command to a device to release exlusive //access to the device. This command undoes the exclusive lock //obtained with a "MSG_RESERVE_DEVICE" command. This message may //target physical drives, arrays, or HBAs. If an HBA is targeted, //the HBA attempts to release all devices. If an array is targeted, //the HBA attempts to release all underlying physical drives. // // Target Types: DPT_SCSI_HBA, DPT_SCSI_DASD // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSG_SET_ARRAY_DRIVE_SIZES 0x00f4L // // Description: // This message sets an HBA's drive size list. The drive size list //defines drive size ranges. Array components are rounded down to the //lower limit of the range in which they fall. The purpose of this //rounding is to allow physical drives within the same capacity range //to be used interchangeably in an array. // // Target Types: DPT_SCSI_HBA // Input Data: save (uLONG) // if zero = make temp. change in DPT Engine // else if non-zero = Save new drive size table in HBA's NVRAM // # of entries(n) (uLONG) // entry #1 (uLONG) // ... // entry #n (uLONG) // Return Data: None //-------------------------------------------------------------------------- // #define MSG_GET_ARRAY_DRIVE_SIZES 0x00f5L // // Description: // This message gets an HBA's drive size list. The drive size list //defines drive size ranges. Array components are rounded down to the //lower limit of the range in which they fall. The purpose of this //rounding is to allow physical drives within the same capacity range //to be used interchangeably in an array. // // Target Types: DPT_SCSI_HBA // Input Data: none // Return Data: max entries (uLONG) // - Maximum number of entries firmware can store in NVRAM // # of entries(n) (uLONG) // entry #1 (uLONG) // ... // entry #n (uLONG) //-------------------------------------------------------------------------- // #define MSG_GET_MEMBANK_CAPACITIES 0x00f6L // // Description: // This message returns the size of the memory in each SIMM slot in //megabytes. // // Target Types: DPT_SCSI_HBA // Input Data: none // Return Data: membank0 (uLONG) // membank1 (uLONG) // membank2 (uLONG) // membank3 (uLONG) //-------------------------------------------------------------------------- // #define MSG_GET_CHAN_INFO 0x00f7L // // Description: // This message returns detailed channel information. // // Target Types: DPT_SCSI_HBA // Input Data: none // Return Data: # channels (uLONG) // array of dptChanInfo2_S structures // (one for each channel supported) //-------------------------------------------------------------------------- // #define MSG_RAID_SET_LUN_SEGMENTS 0x00f8L // // Description: // This message sets the LUN segmenting on an array. // // Target Types: DPT_RAID_DEV // Input Data: numSegments (uLONG) - number of arraySegment_S entries // structSize (uLONG) - size of each arraySegment_S entry // arraySegment_S (1 - 8 entries) // Return Data: none //-------------------------------------------------------------------------- // #define MSG_RAID_GET_LUN_SEGMENTS 0x00f9L // // Description: // This message gets the LUN segmenting of an array. // // Target Types: DPT_RAID_DEV // Input Data: none // Return Data: numSegments (uLONG) - number of arraySegment_S entries returned // structSize (uLONG) - size of each arraySegment_S entry // arraySegment_S[numSegments] //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- //========================================================================== // Communication Messages // // Messages interpreted by the communication engine when not // attached to an HBA engine. //========================================================================== // #define MSGC_SCAN_FOR_END_PTS 0x00a0L // // Description: // Builds a list of potential connection points. These connection //points could be remote comm. engines or a DPT HBA engine located at //the current communication end point. // // Target Types: // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSGC_ID_END_PTS 0x00a1L // // Description: // Returns the list of communication end points visible to the //current end point. The communication end point list is built by //performing a MSG_SCAN_FOR_END_POINTS. // // Target Types: // Input Data: None // Return Data: List of end point IDs //-------------------------------------------------------------------------- // #define MSGC_ID_COMM_MODULES 0x00a2L // // Description: // Returns a list of communication modules (SPX, TLI, RS-232...) //available at the current end point. // // Target Types: // Input Data: None // Return Data: List of comm. modules //-------------------------------------------------------------------------- // #define MSGC_SET_MOD_FLAGS 0x00a3L // // Description: // Sets the specified bits in the target comm. module's user flag //word. // // Target Types: Comm. module // Input Data: Flag mask - Bits to set (uSHORT) // Return Data: None //-------------------------------------------------------------------------- // #define MSGC_CLR_MOD_FLAGS 0x00a4L // // Description: // Clears the specified bits in the target comm. module's user flag //word. // // Target Types: Comm. module // Input Data: Flag mask - Bits to clear (uSHORT) // Return Data: None //-------------------------------------------------------------------------- // #define MSGC_DISCONNECT_ALL 0x00a5L // // Description: // Disconnects from all end points up to the local comm. engine. //This message allows a user to disconnect easily from a deeply nested //comm. link. // // Target Types: // Input Data: None // Return Data: None //-------------------------------------------------------------------------- //Obsolete - Replaced with MSGC_SET_PASSWORD and MSGC_SET_USERNAME #define MSGC_LOGIN 0x00a6L // // Description: // Logs a user into the target DPT engine. A user cannot //connect to a DPT engine until a successfull MSG_LOGIN has been //performed. // // Target Types: DPT engine module // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSGC_ICRS_REQ_START 0x00a7L // // Description: // Requests that an input connection search thread be started. // This message does not start a search thread directly, it simply // requests that a search thread be started. The local DPT comm. // process is responsible for actually starting the search thread. // // Note: ICRS = Input Connection Request Search // // Target Types: DPT comm. module // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSGC_ICRS_REQ_STOP 0x00a8L // // Description: // Requests that an input connection search thread be stopped. // This message sets a flag that is polled by the search thread // function to determine if the search thread should terminate. // // Note: ICRS = Input Connection Request Search // // Target Types: DPT comm. module // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSGC_ICRS_FULFILL_REQ 0x00a9L // // Description: // This message fullfills a MSGC_ICS_START_REQ message. This // message should typically only be sent by the local DPT comm. // process. This message will start a child thread of the calling // process. // // Note: ICRS = Input Connection Request Search // // Target Types: DPT comm. module // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSGC_ICRS_START_THREAD 0x00aaL // // Description: // This message performs a combination of a MSG_ICRS_START_REQ // followed by a MSG_ICRS_FULLFILL_REQ. This function will start // an input connection search thread as a child thread of the calling // process. This message guarantees that the search thread will // be a child thread of the calling process by insuring that no // other process sends a successfull MSGC_ICRS_FULLFILL_REQ between // the MSGC_ICRS_START_REQ and MSGC_ICRS_FULLFILL_REQ messages. // // Note: ICRS = Input Connection Request Search // // Target Types: DPT comm. module // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSGC_LINK_ALIVE 0x00abL // // Description: // This message is sent to a DPT comm. engine to keep the comm. // link from timing out if no other messages are sent to the comm. // engine. // // Target Types: 0 // Input Data: None // Return Data: None //-------------------------------------------------------------------------- // #define MSGC_NEW_MODULE 0x00acL // // Description: // This message adds a new master comm. module to the comm. // engine. This message is only supported when calling the comm. // engine entry point function (not supported remotely). This // message is used to add serial port/modem modules to the comm. // engine. // // Target Types: 0 // Input Data: Comm. Protocol (uSHORT) // Protocol Specific // Serial Port # (uSHORT) // Baud Rate (uLONG) // IRQ # (Optional - uSHORT) // Return Data: None //-------------------------------------------------------------------------- // #define MSGC_DSPLY_STD_OUT 0x00afL // // Description: // This message displays the data specified in the "toEng_P" // buffer to standard output. // // Target Types: 0 // Input Data: Display data (char[]) // Return Data: None //-------------------------------------------------------------------------- #define MSG_ID_ALL_BROADCASTERS 0x000000b0L // // Description: // Returns tag/type structured for all the broadcasters currently loaded with the // logger // // // Target Types: 0 // Input Data: None // Return Data: array of LoggerID_S's //-------------------------------------------------------------------------- #define MSG_ID_BROADCASTERS 0x000000b1L // // Description: // Returns the broadcast modules currently loaded, or the list of broadcasters // inside a module // // // // Target Types: 0 // Input Data: // // (DPT_TAG_T) 0 Will return a list of modules (DLLs, NLMs, etc) // currently loaded // // or // // Module Tag Will return a list of the broadcasters inside the module // // Return Data: array of LoggerID_S's //-------------------------------------------------------------------------- #define MSG_GET_BROADCASTER_INFO 0x000000b2L // // Description: // Returns information about a broadcast module or a specific broadcaster // // // // // Target Types: 0 // // Input Data: // // (DPT_TAG_T) 0 For a module itself, will return a broadcastModuleCfg_S // // or // // Module Tag Will get information for the broadcaster inside the specified // module.// // // if the first tag is 0 then enter the tag of the module // otherwise the tag of the broadcaster inside the module // // Return Data: if first tag is 0: broadcastModuleCfg_S // else: broadcasterCfg__S + broadcaster unique data //-------------------------------------------------------------------------- #define MSG_SET_BROADCASTER_INFO 0x000000b3L // // Description: // Sets changes to broadcasters and modules // // // // Target Types: 0 // // Input Data: // // (DPT_TAG_T) 0 For a module itself // // or // // Module Tag Will get information for the broadcaster inside the specified // module. // // // if the first tag is 0 then insert the tag of the module // otherwise the tag of the broadcaster inside the module // // if module tag is 0, insert a broadcasterModuleCfg_S else // insert broadcasrerCfg_S + broadcaster specific info // // Return Data: none //-------------------------------------------------------------------------- #define MSG_LOAD_BROADCAST_MODULE 0x000000b4L // // Description: // Attempts to load a new broadcating module // // // // // Target Types: 0 // // // Input Data: NULL terminated string // // Return Data: none // //-------------------------------------------------------------------------- #define MSG_UNLOAD_BROADCAST_MODULE 0x000000b5L // // Description: // Unloads a currently running broadcast module // // // // // Target Types: 0 // // // Input Data: (DPT_TAG_T) Module tag // // Return Data: none //-------------------------------------------------------------------------- #define MSG_CREATE_BROADCASTER 0x000000b6L // // Description: // Attempts to create a new broadcaster inside a specified module // // // // // Target Types: 0 // // // Input Data: (DPT_TAG_T) Module tag // // Return Data: none //-------------------------------------------------------------------------- #define MSG_DELETE_BROADCASTER 0x000000b7L // // Description: // Removes a preexisting broadcaster // // // // // Target Types: 0 // // // Input Data: (DPT_TAG_T) Module tag // (DPT_TAG_T) Broadcaster Tag // // Return Data: none //-------------------------------------------------------------------------- // #define MSGC_SET_USERNAME 0x00b8L // // Description: // This message sets the user name used to validate on a remote //comm. engine server. // // Note: This message is used with MSGC_SET_PASSWORD to replace MSGC_LOGIN // // Target Types: 0 // Input Data: username (up to DPTCE_USERNAME_LEN chars) // Return Data: None //-------------------------------------------------------------------------- // #define MSGC_SET_PASSWORD 0x00b9L // // Description: // This message sets the password used to validate on a remote //comm. engine server. // // Note: This message is used with MSGC_SET_USERNAME to replace MSGC_LOGIN // // Target Types: 0 // Input Data: password (up to DPTCE_PASSWORD_LEN chars) // Return Data: None //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // #define MSG_STATS_LOG_CLEAR 0x00baL // // Description: Clears all the log files for the specified device // // // // Target Types: DPT_SCSI_HBA or DPT_SCSI_DASD // Input Data: None // // // Return Data: None // // #define MSG_RAID_CHANGE 0x00bbL // // Description: // Modifies a RAID device. // // Target Types: Any RAID manager // Input Data: DPT_TAG_T (array tag) // uCHAR flags // bits // 0 - Remove these components. Will only work for // components that were added since the last ENABLE // raidHeader_S // List of raidCompList_S // Return Data: None // #define MSG_GET_ACCESS_RIGHTS 0x00bcL // // Description: // gets the current device access rights // // Target Types: Any device // Input Data: none // // Return Data: dptMultiInitList_S (for a device) or a dptMultiInitPage_S + dptMultiInitList_S (for a hba) // #define MSG_SET_ACCESS_RIGHTS 0x00bdL // // Description: // sets the current device access rights // // Target Types: Any device // Input Data: // if target is the hba: dptMultiInitPage_S // uCHAR options // // 0 - if set acquire new rights // 1 - if set make changes permament // // dptMultiInitList_S (for a device, if sent to the hba all devices will get these rights) // // Return Data: none (for a device) or a list of device tags that failed (if sent to a hba) // // NOTE: You can not set the rights on a component of an array, the engine will // automatically set the options of the array if the message is sent to a // component // #define MSG_GET_BROADCASTER_SIG 0x00beL // // Description: // gets the broadcat module sig // // Target Types: 0 // Input Data: 0, module tag // // Return Data: dpt_sig_S #define MSG_ASSIGN_NEW_MAGIC_NUM 0x00bfL // // Description: // gives new magic numbers to arrays // // Target Types: RAID MGR // Input Data: none // // Return Data: none #define MSG_GET_NUM_HW_ENABLES 0x00c0L // // Description: // returns the number of MSG_RAID_HW_ENABLE's that have come down the pike // // Target Types: 0 // Input Data: none // // Return Data: uLONG in big endian format #define MSG_ALMS_ID_ALERTS 0x00c1L // // Desc: Returns the IDs of all known alerts // // target: 0 // input: 0 // output: LoggerID_S's #define MSG_ALMS_ID_USERS 0x00c2L // // Desc: Returns the IDs of all known users or the users associated with an alert // // target: 0 // input: 0 for complete user list // alert tag for users this alert is to be sent to // output: LoggerID_S's #define MSG_ALMS_ID_EVENTS 0x00c3L // // Desc: Get the IDs of the events associated with an alert or in an event group // // target: 0 // input: event folder tag or alert tag // output: LoggerID_S's #define MSG_ALMS_ID_EVENT_FOLDER 0x00c4L // // Desc: Gets the ids of evetn groups // // target: 0 // input: 0 // output: LoggerID_S's #define MSG_ALMS_ID_SERVERS 0x00c5L // // Desc: Gets the ids of either all the known server, the servers associated with an alert or a users server // // target: 0 // input: alert tag or user tag or server location tag // output: LoggerID_S's #define MSG_ALMS_ID_SERVER_LOCATIONS 0x00c6L // // Desc: Gets the id of server locations // // target: 0 // input: 0 // output: LoggerID_S's #define MSG_ALMS_ID_MOVEABLE_RESOURCE_FOLDER 0x00c7L // // Desc: Gets the ids of resource groups that can be assigned to different users // // target: 0 // input: 0 // output: LoggerID_S's #define MSG_ALMS_ID_ALERT_SCHEDULE 0x00c8L // // Desc: Gets the ids of schedules for a certain alert/user // // target: 0 // input: alert tag // // user tag (optional) // broadcast method type (optional) // output: LoggerID_S's #define MSG_ALMS_GET_INFO 0x00c9L // // Desc: gets the info of an object // // target: 0 // input: tag of resource // output: alertInfo_C or userInfo_C or serverInfo_C or serverLocationInfo_C or beeperInfo_C or // eventInfo_C or eventFolderInfo_C or moveableResourceFolderInfo_C #define MSG_ALMS_SET_INFO 0x00caL // // Desc: sets the info of an object // // target: 0 // input: tag of resource // alertInfo_C or userInfo_C or serverInfo_C or serverLocationInfo_C or beeperInfo_C or // eventInfo_C or eventFolderInfo_C or moveableResourceFolderInfo_C // output: none #define MSG_ALMS_CREATE 0x00cbL // // Desc: create an object inside the alert manager // // target: 0 // input: type of resource // // If creating a scheduleTimesInfo you need to add the following items: // uLONG broadcast type // DPT_TAG_T user tag // // output: LoggerID_S #define MSG_ALMS_DELETE 0x00ccL // // Desc: deletes an object inside the alert manager // // target: 0 // input: tag // output: LoggerID_S if object is still linked to another #define MSG_ALMS_LINK 0x00cdL // // Desc: links a resource to another, used to assmeble the pieces on an alert // // target: 0 // input: tag of resource to link // tag of resource to be linked to // output: none #define MSG_ALMS_UNLINK 0x00ceL // // Desc: unlinks a resource from another // // target: 0 // input: tag of resource to unlink // tag of resource to unlink from // output: none #define MSG_ALMS_ACTIVATE 0x00cfL // // Desc: the final message that activates an alert, does final sanity checking, if it passes the // alert will be used // // NOTE: if a link or unlink command is sent to a piece in an alert, the alert is deactivated or // if a set info is sent to an alert object itself it will also be deactivated // // target: 0 // input: tag of alert // // output: TBD #define MSG_ALMS_ID_MOVEABLE_RESOURCES 0x00d0L // // Desc: Gets the ids of moveable resources // // target: 0 // input: 0 or // DPT_TAG_T of resource folder // output: LoggerID_S's #define MSG_ALMS_EVENT_DATA 0x00d1L // // Desc: Sends the event data to the alert manager for further processing // // target: 0 // input: Log page 34 // output: none #define MSG_ALMS_REGISTER 0x00d2L // // Desc: Tells the engine the alert manager is there // // target: 0 // input: none // output: none #define MSG_ALMS_UNREGISTER 0x00d3L // // Desc: Tells the engine that the alert manager is no longer there // // target: 0 // input: none // output: none #define MSG_GET_ENVIRON_INFO 0x00e0L // // Desc: gets information about the environmental conditions on/around the hba // // target: hba // input: none // output: dptHBAenviron_S // // NOTE: 0xffffffff in any field means there is no information // temps are in celcius #define MSG_SET_ENVIRON_INFO 0x00e1L // // Desc: sets environmental thresholds // // target: hba // input: dptHBAenviron_S // output: none // //-------------------------------------------------------------------------- //========================================================================== // I2O specific messages //========================================================================== // #define MSG_I2O_DMA_TEST 0x00e5L // // Description: // Perform a DMA test on the controller. The DMA test will transfer //512 bytes of data from one location to another. If the data is moved //with PIO, the CPU will simply move the data without moving the data //to a buffer in local or Domino memory. If the data is moved with //DMA, the CPU will DMA the data from the source address to Domino memory //and then to the destination address. This command can only fail if an //ECC error is detected during the DMA from Domino memory to host memory. // // Target Types: Only I2O HBAs // Input Data: uCHAR Flags (optional - assumed zero if not specified) // Bit #0 = If set, use DMA transfer // If cleared, use PIO transfer // uCHAR Default flags (optional - assumed zero if not specified) // Bit #0 = If set, use default source data byte // Bit #1 = If set, use default destination data byte // uCHAR Default source data (optional, ignore is "source data" is specified) // uCHAR Default destination data (optional, ignored if "destination data" is specified) // uCHAR[512] - Source data (optional - set to "default source data" if not specified and "default source data" is flagged for use) // uCHAR[512] - Destination data (optional - set to "default destination data" if not specified and "default destination data" is flagged for use) // // Return Data: uCHAR[4] - Parameter Table ID (0x4B, little endian) // uCHAR[4] - Parameter Table Length (528, little endian) // uCHAR[512] - Destination Data // uCHAR[16] - ECC Syndrome //-------------------------------------------------------------------------- // #define MSG_I2O_RAM_TEST 0x00e6L // // Description: // Perform a RAM test on the controller. The RAM test verifies //stuck bits by using a 55h/AAh pattern. RAM test commands will be //rejected if the controller has dirty cache or outstanding commands. //No commands can be issued to the controller during a RAM test. If //the test completes without error, the result data will contain all //zeroes. Thus, if both the "Expected Data" and "Actual Data" result //fields are zero, no RAM errors were found. // //Note: The RAM test cannot be issued when the controller is in //operational mode. // // Target Types: Only I2O HBAs // Input Data: uCHAR Flags // Bit #0 = If set, test Domino memory // If cleared, test local memory // // Return Data: uLONG Failing Address (lower 32 bits) // uLONG Failing Address (upper 32 bits) // uCHAR Expected Data // uCHAR Actual Data //-------------------------------------------------------------------------- // #define MSG_I2O_BIST 0x00e7L // // Description: // MSG_I2O_BIST initiates the controller's built-in-self-test. //The BIST command may be issued at any time, even while host commands //are being processed. When BIST is received, the firmware will //execute the same tests that are performed at power-up. The only //modification to those tests is that the firmware will not be //re-downloaded and the code segment of the firmware image in flash //will simply be compare to the image in RAM. Also, the Domino RAM //test will not be run if there are any active host commands or if //there is dirty data in the cache. During the test, the I2O Message //Unit and internal controller interrupts will be shutdown. // //Note: The complete firmware image contains a default data segment //which has been changed since download. Therefore the image can //neither be compared or re-downloaded. // // Target Types: Only I2O HBAs // Input Data: none // // Return Data: uCHAR BIST Status // 0 = BIST successful // 1 = Flash compare failed // 2 = Domino data path test failed // 3 = PLX data path test failed // 4 = Domino RAM test failed //-------------------------------------------------------------------------- // #define MSG_I2O_ID_PCI_OBJECTS 0x00e8L // // Description: // Return a list of the PCI device objects associated with an I2O HBA. // // Target Types: Only I2O HBAs // Input Data: none // Return Data: List of object IDs (dptID_S) //-------------------------------------------------------------------------- // #define MSG_I2O_ACCESS_MEMORY 0x00e9L // // Description: // Access memory associated with an I2O HBA. // // Target Types: Only I2O I/O Objects // Input Data: uLONG Operation - The task to perform // 0 = Reserved // 1 = Read // 2 = Write // 3 = Write/Read (write followed by read of same location) // 4 = Reserved // 5 = Reserved // uLONG Address Space // 0 = PCI config. space // 1 = BAR0 address space (BAR = base address register) // 2 = BAR1 address space // 3 = BAR2... // uLONG Offset - offset within address space // uLONG Size - size of the memory access (in bytes) // uCHAR Data[Size] - data to write (if a write operation) // // Return Data: uCHAR Data[Size] - data read (if a read operation) //-------------------------------------------------------------------------- // #define MSG_I2O_IOP_RESET 0x00eaL // // Description: // Issues an I2O ExecIopReset message to the HBA. Special driver //support is required for this command to work. // // Target Types: Only I2O HBAs // Input Data: none // Return Data: uCHAR status // 0 = Command timeout // 1 = In progress // 2 = Rejected //-------------------------------------------------------------------------- // #define MSG_I2O_OUTBOUND_INIT 0x00ebL // // Description: // Issues an I2O ExecOutboundInit message to the HBA. Special driver //support is required for this command to work. // // Target Types: Only I2O HBAs // Input Data: uLONG Host page frame size (in bytes) - optional // uSHORT Message frame size (# 32 bit words) - optional // uCHAR Init code (reported with eacb ExecStatusGet) - optional // // Return Data: uCHAR status // 0 = Command timeout // 1 = In progress // 2 = Rejected // 3 = Failed // 4 = Complete //-------------------------------------------------------------------------- // #define MSG_I2O_STATUS_GET 0x00ecL // // Description: // Issues an I2O ExecStatusGet message to the HBA. Special driver //support is required for this command to work. // // Target Types: Only I2O HBAs // Input Data: none // // Return Data: I2O_EXEC_STATUS_GET_REPLY - This is an I2O defined structure //-------------------------------------------------------------------------- // #define MSG_I2O_SYS_TAB_SET 0x00edL // // Description: // Issues an I2O ExecSysTabSet message to the HBA. Special driver //support is required for this command to work. // // Target Types: Only I2O HBAs // Input Data: uSHORT IOP ID // uSHORT Host Unit ID // uSHORT Segment Number // uSHORT reserved // uLONG Size of system table (in bytes) - If zero, defaults are used // uLONG Size of private memory space declaration (in bytes) - If zero, defaults are use // uLONG Size of private I/O space declaration (in bytes) - If zero, defaults are used // System Table - This is an I2O defined structure // Private memory space declaration - This is an I2O defined structure // Private I/O space declaration - This is an I2O defined structure // // Return Data: Reply packet - default I2O reply packet //-------------------------------------------------------------------------- // #define MSG_I2O_SEND_MESSAGE 0x00eeL // // Description: // Issues the specified I2O message to the HBA. The scatter/gather //list in the I2O message frame describes the I/O buffers for the message. // // Target Types: Only I2O HBAs // Input Data: I2O message frame // Output Buffer #1 // Output Buffer #2 // Output Buffer #3... // // Return Data: I2O reply packet // Input Buffer #1 // Input Buffer #2 // Input Buffer #3... //-------------------------------------------------------------------------- // #define MSG_I2O_RESYNC 0x00efL // // Description: // Synchronizes the following software modules with firmware. When //arrays are created/deleted TIDs are added/deleted in firmware. //The operating system, the DPT driver, and the DPT engine all need //to be synchronized with the current firmware configuration before //they can utilize the new devices. This message ensures the various //software modules are synchronized with the controller firmware. // // Target Types: Only I2O HBAs // Input Data: uLONG Flags // Bit: // ---- // 0 = Perform a complete init. (issue IOP reset to controller etc.) // This can be use to pull a controller out of a soft blink LED condition // or to re-initialize a controller after performing hardware level diagnostics. // 1 = Synchronize the DPT driver // 2 = Synchronize the DPT engine (EATA to I2O layer) // 3 = Synchronize the OS (device nodes) // // Return Data: none //-------------------------------------------------------------------------- //*************************************************** // // Last non-communication message number used: 0x0f9 // //*************************************************** #endif raidutils-0.0.6.orig/include/mgr.hh0000664000175000000620000000453510044153306017074 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ // Data unique to every engine manager #undef PACK #if (defined(__GNUC__)) # define PACK __attribute__ ((packed)) #else #define PACK #endif dptCaddr_S maxAddr PACK; // Maximum physical address supported dptCaddr_S minAddr PACK; // Minimum physical address supported // RAID manager information (Ignore if not a RAID manager) uSHORT rbldFrequency; // Rebuild frequency // (Delay in 1/10 sec bet. bursts) uSHORT rbldAmount; // Rebuild amount // (# blocks per burst) uSHORT raidSupport; // RAID level support flags uSHORT rbldPollFreq; // Polling interval to check for rebuild // (in seconds) uSHORT raidFlags; // Rebuild flags - see bit definitions // in get_info.h uSHORT spinDownDelay; // # seconds to wait before spinning // down a failed drive. raidutils-0.0.6.orig/include/osd_defs.h0000664000175000000620000000553610046154263017734 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _OSD_DEFS_H #define _OSD_DEFS_H /*File - OSD_DEFS.H **************************************************************************** * *Description: * * This file contains the OS dependent defines. This file is included *in osd_util.h and provides the OS specific defines for that file. * *Author: Doug Anderson *Date: 1/31/94 * *Editors: * *Remarks: * * *****************************************************************************/ /*Definitions - Defines & Constants ----------------------------------------- */ /* Define the operating system */ #if (defined(__linux__)) # define _DPT_LINUX #elif (defined(__bsdi__) && !defined(_DPT_BSDI)) # define _DPT_BSDI #elif (defined(__FreeBSD__) && !defined(_DPT_FREE_BSD)) # define _DPT_FREE_BSD #elif (defined(_DPT_SOLARIS)) # define _DPT_ERGO #else # define _DPT_SCO #endif #if defined (ZIL_CURSES) #define _DPT_CURSES #else #define _DPT_MOTIF #endif /* Redefine 'far' to nothing - no far pointer type required in UNIX */ #define far /* Define the mutually exclusive semaphore type */ #define SEMAPHORE_T unsigned int * /* Define a handle to a DLL */ #define DLL_HANDLE_T unsigned int * #if defined _DPT_SCO #define min(a,b) ( (a) < (b) ? (a) : (b) ) #if !defined true #define true TRUE #endif // true #endif // _DPT_SCO #endif raidutils-0.0.6.orig/include/osd_unix.h0000664000175000000620000005045610046154564020003 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __OSD_UNIX_H #define __OSD_UNIX_H /*File - OSD_UNIX.H */ /*****************************************************************************/ /* */ /*Description: */ /* */ /* This file contains definitions for the UNIX OS dependent layer of the */ /*DPT engine. */ /* */ /*Author: Bob Pasteur */ /*Date: 5/28/93 */ /* */ /*Editors: */ /* 3/7/96 salyzyn@dpt.com */ /* Added BSDi extensions */ /* 30/9/99 salyzyn@dpt.com */ /* Added I2ORESCANCMD */ /* 7/12/99 salyzyn@dpt.com */ /* Added I2ORESETCMD */ /* */ /*Remarks: */ /* */ /* */ /*****************************************************************************/ /* Definitions - Defines & Constants ---------------------------------------*/ #define DPT_TurnAroundKey 0x01 /* TurnAround Message Type for engine */ #define DPT_EngineKey 0x02 /* Message Que and Type for engine */ #define DPT_LoggerKey 0x03 /* Message Type For Logger */ #define DPT_CommEngineKey 0x04 /* Message Que Type Created */ #define MSG_RECEIVE 0x40000000 /* Ored Into Logger PID For Return Msg */ #define ENGMSG_ECHO 0x00 /* Turnarround Echo Engine Message */ #define ENGMSG_OPEN 0x01 /* Turnarround Open Engine Message */ #define ENGMSG_CLOSE 0x02 /* Turnarround Close Engine Message */ /* Message Que Creation Flags */ #define MSG_URD 00400 #define MSG_UWR 00200 #define MSG_GRD 00040 #define MSG_GWR 00020 #define MSG_ORD 00004 #define MSG_OWR 00002 #define MSG_ALLRD 00444 #define MSG_ALLWR 00222 /* Message Que Creation Flags */ #define SHM_URD 00400 #define SHM_UWR 00200 #define SHM_GRD 00040 #define SHM_GWR 00020 #define SHM_ORD 00004 #define SHM_OWR 00002 #define SHM_ALLRD 00444 #define SHM_ALLWR 00222 /* Program Exit Codes */ #define ExitGoodStatus 0 #define ExitBadParameter 1 #define ExitSignalFail 3 #define ExitMsqAllocFail 5 #define ExitBuffAllocFail 6 #define ExitMsgSendFail 8 #define ExitMsgReceiveFail 9 #define ExitEngOpenFail 10 #define ExitDuplicateEngine 11 #define ExitCommAllocFail 12 #define ExitDuplicateCommEng 13 #define ExitCommConnectFail 14 #ifndef MAX_HAS #define MAX_HAS 18 #define MAX_NAME 100 #endif /* ifndef MAX_HAS */ typedef struct { uCHAR ConfigLength[4]; /* Len in bytes after this field. */ uCHAR EATAsignature[4]; uCHAR EATAversion; uCHAR Flags1; uCHAR PadLength[2]; uCHAR HBA[4]; uCHAR CPlength[4]; /* Command Packet Length */ uCHAR SPlength[4]; /* Status Packet Length */ uCHAR QueueSize[2]; /* Controller Que depth */ uCHAR SG_Size[4]; uCHAR Flags2; uCHAR Reserved0; /* Reserved Field */ uCHAR Flags3; uCHAR ScsiValues; uCHAR MaxLUN; /* Maximun LUN Supported */ uCHAR Flags4; uCHAR RaidNum; /* RAID HBA Number For Stripping */ uCHAR Reserved3; /* Reserved Field */ } DptReadConfig_t; #if defined ( _DPT_SOLARIS ) #include #include #include #include //#define _KERNEL #include #include #include //#undef _KERNEL #undef MSG_DISCONNECT #define MSG_DISCONNECT 0x11L #define EATAUSRCMD 1 #define DPT_SIGNATURE 2 #define DPT_NUMCTRLS 3 #define DPT_CTRLINFO 4 #define DPT_SYSINFO 5 #define DPT_BLINKLED 6 #define I2OUSRCMD 7 //#define I2ORESCANCMD 8 /* Use DPT_IO_ACCESS instead */ //#define I2ORESETCMD 9 /* Use DPT_IO_ACCESS instead */ #define DPT_MAX_DMA_SEGS 32 /* Max used Scatter/Gather seg */ struct dpt_sg { paddr_t data_addr; uLONG data_len; }; typedef struct { uSHORT NumHBAs; uLONG IOAddrs[18]; } GetHbaInfo_t; #elif defined(_DPT_DGUX) #ifndef _IOWR # define _IOWR(x,y,z) (0x0fff3900|y) #endif #ifndef _IOW # define _IOW(x,y,z) (0x0fff3900|y) #endif #ifndef _IOR # define _IOR(x,y,z) (0x0fff3900|y) #endif #ifndef _IO # define _IO(x,y) (0x0fff3900|y) #endif /* EATA PassThrough Command */ #define EATAUSRCMD _IOWR('D',65,EATA_CP) /* Get Signature Structure */ #define DPT_SIGNATURE _IOR('D',67,dpt_sig_S) /* Get Number Of DPT Adapters */ #define DPT_NUMCTRLS _IOR('D',68,int) /* Get Adapter Info Structure */ #define DPT_CTRLINFO _IOR('D',69,CtrlInfo) /* Get System Info Structure */ #define DPT_SYSINFO _IOR('D',72,sysInfo_S) /* Get Blink LED Code */ #define DPT_BLINKLED _IOR('D',75,int) /* Get Statistical information (if available) */ #define DPT_STATS_INFO _IOR('D',80,STATS_DATA) /* Clear the statistical information */ #define DPT_STATS_CLEAR _IO('D',81) /* Send an I2O command */ #define I2OUSRCMD _IO('D',76) /* Inform driver to re-acquire LCT information */ #define I2ORESCANCMD _IO('D',77) /* Inform driver to reset adapter */ #define I2ORESETCMD _IO('D',78) #elif defined (SNI_MIPS) /* Unix Ioctl Command definitions */ #define EATAUSRCMD (('D'<<8)|65) #define DPT_DEBUG (('D'<<8)|66) #define DPT_SIGNATURE (('D'<<8)|67) #define DPT_NUMCTRLS (('D'<<8)|68) #define DPT_CTRLINFO (('D'<<8)|69) #define DPT_STATINFO (('D'<<8)|70) #define DPT_CLRSTAT (('D'<<8)|71) #define DPT_SYSINFO (('D'<<8)|72) /* Set Timeout Value */ #define DPT_TIMEOUT (('D'<<8)|73) /* Get config Data */ #define DPT_CONFIG (('D'<<8)|74) /* Get config Data */ #define DPT_BLINKLED (('D'<<8)|75) /* Get Statistical information (if available) */ #define DPT_STATS_INFO (('D'<<8)|80) /* Clear the statistical information */ #define DPT_STATS_CLEAR (('D'<<8)|81) /* Send an I2O command */ #define I2OUSRCMD (('D'<<8)|76) /* Inform driver to re-acquire LCT information */ #define I2ORESCANCMD (('D'<<8)|77) /* Inform driver to reset adapter */ #define I2ORESETCMD (('D'<<8)|78) #else /* Unix Ioctl Command definitions */ #ifdef _DPT_AIX #undef _IOWR #undef _IOW #undef _IOR #undef _IO #endif #ifndef _IOWR # define _IOWR(x,y,z) (((x)<<8)|y) #endif #ifndef _IOW # define _IOW(x,y,z) (((x)<<8)|y) #endif #ifndef _IOR # define _IOR(x,y,z) (((x)<<8)|y) #endif #ifndef _IO # define _IO(x,y) (((x)<<8)|y) #endif /* EATA PassThrough Command */ #define EATAUSRCMD _IOWR('D',65,EATA_CP) /* Set Debug Level If Enabled */ #define DPT_DEBUG _IOW('D',66,int) /* Get Signature Structure */ #define DPT_SIGNATURE _IOR('D',67,dpt_sig_S) #if defined __bsdi__ #define DPT_SIGNATURE_PACKED _IOR('D',67,dpt_sig_S_Packed) #endif /* Get Number Of DPT Adapters */ #define DPT_NUMCTRLS _IOR('D',68,int) /* Get Adapter Info Structure */ #define DPT_CTRLINFO _IOR('D',69,CtrlInfo) /* Get Statistics If Enabled */ #define DPT_STATINFO _IO('D',70) /* Clear Stats If Enabled */ #define DPT_CLRSTAT _IO('D',71) /* Get System Info Structure */ #define DPT_SYSINFO _IOR('D',72,sysInfo_S) /* Set Timeout Value */ #define DPT_TIMEOUT _IO('D',73) /* Get config Data */ #define DPT_CONFIG _IO('D',74) /* Get Blink LED Code */ #define DPT_BLINKLED _IOR('D',75,int) /* Get Statistical information (if available) */ #define DPT_STATS_INFO _IOR('D',80,STATS_DATA) /* Clear the statistical information */ #define DPT_STATS_CLEAR _IO('D',81) /* Get Performance metrics */ #define DPT_PERF_INFO _IOR('D',82,dpt_perf_t) /* Send an I2O command */ #define I2OUSRCMD _IO('D',76) /* Inform driver to re-acquire LCT information */ #define I2ORESCANCMD _IO('D',77) /* Inform driver to reset adapter */ #define I2ORESETCMD _IO('D',78) #if defined _DPT_LINUX #include # if defined(I2OPASSTHRU) # define _DPT_LINUX_I2O # endif /* See if the target is mounted */ #define DPT_TARGET_BUSY _IOR('D',79, TARGET_BUSY_T) #endif #endif /* _DPT_SOLARIS else */ /* Adapter Flags Field Bit Definitions */ #define CTLR_INSTALLED 0x00000001 /* Adapter Was Installed */ #define CTLR_DMA 0x00000002 /* DMA Supported */ #define CTLR_OVERLAP 0x00000004 /* Overlapped Commands Support */ #define CTLR_SECONDARY 0x00000008 /* I/O Address Not 0x1f0 */ #define CTLR_BLINKLED 0x00000010 /* Adapter In Blink LED State */ #define CTLR_HBACI 0x00000020 /* Cache Inhibit Supported */ #define CTLR_CACHE 0x00000040 /* Adapter Has Cache */ #define CTLR_SANE 0x00000080 /* Adapter Functioning OK */ #define CTLR_BUS_QUIET 0x00000100 /* Bus Quite On This Adapter */ #define CTLR_ABOVE_16 0x00000200 /* Support For Mem. Above 16 MB */ #define CTLR_SCAT_GATH 0x00000400 /* Scatter Gather Supported */ /* Definitions - Structure & Typedef ---------------------------------------*/ typedef struct { uLONG MsgID; DPT_TAG_T engineTag; DPT_TAG_T targetTag; DPT_MSG_T engEvent; long BufferID; uLONG FromEngBuffOffset; uLONG callerID; DPT_RTN_T result; uLONG timeOut; } MsgHdr; #define MsgDataSize sizeof(MsgHdr) - 4 #ifndef SNI_MIPS /*-------------------------------------------------------------------------*/ /* EATA Command Packet definition */ /*-------------------------------------------------------------------------*/ typedef struct EATACommandPacket { #ifdef _DPT_UNIXWARE uCHAR EataID[4]; uINT EataCmd; uCHAR *CmdBuffer; #endif /* _DPT_UNIXWARE */ #ifdef _DPT_AIX uCHAR HbaTargetID; uCHAR HbaLUN; #endif /* _DPT_AIX */ uCHAR cp_Flags1; /* Command Flags */ uCHAR cp_Req_Len; /* AutoRequestSense Data length. */ uCHAR cp_Resv1[3]; /* Reserved Fields */ uCHAR cp_Flags2; uCHAR cp_Flags3; uCHAR cp_ScsiAddr; uCHAR cp_msg0; /* Identify and Disconnect Message. */ uCHAR cp_msg1; uCHAR cp_msg2; uCHAR cp_msg3; uCHAR cp_cdb[12]; /* SCSI cdb for command. */ uLONG cp_dataLen; /* Data length in Bytes for command. */ uLONG cp_Vue; /* Vendor Unique Area */ uCHAR *cp_DataAddr; /* Data Address For The Command. */ uCHAR *cp_SpAddr; /* Status Packet Physical Address. */ uCHAR *cp_SenseAddr; /* AutoRequestSense Data Phy Address. */ #ifdef _DPT_SOLARIS uCHAR HostStatus; uCHAR TargetStatus; uCHAR CdbLength; uCHAR SG_Size; struct scsi_arq_status ReqSenseData; struct dpt_sg SG_List[DPT_MAX_DMA_SEGS]; union { char *b_scratch; struct scsi_cmd *b_ownerp; } cc; paddr_t ccb_paddr; uSHORT IOAddress; #else /* _DPT_SOLARIS */ uLONG TimeOut ; uCHAR HostStatus; uCHAR TargetStatus; uCHAR Retries; #endif /* _DPT_SOLARIS else */ } EATA_CP; #endif // SNI_MIPS /* Control Flags 1 Definitions */ #define SCSI_RESET 0x01 /* Cause a SCSI Bus reset on the cmd */ #define HBA_INIT 0x02 /* Cause Controller to reInitialize */ #define AUTO_REQ_SENSE 0x04 /* Do Auto Request Sense on errors */ #define SCATTER_GATHER 0x08 /* Data Ptr points to a SG Packet */ #define INTERPRET 0x20 /* Interpret the SCSI cdb of own use */ #define DATA_OUT 0x04 /* Data Out phase with command */ #define DATA_IN 0x08 /* Data In phase with command */ /* Control Flags 2 Definitions */ #define FIRMWARE_NESTED 0x01 /* Control Flags 3 Definitions */ #define PHYSICAL_UNIT 0x01 /* Send Command Directly To Target */ #define IAT 0x02 /* Inhibit Address Translation */ #define HBACI 0x04 /* Inhibit Caching */ /* Structure Returned From Get Controller Info */ typedef struct { uCHAR state; /* Operational state */ uCHAR id; /* Host adapter SCSI id */ int vect; /* Interrupt vector number */ int base; /* Base I/O address */ int njobs; /* # of jobs sent to HA */ int qdepth; /* Controller queue depth. */ int wakebase; /* mpx wakeup base index. */ uLONG SGsize; /* Scatter/Gather list size. */ unsigned heads; /* heads for drives on cntlr. */ unsigned sectors; /* sectors for drives on cntlr. */ uCHAR do_drive32; /* Flag for Above 16 MB Ability */ uCHAR BusQuiet; /* SCSI Bus Quiet Flag */ char idPAL[4]; /* 4 Bytes Of The ID Pal */ uCHAR primary; /* 1 For Primary, 0 For Secondary */ uCHAR eataVersion; /* EATA Version */ uLONG cpLength; /* EATA Command Packet Length */ uLONG spLength; /* EATA Status Packet Length */ uCHAR drqNum; /* DRQ Index (0,5,6,7) */ uCHAR flag1; /* EATA Flags 1 (Byte 9) */ uCHAR flag2; /* EATA Flags 2 (Byte 30) */ } CtrlInfo; #ifndef SNI_MIPS #ifdef _DPT_UNIXWARE typedef struct { uINT state; /* Operational state */ uCHAR id[4]; /* Host adapter SCSI id */ uINT vect; /* Interrupt vector number */ uLONG base; /* Base I/O address */ int ha_max_jobs; /* Max number of Active Jobs */ uLONG ha_cacheParams; int ha_nbus; /* Number Of Busses on HBA */ int ha_ntargets; /* Number Of Targets Supported */ int ha_nluns; /* Number Of LUNs Supported */ int ha_tshift; /* Shift value for target */ int ha_bshift; /* Shift value for bus */ uINT ha_npend; /* # of jobs sent to HA */ int ha_active_jobs; /* Number Of Active Jobs */ } HbaInfo; /* SDI ioctl prefix for hba specific ioctl's */ #define SDI_IOC (('S'<<24)|('D'<<16)|('I'<<8)) #define SDI_HBANAME ((SDI_IOC)|0x14) /* Get HBA module name */ #define SDI_SEND 0x0081 /* Send a SCSI command */ #else typedef struct { uLONG flags; /* Operational State Flags */ uCHAR id[4]; /* Host Adapter SCSI ID */ int vect; /* Interrupt Vector Number */ int base; /* Base I/O Address */ int njobs; /* # Of CCBs Outstanding To HBA */ int qdepth; /* Controller Queue depth. */ uLONG SGsize; /* Scatter/Gather List Size. */ char idPAL[4]; /* 4 Bytes Of The ID Pal */ uCHAR eataVersion; /* EATA Version */ uLONG cpLength; /* EATA Command Packet Length */ uLONG spLength; /* EATA Status Packet Length */ uCHAR drqNum; /* DRQ Index (0,5,6,7) */ uCHAR eataflag1; /* EATA Flags 1 (Byte 9) */ uCHAR eataflag2; /* EATA Flags 2 (Byte 30) */ uCHAR maxChannel; /* Maximum Channel Number */ uCHAR maxID; /* Maximum Target ID */ uCHAR maxLUN; /* Maximum LUN */ uCHAR HbaBusType; /* HBA Bus Type, EISA, PCI, etc */ uCHAR RaidNum; /* Host Adapter RAID Number */ } HbaInfo; #endif /* _DPT_UNIXWARE */ #endif // SNI_MIPS #ifdef _DPT_AIX /* * DPT Host Adapter config information structure - this structure contains * configuration information about an adapter. It is imbedded into the * dpt_ctl structure. */ typedef struct dpt_cfg { uchar flags; /* Operational state flags */ uchar id[4]; /* Host adapter SCSI IDs */ int vect; /* Interrupt vector number */ ulong base_addr; /* Base I/O address */ int qdepth; /* Controller queue depth. */ ulong SGsize; /* Max scatter/gather list sz */ ulong SGmax; /* Max s/g we can use per req */ uchar eataVersion; /* EATA version */ ushort cpPadLen; /* # of pad bytes sent to HA for PIO commands */ ulong cpLength; /* EATA Command Packet length */ ulong spLength; /* EATA Status Packet length */ uchar eataflag1; /* EATA Flags 1 (Byte 9) */ uchar eataflag2; /* EATA Flags 2 (Byte 30) */ uchar maxChan; /* Maximum Channel number */ uchar maxID; /* Maximum target ID */ uchar maxLUN; /* Maximum LUN */ uchar HbaBusType; /* HBA bus type, EISA, PCI, etc */ uchar RaidNum; /* Host adapter RAID number */ } DptCfg_t; #endif /* _DPT_AIX */ #define MAX_ELEMENT_COUNT 64 #define MAX_BUCKET_COUNT 10 /* * DPT statistics structure definitions */ typedef struct IO_SIZE_STATS { uLONG TotalIoCount; uLONG IoCountRead; uLONG IoCountReadSg; uLONG IoCountWrite; uLONG IoCountWriteSg; uLONG UnalignedIoAddress; uLONG SgElementCount[MAX_ELEMENT_COUNT]; } IO_SIZE_STATS_T, *pIO_SIZE_STATS_T; typedef struct STATS_DATA { uLONG TotalIoCount; uLONG TotalUnCachedIoCount; uLONG MaxOutstandingIoCount; uLONG CurrentOutstandingIoCount; uLONG OutstandingIoRunningCount; uLONG UnalignedPktCount; uLONG UnalignedSgCount; uLONG NonPageListAddressSgCount; uLONG MaxMessagesPerInterrupt; IO_SIZE_STATS_T IoSize[MAX_BUCKET_COUNT]; } STATS_DATA_T, *pSTATS_DATA_T; typedef struct TARGET_BUSY { uLONG channel; uLONG id; uLONG lun; uLONG isBusy; } TARGET_BUSY_T; #endif /* __OSD_UNIX_H */ raidutils-0.0.6.orig/include/osd_util.h0000664000175000000620000002707510044153305017764 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __OSD_UTIL_H #define __OSD_UTIL_H /*File - OSD_UTIL.H **************************************************************************** * *Description: * * This file contains defines and function prototypes that are *operating system dependent. The resources defined in this file *are not specific to any particular application. * *Author: Doug Anderson *Date: 1/7/94 * *Editors: * *Remarks: * * *****************************************************************************/ /*Definitions - Defines & Constants ----------------------------------------- */ /*----------------------------- */ /* Operating system selections: */ /*----------------------------- */ /*#define _DPT_MSDOS */ /*#define _DPT_WIN_3X */ /*#define _DPT_WIN_4X */ /*#define _DPT_WIN_NT */ /*#define _DPT_NETWARE */ /*#define _DPT_OS2 */ /*#define _DPT_SCO */ /*#define _DPT_UNIXWARE */ /*#define _DPT_SOLARIS */ /*#define _DPT_NEXTSTEP */ /*#define _DPT_BANYAN */ /*---------------------------------- */ /* Include the configuration defines */ /*---------------------------------- */ #include /*--------------------- */ /* Include type headers */ /*--------------------- */ #ifdef HAVE_INTTYPES_H #define __STDC_LIMIT_MACROS #include #endif #ifdef HAVE_STDLIB_H #include #endif /*-------------------------------- */ /* Include the OS specific defines */ /*-------------------------------- */ /*#define OS_SELECTION From Above List */ /*#define SEMAPHORE_T ??? */ /*#define DLL_HANDLE_T ??? */ #if (defined(KERNEL) && defined(__bsdi__)) # include "i386/isa/dpt_osd_defs.h" #elif ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__)) # if (KERN_VERSION < 3) # include "i386/isa/dpt_osd_defs.h" # else # include "dev/asr/osd_defs.h" # endif #else # include "osd_defs.h" #endif #ifndef DPT_UNALIGNED #define DPT_UNALIGNED #endif #ifndef DPT_EXPORT #define DPT_EXPORT #endif #ifndef DPT_IMPORT #define DPT_IMPORT #endif #ifndef DPT_RUNTIME_IMPORT #define DPT_RUNTIME_IMPORT DPT_IMPORT #endif /*--------------------- */ /* OS dependent defines */ /*--------------------- */ #if defined (_DPT_MSDOS) || defined (_DPT_WIN_3X) #define _DPT_16_BIT #else #define _DPT_32_BIT #endif #if defined (_DPT_SCO) || defined (_DPT_UNIXWARE) || defined (_DPT_SOLARIS) || defined (_DPT_AIX) || defined (SNI_MIPS) || defined (_DPT_BSDI) || defined (_DPT_FREE_BSD) || defined(_DPT_LINUX) #define _DPT_UNIX #endif #if defined (_DPT_WIN_3x) || defined (_DPT_WIN_4X) || defined (_DPT_WIN_NT) \ || defined (_DPT_OS2) #define _DPT_DLL_SUPPORT #endif #if !defined (_DPT_MSDOS) && !defined (_DPT_WIN_3X) && !defined (_DPT_NETWARE) #define _DPT_PREEMPTIVE #endif #if !defined (_DPT_MSDOS) && !defined (_DPT_WIN_3X) #define _DPT_MULTI_THREADED #endif #if !defined (_DPT_MSDOS) #define _DPT_MULTI_TASKING #endif /* These exist for platforms that */ /* chunk when accessing mis-aligned */ /* data */ #if defined (SNI_MIPS) || defined (_DPT_SOLARIS) #if defined (_DPT_BIG_ENDIAN) #if !defined (_DPT_STRICT_ALIGN) #define _DPT_STRICT_ALIGN #endif #endif #endif /* Determine if in C or C++ mode */ #ifdef __cplusplus #define _DPT_CPP #else #define _DPT_C #endif /*-------------------------------------------------------------------*/ /* Under Solaris the compiler refuses to accept code like: */ /* { {"DPT"}, 0, NULL .... }, */ /* and complains about the {"DPT"} part by saying "cannot use { } */ /* to initialize char*". */ /* */ /* By defining these ugly macros we can get around this and also */ /* not have to copy and #ifdef large sections of code. I know that */ /* these macros are *really* ugly, but they should help reduce */ /* maintenance in the long run. */ /* */ /* In the meantime, just pray that we can all move to Win32 as soon */ /* as possible... */ /*-------------------------------------------------------------------*/ #if !defined (DPTSQO) #if defined (_DPT_SOLARIS) #define DPTSQO #define DPTSQC #else #define DPTSQO { #define DPTSQC } #endif /* solaris */ #endif /* DPTSQO */ /*---------------------- */ /* OS dependent typedefs */ /*---------------------- */ #if defined (_DPT_MSDOS) || defined (_DPT_SCO) #define BYTE unsigned char #define WORD unsigned short #endif #ifndef _DPT_TYPEDEFS #define _DPT_TYPEDEFS typedef unsigned char uCHAR; typedef unsigned short uSHORT; typedef unsigned int uINT; typedef unsigned long uLONG; typedef union { uCHAR u8[4]; uSHORT u16[2]; uLONG u32; } access_U; #endif #if !defined (NULL) #define NULL 0 #endif /*Prototypes - function ----------------------------------------------------- */ #ifdef __cplusplus extern "C" { /* Declare all these functions as "C" functions */ #endif /*------------------------ */ /* Byte reversal functions */ /*------------------------ */ /* Reverses the byte ordering of a 2 byte variable */ #if (!defined(osdSwap2)) uSHORT osdSwap2(DPT_UNALIGNED uSHORT *); #endif // !osdSwap2 /* Reverses the byte ordering of a 4 byte variable and shifts left 8 bits */ #if (!defined(osdSwap3)) uLONG osdSwap3(DPT_UNALIGNED uLONG *); #endif // !osdSwap3 #ifdef _DPT_NETWARE #include "novpass.h" /* For DPT_Bswapl() prototype */ /* Inline the byte swap */ #ifdef __cplusplus inline uLONG osdSwap4(uLONG *inLong) { return *inLong = DPT_Bswapl(*inLong); } #else #define osdSwap4(inLong) DPT_Bswapl(inLong) #endif // cplusplus #else /* Reverses the byte ordering of a 4 byte variable */ # if (!defined(osdSwap4)) uLONG osdSwap4(DPT_UNALIGNED uLONG *); # endif // !osdSwap4 /* The following functions ALWAYS swap regardless of the * * presence of DPT_BIG_ENDIAN */ uSHORT trueSwap2(DPT_UNALIGNED uSHORT *); uLONG trueSwap4(DPT_UNALIGNED uLONG *); #endif // netware /*-------------------------------------* * Network order swap functions * * * * These functions/macros will be used * * by the structure insert()/extract() * * functions. * * * We will enclose all structure * * portability modifications inside * * #ifdefs. When we are ready, we * * will #define DPT_PORTABLE to begin * * using the modifications. * *-------------------------------------*/ uLONG netSwap4(uLONG val); #if defined (_DPT_BIG_ENDIAN) // for big-endian we need to swap #ifndef NET_SWAP_2 #define NET_SWAP_2(x) (((x) >> 8) | ((x) << 8)) #endif // NET_SWAP_2 #ifndef NET_SWAP_4 #define NET_SWAP_4(x) netSwap4((x)) #endif // NET_SWAP_4 #else /* for little-endian we don't need to do anything */ #ifndef NET_SWAP_2 #define NET_SWAP_2(x) (x) #endif // NET_SWAP_2 #ifndef NET_SWAP_4 #define NET_SWAP_4(x) (x) #endif // NET_SWAP_4 #endif // big endian /*----------------------------------- */ /* Run-time loadable module functions */ /*----------------------------------- */ /* Loads the specified run-time loadable DLL */ DLL_HANDLE_T osdLoadModule(uCHAR *); /* Unloads the specified run-time loadable DLL */ uSHORT osdUnloadModule(DLL_HANDLE_T); /* Returns a pointer to a function inside a run-time loadable DLL */ typedef void *(*dummyFn)(); #if defined(_DPT_NETWARE) || defined(_WIN32) void * osdGetFnAddr(DLL_HANDLE_T,uCHAR *); #else dummyFn osdGetFnAddr(DLL_HANDLE_T,uCHAR *); #endif /*--------------------------------------- */ /* Mutually exclusive semaphore functions */ /*--------------------------------------- */ /* Create a named semaphore */ SEMAPHORE_T osdCreateNamedSemaphore(char *); /* Create a mutually exlusive semaphore */ SEMAPHORE_T osdCreateSemaphore(void); /* create an event semaphore */ SEMAPHORE_T osdCreateEventSemaphore(void); /* create a named event semaphore */ SEMAPHORE_T osdCreateNamedEventSemaphore(char *); /* Destroy the specified mutually exclusive semaphore object */ uSHORT osdDestroySemaphore(SEMAPHORE_T); /* Request access to the specified mutually exclusive semaphore */ uLONG osdRequestSemaphore(SEMAPHORE_T,uLONG); /* Release access to the specified mutually exclusive semaphore */ uSHORT osdReleaseSemaphore(SEMAPHORE_T); /* wait for a event to happen */ uLONG osdWaitForEventSemaphore(SEMAPHORE_T, uLONG); /* signal an event */ uLONG osdSignalEventSemaphore(SEMAPHORE_T); /* reset the event */ uLONG osdResetEventSemaphore(SEMAPHORE_T); /*----------------- */ /* Thread functions */ /*----------------- */ /* Releases control to the task switcher in non-preemptive */ /* multitasking operating systems. */ void osdSwitchThreads(void); /* Starts a thread function */ #if defined(_DPT_LINUX) uLONG osdStartThread(void *(*)(void *),void *); #else uLONG osdStartThread(void *,void *); #endif /* what is my thread id */ uLONG osdGetThreadID(void); /* wakes up the specifed thread */ void osdWakeThread(uLONG); /* osd sleep for x miliseconds */ void osdSleep(uLONG); #define DPT_THREAD_PRIORITY_LOWEST 0x00 #define DPT_THREAD_PRIORITY_NORMAL 0x01 #define DPT_THREAD_PRIORITY_HIGHEST 0x02 uCHAR osdSetThreadPriority(uLONG tid, uCHAR priority); #ifdef __cplusplus } /* end the xtern "C" declaration */ #endif #endif /* osd_util_h */ raidutils-0.0.6.orig/include/raid_bcd.hh0000664000175000000620000000423510044153305020032 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ // Data unqiue to BCDs that support RAID // --- Hardware Info --- uCHAR boardID[5]; // Ascii - Board identifier uCHAR boardRevision[3]; // Ascii - Board revision level uCHAR boardDate[10]; // Ascii - Board date of manufacture // --- Firmware Info --- uCHAR fwVersion[3]; // Firmware version # in hex (x.xx) uCHAR fwDate[3]; // Firmware date in hex // (month, day, year) #if defined (_DPT_STRICT_ALIGN) uSHORT sniAdjust6; #endif // --- Software Info --- uCHAR swVersion[3]; // Software version # in hex (x.xx) uCHAR swDate[3]; // Software date in hex // (month, day, year) raidutils-0.0.6.orig/include/raid_dev.hh0000664000175000000620000000524610044153305020063 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //------------------- // RAID Specific Info //------------------- // Note: // FLG_DEV_VALID_RAID must be set for any of the below // data to be valid! #undef PACK #if (defined(__GNUC__)) # define PACK __attribute__ ((packed)) #else #define PACK #endif uSHORT raidType; // RAID type: // 0,1,3,5... // 0xfe = Hot Spare // 0xffff = No RAID #if defined (_DPT_STRICT_ALIGN) uSHORT sniAdjust2; #endif uLONG maxCompStripe PACK; // Largest component stripe size uLONG minCompStripe PACK; // Smallest component stripe size uLONG masterStripe PACK; // Sum of all component stripes // (Only valid for RAID-0) // Note: // FLG_DEV_RAID_NEXT must be set for nextRAIDmgr to be valid! DPT_TAG_T nextRAIDmgr PACK; // Next manager that can use this // device as a RAID component // ----- Data associated with RAID parent device ----- // Note: // FLG_DEV_RAID_COMPONENT must be set for any of the below // data to be valid! DPT_TAG_T raidParent PACK; // Parent RAID device uLONG stripeSize PACK; // Stripe size used by parent uLONG numStripes PACK; // # stripes used by parent raidutils-0.0.6.orig/include/rtncodes.h0000664000175000000620000011157110044153307017760 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __RTNCODES_H #define __RTNCODES_H //File - RTNCODES.H //*************************************************************************** // //Description: // // This file contains a list of error and warning types encountered //in the DPT engine. // //Author: Doug Anderson //Date: 10/16/92 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- //Definitions - Defines & Constants ----------------------------------------- //************************************************************************* // Message Return Values //************************************************************************* // Message processed and complete #define MSG_RTN_COMPLETED 0x0000L //------------------------------------------------------------------------- // Message started but not complete #define MSG_RTN_STARTED 0x0003L //------------------------------------------------------------------------- // Message processed but failed. An error has been entered into the // error log. (A MSG_GET_ALL_ERRORS should be performed) #if defined(_DPT_DOS) #define MSG_RTN_FAILED 0x4000 #else #define MSG_RTN_FAILED 0x80000000L #endif // Note: // The OS dependent layer of the engine reports an error to the //engine by returning a value with the MSB (bit #15) set. The lower //15 bits of the return value (bits 14-0) represent a sub-error code. //A failure returned from the OS dependent layer will get logged as //follows: // error.code -> ERR_IO_DRIVER // error.data -> sub-error code // // As is the case with all other engine errors, the value returned //to the message initiator will simply be MSG_RTN_FAILED (0x8000). //------------------------------------------------------------------------- // Message successfull, but insufficient space allocated for return data #define MSG_RTN_DATA_OVERFLOW 0x0001L //------------------------------------------------------------------------- // Message successfull, but insufficient # of valid input bytes #define MSG_RTN_DATA_UNDERFLOW 0x0002L //------------------------------------------------------------------------- // Message ignored (Not processed by target object) #define MSG_RTN_IGNORED 0x0004L //------------------------------------------------------------------------- // The comm. engine should disconnect from the current end point. // Note: This message should never get returned to an application. #define MSG_RTN_DISCONNECT 0x0008L //------------------------------------------------------------------------- //************************************************************************* // Error Codes //************************************************************************* //=========================================================================== // Engine Init/Connect/Access Errors //--------------------------------------------------------------------------- //============================= // Engine initialization errors //============================= // A failure occurred allocating the engine connection list #define ERR_CONN_LIST_ALLOC (0x0010L | MSG_RTN_FAILED) // A failure occurred allocating an engine semaphore #define ERR_SEMAPHORE_ALLOC (0x0011L | MSG_RTN_FAILED) // A generic failure was returned from osdOpenEngine() #define ERR_OSD_OPEN_ENGINE (0x0012L | MSG_RTN_FAILED) //================================ // Errors connecting to the engine //================================ // An invalid I/O method was specified while trying to connect // (Could also occur if an invalid I/O method gets passed to osdSendCCB()) #define ERR_INVALID_IO_METHOD (0x0013L | MSG_RTN_FAILED) // SmartRom was not detected, thus it may not be used as the I/O method #define ERR_NO_SMARTROM (0x0014L | MSG_RTN_FAILED) //============================ // Errors accessing the engine //============================ // The engine did not initialize properly and may not be accessed // (Try reloading the engine) #define ERR_ENGINE_INIT (0x0015L | MSG_RTN_FAILED) // An invalid connection tag was specified: DPT_CallEngine() parameter #1 #define ERR_INVALID_CONN_TAG (0x0016L | MSG_RTN_FAILED) // A timeout occurred waiting for access to a shared resource // (ie. Waiting for access to the connection list) #define ERR_SEMAPHORE_TIMEOUT (0x0017L | MSG_RTN_FAILED) // A NULL I/O buffer was passed into the engine // (toEng_P and fromEng_P need to have at least dptData_S bytes allocated) #define ERR_NULL_IO_BUFFER (0x0018L | MSG_RTN_FAILED) // Invalid target tag specified #define ERR_INVALID_TGT_TAG (0x0019L | MSG_RTN_FAILED) //============================ // Errors unloading the engine //============================ // A failure occurred deleting an engine semaphore #define ERR_DESTROY_SEMAPHORE (0x001aL | MSG_RTN_FAILED) //=========================================================================== // Miscellaneous engine errors //--------------------------------------------------------------------------- // A general memory allocation error occurred #define ERR_MEM_ALLOC (0x0160L | MSG_RTN_FAILED) // A device could not be added to the engine core because of an // invalid SCSI address. #define ERR_INVALID_DEV_ADDR (0x01a1L | MSG_RTN_FAILED) // A device's DPT name field could not be set because another device // already has the specified DPT name. #define ERR_DUPLICATE_NAME (0x01a2L | MSG_RTN_FAILED) // An error occurred trying to get a CCB for an I/O operation // (This is probably due to a memory allocation error) #define ERR_GET_CCB (0x01a3L | MSG_RTN_FAILED) // Unable to save the RAID build/rebuild/verify rate because there // are no RAID devices attached to the target manager. #define ERR_NO_RAID_DEVICES (0x01a4L | MSG_RTN_FAILED) // A DPT reserve block signature was not found in the last physical block #define ERR_RESERVE_BLK_SIG (0x01a5L | MSG_RTN_FAILED) // The target device could not be set to format the specified block size #define ERR_FORMAT_BLK_SIZE (0x01a6L | MSG_RTN_FAILED) //=========================================================================== // Errors Encountered Creating a RAID drive //--------------------------------------------------------------------------- // ----- Invalid Header Errors ----- // The specified RAID reference # is not supported by the target // RAID manager. #define ERR_RAID_REFNUM (0x0061L | MSG_RTN_FAILED) // ----- Component Sanity Check Errors ----- // Note: Sanity checks must be met in order to create a ghost device // A component was specified more than 1 time in the component list #define ERR_RAID_COMP_DUPLICATE (0x0064L | MSG_RTN_FAILED) // One of the specified component devices was flagged as RAID // restricted (the device cannot be a component of a RAID device). #define ERR_RAID_COMP_RESTRICT (0x0066L | MSG_RTN_FAILED) // One of the specified RAID components is already a component of // another RAID drive. #define ERR_RAID_COMP_USED (0x0067L | MSG_RTN_FAILED) // One of the specified RAID components is a ghosted device. // A ghosted device can only be a component of another ghosted device. #define ERR_RAID_COMP_GHOST (0x0068L | MSG_RTN_FAILED) // One of the specified RAID components is a failed device #define ERR_RAID_COMP_FAILED (0x006aL | MSG_RTN_FAILED) // ----- RAID definition/restriction verification ----- // The specified number of component drives is below the minimum #define ERR_RAID_TOO_FEW (0x006bL | MSG_RTN_FAILED) // The specified number of component drives is above the maximum #define ERR_RAID_TOO_MANY (0x006cL | MSG_RTN_FAILED) // The specified RAID type requires an even number of component drives. #define ERR_RAID_EVEN (0x006dL | MSG_RTN_FAILED) // The specified RAID type requires an odd number of component drives. #define ERR_RAID_ODD (0x006eL | MSG_RTN_FAILED) // The specified RAID type requires that the number of components // be a power of 2 plus the number of parity drives. #define ERR_RAID_POWER_2_PLUS (0x006fL | MSG_RTN_FAILED) // A single channel appeared in the component list more than the // number of times permissable with the specified RAID definition. #define ERR_RAID_CHAN_COUNT (0x0070L | MSG_RTN_FAILED) // One of the component's stripe size is less than the minimum #define ERR_RAID_MIN_STRIPE (0x0071L | MSG_RTN_FAILED) // One of the component's stripe size is greater than the maximum #define ERR_RAID_MAX_STRIPE (0x0072L | MSG_RTN_FAILED) // One of the component's had a stripe count of zero. There must // always be at least 1 stripe per component #define ERR_RAID_ZERO_STRIPES (0x0073L | MSG_RTN_FAILED) // One of the component's had a RAID capacity (stripeSize*numStripes) // that exceeded the capacity of the physical device. #define ERR_RAID_TOO_LARGE (0x0074L | MSG_RTN_FAILED) // The first component device does not start on the first SCSI channel. #define ERR_RAID_START_CHAN (0x0075L | MSG_RTN_FAILED) // The component devices do not all fall on sequential SCSI channel // numbers. #define ERR_RAID_SEQ_CHAN (0x0076L | MSG_RTN_FAILED) // The component devices have different stripe sizes. #define ERR_RAID_DIFF_STRIPES (0x0077L | MSG_RTN_FAILED) // The component devices have different number of stripes #define ERR_RAID_DIFF_NUM_STR (0x0078L | MSG_RTN_FAILED) // One of the component devices has a stripe size that is not an // even multiple of the underlying stripe size. #define ERR_RAID_OVER_STRIPE (0x0079L | MSG_RTN_FAILED) // ----- RAID permission verification ----- // One of the component devices has removable media. #define ERR_RAID_COMP_REMOVE (0x007aL | MSG_RTN_FAILED) // One of the component devices is an emulated drive. #define ERR_RAID_COMP_EMULATED (0x007bL | MSG_RTN_FAILED) // One of the component devices is a different device type than // the device type specified in the RAID definition. #define ERR_RAID_COMP_DEVTYPE (0x007cL | MSG_RTN_FAILED) // One of the component devices has a block size that is not equal // to 512. #define ERR_RAID_COMP_NON_512 (0x007dL | MSG_RTN_FAILED) // One of the components devices has a block size that is not // the same as the other components #define ERR_RAID_DIFF_BLOCKS (0x007eL | MSG_RTN_FAILED) // One of the component devices has a different capacity than // the other components. #define ERR_RAID_DIFF_CAPACITY (0x007fL | MSG_RTN_FAILED) // One of the component devices has a differnt vendor ID than // the other components #define ERR_RAID_DIFF_VENDOR (0x0080L | MSG_RTN_FAILED) // One of the component devices has a differnt vendor ID than // the other components #define ERR_RAID_DIFF_PRODUCT (0x0081L | MSG_RTN_FAILED) // One of the component devices has a differnt vendor ID than // the other components #define ERR_RAID_DIFF_REVISION (0x0082L | MSG_RTN_FAILED) //------------------------------------------ // The specified manager can not configure RAID devices #define ERR_RAID_NOT_SUPPORTED (0x0083L | MSG_RTN_FAILED) // The specified HBA does not exist in the system // (Generated by creating a SW array) #define ERR_RAID_INVALID_HBA (0x0084L | MSG_RTN_FAILED) // A component requires a RAID table but sufficient room has not // been allocated at the end of the drive. #define ERR_RAID_TABLE_REQUIRED (0x0085L | MSG_RTN_FAILED) // An invalid component tag was specified #define ERR_RAID_COMP_TAG (0x0086L | MSG_RTN_FAILED) // The maximum # of arrays supported by the target manager // already exist (no more may be created) #define ERR_RAID_MAX_ARRAYS (0x0087L | MSG_RTN_FAILED) // The target array has at least 1 component drive (probably // a replaced drive) that is too small for the array. A rebuild // cannot be performed with a component that is too small. // OR for adding drives to an existing array, the drive is smaller than // the smallest currently in the array #define ERR_RAID_COMP_SIZE (0x0088L | MSG_RTN_FAILED) // the array that was asked to be changed was not a FW level array #define ERR_RAID_FW_LEVEL (0x0089 | MSG_RTN_FAILED) //=========================================================================== // Errors Encountered Adding an HBA //--------------------------------------------------------------------------- // The specified HBA address is not a valid EISA or ISA address. // (addr must be >x100) #define ERR_INVALID_HBA_ADDR (0x0100L | MSG_RTN_FAILED) // The connection is configured to handle ISA addresses only. #define ERR_ISA_ADDR_ONLY (0x0101L | MSG_RTN_FAILED) // There is already a primary controller, another primary // controller can not be added. #define ERR_PRIMARY_HBA_EXISTS (0x0102L | MSG_RTN_FAILED) // There are no more slots available to add another HBA // (There are already 15 HBAs in the connection) #define ERR_NO_MORE_SLOTS (0x0103L | MSG_RTN_FAILED) // Another HBA responds to the specified ISA address #define ERR_DUP_ISA_ADDR (0x0104L | MSG_RTN_FAILED) // Another HBA exists in the specified EISA slot #define ERR_DUP_EISA_SLOT (0x0105L | MSG_RTN_FAILED) // An attempt was made to add a secondary HBA with an ISA address // of 0x1f0. #define ERR_PRIMARY_ISA_ADDR (0x0106L | MSG_RTN_FAILED) // An attempt was made to add a primary HBA with an ISA address // not equal to 0x1f0. #define ERR_SECONDARY_ISA_ADDR (0x0107L | MSG_RTN_FAILED) //=========================================================================== // Errors Encountered Adding an Absent Device //--------------------------------------------------------------------------- // The engine attempted to find an unused SCSI ID but none // were available. #define ERR_ABS_NO_MORE_IDS (0x0120L | MSG_RTN_FAILED) // An attempt was made to create an absent device with a // non-zero SCSI LUN. Absent devices with non-zero SCSI LUNs // are only supported by SCSI bridge controller objects // (TY_SCSI_BCD). #define ERR_ABS_NON_ZERO_LUN (0x0121L | MSG_RTN_FAILED) // The specified SCSI address does not fall within the SCSI // address range supported by the target object. #define ERR_ABS_ADDR_LIMITS (0x0122L | MSG_RTN_FAILED) // The specified SCSI address is already occupied by another // device attached to the target object. #define ERR_ABS_ADDR_OCCUPIED (0x0123L | MSG_RTN_FAILED) // There are no more SCSI LUNs available on the target bridge // controller. No more devices can be added to this bridge // controller. #define ERR_ABS_NO_MORE_LUNS (0x0125L | MSG_RTN_FAILED) // Unable to create the specified artificial object. This // is due to an invalid object type or a memory allocation error. #define ERR_NEW_ARTIFICIAL (0x0126L | MSG_RTN_FAILED) //=========================================================================== // Data I/O Errors //--------------------------------------------------------------------------- // The connection's method of I/O does not support the attempted // message #define ERR_IO_NOT_SUPPORTED (0x0161L | MSG_RTN_FAILED) // The SCSI read or write was not issued to hardware because the // command exceeded the target device's capacity #define ERR_RW_EXCEEDS_CAPACITY (0x0162L | MSG_RTN_FAILED) // A SCSI pass through command had both the data input and // data output bits set. #define ERR_DATA_IN_OUT (0x0163L | MSG_RTN_FAILED) // A SCSI pass through command was sent to the target object // but failed. #define ERR_SCSI_CMD_FAILED (0x0164L | MSG_RTN_FAILED) // An I/O operation was attempted to an artificial object #define ERR_ARTIFICIAL_IO (0x0165L | MSG_RTN_FAILED) // An I/O operation was performed, but did not complete without error #define ERR_SCSI_IO (0x0166L | MSG_RTN_FAILED) // An I/O operation was attempted on an HBA in blink LED mode #define ERR_BLINK_LED_IO (0x0167L | MSG_RTN_FAILED) // The OSD layer could not allocate sufficient memory to perform the // I/O operation #define ERR_OSD_MEM_ALLOC (0x0168L | MSG_RTN_FAILED) // A message could not be successfully completed because the target // object was formatting #define ERR_FORMATTING (0x0169L | MSG_RTN_FAILED) // An EATA command packet could not be sent because the HBA // has the busy signal asserted #define ERR_HBA_BUSY (0x016aL | MSG_RTN_FAILED) // An EATA command packet could not be sent because the HBA // returned DPTH indicating that it is initializing #define ERR_HBA_INITIALIZING (0x016bL | MSG_RTN_FAILED) // A failure occurred trying to determine if a device // is busy (ie. mounted by the OS) #define ERR_BUSY_CHECK_FAILED (0x016cL | MSG_RTN_FAILED) //=========================================================================== // Errors encountered enabling a RAID configuration //--------------------------------------------------------------------------- // An error occurred deleting an existing RAID device #define ERR_DEL_OLD_RAID (0x0180L | MSG_RTN_FAILED) // An error occurred creating a new RAID device #define ERR_ENABLE_NEW_RAID (0x0181L | MSG_RTN_FAILED) // An error occurred updating the OS config (ie. AIX ODM database) #define ERR_UPDATE_OS_CONFIG (0x0182L | MSG_RTN_FAILED) // An action could not be completed due to a device reservation conflict #define ERR_RESERVATION_CONFLICT (0x0183L | MSG_RTN_FAILED) //=========================================================================== // Errors attempting to enter an object into the engine core //--------------------------------------------------------------------------- // An object could not be added to the engine core because its // SCSI address was outside of the bounds of the target manager. #define ERR_SCSI_ADDR_BOUNDS (0x01c0L | MSG_RTN_FAILED) // An object could not be added to the engine core due to // a SCSI address conflict with an existing object. #define ERR_SCSI_ADDR_CONFLICT (0x01c1L | MSG_RTN_FAILED) //=========================================================================== // Errors deleting an object //--------------------------------------------------------------------------- // Unable to delete the target object from the engine. The object // has some higher level dependency. #define ERR_CANNOT_DELETE (0x01e0L | MSG_RTN_FAILED) //=========================================================================== // Errors downloading firmware //--------------------------------------------------------------------------- // There are no non-removeable DASD devices to store the FW code. #define ERR_FWD_NO_SPACE (0x01f0L | MSG_RTN_FAILED) // There are only DASD devices without sufficient space reserved // for the firmware code. The code can still be written to the // disks, but the user should beware. #define ERR_FWD_NOT_RESERVED (0x01f1L | MSG_RTN_FAILED) // A firmware download has not been successfully initialized #define ERR_FWD_NOT_INITIALIZED (0x01f2L | MSG_RTN_FAILED) // There was a block # mismatch during a FW download burst #define ERR_FWD_BLK_MISMATCH (0x01f3L | MSG_RTN_FAILED) // Too many blocks were specified for the final FW download burst #define ERR_FWD_BLK_OVERFLOW (0x01f4L | MSG_RTN_FAILED) //=========================================================================== // Errors reserving disk space //--------------------------------------------------------------------------- // Cannot reserve disk space on a removeable media device #define ERR_RSV_REMOVEABLE (0x0200L | MSG_RTN_FAILED) // Cannot reserve disk space on a non-DASD device #define ERR_RSV_NOT_DASD (0x0201L | MSG_RTN_FAILED) // The # of blocks reserved must be greater than zero #define ERR_RSV_NON_ZERO (0x0202L | MSG_RTN_FAILED) // HBA is not capable is using downloadable FW #define ERR_RSV_HBA_UNABLE (0x0203L | MSG_RTN_FAILED) // Memory allocation failure or I/O operation failure #define ERR_RSV_OTHER (0x0204L | MSG_RTN_FAILED) //=========================================================================== // Errors scanning for SCSI devices //--------------------------------------------------------------------------- // An error occurred scanning for physical devices #define ERR_SCAN_PHYSICALS (0x0220L | MSG_RTN_FAILED) // An error occurred initializing a physical device #define ERR_INIT_PHYSICALS (0x0221L | MSG_RTN_FAILED) // An error occurred scanning for logical devices #define ERR_SCAN_LOGICALS (0x0222L | MSG_RTN_FAILED) // An error occurred initializing a logical device #define ERR_INIT_LOGICALS (0x0223L | MSG_RTN_FAILED) //=========================================================================== // Communication Errors //--------------------------------------------------------------------------- // Error transmitting a data buffer to a remote engine #define ERR_COMM_XMIT_BUFFER (0x0300L | MSG_RTN_FAILED) // Error recieving a data buffer from a remote engine #define ERR_COMM_RCVE_BUFFER (0x0301L | MSG_RTN_FAILED) // An unexpected disconnect occurred #define ERR_COMM_DISCONNECTED (0x0302L | MSG_RTN_FAILED) // Too much data was transfered #define ERR_COMM_DATA_OVERFLOW (0x0303L | MSG_RTN_FAILED) // TLI Specific Errors................................ // Error occurred with t_open() #define ERRC_T_OPEN (0x0320L | MSG_RTN_FAILED) // Error occurred with t_bind() #define ERRC_T_BIND (0x0321L | MSG_RTN_FAILED) // Error occurred with t_alloc() #define ERRC_T_ALLOC (0x0322L | MSG_RTN_FAILED) // Error occurred with t_connect() #define ERRC_T_CONNECT (0x0323L | MSG_RTN_FAILED) // Error occurred with t_listen() #define ERRC_T_LISTEN (0x0324L | MSG_RTN_FAILED) // Error occurred with t_accept() #define ERRC_T_ACCEPT (0x0325L | MSG_RTN_FAILED) // DOS SPX Specific Errors............................ // Error initializing netware calls #define ERRC_COMM_NW_INIT (0x0330L | MSG_RTN_FAILED) // Winsock Specific Errors............................ // Error initializing Winsock (wrong version) #define ERRC_COMM_WS_INIT (0x0335L | MSG_RTN_FAILED) // Basic comm. engine errors.......................... // Note: ICR = Input Connection Request // A timeout has occurred waiting for a mutually exclusive // semaphore to become available #define ERRC_SEMAPHORE_TIMEOUT (0x0340L | MSG_RTN_FAILED) // An invalid connection tag was specified #define ERRC_CONNECTION_TAG (0x0341L | MSG_RTN_FAILED) // A password string was passed in that was not NULL terminated // and insufficient space existed to NULL terminate it. #define ERRC_NOT_NULL_TERMED (0x0342L | MSG_RTN_FAILED) // A general memory allocation error has occurred in the comm. // engine. #define ERRC_MEM_ALLOC (0x0343L | MSG_RTN_FAILED) // A NULL I/O buffer was passed into the comm. engine #define ERRC_NULL_IO_BUFFER (0x0344L | MSG_RTN_FAILED) // An invalid password was specified with a login attempt #define ERRC_INVALID_PASSWORD (0x0345L | MSG_RTN_FAILED) // A connection to a DPT engine failed because the user has not // succesfully logged into the DPT engine. #define ERRC_NOT_LOGGED_IN (0x0346L | MSG_RTN_FAILED) // A failure has occurred loading the DPT engine #define ERRC_ENGINE_LOAD (0x0347L | MSG_RTN_FAILED) // The requested feature (message) is not supported by the target #define ERRC_NOT_SUPPORTED (0x0348L | MSG_RTN_FAILED) // No change was made to the ICR search thread since it was // already in the desired state (active) #define ERRC_ICRS_ACTIVE (0x0349L | MSG_RTN_FAILED) // No change was made to the ICR search thread since it was // already in the desired state (inactive) #define ERRC_ICRS_INACTIVE (0x034aL | MSG_RTN_FAILED) // The ICR search start or stop request has already been posted #define ERRC_ICRS_REQ_POSTED (0x034bL | MSG_RTN_FAILED) // A failure occurred attempting to start the ICR search thread #define ERRC_ICRS_THREAD_START (0x034cL | MSG_RTN_FAILED) // A start ICR search thread request has not been posted #define ERRC_ICRS_START_REQUEST (0x034dL | MSG_RTN_FAILED) // A failure occurred initializing the comm. module prior to // executing the ICR search thread #define ERRC_ICRS_INIT (0x034eL | MSG_RTN_FAILED) // A failure occurred accepting a pending ICR #define ERRC_ACCEPTING_ICR (0x034fL | MSG_RTN_FAILED) // A failure occurred transmitting the new engine message sync bytes #define ERRC_TX_MSG_SYNC (0x0350L | MSG_RTN_FAILED) // A failure occurred receiving the new message acknowledge sync bytes #define ERRC_RX_MSG_ACK (0x0351L | MSG_RTN_FAILED) // A failure occurred receiving the message command header #define ERRC_RX_MSG_HEADER (0x0352L | MSG_RTN_FAILED) // A failure occurred transmitting the message command header #define ERRC_TX_MSG_HEADER (0x0353L | MSG_RTN_FAILED) // A failure occurred tranmitting the to engine data #define ERRC_TX_TO_ENG_DATA (0x0354L | MSG_RTN_FAILED) // A failure occurred receivind the to engine data #define ERRC_RX_TO_ENG_DATA (0x0355L | MSG_RTN_FAILED) // A failure occurred recieving the message status header #define ERRC_RX_STATUS_HEADER (0x0357L | MSG_RTN_FAILED) // A failure occurred transmitting the message status header buffer #define ERRC_TX_STATUS_HEADER (0x0358L | MSG_RTN_FAILED) // A failure occurred recieving the from engine data #define ERRC_RX_FROM_ENG_DATA (0x0359L | MSG_RTN_FAILED) // A failure occcurred transmitting the from engine data #define ERRC_TX_FROM_ENG_DATA (0x035aL | MSG_RTN_FAILED) // A comm. engine had a from engine buffer that was too small for // the specified allocation size. Attempts to increase the buffer // size failed. #define ERRC_FROM_ENG_SIZE (0x035bL | MSG_RTN_FAILED) // A comm. engine had a to engine buffer that was too small for // the specified allocation size. Attempts to increase the buffer // size failed. #define ERRC_TO_ENG_SIZE (0x035cL | MSG_RTN_FAILED) // A failure occurred initializing the serial port #define ERRC_SERIAL_INIT (0x035dL | MSG_RTN_FAILED) // Unable to establish a connection at any of the supported // baud rates #define ERRC_BAUD_RATE (0x035eL | MSG_RTN_FAILED) // The specified comm. module is already in use and cannot be accessed #define ERRC_COMM_BUSY (0x035fL | MSG_RTN_FAILED) // Unable to create a master comm. module of the specified protocol type #define ERRC_INVALID_PROTOCOL (0x0360L | MSG_RTN_FAILED) // Unable to create the specified comm. module due to a serial port // conflict (another module has claimed the serial port) #define ERRC_PORT_CONFLICT (0x0361L | MSG_RTN_FAILED) // A failure occurred initializing the modem #define ERRC_MODEM_INIT (0x0362L | MSG_RTN_FAILED) // A modem connection attempt was aborted by the user #define ERRC_DIAL_ABORT (0x0365L | MSG_RTN_FAILED) // A modem connection attempt timed out #define ERRC_DIAL_TIMEOUT (0x0366L | MSG_RTN_FAILED) // A busy indiactor was received from the modem #define ERRC_DIAL_BUSY (0x0367L | MSG_RTN_FAILED) // A beeper number was successfully dialed // (The error code is because no connection was established) #define ERRC_DIAL_BEEPER_OK (0x0368L | MSG_RTN_FAILED) // A beeper number was dialed and an unexpected carrier was established #define ERRC_DIAL_UNEXPECTED_CD (0x0369L | MSG_RTN_FAILED) // A modem dial resulted in a NO DIAL TONE error condition #define ERRC_DIAL_NO_TONE (0x036aL | MSG_RTN_FAILED) // A modem dial resulted in a NO ANSWER error condition #define ERRC_DIAL_NO_ANSWER (0x036bL | MSG_RTN_FAILED) // The modem returned an error or unknown status back from the // dial command #define ERRC_DIAL_ERROR (0x036cL | MSG_RTN_FAILED) // An error occurred during comm. engine parameter negotiation. #define ERRC_NEGOTIATION (0x0371L | MSG_RTN_FAILED) // The engine message timed out #define ERRC_MSG_TIMEOUT (0x0372L | MSG_RTN_FAILED) // A comm. function was aborted by the user #define ERRC_USER_ABORT (0x0373L | MSG_RTN_FAILED) // Error calling ReadPropertyValue() during a search for servers #define ERRSPX_RD_PROPERTY (0x0380L | MSG_RTN_FAILED) #define ERRSPX_SAP (0x0381L | MSG_RTN_FAILED) // Windows Sockets specific errors.................... // Unable to allocate a socket descriptor #define ERRC_SOCKET_ALLOC (0x0390 | MSG_RTN_FAILED) // Unable to bind an address to a socket #define ERRC_SOCKET_BIND (0x0391 | MSG_RTN_FAILED) // Failure accepting a connection request #define ERRC_SOCKET_ACCEPT (0x0392 | MSG_RTN_FAILED) // Failure connecting to a "remote" IP address #define ERRC_SOCKET_CONNECT (0x0393 | MSG_RTN_FAILED) // The specified user could not be validated on the remote system #define ERRC_USER_VALIDATION (0x0394 | MSG_RTN_FAILED) //=========================================================================== // Flash Memory Related Errors //--------------------------------------------------------------------------- // An error has occurred attempting to erase the HBA's flash memory. // Future attempts to write the flash may not succeed. #define ERR_FLASH_ERASE (0x03a0 | MSG_RTN_FAILED) // The HBA could not be switched into flash command mode. // Flash command mode allows the HBA's flash memory to be programmed. // This error most likely occurred for one of the following reasons: // 1. The HBA had dirty cache memory // 2. A firmware level diagnostic was in progress on the HBA // 3. An array build, rebuild, or verify was in progress on the HBA #define ERR_FLASH_SWITCH_MODES (0x03a1 | MSG_RTN_FAILED) // The flash memory can only be written in segments that are multiples // of 512 bytes. This error resulted from a MSG_FLASH_WRITE command // that specified the number of bytes to be written that was not an // even multiple of 512. #define ERR_FLASH_WRITE_512 (0x03a2 | MSG_RTN_FAILED) // The engine will try to verify that a MSG_FLASH_WRITE command // was successful by reading the flash memory and comparing the // data read to the data written. This error results if either // the engine's attempt to read the flash failed or if a data // miscompare was detected. #define ERR_FLASH_ENG_VERIFY (0x03a3 | MSG_RTN_FAILED) // A flash command was issued that requires a successful // MSG_FLASH_WRITE_INIT before it can be successfully issued. #define ERR_FLASH_INIT_REQ (0x03a4 | MSG_RTN_FAILED) //=========================================================================== // Firmware Diagnostic Related Errors //--------------------------------------------------------------------------- // An invalid background task exlusion start time or end time // was specified with a MSG_SET_EXCLUSION (must be between 0-23 // and the startTime must be less than the end time (cannot span midnight)) #define ERR_EXCLUSION_TIME (0x03c0 | MSG_RTN_FAILED) // A firmware based diagnostic has already been scheduled on the // target device, the target device's RAID parent, or another // component of the target device's RAID parent. #define ERR_DIAG_SCHEDULED (0x03c1 | MSG_RTN_FAILED) // Diagnostic progress information could not be returned // because the diagnostic is not (no longer) active #define ERR_DIAG_NOT_ACTIVE (0x03c2 | MSG_RTN_FAILED) //=========================================================================== // Event Logger Related Errors //--------------------------------------------------------------------------- // The DPT event logger is not loaded, but is required for the // specified message #define ERR_ELOG_NOT_LOADED (0x0400L | MSG_RTN_FAILED) // The DPT event logger is already loaded, but should not be loaded // for the specified message #define ERR_ELOG_LOADED (0x0401L | MSG_RTN_FAILED) // The engine OSD layer had trouble opening DPT event logger events #define ERR_ELOG_EVENTS (0x0402L | MSG_RTN_FAILED) // An attempt was made to pause an already paused DPT event logger #define ERR_ELOG_PAUSED (0x0403L | MSG_RTN_FAILED) // An attempt was made to continue (unpause/start) a running // DPT event logger #define ERR_ELOG_NOT_PAUSED (0x0404L | MSG_RTN_FAILED) // The time period the user requested stats for is invalid #define ERR_SLOG_INVALID_TIME (0x0405L | MSG_RTN_FAILED) // The user asked for a stats group that was either invalid // or not supported to the by the stats object #define ERR_SLOG_STAT_GROUP (0x0407L | MSG_RTN_FAILED) // an attempt way made to link two alert manager resources together that were already linked #define ERR_ALMS_ALREADY_LINKED (0x0408 | MSG_RTN_FAILED) // an attempt was made to unlink resources that were not linked #define ERR_ALMS_NOT_LINKED (0x0409 | MSG_RTN_FAILED) // an attempt was made to like resources that can not be linked together #define ERR_ALMS_INVALID_RESOURCE_TYPE (0x040a | MSG_RTN_FAILED) // A non-zero save parameters bit (SP) was specified when the // read & clear bit (bit #6 in SCSI control byte) was set. #define ERR_ELOG_NON_ZERO_SP (0x040b | MSG_RTN_FAILED) // A non-zero parameter pointer offset was specified when the // read & clear bit (bit #6 in SCSI control byte) was set. #define ERR_ELOG_NON_ZERO_OFFSET (0x040c | MSG_RTN_FAILED) //=========================================================================== // I2O Specific Errors //--------------------------------------------------------------------------- // The I2O reply packet returned an error #define ERR_I2O_REPLY_FAILURE (0x0440 | MSG_RTN_FAILED) //=========================================================================== // Event Logger Related Errors //--------------------------------------------------------------------------- // Tried to write drive size table to firmware but no drive size table exists // (NULL drive size table) #define ERR_NO_DRIVE_SIZE_TABLE (0x0480L | MSG_RTN_FAILED) // Tried to set drive size tablebut umber of drive size entries // exceeded maximum supported value #define ERR_DRIVE_SIZE_TABLE_MAX (0x0481L | MSG_RTN_FAILED) //=========================================================================== // Unix Client Errors //--------------------------------------------------------------------------- // A really lame error code indicating we don't know what happened #define ERR_UNSPECIFIED (0x0500L | MSG_RTN_FAILED) // The ID of the message queue is invalid, indicating that either the open // call has not been made, or the engine process is not running. #define ERR_NO_MSG_QUEUE_FOUND (0x0501L | MSG_RTN_FAILED) // Unable to signal the engine process even though we have the process ID. #define ERR_CANNOT_SIGNAL_PROCESS (0x0502L | MSG_RTN_FAILED) // Could not reallocate client buffers for the requirements of this message. #define ERR_CANNOT_ALLOC_BUFFERS (0x0503L | MSG_RTN_FAILED) // The call to msgsnd returned -1. Check errno. #define ERR_MSGSND_FAILED (0x0504L | MSG_RTN_FAILED) // The call to msgrcv timed out. #define ERR_MSGRCV_TIMEOUT (0x0505L | MSG_RTN_FAILED) // The call to msgrcv was interrupted. (errno == EINTR) #define ERR_MSGRCV_INTR (0x0506L | MSG_RTN_FAILED) // The call to msgrcv returned -1, due to some errno other than EINTR. #define ERR_MSGRCV_FAILED (0x0507L | MSG_RTN_FAILED) // Unable to set signal handler. #define ERR_CANNOT_SET_SIGHANDLER (0x0508L | MSG_RTN_FAILED) #endif // #ifndef __RTNCODES_H raidutils-0.0.6.orig/include/sys_info.h0000664000175000000620000003125410044153305017765 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __SYS_INFO_H #define __SYS_INFO_H /*File - SYS_INFO.H **************************************************************************** * *Description: * * This file contains structure definitions for the OS dependent *layer system information buffers. * *Author: Don Kemper *Date: 5/10/94 * *Editors: * *Remarks: * * *****************************************************************************/ /*Include Files ------------------------------------------------------------- */ #if (defined(KERNEL) && defined(__bsdi__)) # include "i386/isa/dpt_osd_util.h" #elif ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__)) # if (KERN_VERSION < 3) # include "i386/isa/dpt_osd_util.h" # else # include "dev/asr/osd_util.h" # endif #else # include "osd_util.h" #endif #ifndef NO_PACK #if defined (_DPT_AIX) #pragma options align=packed #else #pragma pack(1) #endif /* aix */ #endif // no unpack /*struct - driveParam_S - start *=========================================================================== * *Description: * * This structure defines the drive parameters seen during *booting. * *---------------------------------------------------------------------------*/ #ifdef __cplusplus struct driveParam_S { #else typedef struct { #endif uSHORT cylinders; /* Upto 1024 */ uCHAR heads; /* Upto 255 */ uCHAR sectors; /* Upto 63 */ #ifdef __cplusplus //---------- Portability Additions ----------- in sp_sinfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #else } driveParam_S; #endif /*driveParam_S - end */ /*struct - sysInfo_S - start *=========================================================================== * *Description: * * This structure defines the command system information that *should be returned by every OS dependent layer. * *---------------------------------------------------------------------------*/ /*flags - bit definitions */ #define SI_CMOS_Valid 0x0001 #define SI_NumDrivesValid 0x0002 #define SI_ProcessorValid 0x0004 #define SI_MemorySizeValid 0x0008 #define SI_DriveParamsValid 0x0010 #define SI_SmartROMverValid 0x0020 #define SI_OSversionValid 0x0040 #define SI_OSspecificValid 0x0080 /* 1 if OS structure returned */ #define SI_BusTypeValid 0x0100 #define SI_ALL_VALID 0x0FFF /* All Std SysInfo is valid */ #define SI_NO_SmartROM 0x8000 /*busType - definitions */ #define SI_ISA_BUS 0x00 #define SI_MCA_BUS 0x01 #define SI_EISA_BUS 0x02 #define SI_PCI_BUS 0x04 #ifdef __cplusplus struct sysInfo_S { #else typedef struct { #endif uCHAR drive0CMOS; /* CMOS Drive 0 Type */ uCHAR drive1CMOS; /* CMOS Drive 1 Type */ uCHAR numDrives; /* 0040:0075 contents */ uCHAR processorFamily; /* Same as DPTSIG's definition */ uCHAR processorType; /* Same as DPTSIG's definition */ uCHAR smartROMMajorVersion; uCHAR smartROMMinorVersion; /* SmartROM version */ uCHAR smartROMRevision; uSHORT flags; /* See bit definitions above */ uSHORT conventionalMemSize; /* in KB */ uLONG extendedMemSize; /* in KB */ uLONG osType; /* Same as DPTSIG's definition */ uCHAR osMajorVersion; uCHAR osMinorVersion; /* The OS version */ uCHAR osRevision; #ifdef _SINIX_ADDON uCHAR busType; /* See defininitions above */ uSHORT osSubRevision; uCHAR pad[2]; /* For alignment */ #else uCHAR osSubRevision; uCHAR busType; /* See defininitions above */ uCHAR pad[3]; /* For alignment */ #endif driveParam_S drives[16]; /* SmartROM Logical Drives */ #ifdef __cplusplus //---------- Portability Additions ----------- in sp_sinfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #else } sysInfo_S; #endif /*sysInfo_S - end */ /*struct - DOS_Info_S - start *=========================================================================== * *Description: * * This structure defines the system information specific to a *DOS workstation. * *---------------------------------------------------------------------------*/ /*flags - bit definitions */ #define DI_DOS_HIGH 0x01 /* DOS is loaded high */ #define DI_DPMI_VALID 0x02 /* DPMI version is valid */ #ifdef __cplusplus struct DOS_Info_S { #else typedef struct { #endif uCHAR flags; /* See bit definitions above */ uSHORT driverLocation; /* SmartROM BIOS address */ uSHORT DOS_version; uSHORT DPMI_version; #ifdef __cplusplus //---------- Portability Additions ----------- in sp_sinfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #else } DOS_Info_S; #endif /*DOS_Info_S - end */ /*struct - Netware_Info_S - start *=========================================================================== * *Description: * * This structure defines the system information specific to a *Netware machine. * *---------------------------------------------------------------------------*/ #ifdef __cplusplus struct Netware_Info_S { #else typedef struct { #endif uCHAR driverName[13]; /* ie PM12NW31.DSK */ uCHAR serverName[48]; uCHAR netwareVersion; /* The Netware OS version */ uCHAR netwareSubVersion; uCHAR netwareRevision; uSHORT maxConnections; /* Probably 250 or 1000 */ uSHORT connectionsInUse; uSHORT maxVolumes; uCHAR unused; uCHAR SFTlevel; uCHAR TTSlevel; uCHAR clibMajorVersion; /* The CLIB.NLM version */ uCHAR clibMinorVersion; uCHAR clibRevision; #ifdef __cplusplus //---------- Portability Additions ----------- in sp_sinfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #else } Netware_Info_S; #endif /*Netware_Info_S - end */ /*struct - OS2_Info_S - start *=========================================================================== * *Description: * * This structure defines the system information specific to an *OS/2 machine. * *---------------------------------------------------------------------------*/ #ifdef __cplusplus struct OS2_Info_S { #else typedef struct { #endif uCHAR something; #ifdef __cplusplus //---------- Portability Additions ----------- in sp_sinfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #else } OS2_Info_S; #endif /*OS2_Info_S - end */ /*struct - WinNT_Info_S - start *=========================================================================== * *Description: * * This structure defines the system information specific to a *Windows NT machine. * *---------------------------------------------------------------------------*/ #ifdef __cplusplus struct WinNT_Info_S { #else typedef struct { #endif uCHAR something; #ifdef __cplusplus //---------- Portability Additions ----------- in sp_sinfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #else } WinNT_Info_S; #endif /*WinNT_Info_S - end */ /*struct - SCO_Info_S - start *=========================================================================== * *Description: * * This structure defines the system information specific to an *SCO UNIX machine. * *---------------------------------------------------------------------------*/ #ifdef __cplusplus struct SCO_Info_S { #else typedef struct { #endif uCHAR something; #ifdef __cplusplus //---------- Portability Additions ----------- in sp_sinfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #else } SCO_Info_S; #endif /*SCO_Info_S - end */ /*struct - USL_Info_S - start *=========================================================================== * *Description: * * This structure defines the system information specific to a *USL UNIX machine. * *---------------------------------------------------------------------------*/ #ifdef __cplusplus struct USL_Info_S { #else typedef struct { #endif uCHAR something; #ifdef __cplusplus //---------- Portability Additions ----------- in sp_sinfo.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #else } USL_Info_S; #endif /*USL_Info_S - end */ /* Restore default structure packing */ #ifndef NO_UNPACK #if defined (_DPT_AIX) #pragma options align=reset #elif defined (UNPACK_FOUR) #pragma pack(4) #else #pragma pack() #endif /* aix */ #endif // no unpack #ifdef DPT_MEASURE_PERFORMANCE typedef struct dpt_metrics { u_int32_t command_count[256]; /* We assume MAX 256 SCSI commands */ u_int32_t max_command_time[256]; u_int32_t min_command_time[256]; u_int32_t min_intr_time; u_int32_t max_intr_time; u_int32_t max_intr_gap; u_int32_t max_ht_time; u_int32_t aborted_interrupts; u_int32_t spurious_interrupts; u_int32_t aborted_requests; u_int32_t retried_requests; u_int32_t max_waiting_count; u_int32_t max_submit_count; u_int32_t max_complete_count; u_int32_t min_waiting_time; u_int32_t min_submit_time; u_int32_t min_complete_time; u_int32_t max_waiting_time; u_int32_t max_submit_time; u_int32_t max_complete_time; u_int32_t command_collisions; u_int32_t command_too_busy; u_int32_t max_eata_tries; u_int32_t min_eata_tries; u_int32_t read_by_size_count[10]; u_int32_t write_by_size_count[10]; u_int32_t read_by_size_min_time[10]; u_int32_t read_by_size_max_time[10]; struct timeval read_by_size_total_time[10]; u_int32_t write_by_size_min_time[10]; u_int32_t write_by_size_max_time[10]; struct timeval write_by_size_total_time[10]; #define SIZE_512 0 #define SIZE_1K 1 #define SIZE_2K 2 #define SIZE_4K 3 #define SIZE_8K 4 #define SIZE_16K 5 #define SIZE_32K 6 #define SIZE_64K 7 #define SIZE_BIGGER 8 #define SIZE_OTHER 9 struct timeval intr_started; } dpt_perf_t; #endif #endif // __SYS_INFO_H raidutils-0.0.6.orig/include/linux/0002775000175000000620000000000010333777643017141 5ustar bapstaff00000000000000raidutils-0.0.6.orig/include/linux/i2o-dev.h0000664000175000000620000002531110175137401020541 0ustar bapstaff00000000000000/* * I2O user space accessible structures/APIs * * (c) Copyright 1999, 2000 Red Hat Software * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * ************************************************************************* * * This header file defines the I2O APIs that are available to both * the kernel and user level applications. Kernel specific structures * are defined in i2o_osm. OSMs should include _only_ i2o_osm.h which * automatically includs this file. * */ #ifndef _I2O_DEV_H #define _I2O_DEV_H #define __user /* How many controllers are we allowing */ #define MAX_I2O_CONTROLLERS 32 #include #ifndef __KERNEL__ typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; #endif /* __KERNEL__ */ /* * I2O Control IOCTLs and structures */ #define I2O_MAGIC_NUMBER 'i' #define I2OGETIOPS _IOR(I2O_MAGIC_NUMBER,0,u8[MAX_I2O_CONTROLLERS]) #define I2OHRTGET _IOWR(I2O_MAGIC_NUMBER,1,struct i2o_cmd_hrtlct) #define I2OLCTGET _IOWR(I2O_MAGIC_NUMBER,2,struct i2o_cmd_hrtlct) #define I2OPARMSET _IOWR(I2O_MAGIC_NUMBER,3,struct i2o_cmd_psetget) #define I2OPARMGET _IOWR(I2O_MAGIC_NUMBER,4,struct i2o_cmd_psetget) #define I2OSWDL _IOWR(I2O_MAGIC_NUMBER,5,struct i2o_sw_xfer) #define I2OSWUL _IOWR(I2O_MAGIC_NUMBER,6,struct i2o_sw_xfer) #define I2OSWDEL _IOWR(I2O_MAGIC_NUMBER,7,struct i2o_sw_xfer) #define I2OVALIDATE _IOR(I2O_MAGIC_NUMBER,8,u32) #define I2OHTML _IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html) #define I2OEVTREG _IOW(I2O_MAGIC_NUMBER,10,struct i2o_evt_id) #define I2OEVTGET _IOR(I2O_MAGIC_NUMBER,11,struct i2o_evt_info) #define I2OPASSTHRU _IOR(I2O_MAGIC_NUMBER,12,struct i2o_cmd_passthru) #define I2OPASSTHRU32 _IOR(I2O_MAGIC_NUMBER,12,struct i2o_cmd_passthru32) struct i2o_cmd_passthru32 { unsigned int iop; /* IOP unit number */ u32 msg; /* message */ }; struct i2o_cmd_passthru { unsigned int iop; /* IOP unit number */ void __user *msg; /* message */ }; struct i2o_cmd_hrtlct { unsigned int iop; /* IOP unit number */ void __user *resbuf; /* Buffer for result */ unsigned int __user *reslen; /* Buffer length in bytes */ }; struct i2o_cmd_psetget { unsigned int iop; /* IOP unit number */ unsigned int tid; /* Target device TID */ void __user *opbuf; /* Operation List buffer */ unsigned int oplen; /* Operation List buffer length in bytes */ void __user *resbuf; /* Result List buffer */ unsigned int __user *reslen; /* Result List buffer length in bytes */ }; struct i2o_sw_xfer { unsigned int iop; /* IOP unit number */ unsigned char flags; /* Flags field */ unsigned char sw_type; /* Software type */ unsigned int sw_id; /* Software ID */ void __user *buf; /* Pointer to software buffer */ unsigned int __user *swlen; /* Length of software data */ unsigned int __user *maxfrag; /* Maximum fragment count */ unsigned int __user *curfrag; /* Current fragment count */ }; struct i2o_html { unsigned int iop; /* IOP unit number */ unsigned int tid; /* Target device ID */ unsigned int page; /* HTML page */ void __user *resbuf; /* Buffer for reply HTML page */ unsigned int __user *reslen; /* Length in bytes of reply buffer */ void __user *qbuf; /* Pointer to HTTP query string */ unsigned int qlen; /* Length in bytes of query string buffer */ }; #define I2O_EVT_Q_LEN 32 struct i2o_evt_id { unsigned int iop; unsigned int tid; unsigned int evt_mask; }; /* Event data size = frame size - message header + evt indicator */ #define I2O_EVT_DATA_SIZE 88 struct i2o_evt_info { struct i2o_evt_id id; unsigned char evt_data[I2O_EVT_DATA_SIZE]; unsigned int data_size; }; struct i2o_evt_get { struct i2o_evt_info info; int pending; int lost; }; /************************************************************************** * HRT related constants and structures **************************************************************************/ #define I2O_BUS_LOCAL 0 #define I2O_BUS_ISA 1 #define I2O_BUS_EISA 2 #define I2O_BUS_MCA 3 #define I2O_BUS_PCI 4 #define I2O_BUS_PCMCIA 5 #define I2O_BUS_NUBUS 6 #define I2O_BUS_CARDBUS 7 #define I2O_BUS_UNKNOWN 0x80 typedef struct _i2o_pci_bus { u8 PciFunctionNumber; u8 PciDeviceNumber; u8 PciBusNumber; u8 reserved; u16 PciVendorID; u16 PciDeviceID; } i2o_pci_bus; typedef struct _i2o_local_bus { u16 LbBaseIOPort; u16 reserved; u32 LbBaseMemoryAddress; } i2o_local_bus; typedef struct _i2o_isa_bus { u16 IsaBaseIOPort; u8 CSN; u8 reserved; u32 IsaBaseMemoryAddress; } i2o_isa_bus; typedef struct _i2o_eisa_bus_info { u16 EisaBaseIOPort; u8 reserved; u8 EisaSlotNumber; u32 EisaBaseMemoryAddress; } i2o_eisa_bus; typedef struct _i2o_mca_bus { u16 McaBaseIOPort; u8 reserved; u8 McaSlotNumber; u32 McaBaseMemoryAddress; } i2o_mca_bus; typedef struct _i2o_other_bus { u16 BaseIOPort; u16 reserved; u32 BaseMemoryAddress; } i2o_other_bus; typedef struct _i2o_hrt_entry { u32 adapter_id; u32 parent_tid:12; u32 state:4; u32 bus_num:8; u32 bus_type:8; union { i2o_pci_bus pci_bus; i2o_local_bus local_bus; i2o_isa_bus isa_bus; i2o_eisa_bus eisa_bus; i2o_mca_bus mca_bus; i2o_other_bus other_bus; } bus; } i2o_hrt_entry; typedef struct _i2o_hrt { u16 num_entries; u8 entry_len; u8 hrt_version; u32 change_ind; i2o_hrt_entry hrt_entry[1]; } i2o_hrt; typedef struct _i2o_lct_entry { u32 entry_size:16; u32 tid:12; u32 reserved:4; u32 change_ind; u32 device_flags; u32 class_id:12; u32 version:4; u32 vendor_id:16; u32 sub_class; u32 user_tid:12; u32 parent_tid:12; u32 bios_info:8; u8 identity_tag[8]; u32 event_capabilities; } i2o_lct_entry; typedef struct _i2o_lct { u32 table_size:16; u32 boot_tid:12; u32 lct_ver:4; u32 iop_flags; u32 change_ind; i2o_lct_entry lct_entry[1]; } i2o_lct; typedef struct _i2o_status_block { u16 org_id; u16 reserved; u16 iop_id:12; u16 reserved1:4; u16 host_unit_id; u16 segment_number:12; u16 i2o_version:4; u8 iop_state; u8 msg_type; u16 inbound_frame_size; u8 init_code; u8 reserved2; u32 max_inbound_frames; u32 cur_inbound_frames; u32 max_outbound_frames; char product_id[24]; u32 expected_lct_size; u32 iop_capabilities; u32 desired_mem_size; u32 current_mem_size; u32 current_mem_base; u32 desired_io_size; u32 current_io_size; u32 current_io_base; u32 reserved3:24; u32 cmd_status:8; } i2o_status_block; /* Event indicator mask flags */ #define I2O_EVT_IND_STATE_CHANGE 0x80000000 #define I2O_EVT_IND_GENERAL_WARNING 0x40000000 #define I2O_EVT_IND_CONFIGURATION_FLAG 0x20000000 #define I2O_EVT_IND_LOCK_RELEASE 0x10000000 #define I2O_EVT_IND_CAPABILITY_CHANGE 0x08000000 #define I2O_EVT_IND_DEVICE_RESET 0x04000000 #define I2O_EVT_IND_EVT_MASK_MODIFIED 0x02000000 #define I2O_EVT_IND_FIELD_MODIFIED 0x01000000 #define I2O_EVT_IND_VENDOR_EVT 0x00800000 #define I2O_EVT_IND_DEVICE_STATE 0x00400000 /* Executive event indicitors */ #define I2O_EVT_IND_EXEC_RESOURCE_LIMITS 0x00000001 #define I2O_EVT_IND_EXEC_CONNECTION_FAIL 0x00000002 #define I2O_EVT_IND_EXEC_ADAPTER_FAULT 0x00000004 #define I2O_EVT_IND_EXEC_POWER_FAIL 0x00000008 #define I2O_EVT_IND_EXEC_RESET_PENDING 0x00000010 #define I2O_EVT_IND_EXEC_RESET_IMMINENT 0x00000020 #define I2O_EVT_IND_EXEC_HW_FAIL 0x00000040 #define I2O_EVT_IND_EXEC_XCT_CHANGE 0x00000080 #define I2O_EVT_IND_EXEC_NEW_LCT_ENTRY 0x00000100 #define I2O_EVT_IND_EXEC_MODIFIED_LCT 0x00000200 #define I2O_EVT_IND_EXEC_DDM_AVAILABILITY 0x00000400 /* Random Block Storage Event Indicators */ #define I2O_EVT_IND_BSA_VOLUME_LOAD 0x00000001 #define I2O_EVT_IND_BSA_VOLUME_UNLOAD 0x00000002 #define I2O_EVT_IND_BSA_VOLUME_UNLOAD_REQ 0x00000004 #define I2O_EVT_IND_BSA_CAPACITY_CHANGE 0x00000008 #define I2O_EVT_IND_BSA_SCSI_SMART 0x00000010 /* Event data for generic events */ #define I2O_EVT_STATE_CHANGE_NORMAL 0x00 #define I2O_EVT_STATE_CHANGE_SUSPENDED 0x01 #define I2O_EVT_STATE_CHANGE_RESTART 0x02 #define I2O_EVT_STATE_CHANGE_NA_RECOVER 0x03 #define I2O_EVT_STATE_CHANGE_NA_NO_RECOVER 0x04 #define I2O_EVT_STATE_CHANGE_QUIESCE_REQUEST 0x05 #define I2O_EVT_STATE_CHANGE_FAILED 0x10 #define I2O_EVT_STATE_CHANGE_FAULTED 0x11 #define I2O_EVT_GEN_WARNING_NORMAL 0x00 #define I2O_EVT_GEN_WARNING_ERROR_THRESHOLD 0x01 #define I2O_EVT_GEN_WARNING_MEDIA_FAULT 0x02 #define I2O_EVT_CAPABILITY_OTHER 0x01 #define I2O_EVT_CAPABILITY_CHANGED 0x02 #define I2O_EVT_SENSOR_STATE_CHANGED 0x01 /* * I2O classes / subclasses */ /* Class ID and Code Assignments * (LCT.ClassID.Version field) */ #define I2O_CLASS_VERSION_10 0x00 #define I2O_CLASS_VERSION_11 0x01 /* Class code names * (from v1.5 Table 6-1 Class Code Assignments.) */ #define I2O_CLASS_EXECUTIVE 0x000 #define I2O_CLASS_DDM 0x001 #define I2O_CLASS_RANDOM_BLOCK_STORAGE 0x010 #define I2O_CLASS_SEQUENTIAL_STORAGE 0x011 #define I2O_CLASS_LAN 0x020 #define I2O_CLASS_WAN 0x030 #define I2O_CLASS_FIBRE_CHANNEL_PORT 0x040 #define I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL 0x041 #define I2O_CLASS_SCSI_PERIPHERAL 0x051 #define I2O_CLASS_ATE_PORT 0x060 #define I2O_CLASS_ATE_PERIPHERAL 0x061 #define I2O_CLASS_FLOPPY_CONTROLLER 0x070 #define I2O_CLASS_FLOPPY_DEVICE 0x071 #define I2O_CLASS_BUS_ADAPTER_PORT 0x080 #define I2O_CLASS_PEER_TRANSPORT_AGENT 0x090 #define I2O_CLASS_PEER_TRANSPORT 0x091 #define I2O_CLASS_END 0xfff /* * Rest of 0x092 - 0x09f reserved for peer-to-peer classes */ #define I2O_CLASS_MATCH_ANYCLASS 0xffffffff /* * Subclasses */ #define I2O_SUBCLASS_i960 0x001 #define I2O_SUBCLASS_HDM 0x020 #define I2O_SUBCLASS_ISM 0x021 /* Operation functions */ #define I2O_PARAMS_FIELD_GET 0x0001 #define I2O_PARAMS_LIST_GET 0x0002 #define I2O_PARAMS_MORE_GET 0x0003 #define I2O_PARAMS_SIZE_GET 0x0004 #define I2O_PARAMS_TABLE_GET 0x0005 #define I2O_PARAMS_FIELD_SET 0x0006 #define I2O_PARAMS_LIST_SET 0x0007 #define I2O_PARAMS_ROW_ADD 0x0008 #define I2O_PARAMS_ROW_DELETE 0x0009 #define I2O_PARAMS_TABLE_CLEAR 0x000A /* * I2O serial number conventions / formats * (circa v1.5) */ #define I2O_SNFORMAT_UNKNOWN 0 #define I2O_SNFORMAT_BINARY 1 #define I2O_SNFORMAT_ASCII 2 #define I2O_SNFORMAT_UNICODE 3 #define I2O_SNFORMAT_LAN48_MAC 4 #define I2O_SNFORMAT_WAN 5 /* * Plus new in v2.0 (Yellowstone pdf doc) */ #define I2O_SNFORMAT_LAN64_MAC 6 #define I2O_SNFORMAT_DDM 7 #define I2O_SNFORMAT_IEEE_REG64 8 #define I2O_SNFORMAT_IEEE_REG128 9 #define I2O_SNFORMAT_UNKNOWN2 0xff /* * I2O Get Status State values */ #define ADAPTER_STATE_INITIALIZING 0x01 #define ADAPTER_STATE_RESET 0x02 #define ADAPTER_STATE_HOLD 0x04 #define ADAPTER_STATE_READY 0x05 #define ADAPTER_STATE_OPERATIONAL 0x08 #define ADAPTER_STATE_FAILED 0x10 #define ADAPTER_STATE_FAULTED 0x11 #endif /* _I2O_DEV_H */ raidutils-0.0.6.orig/raideng/0002775000175000000620000000000010333777643015770 5ustar bapstaff00000000000000raidutils-0.0.6.orig/raideng/Makefile.am0000664000175000000620000000132110175141262020001 0ustar bapstaff00000000000000bin_PROGRAMS=raideng raideng_SOURCES=addr_rng.cpp array.cpp connect.cpp core.cpp core_ccb.cpp core_con.cpp core_dev.cpp core_mgr.cpp core_obj.cpp debug.cpp device.cpp dptcbuff.c driver.cpp eata2i2o.c eng_sig.c eng_std.cpp eng_unix.cpp engine.cpp englists.cpp gbl_fns.cpp hba.cpp manager.cpp msg_str.cpp object.cpp osd_unix.cpp ptrarray.cpp raid.cpp raid_bcd.cpp raid_dev.cpp raid_hba.cpp raid_mgr.cpp raiddrvr.cpp scsi_bcd.cpp scsi_ccb.cpp scsi_con.cpp scsi_dev.cpp scsi_hba.cpp scsi_mgr.cpp scsi_obj.cpp scsidrvr.cpp semaphor.c stat_log.cpp swap_em.c threads.cpp unreslvd.cpp raideng_CPPFLAGS=-D__UNIX__ -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -DI_WANT_SNI_DEBUG -DNEW_LOGGER -I../include raideng_LDADD=../lib/libraidutil.la raidutils-0.0.6.orig/raideng/Makefile.in0000664000175000000620000031522510175141467020034 0ustar bapstaff00000000000000# Makefile.in generated by automake 1.9.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ SOURCES = $(raideng_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c 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@ bin_PROGRAMS = raideng$(EXEEXT) subdir = raideng DIST_COMMON = $(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 = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_raideng_OBJECTS = raideng-addr_rng.$(OBJEXT) \ raideng-array.$(OBJEXT) raideng-connect.$(OBJEXT) \ raideng-core.$(OBJEXT) raideng-core_ccb.$(OBJEXT) \ raideng-core_con.$(OBJEXT) raideng-core_dev.$(OBJEXT) \ raideng-core_mgr.$(OBJEXT) raideng-core_obj.$(OBJEXT) \ raideng-debug.$(OBJEXT) raideng-device.$(OBJEXT) \ raideng-dptcbuff.$(OBJEXT) raideng-driver.$(OBJEXT) \ raideng-eata2i2o.$(OBJEXT) raideng-eng_sig.$(OBJEXT) \ raideng-eng_std.$(OBJEXT) raideng-eng_unix.$(OBJEXT) \ raideng-engine.$(OBJEXT) raideng-englists.$(OBJEXT) \ raideng-gbl_fns.$(OBJEXT) raideng-hba.$(OBJEXT) \ raideng-manager.$(OBJEXT) raideng-msg_str.$(OBJEXT) \ raideng-object.$(OBJEXT) raideng-osd_unix.$(OBJEXT) \ raideng-ptrarray.$(OBJEXT) raideng-raid.$(OBJEXT) \ raideng-raid_bcd.$(OBJEXT) raideng-raid_dev.$(OBJEXT) \ raideng-raid_hba.$(OBJEXT) raideng-raid_mgr.$(OBJEXT) \ raideng-raiddrvr.$(OBJEXT) raideng-scsi_bcd.$(OBJEXT) \ raideng-scsi_ccb.$(OBJEXT) raideng-scsi_con.$(OBJEXT) \ raideng-scsi_dev.$(OBJEXT) raideng-scsi_hba.$(OBJEXT) \ raideng-scsi_mgr.$(OBJEXT) raideng-scsi_obj.$(OBJEXT) \ raideng-scsidrvr.$(OBJEXT) raideng-semaphor.$(OBJEXT) \ raideng-stat_log.$(OBJEXT) raideng-swap_em.$(OBJEXT) \ raideng-threads.$(OBJEXT) raideng-unreslvd.$(OBJEXT) raideng_OBJECTS = $(am_raideng_OBJECTS) raideng_DEPENDENCIES = ../lib/libraidutil.la DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(raideng_SOURCES) DIST_SOURCES = $(raideng_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ raideng_SOURCES = addr_rng.cpp array.cpp connect.cpp core.cpp core_ccb.cpp core_con.cpp core_dev.cpp core_mgr.cpp core_obj.cpp debug.cpp device.cpp dptcbuff.c driver.cpp eata2i2o.c eng_sig.c eng_std.cpp eng_unix.cpp engine.cpp englists.cpp gbl_fns.cpp hba.cpp manager.cpp msg_str.cpp object.cpp osd_unix.cpp ptrarray.cpp raid.cpp raid_bcd.cpp raid_dev.cpp raid_hba.cpp raid_mgr.cpp raiddrvr.cpp scsi_bcd.cpp scsi_ccb.cpp scsi_con.cpp scsi_dev.cpp scsi_hba.cpp scsi_mgr.cpp scsi_obj.cpp scsidrvr.cpp semaphor.c stat_log.cpp swap_em.c threads.cpp unreslvd.cpp raideng_CPPFLAGS = -D__UNIX__ -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -DI_WANT_SNI_DEBUG -DNEW_LOGGER -I../include raideng_LDADD = ../lib/libraidutil.la all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu raideng/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu raideng/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done raideng$(EXEEXT): $(raideng_OBJECTS) $(raideng_DEPENDENCIES) @rm -f raideng$(EXEEXT) $(CXXLINK) $(raideng_LDFLAGS) $(raideng_OBJECTS) $(raideng_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-addr_rng.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-array.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-connect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-core.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-core_ccb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-core_con.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-core_dev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-core_mgr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-core_obj.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-device.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-dptcbuff.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-driver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-eata2i2o.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-eng_sig.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-eng_std.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-eng_unix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-engine.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-englists.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-gbl_fns.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-hba.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-manager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-msg_str.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-object.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-osd_unix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-ptrarray.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-raid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-raid_bcd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-raid_dev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-raid_hba.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-raid_mgr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-raiddrvr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-scsi_bcd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-scsi_ccb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-scsi_con.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-scsi_dev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-scsi_hba.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-scsi_mgr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-scsi_obj.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-scsidrvr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-semaphor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-stat_log.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-swap_em.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-threads.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raideng-unreslvd.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< raideng-dptcbuff.o: dptcbuff.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raideng-dptcbuff.o -MD -MP -MF "$(DEPDIR)/raideng-dptcbuff.Tpo" -c -o raideng-dptcbuff.o `test -f 'dptcbuff.c' || echo '$(srcdir)/'`dptcbuff.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raideng-dptcbuff.Tpo" "$(DEPDIR)/raideng-dptcbuff.Po"; else rm -f "$(DEPDIR)/raideng-dptcbuff.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dptcbuff.c' object='raideng-dptcbuff.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raideng-dptcbuff.o `test -f 'dptcbuff.c' || echo '$(srcdir)/'`dptcbuff.c raideng-dptcbuff.obj: dptcbuff.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raideng-dptcbuff.obj -MD -MP -MF "$(DEPDIR)/raideng-dptcbuff.Tpo" -c -o raideng-dptcbuff.obj `if test -f 'dptcbuff.c'; then $(CYGPATH_W) 'dptcbuff.c'; else $(CYGPATH_W) '$(srcdir)/dptcbuff.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raideng-dptcbuff.Tpo" "$(DEPDIR)/raideng-dptcbuff.Po"; else rm -f "$(DEPDIR)/raideng-dptcbuff.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dptcbuff.c' object='raideng-dptcbuff.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raideng-dptcbuff.obj `if test -f 'dptcbuff.c'; then $(CYGPATH_W) 'dptcbuff.c'; else $(CYGPATH_W) '$(srcdir)/dptcbuff.c'; fi` raideng-eata2i2o.o: eata2i2o.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raideng-eata2i2o.o -MD -MP -MF "$(DEPDIR)/raideng-eata2i2o.Tpo" -c -o raideng-eata2i2o.o `test -f 'eata2i2o.c' || echo '$(srcdir)/'`eata2i2o.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raideng-eata2i2o.Tpo" "$(DEPDIR)/raideng-eata2i2o.Po"; else rm -f "$(DEPDIR)/raideng-eata2i2o.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eata2i2o.c' object='raideng-eata2i2o.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raideng-eata2i2o.o `test -f 'eata2i2o.c' || echo '$(srcdir)/'`eata2i2o.c raideng-eata2i2o.obj: eata2i2o.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raideng-eata2i2o.obj -MD -MP -MF "$(DEPDIR)/raideng-eata2i2o.Tpo" -c -o raideng-eata2i2o.obj `if test -f 'eata2i2o.c'; then $(CYGPATH_W) 'eata2i2o.c'; else $(CYGPATH_W) '$(srcdir)/eata2i2o.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raideng-eata2i2o.Tpo" "$(DEPDIR)/raideng-eata2i2o.Po"; else rm -f "$(DEPDIR)/raideng-eata2i2o.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eata2i2o.c' object='raideng-eata2i2o.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raideng-eata2i2o.obj `if test -f 'eata2i2o.c'; then $(CYGPATH_W) 'eata2i2o.c'; else $(CYGPATH_W) '$(srcdir)/eata2i2o.c'; fi` raideng-eng_sig.o: eng_sig.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raideng-eng_sig.o -MD -MP -MF "$(DEPDIR)/raideng-eng_sig.Tpo" -c -o raideng-eng_sig.o `test -f 'eng_sig.c' || echo '$(srcdir)/'`eng_sig.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raideng-eng_sig.Tpo" "$(DEPDIR)/raideng-eng_sig.Po"; else rm -f "$(DEPDIR)/raideng-eng_sig.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eng_sig.c' object='raideng-eng_sig.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raideng-eng_sig.o `test -f 'eng_sig.c' || echo '$(srcdir)/'`eng_sig.c raideng-eng_sig.obj: eng_sig.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raideng-eng_sig.obj -MD -MP -MF "$(DEPDIR)/raideng-eng_sig.Tpo" -c -o raideng-eng_sig.obj `if test -f 'eng_sig.c'; then $(CYGPATH_W) 'eng_sig.c'; else $(CYGPATH_W) '$(srcdir)/eng_sig.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raideng-eng_sig.Tpo" "$(DEPDIR)/raideng-eng_sig.Po"; else rm -f "$(DEPDIR)/raideng-eng_sig.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eng_sig.c' object='raideng-eng_sig.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raideng-eng_sig.obj `if test -f 'eng_sig.c'; then $(CYGPATH_W) 'eng_sig.c'; else $(CYGPATH_W) '$(srcdir)/eng_sig.c'; fi` raideng-semaphor.o: semaphor.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raideng-semaphor.o -MD -MP -MF "$(DEPDIR)/raideng-semaphor.Tpo" -c -o raideng-semaphor.o `test -f 'semaphor.c' || echo '$(srcdir)/'`semaphor.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raideng-semaphor.Tpo" "$(DEPDIR)/raideng-semaphor.Po"; else rm -f "$(DEPDIR)/raideng-semaphor.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='semaphor.c' object='raideng-semaphor.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raideng-semaphor.o `test -f 'semaphor.c' || echo '$(srcdir)/'`semaphor.c raideng-semaphor.obj: semaphor.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raideng-semaphor.obj -MD -MP -MF "$(DEPDIR)/raideng-semaphor.Tpo" -c -o raideng-semaphor.obj `if test -f 'semaphor.c'; then $(CYGPATH_W) 'semaphor.c'; else $(CYGPATH_W) '$(srcdir)/semaphor.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raideng-semaphor.Tpo" "$(DEPDIR)/raideng-semaphor.Po"; else rm -f "$(DEPDIR)/raideng-semaphor.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='semaphor.c' object='raideng-semaphor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raideng-semaphor.obj `if test -f 'semaphor.c'; then $(CYGPATH_W) 'semaphor.c'; else $(CYGPATH_W) '$(srcdir)/semaphor.c'; fi` raideng-swap_em.o: swap_em.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raideng-swap_em.o -MD -MP -MF "$(DEPDIR)/raideng-swap_em.Tpo" -c -o raideng-swap_em.o `test -f 'swap_em.c' || echo '$(srcdir)/'`swap_em.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raideng-swap_em.Tpo" "$(DEPDIR)/raideng-swap_em.Po"; else rm -f "$(DEPDIR)/raideng-swap_em.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='swap_em.c' object='raideng-swap_em.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raideng-swap_em.o `test -f 'swap_em.c' || echo '$(srcdir)/'`swap_em.c raideng-swap_em.obj: swap_em.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raideng-swap_em.obj -MD -MP -MF "$(DEPDIR)/raideng-swap_em.Tpo" -c -o raideng-swap_em.obj `if test -f 'swap_em.c'; then $(CYGPATH_W) 'swap_em.c'; else $(CYGPATH_W) '$(srcdir)/swap_em.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raideng-swap_em.Tpo" "$(DEPDIR)/raideng-swap_em.Po"; else rm -f "$(DEPDIR)/raideng-swap_em.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='swap_em.c' object='raideng-swap_em.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raideng-swap_em.obj `if test -f 'swap_em.c'; then $(CYGPATH_W) 'swap_em.c'; else $(CYGPATH_W) '$(srcdir)/swap_em.c'; fi` .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< raideng-addr_rng.o: addr_rng.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-addr_rng.o -MD -MP -MF "$(DEPDIR)/raideng-addr_rng.Tpo" -c -o raideng-addr_rng.o `test -f 'addr_rng.cpp' || echo '$(srcdir)/'`addr_rng.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-addr_rng.Tpo" "$(DEPDIR)/raideng-addr_rng.Po"; else rm -f "$(DEPDIR)/raideng-addr_rng.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='addr_rng.cpp' object='raideng-addr_rng.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-addr_rng.o `test -f 'addr_rng.cpp' || echo '$(srcdir)/'`addr_rng.cpp raideng-addr_rng.obj: addr_rng.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-addr_rng.obj -MD -MP -MF "$(DEPDIR)/raideng-addr_rng.Tpo" -c -o raideng-addr_rng.obj `if test -f 'addr_rng.cpp'; then $(CYGPATH_W) 'addr_rng.cpp'; else $(CYGPATH_W) '$(srcdir)/addr_rng.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-addr_rng.Tpo" "$(DEPDIR)/raideng-addr_rng.Po"; else rm -f "$(DEPDIR)/raideng-addr_rng.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='addr_rng.cpp' object='raideng-addr_rng.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-addr_rng.obj `if test -f 'addr_rng.cpp'; then $(CYGPATH_W) 'addr_rng.cpp'; else $(CYGPATH_W) '$(srcdir)/addr_rng.cpp'; fi` raideng-array.o: array.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-array.o -MD -MP -MF "$(DEPDIR)/raideng-array.Tpo" -c -o raideng-array.o `test -f 'array.cpp' || echo '$(srcdir)/'`array.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-array.Tpo" "$(DEPDIR)/raideng-array.Po"; else rm -f "$(DEPDIR)/raideng-array.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='array.cpp' object='raideng-array.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-array.o `test -f 'array.cpp' || echo '$(srcdir)/'`array.cpp raideng-array.obj: array.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-array.obj -MD -MP -MF "$(DEPDIR)/raideng-array.Tpo" -c -o raideng-array.obj `if test -f 'array.cpp'; then $(CYGPATH_W) 'array.cpp'; else $(CYGPATH_W) '$(srcdir)/array.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-array.Tpo" "$(DEPDIR)/raideng-array.Po"; else rm -f "$(DEPDIR)/raideng-array.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='array.cpp' object='raideng-array.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-array.obj `if test -f 'array.cpp'; then $(CYGPATH_W) 'array.cpp'; else $(CYGPATH_W) '$(srcdir)/array.cpp'; fi` raideng-connect.o: connect.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-connect.o -MD -MP -MF "$(DEPDIR)/raideng-connect.Tpo" -c -o raideng-connect.o `test -f 'connect.cpp' || echo '$(srcdir)/'`connect.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-connect.Tpo" "$(DEPDIR)/raideng-connect.Po"; else rm -f "$(DEPDIR)/raideng-connect.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='connect.cpp' object='raideng-connect.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-connect.o `test -f 'connect.cpp' || echo '$(srcdir)/'`connect.cpp raideng-connect.obj: connect.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-connect.obj -MD -MP -MF "$(DEPDIR)/raideng-connect.Tpo" -c -o raideng-connect.obj `if test -f 'connect.cpp'; then $(CYGPATH_W) 'connect.cpp'; else $(CYGPATH_W) '$(srcdir)/connect.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-connect.Tpo" "$(DEPDIR)/raideng-connect.Po"; else rm -f "$(DEPDIR)/raideng-connect.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='connect.cpp' object='raideng-connect.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-connect.obj `if test -f 'connect.cpp'; then $(CYGPATH_W) 'connect.cpp'; else $(CYGPATH_W) '$(srcdir)/connect.cpp'; fi` raideng-core.o: core.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core.o -MD -MP -MF "$(DEPDIR)/raideng-core.Tpo" -c -o raideng-core.o `test -f 'core.cpp' || echo '$(srcdir)/'`core.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core.Tpo" "$(DEPDIR)/raideng-core.Po"; else rm -f "$(DEPDIR)/raideng-core.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core.cpp' object='raideng-core.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core.o `test -f 'core.cpp' || echo '$(srcdir)/'`core.cpp raideng-core.obj: core.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core.obj -MD -MP -MF "$(DEPDIR)/raideng-core.Tpo" -c -o raideng-core.obj `if test -f 'core.cpp'; then $(CYGPATH_W) 'core.cpp'; else $(CYGPATH_W) '$(srcdir)/core.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core.Tpo" "$(DEPDIR)/raideng-core.Po"; else rm -f "$(DEPDIR)/raideng-core.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core.cpp' object='raideng-core.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core.obj `if test -f 'core.cpp'; then $(CYGPATH_W) 'core.cpp'; else $(CYGPATH_W) '$(srcdir)/core.cpp'; fi` raideng-core_ccb.o: core_ccb.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core_ccb.o -MD -MP -MF "$(DEPDIR)/raideng-core_ccb.Tpo" -c -o raideng-core_ccb.o `test -f 'core_ccb.cpp' || echo '$(srcdir)/'`core_ccb.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core_ccb.Tpo" "$(DEPDIR)/raideng-core_ccb.Po"; else rm -f "$(DEPDIR)/raideng-core_ccb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core_ccb.cpp' object='raideng-core_ccb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core_ccb.o `test -f 'core_ccb.cpp' || echo '$(srcdir)/'`core_ccb.cpp raideng-core_ccb.obj: core_ccb.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core_ccb.obj -MD -MP -MF "$(DEPDIR)/raideng-core_ccb.Tpo" -c -o raideng-core_ccb.obj `if test -f 'core_ccb.cpp'; then $(CYGPATH_W) 'core_ccb.cpp'; else $(CYGPATH_W) '$(srcdir)/core_ccb.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core_ccb.Tpo" "$(DEPDIR)/raideng-core_ccb.Po"; else rm -f "$(DEPDIR)/raideng-core_ccb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core_ccb.cpp' object='raideng-core_ccb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core_ccb.obj `if test -f 'core_ccb.cpp'; then $(CYGPATH_W) 'core_ccb.cpp'; else $(CYGPATH_W) '$(srcdir)/core_ccb.cpp'; fi` raideng-core_con.o: core_con.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core_con.o -MD -MP -MF "$(DEPDIR)/raideng-core_con.Tpo" -c -o raideng-core_con.o `test -f 'core_con.cpp' || echo '$(srcdir)/'`core_con.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core_con.Tpo" "$(DEPDIR)/raideng-core_con.Po"; else rm -f "$(DEPDIR)/raideng-core_con.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core_con.cpp' object='raideng-core_con.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core_con.o `test -f 'core_con.cpp' || echo '$(srcdir)/'`core_con.cpp raideng-core_con.obj: core_con.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core_con.obj -MD -MP -MF "$(DEPDIR)/raideng-core_con.Tpo" -c -o raideng-core_con.obj `if test -f 'core_con.cpp'; then $(CYGPATH_W) 'core_con.cpp'; else $(CYGPATH_W) '$(srcdir)/core_con.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core_con.Tpo" "$(DEPDIR)/raideng-core_con.Po"; else rm -f "$(DEPDIR)/raideng-core_con.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core_con.cpp' object='raideng-core_con.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core_con.obj `if test -f 'core_con.cpp'; then $(CYGPATH_W) 'core_con.cpp'; else $(CYGPATH_W) '$(srcdir)/core_con.cpp'; fi` raideng-core_dev.o: core_dev.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core_dev.o -MD -MP -MF "$(DEPDIR)/raideng-core_dev.Tpo" -c -o raideng-core_dev.o `test -f 'core_dev.cpp' || echo '$(srcdir)/'`core_dev.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core_dev.Tpo" "$(DEPDIR)/raideng-core_dev.Po"; else rm -f "$(DEPDIR)/raideng-core_dev.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core_dev.cpp' object='raideng-core_dev.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core_dev.o `test -f 'core_dev.cpp' || echo '$(srcdir)/'`core_dev.cpp raideng-core_dev.obj: core_dev.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core_dev.obj -MD -MP -MF "$(DEPDIR)/raideng-core_dev.Tpo" -c -o raideng-core_dev.obj `if test -f 'core_dev.cpp'; then $(CYGPATH_W) 'core_dev.cpp'; else $(CYGPATH_W) '$(srcdir)/core_dev.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core_dev.Tpo" "$(DEPDIR)/raideng-core_dev.Po"; else rm -f "$(DEPDIR)/raideng-core_dev.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core_dev.cpp' object='raideng-core_dev.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core_dev.obj `if test -f 'core_dev.cpp'; then $(CYGPATH_W) 'core_dev.cpp'; else $(CYGPATH_W) '$(srcdir)/core_dev.cpp'; fi` raideng-core_mgr.o: core_mgr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core_mgr.o -MD -MP -MF "$(DEPDIR)/raideng-core_mgr.Tpo" -c -o raideng-core_mgr.o `test -f 'core_mgr.cpp' || echo '$(srcdir)/'`core_mgr.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core_mgr.Tpo" "$(DEPDIR)/raideng-core_mgr.Po"; else rm -f "$(DEPDIR)/raideng-core_mgr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core_mgr.cpp' object='raideng-core_mgr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core_mgr.o `test -f 'core_mgr.cpp' || echo '$(srcdir)/'`core_mgr.cpp raideng-core_mgr.obj: core_mgr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core_mgr.obj -MD -MP -MF "$(DEPDIR)/raideng-core_mgr.Tpo" -c -o raideng-core_mgr.obj `if test -f 'core_mgr.cpp'; then $(CYGPATH_W) 'core_mgr.cpp'; else $(CYGPATH_W) '$(srcdir)/core_mgr.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core_mgr.Tpo" "$(DEPDIR)/raideng-core_mgr.Po"; else rm -f "$(DEPDIR)/raideng-core_mgr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core_mgr.cpp' object='raideng-core_mgr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core_mgr.obj `if test -f 'core_mgr.cpp'; then $(CYGPATH_W) 'core_mgr.cpp'; else $(CYGPATH_W) '$(srcdir)/core_mgr.cpp'; fi` raideng-core_obj.o: core_obj.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core_obj.o -MD -MP -MF "$(DEPDIR)/raideng-core_obj.Tpo" -c -o raideng-core_obj.o `test -f 'core_obj.cpp' || echo '$(srcdir)/'`core_obj.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core_obj.Tpo" "$(DEPDIR)/raideng-core_obj.Po"; else rm -f "$(DEPDIR)/raideng-core_obj.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core_obj.cpp' object='raideng-core_obj.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core_obj.o `test -f 'core_obj.cpp' || echo '$(srcdir)/'`core_obj.cpp raideng-core_obj.obj: core_obj.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-core_obj.obj -MD -MP -MF "$(DEPDIR)/raideng-core_obj.Tpo" -c -o raideng-core_obj.obj `if test -f 'core_obj.cpp'; then $(CYGPATH_W) 'core_obj.cpp'; else $(CYGPATH_W) '$(srcdir)/core_obj.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-core_obj.Tpo" "$(DEPDIR)/raideng-core_obj.Po"; else rm -f "$(DEPDIR)/raideng-core_obj.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='core_obj.cpp' object='raideng-core_obj.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-core_obj.obj `if test -f 'core_obj.cpp'; then $(CYGPATH_W) 'core_obj.cpp'; else $(CYGPATH_W) '$(srcdir)/core_obj.cpp'; fi` raideng-debug.o: debug.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-debug.o -MD -MP -MF "$(DEPDIR)/raideng-debug.Tpo" -c -o raideng-debug.o `test -f 'debug.cpp' || echo '$(srcdir)/'`debug.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-debug.Tpo" "$(DEPDIR)/raideng-debug.Po"; else rm -f "$(DEPDIR)/raideng-debug.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='debug.cpp' object='raideng-debug.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-debug.o `test -f 'debug.cpp' || echo '$(srcdir)/'`debug.cpp raideng-debug.obj: debug.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-debug.obj -MD -MP -MF "$(DEPDIR)/raideng-debug.Tpo" -c -o raideng-debug.obj `if test -f 'debug.cpp'; then $(CYGPATH_W) 'debug.cpp'; else $(CYGPATH_W) '$(srcdir)/debug.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-debug.Tpo" "$(DEPDIR)/raideng-debug.Po"; else rm -f "$(DEPDIR)/raideng-debug.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='debug.cpp' object='raideng-debug.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-debug.obj `if test -f 'debug.cpp'; then $(CYGPATH_W) 'debug.cpp'; else $(CYGPATH_W) '$(srcdir)/debug.cpp'; fi` raideng-device.o: device.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-device.o -MD -MP -MF "$(DEPDIR)/raideng-device.Tpo" -c -o raideng-device.o `test -f 'device.cpp' || echo '$(srcdir)/'`device.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-device.Tpo" "$(DEPDIR)/raideng-device.Po"; else rm -f "$(DEPDIR)/raideng-device.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='device.cpp' object='raideng-device.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-device.o `test -f 'device.cpp' || echo '$(srcdir)/'`device.cpp raideng-device.obj: device.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-device.obj -MD -MP -MF "$(DEPDIR)/raideng-device.Tpo" -c -o raideng-device.obj `if test -f 'device.cpp'; then $(CYGPATH_W) 'device.cpp'; else $(CYGPATH_W) '$(srcdir)/device.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-device.Tpo" "$(DEPDIR)/raideng-device.Po"; else rm -f "$(DEPDIR)/raideng-device.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='device.cpp' object='raideng-device.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-device.obj `if test -f 'device.cpp'; then $(CYGPATH_W) 'device.cpp'; else $(CYGPATH_W) '$(srcdir)/device.cpp'; fi` raideng-driver.o: driver.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-driver.o -MD -MP -MF "$(DEPDIR)/raideng-driver.Tpo" -c -o raideng-driver.o `test -f 'driver.cpp' || echo '$(srcdir)/'`driver.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-driver.Tpo" "$(DEPDIR)/raideng-driver.Po"; else rm -f "$(DEPDIR)/raideng-driver.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='driver.cpp' object='raideng-driver.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-driver.o `test -f 'driver.cpp' || echo '$(srcdir)/'`driver.cpp raideng-driver.obj: driver.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-driver.obj -MD -MP -MF "$(DEPDIR)/raideng-driver.Tpo" -c -o raideng-driver.obj `if test -f 'driver.cpp'; then $(CYGPATH_W) 'driver.cpp'; else $(CYGPATH_W) '$(srcdir)/driver.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-driver.Tpo" "$(DEPDIR)/raideng-driver.Po"; else rm -f "$(DEPDIR)/raideng-driver.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='driver.cpp' object='raideng-driver.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-driver.obj `if test -f 'driver.cpp'; then $(CYGPATH_W) 'driver.cpp'; else $(CYGPATH_W) '$(srcdir)/driver.cpp'; fi` raideng-eng_std.o: eng_std.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-eng_std.o -MD -MP -MF "$(DEPDIR)/raideng-eng_std.Tpo" -c -o raideng-eng_std.o `test -f 'eng_std.cpp' || echo '$(srcdir)/'`eng_std.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-eng_std.Tpo" "$(DEPDIR)/raideng-eng_std.Po"; else rm -f "$(DEPDIR)/raideng-eng_std.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='eng_std.cpp' object='raideng-eng_std.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-eng_std.o `test -f 'eng_std.cpp' || echo '$(srcdir)/'`eng_std.cpp raideng-eng_std.obj: eng_std.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-eng_std.obj -MD -MP -MF "$(DEPDIR)/raideng-eng_std.Tpo" -c -o raideng-eng_std.obj `if test -f 'eng_std.cpp'; then $(CYGPATH_W) 'eng_std.cpp'; else $(CYGPATH_W) '$(srcdir)/eng_std.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-eng_std.Tpo" "$(DEPDIR)/raideng-eng_std.Po"; else rm -f "$(DEPDIR)/raideng-eng_std.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='eng_std.cpp' object='raideng-eng_std.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-eng_std.obj `if test -f 'eng_std.cpp'; then $(CYGPATH_W) 'eng_std.cpp'; else $(CYGPATH_W) '$(srcdir)/eng_std.cpp'; fi` raideng-eng_unix.o: eng_unix.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-eng_unix.o -MD -MP -MF "$(DEPDIR)/raideng-eng_unix.Tpo" -c -o raideng-eng_unix.o `test -f 'eng_unix.cpp' || echo '$(srcdir)/'`eng_unix.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-eng_unix.Tpo" "$(DEPDIR)/raideng-eng_unix.Po"; else rm -f "$(DEPDIR)/raideng-eng_unix.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='eng_unix.cpp' object='raideng-eng_unix.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-eng_unix.o `test -f 'eng_unix.cpp' || echo '$(srcdir)/'`eng_unix.cpp raideng-eng_unix.obj: eng_unix.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-eng_unix.obj -MD -MP -MF "$(DEPDIR)/raideng-eng_unix.Tpo" -c -o raideng-eng_unix.obj `if test -f 'eng_unix.cpp'; then $(CYGPATH_W) 'eng_unix.cpp'; else $(CYGPATH_W) '$(srcdir)/eng_unix.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-eng_unix.Tpo" "$(DEPDIR)/raideng-eng_unix.Po"; else rm -f "$(DEPDIR)/raideng-eng_unix.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='eng_unix.cpp' object='raideng-eng_unix.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-eng_unix.obj `if test -f 'eng_unix.cpp'; then $(CYGPATH_W) 'eng_unix.cpp'; else $(CYGPATH_W) '$(srcdir)/eng_unix.cpp'; fi` raideng-engine.o: engine.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-engine.o -MD -MP -MF "$(DEPDIR)/raideng-engine.Tpo" -c -o raideng-engine.o `test -f 'engine.cpp' || echo '$(srcdir)/'`engine.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-engine.Tpo" "$(DEPDIR)/raideng-engine.Po"; else rm -f "$(DEPDIR)/raideng-engine.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='engine.cpp' object='raideng-engine.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-engine.o `test -f 'engine.cpp' || echo '$(srcdir)/'`engine.cpp raideng-engine.obj: engine.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-engine.obj -MD -MP -MF "$(DEPDIR)/raideng-engine.Tpo" -c -o raideng-engine.obj `if test -f 'engine.cpp'; then $(CYGPATH_W) 'engine.cpp'; else $(CYGPATH_W) '$(srcdir)/engine.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-engine.Tpo" "$(DEPDIR)/raideng-engine.Po"; else rm -f "$(DEPDIR)/raideng-engine.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='engine.cpp' object='raideng-engine.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-engine.obj `if test -f 'engine.cpp'; then $(CYGPATH_W) 'engine.cpp'; else $(CYGPATH_W) '$(srcdir)/engine.cpp'; fi` raideng-englists.o: englists.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-englists.o -MD -MP -MF "$(DEPDIR)/raideng-englists.Tpo" -c -o raideng-englists.o `test -f 'englists.cpp' || echo '$(srcdir)/'`englists.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-englists.Tpo" "$(DEPDIR)/raideng-englists.Po"; else rm -f "$(DEPDIR)/raideng-englists.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='englists.cpp' object='raideng-englists.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-englists.o `test -f 'englists.cpp' || echo '$(srcdir)/'`englists.cpp raideng-englists.obj: englists.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-englists.obj -MD -MP -MF "$(DEPDIR)/raideng-englists.Tpo" -c -o raideng-englists.obj `if test -f 'englists.cpp'; then $(CYGPATH_W) 'englists.cpp'; else $(CYGPATH_W) '$(srcdir)/englists.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-englists.Tpo" "$(DEPDIR)/raideng-englists.Po"; else rm -f "$(DEPDIR)/raideng-englists.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='englists.cpp' object='raideng-englists.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-englists.obj `if test -f 'englists.cpp'; then $(CYGPATH_W) 'englists.cpp'; else $(CYGPATH_W) '$(srcdir)/englists.cpp'; fi` raideng-gbl_fns.o: gbl_fns.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-gbl_fns.o -MD -MP -MF "$(DEPDIR)/raideng-gbl_fns.Tpo" -c -o raideng-gbl_fns.o `test -f 'gbl_fns.cpp' || echo '$(srcdir)/'`gbl_fns.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-gbl_fns.Tpo" "$(DEPDIR)/raideng-gbl_fns.Po"; else rm -f "$(DEPDIR)/raideng-gbl_fns.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gbl_fns.cpp' object='raideng-gbl_fns.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-gbl_fns.o `test -f 'gbl_fns.cpp' || echo '$(srcdir)/'`gbl_fns.cpp raideng-gbl_fns.obj: gbl_fns.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-gbl_fns.obj -MD -MP -MF "$(DEPDIR)/raideng-gbl_fns.Tpo" -c -o raideng-gbl_fns.obj `if test -f 'gbl_fns.cpp'; then $(CYGPATH_W) 'gbl_fns.cpp'; else $(CYGPATH_W) '$(srcdir)/gbl_fns.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-gbl_fns.Tpo" "$(DEPDIR)/raideng-gbl_fns.Po"; else rm -f "$(DEPDIR)/raideng-gbl_fns.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gbl_fns.cpp' object='raideng-gbl_fns.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-gbl_fns.obj `if test -f 'gbl_fns.cpp'; then $(CYGPATH_W) 'gbl_fns.cpp'; else $(CYGPATH_W) '$(srcdir)/gbl_fns.cpp'; fi` raideng-hba.o: hba.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-hba.o -MD -MP -MF "$(DEPDIR)/raideng-hba.Tpo" -c -o raideng-hba.o `test -f 'hba.cpp' || echo '$(srcdir)/'`hba.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-hba.Tpo" "$(DEPDIR)/raideng-hba.Po"; else rm -f "$(DEPDIR)/raideng-hba.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hba.cpp' object='raideng-hba.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-hba.o `test -f 'hba.cpp' || echo '$(srcdir)/'`hba.cpp raideng-hba.obj: hba.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-hba.obj -MD -MP -MF "$(DEPDIR)/raideng-hba.Tpo" -c -o raideng-hba.obj `if test -f 'hba.cpp'; then $(CYGPATH_W) 'hba.cpp'; else $(CYGPATH_W) '$(srcdir)/hba.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-hba.Tpo" "$(DEPDIR)/raideng-hba.Po"; else rm -f "$(DEPDIR)/raideng-hba.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hba.cpp' object='raideng-hba.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-hba.obj `if test -f 'hba.cpp'; then $(CYGPATH_W) 'hba.cpp'; else $(CYGPATH_W) '$(srcdir)/hba.cpp'; fi` raideng-manager.o: manager.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-manager.o -MD -MP -MF "$(DEPDIR)/raideng-manager.Tpo" -c -o raideng-manager.o `test -f 'manager.cpp' || echo '$(srcdir)/'`manager.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-manager.Tpo" "$(DEPDIR)/raideng-manager.Po"; else rm -f "$(DEPDIR)/raideng-manager.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='manager.cpp' object='raideng-manager.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-manager.o `test -f 'manager.cpp' || echo '$(srcdir)/'`manager.cpp raideng-manager.obj: manager.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-manager.obj -MD -MP -MF "$(DEPDIR)/raideng-manager.Tpo" -c -o raideng-manager.obj `if test -f 'manager.cpp'; then $(CYGPATH_W) 'manager.cpp'; else $(CYGPATH_W) '$(srcdir)/manager.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-manager.Tpo" "$(DEPDIR)/raideng-manager.Po"; else rm -f "$(DEPDIR)/raideng-manager.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='manager.cpp' object='raideng-manager.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-manager.obj `if test -f 'manager.cpp'; then $(CYGPATH_W) 'manager.cpp'; else $(CYGPATH_W) '$(srcdir)/manager.cpp'; fi` raideng-msg_str.o: msg_str.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-msg_str.o -MD -MP -MF "$(DEPDIR)/raideng-msg_str.Tpo" -c -o raideng-msg_str.o `test -f 'msg_str.cpp' || echo '$(srcdir)/'`msg_str.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-msg_str.Tpo" "$(DEPDIR)/raideng-msg_str.Po"; else rm -f "$(DEPDIR)/raideng-msg_str.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='msg_str.cpp' object='raideng-msg_str.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-msg_str.o `test -f 'msg_str.cpp' || echo '$(srcdir)/'`msg_str.cpp raideng-msg_str.obj: msg_str.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-msg_str.obj -MD -MP -MF "$(DEPDIR)/raideng-msg_str.Tpo" -c -o raideng-msg_str.obj `if test -f 'msg_str.cpp'; then $(CYGPATH_W) 'msg_str.cpp'; else $(CYGPATH_W) '$(srcdir)/msg_str.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-msg_str.Tpo" "$(DEPDIR)/raideng-msg_str.Po"; else rm -f "$(DEPDIR)/raideng-msg_str.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='msg_str.cpp' object='raideng-msg_str.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-msg_str.obj `if test -f 'msg_str.cpp'; then $(CYGPATH_W) 'msg_str.cpp'; else $(CYGPATH_W) '$(srcdir)/msg_str.cpp'; fi` raideng-object.o: object.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-object.o -MD -MP -MF "$(DEPDIR)/raideng-object.Tpo" -c -o raideng-object.o `test -f 'object.cpp' || echo '$(srcdir)/'`object.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-object.Tpo" "$(DEPDIR)/raideng-object.Po"; else rm -f "$(DEPDIR)/raideng-object.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='object.cpp' object='raideng-object.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-object.o `test -f 'object.cpp' || echo '$(srcdir)/'`object.cpp raideng-object.obj: object.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-object.obj -MD -MP -MF "$(DEPDIR)/raideng-object.Tpo" -c -o raideng-object.obj `if test -f 'object.cpp'; then $(CYGPATH_W) 'object.cpp'; else $(CYGPATH_W) '$(srcdir)/object.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-object.Tpo" "$(DEPDIR)/raideng-object.Po"; else rm -f "$(DEPDIR)/raideng-object.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='object.cpp' object='raideng-object.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-object.obj `if test -f 'object.cpp'; then $(CYGPATH_W) 'object.cpp'; else $(CYGPATH_W) '$(srcdir)/object.cpp'; fi` raideng-osd_unix.o: osd_unix.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-osd_unix.o -MD -MP -MF "$(DEPDIR)/raideng-osd_unix.Tpo" -c -o raideng-osd_unix.o `test -f 'osd_unix.cpp' || echo '$(srcdir)/'`osd_unix.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-osd_unix.Tpo" "$(DEPDIR)/raideng-osd_unix.Po"; else rm -f "$(DEPDIR)/raideng-osd_unix.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='osd_unix.cpp' object='raideng-osd_unix.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-osd_unix.o `test -f 'osd_unix.cpp' || echo '$(srcdir)/'`osd_unix.cpp raideng-osd_unix.obj: osd_unix.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-osd_unix.obj -MD -MP -MF "$(DEPDIR)/raideng-osd_unix.Tpo" -c -o raideng-osd_unix.obj `if test -f 'osd_unix.cpp'; then $(CYGPATH_W) 'osd_unix.cpp'; else $(CYGPATH_W) '$(srcdir)/osd_unix.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-osd_unix.Tpo" "$(DEPDIR)/raideng-osd_unix.Po"; else rm -f "$(DEPDIR)/raideng-osd_unix.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='osd_unix.cpp' object='raideng-osd_unix.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-osd_unix.obj `if test -f 'osd_unix.cpp'; then $(CYGPATH_W) 'osd_unix.cpp'; else $(CYGPATH_W) '$(srcdir)/osd_unix.cpp'; fi` raideng-ptrarray.o: ptrarray.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-ptrarray.o -MD -MP -MF "$(DEPDIR)/raideng-ptrarray.Tpo" -c -o raideng-ptrarray.o `test -f 'ptrarray.cpp' || echo '$(srcdir)/'`ptrarray.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-ptrarray.Tpo" "$(DEPDIR)/raideng-ptrarray.Po"; else rm -f "$(DEPDIR)/raideng-ptrarray.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ptrarray.cpp' object='raideng-ptrarray.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-ptrarray.o `test -f 'ptrarray.cpp' || echo '$(srcdir)/'`ptrarray.cpp raideng-ptrarray.obj: ptrarray.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-ptrarray.obj -MD -MP -MF "$(DEPDIR)/raideng-ptrarray.Tpo" -c -o raideng-ptrarray.obj `if test -f 'ptrarray.cpp'; then $(CYGPATH_W) 'ptrarray.cpp'; else $(CYGPATH_W) '$(srcdir)/ptrarray.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-ptrarray.Tpo" "$(DEPDIR)/raideng-ptrarray.Po"; else rm -f "$(DEPDIR)/raideng-ptrarray.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ptrarray.cpp' object='raideng-ptrarray.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-ptrarray.obj `if test -f 'ptrarray.cpp'; then $(CYGPATH_W) 'ptrarray.cpp'; else $(CYGPATH_W) '$(srcdir)/ptrarray.cpp'; fi` raideng-raid.o: raid.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raid.o -MD -MP -MF "$(DEPDIR)/raideng-raid.Tpo" -c -o raideng-raid.o `test -f 'raid.cpp' || echo '$(srcdir)/'`raid.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raid.Tpo" "$(DEPDIR)/raideng-raid.Po"; else rm -f "$(DEPDIR)/raideng-raid.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raid.cpp' object='raideng-raid.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raid.o `test -f 'raid.cpp' || echo '$(srcdir)/'`raid.cpp raideng-raid.obj: raid.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raid.obj -MD -MP -MF "$(DEPDIR)/raideng-raid.Tpo" -c -o raideng-raid.obj `if test -f 'raid.cpp'; then $(CYGPATH_W) 'raid.cpp'; else $(CYGPATH_W) '$(srcdir)/raid.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raid.Tpo" "$(DEPDIR)/raideng-raid.Po"; else rm -f "$(DEPDIR)/raideng-raid.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raid.cpp' object='raideng-raid.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raid.obj `if test -f 'raid.cpp'; then $(CYGPATH_W) 'raid.cpp'; else $(CYGPATH_W) '$(srcdir)/raid.cpp'; fi` raideng-raid_bcd.o: raid_bcd.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raid_bcd.o -MD -MP -MF "$(DEPDIR)/raideng-raid_bcd.Tpo" -c -o raideng-raid_bcd.o `test -f 'raid_bcd.cpp' || echo '$(srcdir)/'`raid_bcd.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raid_bcd.Tpo" "$(DEPDIR)/raideng-raid_bcd.Po"; else rm -f "$(DEPDIR)/raideng-raid_bcd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raid_bcd.cpp' object='raideng-raid_bcd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raid_bcd.o `test -f 'raid_bcd.cpp' || echo '$(srcdir)/'`raid_bcd.cpp raideng-raid_bcd.obj: raid_bcd.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raid_bcd.obj -MD -MP -MF "$(DEPDIR)/raideng-raid_bcd.Tpo" -c -o raideng-raid_bcd.obj `if test -f 'raid_bcd.cpp'; then $(CYGPATH_W) 'raid_bcd.cpp'; else $(CYGPATH_W) '$(srcdir)/raid_bcd.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raid_bcd.Tpo" "$(DEPDIR)/raideng-raid_bcd.Po"; else rm -f "$(DEPDIR)/raideng-raid_bcd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raid_bcd.cpp' object='raideng-raid_bcd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raid_bcd.obj `if test -f 'raid_bcd.cpp'; then $(CYGPATH_W) 'raid_bcd.cpp'; else $(CYGPATH_W) '$(srcdir)/raid_bcd.cpp'; fi` raideng-raid_dev.o: raid_dev.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raid_dev.o -MD -MP -MF "$(DEPDIR)/raideng-raid_dev.Tpo" -c -o raideng-raid_dev.o `test -f 'raid_dev.cpp' || echo '$(srcdir)/'`raid_dev.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raid_dev.Tpo" "$(DEPDIR)/raideng-raid_dev.Po"; else rm -f "$(DEPDIR)/raideng-raid_dev.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raid_dev.cpp' object='raideng-raid_dev.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raid_dev.o `test -f 'raid_dev.cpp' || echo '$(srcdir)/'`raid_dev.cpp raideng-raid_dev.obj: raid_dev.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raid_dev.obj -MD -MP -MF "$(DEPDIR)/raideng-raid_dev.Tpo" -c -o raideng-raid_dev.obj `if test -f 'raid_dev.cpp'; then $(CYGPATH_W) 'raid_dev.cpp'; else $(CYGPATH_W) '$(srcdir)/raid_dev.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raid_dev.Tpo" "$(DEPDIR)/raideng-raid_dev.Po"; else rm -f "$(DEPDIR)/raideng-raid_dev.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raid_dev.cpp' object='raideng-raid_dev.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raid_dev.obj `if test -f 'raid_dev.cpp'; then $(CYGPATH_W) 'raid_dev.cpp'; else $(CYGPATH_W) '$(srcdir)/raid_dev.cpp'; fi` raideng-raid_hba.o: raid_hba.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raid_hba.o -MD -MP -MF "$(DEPDIR)/raideng-raid_hba.Tpo" -c -o raideng-raid_hba.o `test -f 'raid_hba.cpp' || echo '$(srcdir)/'`raid_hba.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raid_hba.Tpo" "$(DEPDIR)/raideng-raid_hba.Po"; else rm -f "$(DEPDIR)/raideng-raid_hba.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raid_hba.cpp' object='raideng-raid_hba.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raid_hba.o `test -f 'raid_hba.cpp' || echo '$(srcdir)/'`raid_hba.cpp raideng-raid_hba.obj: raid_hba.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raid_hba.obj -MD -MP -MF "$(DEPDIR)/raideng-raid_hba.Tpo" -c -o raideng-raid_hba.obj `if test -f 'raid_hba.cpp'; then $(CYGPATH_W) 'raid_hba.cpp'; else $(CYGPATH_W) '$(srcdir)/raid_hba.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raid_hba.Tpo" "$(DEPDIR)/raideng-raid_hba.Po"; else rm -f "$(DEPDIR)/raideng-raid_hba.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raid_hba.cpp' object='raideng-raid_hba.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raid_hba.obj `if test -f 'raid_hba.cpp'; then $(CYGPATH_W) 'raid_hba.cpp'; else $(CYGPATH_W) '$(srcdir)/raid_hba.cpp'; fi` raideng-raid_mgr.o: raid_mgr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raid_mgr.o -MD -MP -MF "$(DEPDIR)/raideng-raid_mgr.Tpo" -c -o raideng-raid_mgr.o `test -f 'raid_mgr.cpp' || echo '$(srcdir)/'`raid_mgr.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raid_mgr.Tpo" "$(DEPDIR)/raideng-raid_mgr.Po"; else rm -f "$(DEPDIR)/raideng-raid_mgr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raid_mgr.cpp' object='raideng-raid_mgr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raid_mgr.o `test -f 'raid_mgr.cpp' || echo '$(srcdir)/'`raid_mgr.cpp raideng-raid_mgr.obj: raid_mgr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raid_mgr.obj -MD -MP -MF "$(DEPDIR)/raideng-raid_mgr.Tpo" -c -o raideng-raid_mgr.obj `if test -f 'raid_mgr.cpp'; then $(CYGPATH_W) 'raid_mgr.cpp'; else $(CYGPATH_W) '$(srcdir)/raid_mgr.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raid_mgr.Tpo" "$(DEPDIR)/raideng-raid_mgr.Po"; else rm -f "$(DEPDIR)/raideng-raid_mgr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raid_mgr.cpp' object='raideng-raid_mgr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raid_mgr.obj `if test -f 'raid_mgr.cpp'; then $(CYGPATH_W) 'raid_mgr.cpp'; else $(CYGPATH_W) '$(srcdir)/raid_mgr.cpp'; fi` raideng-raiddrvr.o: raiddrvr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raiddrvr.o -MD -MP -MF "$(DEPDIR)/raideng-raiddrvr.Tpo" -c -o raideng-raiddrvr.o `test -f 'raiddrvr.cpp' || echo '$(srcdir)/'`raiddrvr.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raiddrvr.Tpo" "$(DEPDIR)/raideng-raiddrvr.Po"; else rm -f "$(DEPDIR)/raideng-raiddrvr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raiddrvr.cpp' object='raideng-raiddrvr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raiddrvr.o `test -f 'raiddrvr.cpp' || echo '$(srcdir)/'`raiddrvr.cpp raideng-raiddrvr.obj: raiddrvr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-raiddrvr.obj -MD -MP -MF "$(DEPDIR)/raideng-raiddrvr.Tpo" -c -o raideng-raiddrvr.obj `if test -f 'raiddrvr.cpp'; then $(CYGPATH_W) 'raiddrvr.cpp'; else $(CYGPATH_W) '$(srcdir)/raiddrvr.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-raiddrvr.Tpo" "$(DEPDIR)/raideng-raiddrvr.Po"; else rm -f "$(DEPDIR)/raideng-raiddrvr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raiddrvr.cpp' object='raideng-raiddrvr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-raiddrvr.obj `if test -f 'raiddrvr.cpp'; then $(CYGPATH_W) 'raiddrvr.cpp'; else $(CYGPATH_W) '$(srcdir)/raiddrvr.cpp'; fi` raideng-scsi_bcd.o: scsi_bcd.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_bcd.o -MD -MP -MF "$(DEPDIR)/raideng-scsi_bcd.Tpo" -c -o raideng-scsi_bcd.o `test -f 'scsi_bcd.cpp' || echo '$(srcdir)/'`scsi_bcd.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_bcd.Tpo" "$(DEPDIR)/raideng-scsi_bcd.Po"; else rm -f "$(DEPDIR)/raideng-scsi_bcd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_bcd.cpp' object='raideng-scsi_bcd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_bcd.o `test -f 'scsi_bcd.cpp' || echo '$(srcdir)/'`scsi_bcd.cpp raideng-scsi_bcd.obj: scsi_bcd.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_bcd.obj -MD -MP -MF "$(DEPDIR)/raideng-scsi_bcd.Tpo" -c -o raideng-scsi_bcd.obj `if test -f 'scsi_bcd.cpp'; then $(CYGPATH_W) 'scsi_bcd.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_bcd.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_bcd.Tpo" "$(DEPDIR)/raideng-scsi_bcd.Po"; else rm -f "$(DEPDIR)/raideng-scsi_bcd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_bcd.cpp' object='raideng-scsi_bcd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_bcd.obj `if test -f 'scsi_bcd.cpp'; then $(CYGPATH_W) 'scsi_bcd.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_bcd.cpp'; fi` raideng-scsi_ccb.o: scsi_ccb.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_ccb.o -MD -MP -MF "$(DEPDIR)/raideng-scsi_ccb.Tpo" -c -o raideng-scsi_ccb.o `test -f 'scsi_ccb.cpp' || echo '$(srcdir)/'`scsi_ccb.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_ccb.Tpo" "$(DEPDIR)/raideng-scsi_ccb.Po"; else rm -f "$(DEPDIR)/raideng-scsi_ccb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_ccb.cpp' object='raideng-scsi_ccb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_ccb.o `test -f 'scsi_ccb.cpp' || echo '$(srcdir)/'`scsi_ccb.cpp raideng-scsi_ccb.obj: scsi_ccb.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_ccb.obj -MD -MP -MF "$(DEPDIR)/raideng-scsi_ccb.Tpo" -c -o raideng-scsi_ccb.obj `if test -f 'scsi_ccb.cpp'; then $(CYGPATH_W) 'scsi_ccb.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_ccb.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_ccb.Tpo" "$(DEPDIR)/raideng-scsi_ccb.Po"; else rm -f "$(DEPDIR)/raideng-scsi_ccb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_ccb.cpp' object='raideng-scsi_ccb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_ccb.obj `if test -f 'scsi_ccb.cpp'; then $(CYGPATH_W) 'scsi_ccb.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_ccb.cpp'; fi` raideng-scsi_con.o: scsi_con.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_con.o -MD -MP -MF "$(DEPDIR)/raideng-scsi_con.Tpo" -c -o raideng-scsi_con.o `test -f 'scsi_con.cpp' || echo '$(srcdir)/'`scsi_con.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_con.Tpo" "$(DEPDIR)/raideng-scsi_con.Po"; else rm -f "$(DEPDIR)/raideng-scsi_con.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_con.cpp' object='raideng-scsi_con.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_con.o `test -f 'scsi_con.cpp' || echo '$(srcdir)/'`scsi_con.cpp raideng-scsi_con.obj: scsi_con.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_con.obj -MD -MP -MF "$(DEPDIR)/raideng-scsi_con.Tpo" -c -o raideng-scsi_con.obj `if test -f 'scsi_con.cpp'; then $(CYGPATH_W) 'scsi_con.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_con.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_con.Tpo" "$(DEPDIR)/raideng-scsi_con.Po"; else rm -f "$(DEPDIR)/raideng-scsi_con.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_con.cpp' object='raideng-scsi_con.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_con.obj `if test -f 'scsi_con.cpp'; then $(CYGPATH_W) 'scsi_con.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_con.cpp'; fi` raideng-scsi_dev.o: scsi_dev.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_dev.o -MD -MP -MF "$(DEPDIR)/raideng-scsi_dev.Tpo" -c -o raideng-scsi_dev.o `test -f 'scsi_dev.cpp' || echo '$(srcdir)/'`scsi_dev.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_dev.Tpo" "$(DEPDIR)/raideng-scsi_dev.Po"; else rm -f "$(DEPDIR)/raideng-scsi_dev.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_dev.cpp' object='raideng-scsi_dev.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_dev.o `test -f 'scsi_dev.cpp' || echo '$(srcdir)/'`scsi_dev.cpp raideng-scsi_dev.obj: scsi_dev.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_dev.obj -MD -MP -MF "$(DEPDIR)/raideng-scsi_dev.Tpo" -c -o raideng-scsi_dev.obj `if test -f 'scsi_dev.cpp'; then $(CYGPATH_W) 'scsi_dev.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_dev.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_dev.Tpo" "$(DEPDIR)/raideng-scsi_dev.Po"; else rm -f "$(DEPDIR)/raideng-scsi_dev.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_dev.cpp' object='raideng-scsi_dev.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_dev.obj `if test -f 'scsi_dev.cpp'; then $(CYGPATH_W) 'scsi_dev.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_dev.cpp'; fi` raideng-scsi_hba.o: scsi_hba.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_hba.o -MD -MP -MF "$(DEPDIR)/raideng-scsi_hba.Tpo" -c -o raideng-scsi_hba.o `test -f 'scsi_hba.cpp' || echo '$(srcdir)/'`scsi_hba.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_hba.Tpo" "$(DEPDIR)/raideng-scsi_hba.Po"; else rm -f "$(DEPDIR)/raideng-scsi_hba.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_hba.cpp' object='raideng-scsi_hba.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_hba.o `test -f 'scsi_hba.cpp' || echo '$(srcdir)/'`scsi_hba.cpp raideng-scsi_hba.obj: scsi_hba.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_hba.obj -MD -MP -MF "$(DEPDIR)/raideng-scsi_hba.Tpo" -c -o raideng-scsi_hba.obj `if test -f 'scsi_hba.cpp'; then $(CYGPATH_W) 'scsi_hba.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_hba.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_hba.Tpo" "$(DEPDIR)/raideng-scsi_hba.Po"; else rm -f "$(DEPDIR)/raideng-scsi_hba.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_hba.cpp' object='raideng-scsi_hba.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_hba.obj `if test -f 'scsi_hba.cpp'; then $(CYGPATH_W) 'scsi_hba.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_hba.cpp'; fi` raideng-scsi_mgr.o: scsi_mgr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_mgr.o -MD -MP -MF "$(DEPDIR)/raideng-scsi_mgr.Tpo" -c -o raideng-scsi_mgr.o `test -f 'scsi_mgr.cpp' || echo '$(srcdir)/'`scsi_mgr.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_mgr.Tpo" "$(DEPDIR)/raideng-scsi_mgr.Po"; else rm -f "$(DEPDIR)/raideng-scsi_mgr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_mgr.cpp' object='raideng-scsi_mgr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_mgr.o `test -f 'scsi_mgr.cpp' || echo '$(srcdir)/'`scsi_mgr.cpp raideng-scsi_mgr.obj: scsi_mgr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_mgr.obj -MD -MP -MF "$(DEPDIR)/raideng-scsi_mgr.Tpo" -c -o raideng-scsi_mgr.obj `if test -f 'scsi_mgr.cpp'; then $(CYGPATH_W) 'scsi_mgr.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_mgr.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_mgr.Tpo" "$(DEPDIR)/raideng-scsi_mgr.Po"; else rm -f "$(DEPDIR)/raideng-scsi_mgr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_mgr.cpp' object='raideng-scsi_mgr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_mgr.obj `if test -f 'scsi_mgr.cpp'; then $(CYGPATH_W) 'scsi_mgr.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_mgr.cpp'; fi` raideng-scsi_obj.o: scsi_obj.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_obj.o -MD -MP -MF "$(DEPDIR)/raideng-scsi_obj.Tpo" -c -o raideng-scsi_obj.o `test -f 'scsi_obj.cpp' || echo '$(srcdir)/'`scsi_obj.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_obj.Tpo" "$(DEPDIR)/raideng-scsi_obj.Po"; else rm -f "$(DEPDIR)/raideng-scsi_obj.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_obj.cpp' object='raideng-scsi_obj.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_obj.o `test -f 'scsi_obj.cpp' || echo '$(srcdir)/'`scsi_obj.cpp raideng-scsi_obj.obj: scsi_obj.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsi_obj.obj -MD -MP -MF "$(DEPDIR)/raideng-scsi_obj.Tpo" -c -o raideng-scsi_obj.obj `if test -f 'scsi_obj.cpp'; then $(CYGPATH_W) 'scsi_obj.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_obj.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsi_obj.Tpo" "$(DEPDIR)/raideng-scsi_obj.Po"; else rm -f "$(DEPDIR)/raideng-scsi_obj.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsi_obj.cpp' object='raideng-scsi_obj.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsi_obj.obj `if test -f 'scsi_obj.cpp'; then $(CYGPATH_W) 'scsi_obj.cpp'; else $(CYGPATH_W) '$(srcdir)/scsi_obj.cpp'; fi` raideng-scsidrvr.o: scsidrvr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsidrvr.o -MD -MP -MF "$(DEPDIR)/raideng-scsidrvr.Tpo" -c -o raideng-scsidrvr.o `test -f 'scsidrvr.cpp' || echo '$(srcdir)/'`scsidrvr.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsidrvr.Tpo" "$(DEPDIR)/raideng-scsidrvr.Po"; else rm -f "$(DEPDIR)/raideng-scsidrvr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsidrvr.cpp' object='raideng-scsidrvr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsidrvr.o `test -f 'scsidrvr.cpp' || echo '$(srcdir)/'`scsidrvr.cpp raideng-scsidrvr.obj: scsidrvr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-scsidrvr.obj -MD -MP -MF "$(DEPDIR)/raideng-scsidrvr.Tpo" -c -o raideng-scsidrvr.obj `if test -f 'scsidrvr.cpp'; then $(CYGPATH_W) 'scsidrvr.cpp'; else $(CYGPATH_W) '$(srcdir)/scsidrvr.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-scsidrvr.Tpo" "$(DEPDIR)/raideng-scsidrvr.Po"; else rm -f "$(DEPDIR)/raideng-scsidrvr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsidrvr.cpp' object='raideng-scsidrvr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-scsidrvr.obj `if test -f 'scsidrvr.cpp'; then $(CYGPATH_W) 'scsidrvr.cpp'; else $(CYGPATH_W) '$(srcdir)/scsidrvr.cpp'; fi` raideng-stat_log.o: stat_log.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-stat_log.o -MD -MP -MF "$(DEPDIR)/raideng-stat_log.Tpo" -c -o raideng-stat_log.o `test -f 'stat_log.cpp' || echo '$(srcdir)/'`stat_log.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-stat_log.Tpo" "$(DEPDIR)/raideng-stat_log.Po"; else rm -f "$(DEPDIR)/raideng-stat_log.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stat_log.cpp' object='raideng-stat_log.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-stat_log.o `test -f 'stat_log.cpp' || echo '$(srcdir)/'`stat_log.cpp raideng-stat_log.obj: stat_log.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-stat_log.obj -MD -MP -MF "$(DEPDIR)/raideng-stat_log.Tpo" -c -o raideng-stat_log.obj `if test -f 'stat_log.cpp'; then $(CYGPATH_W) 'stat_log.cpp'; else $(CYGPATH_W) '$(srcdir)/stat_log.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-stat_log.Tpo" "$(DEPDIR)/raideng-stat_log.Po"; else rm -f "$(DEPDIR)/raideng-stat_log.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stat_log.cpp' object='raideng-stat_log.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-stat_log.obj `if test -f 'stat_log.cpp'; then $(CYGPATH_W) 'stat_log.cpp'; else $(CYGPATH_W) '$(srcdir)/stat_log.cpp'; fi` raideng-threads.o: threads.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-threads.o -MD -MP -MF "$(DEPDIR)/raideng-threads.Tpo" -c -o raideng-threads.o `test -f 'threads.cpp' || echo '$(srcdir)/'`threads.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-threads.Tpo" "$(DEPDIR)/raideng-threads.Po"; else rm -f "$(DEPDIR)/raideng-threads.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='threads.cpp' object='raideng-threads.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-threads.o `test -f 'threads.cpp' || echo '$(srcdir)/'`threads.cpp raideng-threads.obj: threads.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-threads.obj -MD -MP -MF "$(DEPDIR)/raideng-threads.Tpo" -c -o raideng-threads.obj `if test -f 'threads.cpp'; then $(CYGPATH_W) 'threads.cpp'; else $(CYGPATH_W) '$(srcdir)/threads.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-threads.Tpo" "$(DEPDIR)/raideng-threads.Po"; else rm -f "$(DEPDIR)/raideng-threads.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='threads.cpp' object='raideng-threads.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-threads.obj `if test -f 'threads.cpp'; then $(CYGPATH_W) 'threads.cpp'; else $(CYGPATH_W) '$(srcdir)/threads.cpp'; fi` raideng-unreslvd.o: unreslvd.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-unreslvd.o -MD -MP -MF "$(DEPDIR)/raideng-unreslvd.Tpo" -c -o raideng-unreslvd.o `test -f 'unreslvd.cpp' || echo '$(srcdir)/'`unreslvd.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-unreslvd.Tpo" "$(DEPDIR)/raideng-unreslvd.Po"; else rm -f "$(DEPDIR)/raideng-unreslvd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='unreslvd.cpp' object='raideng-unreslvd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-unreslvd.o `test -f 'unreslvd.cpp' || echo '$(srcdir)/'`unreslvd.cpp raideng-unreslvd.obj: unreslvd.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raideng-unreslvd.obj -MD -MP -MF "$(DEPDIR)/raideng-unreslvd.Tpo" -c -o raideng-unreslvd.obj `if test -f 'unreslvd.cpp'; then $(CYGPATH_W) 'unreslvd.cpp'; else $(CYGPATH_W) '$(srcdir)/unreslvd.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raideng-unreslvd.Tpo" "$(DEPDIR)/raideng-unreslvd.Po"; else rm -f "$(DEPDIR)/raideng-unreslvd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='unreslvd.cpp' object='raideng-unreslvd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raideng_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raideng-unreslvd.obj `if test -f 'unreslvd.cpp'; then $(CYGPATH_W) 'unreslvd.cpp'; else $(CYGPATH_W) '$(srcdir)/unreslvd.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raidutils-0.0.6.orig/raideng/addr_rng.cpp0000664000175000000620000001762310044153333020242 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - ADDR_RNG.CPP //*************************************************************************** // //Description: // // This file contains function definitions for the dptAddrRange_C //class. // //Author: Doug Anderson //Date: 12/23/92 // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "addr_rng.hpp" //Function - dptAddrRange_C::dptAddrRange_C() - start //=========================================================================== //Description: // This function is the constructor for the dptAddrRange_C class. //--------------------------------------------------------------------------- dptAddrRange_C::dptAddrRange_C() { maxFlag = 0; minChan = 0; maxChan = 0; for (uINT i=0; i maxChan) { curAddr.chan = minChan; if (++curAddr.id > chanInfo[curAddr.chan-minChan].maxId) { curAddr.id = 0; if (++curAddr.lun > chanInfo[curAddr.chan-minChan].maxLun) { curAddr.lun = 0; maxFlag = 1; } } } return (!maxFlag); } //dptAddrRange_C::incTopDown() - end //Function - dptAddrRange_C::incBottomUp() - start //=========================================================================== //Description: // This function increments the current SCSI address value and //limits the current address to the maximum value. The SCSI lun //is incremented thru its full range first, then the SCSI id, then //the SCSI channel. // //Return Value: // 1 = Successfully incremented // 0 = Not incremented because maxed out //--------------------------------------------------------------------------- uINT dptAddrRange_C::incBottomUp() { if (++curAddr.lun > chanInfo[curAddr.chan-minChan].maxLun) { curAddr.lun = 0; if (++curAddr.id > chanInfo[curAddr.chan-minChan].maxId) { curAddr.id = 0; if (++curAddr.chan > maxChan) { curAddr = getMaxAddr(); maxFlag = 1; } } } return (!maxFlag); } //dptAddrRange_C::incBottomUp() - end //Function - dptAddrRange_C::nextID() - start //=========================================================================== //Description: // This function increments the current SCSI address value to //the maximum SCSI LUN so that the next increment function will place //the current address at the next ID, LUN==0. This function is intended //for use inside a for loop where the current address gets incremented //from the bottom up at the end of the loop. // //Return Value: // 1 = Successfully incremented // 0 = Not incremented because maxed out //--------------------------------------------------------------------------- uINT dptAddrRange_C::nextID() { curAddr.lun = chanInfo[curAddr.chan-minChan].maxLun; return (!maxFlag); } //dptAddrRange_C::nextID() - end //Function - dptAddrRange_C::cur() - start //=========================================================================== //Description: // This function attempts to set the current address value. If the //specified address is not within the minimum/maximum address bounds, //the current address is not set. // //Return Value: // 1 = Successfull // 0 = Failed (Specified address not within min/max bounds) //--------------------------------------------------------------------------- uINT dptAddrRange_C::cur(const dptAddr_S &inAddr) { uINT rtnVal = 0; if (inBounds(inAddr)) { curAddr = inAddr; rtnVal = 1; } return (rtnVal); } //dptAddrRange_C::cur() - end //Function - dptAddrRange_C::inBounds() - start //=========================================================================== //Description: // This function checks if the specified address falls within the //min/max address range. // //Return Value: // 1=Success - The specifed address fell within he min/max bounds // 0=Failed - The specified address was outside of the min/max bounds //--------------------------------------------------------------------------- uINT dptAddrRange_C::inBounds(const dptAddr_S &inAddr) const { uINT rtnVal = 0; if ((inAddr.chan <= maxChan) && (inAddr.chan >= minChan) && (inAddr.id <= chanInfo[inAddr.chan-minChan].maxId) && (inAddr.lun <= chanInfo[inAddr.chan-minChan].maxLun)) { rtnVal = 1; } return (rtnVal); } //dptAddrRange_C::inBounds() - end //Function - dptAddrRange_C::getMinAddr() - start //=========================================================================== //Description: // This function returns the minimum SCSI address for this range. //--------------------------------------------------------------------------- const dptAddr_S & dptAddrRange_C::getMinAddr() { minAddr.chan = minChan; minAddr.id = 0; minAddr.lun = 0; return minAddr; } //dptAddrRange_C::getMinAddr() - end //Function - dptAddrRange_C::getMaxAddr() - start //=========================================================================== //Description: // This function returns the maximum SCSI address for this range. //--------------------------------------------------------------------------- const dptAddr_S & dptAddrRange_C::getMaxAddr() { maxAddr.chan = maxChan; maxAddr.id = chanInfo[maxChan].maxId; maxAddr.lun = chanInfo[maxChan].maxLun; return maxAddr; } //dptAddrRange_C::getMaxAddr() - end raidutils-0.0.6.orig/raideng/addr_rng.hpp0000664000175000000620000001145310044153311020236 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __ADDR_RNG_HPP #define __ADDR_RNG_HPP //File - ADDR_RNG.HPP //*************************************************************************** // //Description: // // This file contains the class definition for the dptAddrRange_C //class. // //Author: Doug Anderson //Date: 3/9/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "eng_std.hpp" #define MAX_NUM_CHANS 8 //class - dptAddrRange_C - start //=========================================================================== // //Description: // // This class defines a SCSI address range. This class allows a //SCSI address to be manipulated within a specified min/max region. // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. The HBA field of the dptAddr_S structure is not used in this // class. // //--------------------------------------------------------------------------- class dptAddrRange_C { struct ChanInfo_S { uCHAR maxId; uCHAR maxLun; }; // Indicates if the current address attempted to exceed the maximum uINT maxFlag; // Current (working) SCSI address dptAddr_S curAddr; // Minimum SCSI address dptAddr_S minAddr; // Maximum SCSI address dptAddr_S maxAddr; // The minimum channel number (some BCD's start at 1) uCHAR minChan; // The maximum channel number uCHAR maxChan; // Per channel info ChanInfo_S chanInfo[MAX_NUM_CHANS]; public: dptAddrRange_C(); // Resets the current address to the minimum void reset(); // Determines if the current address attempted to increment // beyond the maximum address uINT maxedOut() { return (maxFlag); } // Increments the current value SCSI channel first uINT incTopDown(); // Increments the current value SCSI lun first uINT incBottomUp(); // Increments the current value to the next SCSI ID (LUN==min) uINT nextID(); // Checks if the specified address is within the min/max bounds uINT inBounds(const dptAddr_S &) const; // Return a reference to the current address value const dptAddr_S & cur() const { return (curAddr); } // Attempts to set the current address value uINT cur(const dptAddr_S &); // Return a reference to the minimum address value const dptAddr_S & getMinAddr(); // Return a reference to the maximum address value const dptAddr_S & getMaxAddr(); uINT ValidChan(uCHAR inChan) const { return ((inChan < MAX_NUM_CHANS) && (inChan >= minChan)); } uCHAR getMinChan() const { return minChan; } uCHAR getMaxChan() const { return maxChan; } uCHAR getMaxId(uCHAR inChan) const { return ValidChan(inChan) ? chanInfo[inChan-minChan].maxId : 0; } uCHAR getMaxLun(uCHAR inChan) const { return ValidChan(inChan) ? chanInfo[inChan-minChan].maxLun : 0; } void setMinChan(uCHAR inChan) { if (inChan <= maxChan) minChan = inChan; } void setMaxChan(uCHAR inChan) { if ((inChan < MAX_NUM_CHANS) && (inChan >= minChan)) maxChan = inChan; } void setMaxId(uCHAR inChan, uCHAR inId) { if (ValidChan(inChan)) chanInfo[inChan-minChan].maxId = inId; } void setMaxLun(uCHAR inChan, uCHAR inLun) { if (ValidChan(inChan)) chanInfo[inChan-minChan].maxLun = inLun; } }; //dptAddrRange_C - end #endif raidutils-0.0.6.orig/raideng/allfiles.hpp0000664000175000000620000001067710044153332020263 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __ALLFILES_HPP #define __ALLFILES_HPP //File - ALLFILES.HPP //*************************************************************************** // //Description: // // This files contains all the include files in the DPT engine. // //Author: Doug Anderson //Date: 3/17/93 // //Editors: // //Remarks: // // //*************************************************************************** // What to link? ------------------------------------------------------------ //#define ENABLE_SCSI_TRACE // Use Special OSD functions to allocate I/O buffers //#define __DPT_ALLOC // Indicate that this is the DPT engine (not the API) #define _DPT_ENGINE // Forward References ------------------------------------------------------- #include "core_fwd.hpp" // Engine core classes #include "scsi_fwd.hpp" // SCSI classes #include "raid_fwd.hpp" // RAID classes #include "dpt_fwd.hpp" // Final DPT classes class engCCB_C; struct dptBuffer_S; //Include Files ------------------------------------------------------------- // Debug only! //#include //#include //#include // System include files #include #include // Standard DPT includes #include "osd_util.h" #include "dptsig.h" #include "dpt_eata.h" // Indicates a valid reserve block #if defined (_DPT_BIG_ENDIAN) const uLONG FW_RB_INDICATOR = 0x37fc4d1e; #else const uLONG FW_RB_INDICATOR = 0x1e4dfc37; #endif // Basic engine data structures #include "eng_std.hpp" #include "messages.h" #include "rtncodes.h" #include "raid.h" #include "stats.h" #include "stamp.hpp" // Lists #include "englists.hpp" // More basic engine data structures #include "gbl_fns.hpp" #include "addr_rng.hpp" #include "dpt_buff.h" // Object data structures used in MSG_GET_INFO/MSG_SET_INFO #include "get_info.h" // OS dependent definitions #include "eng_osd.h" // Log sense/select facilitator classes #include "dpt_log.hpp" // HBA event log facilitator class #include "hba_log.hpp" // Statistics log page facilitator classes #include "stat_log.hpp" // Engine CCB classes #include "eng_ccb.hpp" // Engine entry points #include "engine.h" #include "dpt_scsi.h" // DPT Engine classes #ifndef _DPT_SCO_MANAGER #include "core.hpp" #include "connect.hpp" #include "object.hpp" #include "device.hpp" #include "manager.hpp" #include "bridge.hpp" #include "hba.hpp" #include "driver.hpp" #endif // _DPT_SCO_MANAGER // SNI Debug Stuff #if defined (_SINIX) || defined (I_WANT_SNI_DEBUG) || defined (SNIDBG) || defined(_DPT_NETWARE) #include "debug.h" #endif // sinix #endif raidutils-0.0.6.orig/raideng/array.cpp0000664000175000000620000002726310044153333017601 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - ARRAY.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the baseArray_C //class. // //Author: Doug Anderson //Date: 6/29/93 // //Editors: Mark Salyzyn // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "array.hpp" #if (defined(__cplusplus)) extern "C" { #endif #if (defined(_DPT_ARC)) # include #else # include "mem.h" #endif #include "string.h" #if (defined(__cplusplus)) } #endif //Function - baseArray_C::baseArray_C() - start //=========================================================================== // //Description: // // This function is the constructor for the baseArray_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- baseArray_C::baseArray_C() { expandBy = objSize = objCount = totalObjs = 0; buff_P = (uCHAR *)NULL; } //baseArray_C::baseArray_C - end //Function - baseArray_C::setAlloc() - start //=========================================================================== // //Description: // // This function attempts to allocate the array buffer based on the //current array size variables. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT baseArray_C::setAlloc(uSHORT numObjs) { uSHORT retVal = 0; if ((numObjs > 0) && (objSize > 0) && (numObjs >= objCount)) { // Allocate a new buffer uCHAR *newBuff_P = new uCHAR[(numObjs+1)*objSize]; // If the new buffer was allocated... if (newBuff_P != (uCHAR *)NULL) { retVal = 1; // If an old buffer exists... if (buff_P != (uCHAR *)NULL) { // Copy the old buffer data to the new buffer memcpy(newBuff_P,buff_P,objCount*objSize); // Free the old buffer freeBuff(); } // Set the total # of objects allocated totalObjs = numObjs; // Set the array buffer pointer buff_P = newBuff_P; } } return (retVal); } //baseArray_C::setAlloc() - end //Function - baseArray_C::freeBuff() - start //=========================================================================== // //Description: // // This function frees the buffer allocated at buff_P. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void baseArray_C::freeBuff() { // If the buffer exists... if (buff_P != (uCHAR *)NULL) { // Free the buffer delete[] buff_P; buff_P = (uCHAR *)NULL; } } //baseArray_C::freeBuff() - end //Function - baseArray_C::addAt() - start //=========================================================================== // //Description: // // This function adds an object to the array at the specified offset. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT baseArray_C::addAt(void *newObj_P,uSHORT offset) { uSHORT retVal = 0; // If the offset is within bounds... if (offset <= objCount) { // If there is no space left... if ((objCount >= totalObjs) && (expandBy > 0)) { // Attempt to allocate space for "expandBy" more objects setAlloc(totalObjs+expandBy); // If more space was not allocated... if ((objCount >= totalObjs) && (expandBy > 1)) // Attempt to allocate space for 1 more object setAlloc(totalObjs+1); } // If there is space for another object... if (objCount < totalObjs) { retVal = 1; objCount++; // Shift all existing objects towards the end for (uSHORT i=objCount*objSize-1;i>=(offset+1)*objSize;i--) buff_P[i] = buff_P[i-objSize]; // Copy the new object to the front of the array memcpy(buff_P+(offset*objSize),newObj_P,objSize); } } return (retVal); } //baseArray_C::addAt() - end //Function - baseArray_C::remAt() - start //=========================================================================== // //Description: // // This function removes the object at the specified offset from //the array. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT baseArray_C::remAt(uSHORT offset) { uSHORT retVal = 0; // If the offset is within bounds... if (offset < objCount) { retVal = 1; uSHORT byteOffset = offset*objSize; // Shift all objects beyond offset memmove(buff_P+byteOffset,buff_P+byteOffset+objSize, (objCount-offset-1)*objSize); objCount--; } return (retVal); } //baseArray_C::remAt() - end //Function - baseArray_C::setObjSize() - start //=========================================================================== // //Description: // // This function sets the size of the objects stored in the array. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT baseArray_C::setObjSize(uSHORT desiredSize) { // If no space has been allocated... if (totalObjs==0) // Set the desired allocation size objSize = desiredSize; return (objSize); } //baseArray_C::setObjSize() - end //Function - baseArray_C::getObjAt() - start //=========================================================================== // //Description: // // This function returns the object stored at the specified offset. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT baseArray_C::getObjAt(void *obj_P,uSHORT offset) { uSHORT retVal = 0; // If the offset is within range... if (offset < objCount) { retVal = 1; // Return the object at the specified offset memcpy(obj_P,buff_P+offset*objSize,objSize); } return (retVal); } //baseArray_C::getObjAt() - end //Function - baseArray_C::reAlloc() - start //=========================================================================== // //Description: // // This function prepares the array for a fresh object buffer //allocation. After calling this function a new object size may //be specified prior to calling setAlloc(). // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void baseArray_C::reAlloc() { // Free the current object buffer freeBuff(); // Zero the object count objCount = // Zero the object allocation size totalObjs = 0; } //baseArray_C::reAlloc() - end //Function - baseArray_C::swap() - start //=========================================================================== // //Description: // // This function swaps two objects in the array. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT baseArray_C::swap(uSHORT offset1,uSHORT offset2) { uSHORT retVal = 0; // If both offsets are within range... if ((offset1 < objCount) && (offset2 < objCount)) { retVal = 1; // Copy object 1 to the swap space memcpy(buff_P+totalObjs*objSize,buff_P+offset1*objSize,objSize); // Copy object 2 to offset 1 memcpy(buff_P+offset1*objSize,buff_P+offset2*objSize,objSize); // Copy object 1 to offset 2 memcpy(buff_P+offset2*objSize,buff_P+totalObjs*objSize,objSize); } return (retVal); } //baseArray_C::swap() - end //Function - baseArray_C::moveTo() - start //=========================================================================== // //Description: // // This function moves the object at the specified offset to a //new offset. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT baseArray_C::moveTo(uSHORT objOffset,uSHORT newOffset) { uSHORT retVal = 0; // If both offsets are within range... if ((objOffset < objCount) && (newOffset < objCount)) { retVal = 1; if (objOffset!=newOffset) { // Copy the object to the swap space memcpy(buff_P+totalObjs*objSize,buff_P+objOffset*objSize,objSize); // Remove the object from its current location remAt(objOffset); // Add the object to the new location addAt(buff_P+totalObjs*objSize,newOffset); } } return (retVal); } //baseArray_C::moveTo() - end //Function - baseArray_C::~baseArray_C() - start //=========================================================================== // //Description: // // This function is the destructor for the baseArray_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- baseArray_C::~baseArray_C() { freeBuff(); } //baseArray_C::~baseArray_C - end raidutils-0.0.6.orig/raideng/array.hpp0000664000175000000620000001342610044153311017576 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __ARRAY_HPP #define __ARRAY_HPP //File - ARRAY.HPP //*************************************************************************** // //Description: // // This file contains the class definition for the base array class. //This class is capable of holding an array of objects of any type. The //objects held in any one array must all be the same size. The array //will dynamically grow as objects are added to the array. // //Author: Doug Anderson //Date: 10/6/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "osd_util.h" #include "eng_std.h" #if (defined(_DPT_ARC)) extern "C" { # include # include } #else # include "mem.h" #endif //Class - baseArray_C - start //=========================================================================== // //Description: // // This class defines an array class used to hold objects of a specified //size. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class baseArray_C { public: // Data............................................... // # objects to increase array size by when necessary #if (defined(MINIMAL_BUILD)) uCHAR expandBy; uCHAR objSize; // Object size (in bytes) #else uSHORT expandBy; uSHORT objSize; // Object size (in bytes) #endif uSHORT totalObjs; // Total # objects that can be held // in the array uSHORT objCount; // # objects currently in the array uCHAR *buff_P; // Object array buffer protected: // Array Management Functions......................... // Free the object buffer void freeBuff(); public: // Data............................................... // Constructor/Destructor............................. baseArray_C(); ~baseArray_C(); // Array Management Functions......................... // Add an object at the specified offset uSHORT addAt(void *,uSHORT); // Add an object to the front of the array uSHORT addFront(void *newObj_P) { return (addAt(newObj_P,0)); } // Add an object to the end of the array uSHORT addEnd(void *newObj_P) { return (addAt(newObj_P,objCount)); } // Remove the object at the specified offset from the array uSHORT remAt(uSHORT); // Remove all objects from the array void remAll() { objCount = 0; } // Swap the objects at the specified offsets uSHORT swap(uSHORT,uSHORT); // Move the object at the specified offset to another offset uSHORT moveTo(uSHORT,uSHORT); // Set Array Parameters............................... // Allocates space for the specified # of objects uSHORT setAlloc(uSHORT allocObjs); // Set the object size (in bytes) uSHORT setObjSize(uSHORT); // Optimize the allocation size (set to current # of objects) uSHORT optimizeAlloc() { return(setAlloc(objCount)); } // Prepares the array for new allocation parameters // (Frees the current object buffer) void reAlloc(); // Return Array Information........................... // Return the array buffer pointer uCHAR * getObjPtr() { return (buff_P); } // Get the object at the specified offset uSHORT getObjAt(void *,uSHORT); // Return the # of objects currently stored in the array uSHORT getNumObjs() { return (objCount); } // Get the maximum # of objects that can be stored in the array // without expanding the array uSHORT getMaxObjs() { return (totalObjs); } // Return the size of the array objects (in bytes) uSHORT getObjSize() { return (objSize); } }; //baseArray_C - end #endif raidutils-0.0.6.orig/raideng/bridge.hpp0000664000175000000620000001702710044153311017715 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __BRIDGE_HPP #define __BRIDGE_HPP //File - BRIDGE.HPP //*************************************************************************** // //Description: // // This file contains the class definitions for all the DPT bridge //controller classes. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Class - dptSCSIbcd_C::- start //=========================================================================== // //Description: // // This class defines a SCSI Bridge Controller Device (BCD). // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptSCSIbcd_C : public dptManager_C { protected: // Virtual Functions.................................. // Called prior to entering a device in the logical device list // - Sets the logical device's HBA pointer virtual DPT_RTN_T preEnterLog(dptCoreDev_C *); // Enter an absent object into the engine core virtual DPT_RTN_T enterAbs(dptSCSIobj_C *obj_P) { // Enter into the physical device list return (enterPhy(obj_P)); } // Other Functions.................................... // Gets the next available logical device address uSHORT getLogAddr(dptAddr_S &); public: // Constructor/Destructor............................. dptSCSIbcd_C(); // Virtual Functions.................................. // Return the size of this object's information structure virtual uLONG infoSize() { return (sizeof(dptBCDonlyInfo_S)); } // Enter an object into the BCDs' lists from an HBA virtual void enterFromHBA(dptDevice_C *dev_P) { // Enter into the logical device list enterLog(dev_P); } }; //dptSCSIbcd_C - end //Class - dptBCD_C - start //=========================================================================== // //Description: // // This class is the highest level DPT BCD class. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptBCD_C : public dptSCSIbcd_C { protected: // Virtual Functions.................................. // Called prior to entering a device in the physical device list virtual DPT_RTN_T preEnterPhy(dptCoreObj_C *obj_P) { // Logic is as though a logical device were // being added to the BCD return (preEnterLog((dptDevice_C *)obj_P)); } // Determine the level of an attached device // - For SCSI BCDs only, physical && logical devices appear // at the same level (since they are really the same device // just duplicated in both lists). virtual uSHORT getDevLevel(dptCoreDev_C *) { return (getLevel()); } public: // Virtual Functions.................................. // Return the size of this object's information structure virtual uLONG infoSize() { return (sizeof(dptBCDinfo_S)); } // Enter an object into the BCDs' lists from an HBA virtual void enterFromHBA(dptDevice_C *dev_P) { // Enter into the physical device list enterPhy(dev_P); } }; //dptBCD_C - end //Class - dptRAIDbcd_C - start //=========================================================================== // //Description: // // This class is the highest level DPT RAID BCD class. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptRAIDbcd_C : public dptSCSIbcd_C { // Virtual Functions.................................. // Send a pass thru command to the BCD to access a physical device DPT_RTN_T sendPassThru(engCCB_C *); // Other Functions.................................... // Sets up default RAID definitions void setDefRAID(); protected: // Data............................................... // Physical ID this controller appears on uCHAR phyID; // Logical LUN to access this controller (via pass thru...) uCHAR logLUN; // Board ID (ASCII) uCHAR boardID[5]; // Board revision (ASCII) uCHAR boardRevision[3]; // Board date of manufacture (ASCII) uCHAR boardDate[10]; // Firmware version and date uCHAR fwVerDate[6]; // Software version and date uCHAR swVerDate[6]; // Virtual Functions.................................. // Get the next available address for the specified RAID device virtual void getRAIDaddr(dptRAIDdev_C *); // Return object information in the specified output buffer virtual DPT_RTN_T rtnInfo(dptBuffer_S *); // Derive critical absent object information virtual void deriveAbsInfo(dptSCSIobj_C *obj_P) { // Get the next available SCSI address getNextAddr(phyList,obj_P->addr,0x6,1); } // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); // Finds this manager's physical objects virtual uSHORT findMyPhysicals(); // Finds this manager's logical objects virtual uSHORT findMyLogicals(); // Finds a component device virtual dptDevice_C * findComponent(dptAddr_S,uSHORT=0,uLONG=0, dptCoreList_C *list_P=NULL); // Other Functions.................................... // Get the NCR specific HW, FW, and SW information void getNCRinfo(); public: // Constructor/Destructor............................. dptRAIDbcd_C(); // Virtual Functions.................................. // Return the physical SCSI ID the manager resides on virtual uCHAR getMgrPhyID() { return (phyRange.getMaxAddr().id); } // Determines if this manager is capable of configuring RAID devices virtual uSHORT isRAIDcapable() { return (1); } // Adjust a CCB as necessary and pass it on to the next manager virtual DPT_RTN_T passCCB(engCCB_C *); // Performs initialization of a real object (SCSI Inquiry...) virtual void realInit(); }; //dptRAIDbcd_C - end #endif raidutils-0.0.6.orig/raideng/connect.cpp0000664000175000000620000003066010044153332020106 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - CONNECT.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptConnection_C //class. // //Author: Doug Anderson //Date: 4/7/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files #if !defined _DPT_UNIX && !defined _DPT_NETWARE && !defined _DPT_DOS extern "C" { void osdTargetOffline(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); } #else void osdTargetOffline(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); #endif // _DPT_UNIX //Function - dptConnection_C::newMgrZero() - start //=========================================================================== // //Description: // // This function allocates a new absent driver manager as manager zero. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptCoreMgr_C * dptConnection_C::newMgrZero() { // Create a SCSI driver dptManager_C *mgr_P = new dptDriver_C; // If an I/O method is supported... if ((mgr_P!=NULL) && (ioMethod!=DPT_IO_NONE)) // The driver is real mgr_P->status.flags |= FLG_STAT_REAL; return (mgr_P); } //dptConnection_C::newMgrZero() - end //Function - dptConnection_C::acquireCCB() - start //=========================================================================== // //Description: // // This function returns a pointer to an engine CCB. A pointer to the //first CCB not in use is returned. If all CCBs are in use, a new CCB is //created and added to the end of the CCB list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- engCCB_C * dptConnection_C::acquireCCB() { engCCB_C *ccb_P; uSHORT found = 0; // Get the first available CCB ccb_P = (engCCB_C *) ccbList.reset(); while ((ccb_P!=NULL) && !found) { // Check if the CCB is in use if (!ccb_P->isInUse()) { // Indicate that the CCB is in use ccb_P->setInUse(); // Indicate that an available CCB was found found = 1; } else // Get the next CCB ccb_P = (engCCB_C *) ccbList.next(); } if (!found) { #ifdef __DPT_ALLOC // Allocate a new CCB ccb_P = (engCCB_C *) osdAlloc(sizeof(engCCB_C)); #else // Allocate a new CCB ccb_P = new engCCB_C; #endif if (ccb_P!=NULL) { // Initialize the CCB ccb_P->init(); // Indicate that the CCB is in use ccb_P->setInUse(); // Add the new CCB to the end of the HBA's CCB list if (!ccbList.addEnd(ccb_P)) { #ifdef __DPT_ALLOC // Free the CCB osdFree(ccb_P); #else delete (ccb_P); #endif ccb_P = NULL; } } } // end if (!found) if (ccb_P!=NULL) // Re-initialize the CCB ccb_P->reInit(); return (ccb_P); } //dptConnection_C::acquireCCB() - end //Function - dptConnection_C::reserveEndOfDisks() - start //=========================================================================== // //Description: // // This function attempts to reserve space at the end of all non- //removeable DASD devices. This space is used by DPT to store //configuration information, downloaded FW code... // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function assumes that partition information has been obtained // //--------------------------------------------------------------------------- void dptConnection_C::reserveEndOfDisks() { uLONG spaceReserved; dptDevice_C *dev_P; DEBUG_BEGIN(1, dptConnection_C::reserveEndOfDisks()); dptObject_C *obj_P = (dptObject_C *) objectList.reset(); while (obj_P!=NULL) { if (obj_P->isDevice()) { dev_P = (dptDevice_C *) obj_P; // If a non-removeable HBA physical DASD device... if ((dev_P->getLevel()==2) && (dev_P->getObjType()==DPT_SCSI_DASD) && !dev_P->isComponent() && !dev_P->isRemoveable()) { // Determine how much space is currently reserved spaceReserved = dev_P->getMaxPhyLBA() - dev_P->getLastLBA(); #ifdef _SINIX_ADDON // SNI: To keep compatibility with other HBAs (Adaptec, Symbios ..) // we reserve only 1 block on normal SCSI disks. // More space is reserved on LSU creation. // See reserveTempSpace() and enableTempSpace(). if (spaceReserved != 1) { dev_P->reserveEndOfDisk(1); DEBUG(1, PRT_DADDR(dev_P) << " RESERVED: old=" << spaceReserved << " new=" << \ (int) (dev_P->getMaxPhyLBA() - dev_P->getLastLBA())); } // At this place osdGetLBA() is called only to get the "MP.." name. // The spaceReserved value of SDI is ignored here. - michiz. dptHBA_C *hba_P = obj_P->myHBA_P(); spaceReserved = 0; osdGetLBA(hba_P->getDrvrNum(), dev_P->getChan(), dev_P->getID(), &spaceReserved, dev_P->userBuff, (uLONG) dev_P->getMaxPhyLBA()); #else // If insufficient blocks have been reserved... if (spaceReserved < RESERVED_SPACE_DISK) { // Determine how much space is not used by a valid // partition. uLONG availableSpace = dev_P->getMaxPhyLBA() - dev_P->getLastPartBlk(); uSHORT spaceToReserve = 0; // If more space can be reserved... if (availableSpace > spaceReserved) { // Reserve up to RESERVED_SPACE_DISK blocks spaceToReserve = (availableSpace > RESERVED_SPACE_DISK) ? RESERVED_SPACE_DISK : (uSHORT) availableSpace; // Reserve the space dev_P->reserveEndOfDisk(spaceToReserve); } // tell the user how much space was reserved at the end of the disk for DPT stuff DEBUG(1, PRT_DADDR(dev_P) << " RESERVED: " << spaceToReserve); } #endif } } obj_P = (dptObject_C *) objectList.next(); } } //dptConnection_C::reserveEndOfDisks() - end //Function - dptConnection_C::zapPartitions() - start //=========================================================================== // //Description: // // This function destroys the partition table on all devices that //are flagged for partition table zapping. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptConnection_C::zapPartitions() { DPT_RTN_T retVal = MSG_RTN_COMPLETED; dptDevice_C *dev_P; dptObject_C *obj_P = (dptObject_C *) objectList.reset(); while (obj_P!=NULL) { // If this object is a device... if (obj_P->isDevice()) { dev_P = (dptDevice_C *) obj_P; // If the device is marked for partition zapping... if (dev_P->isPartitionMarked() && !dev_P->isComponent()) { // If a new SW array on a 4th Gen board... if ((dev_P->getRAIDtype()==0) && (dev_P->getLevel()==0) && !dev_P->myHBA_P()->isI2O()) // Clear the component device partitions dev_P->zapCompPartitions(); else // Clear the partition table sector dev_P->zapPartition(); } // Clear the partition table zap indicator dev_P->clrPartitionZap(); // Clear the new RAID-0 indicator dev_P->clrNewRAID0(); } obj_P = (dptObject_C *) objectList.next(); } return (retVal); } //dptConnection_C::zapPartitions() - end //Function - dptConnection_C::genMagicNum() - start //=========================================================================== // //Description: // This function generates a unique magic number and guarantees //that no other object in this connection has the same magic number. // //--------------------------------------------------------------------------- uLONG dptConnection_C::genMagicNum() { uINT duplicateFound; time_t curTime; uLONG newMagicNum = 0x12345678L; time(&curTime); srand(curTime); do { // Assume no duplicates until one is found duplicateFound = 0; // Create the magic number newMagicNum = rand() & 0x7fff; // Bit #31 reserved by F/W newMagicNum <<= 16; newMagicNum |= rand() & 0xffff; // Insure the new magic number is unique dptObject_C *obj_P = (dptObject_C *) objectList.reset(); while (obj_P) { if (newMagicNum == obj_P->getMagicNum()) { duplicateFound = 1; break; } obj_P = (dptObject_C *) objectList.next(); } } while (duplicateFound); return (newMagicNum); } //dptConnection_C::genMagicNum() - end //Function - dptConnection_C::setPrevOsVisibles() - start //=========================================================================== //Description: // This function sets all devices flagged as OS visible to previously //OS visible. //--------------------------------------------------------------------------- void dptConnection_C::setPrevOsVisibles() { dptDevice_C *dev_P; dptObject_C *obj_P = (dptObject_C *) objectList.reset(); while (obj_P!=NULL) { if (obj_P->isDevice()) { dev_P = (dptDevice_C *) obj_P; if (dev_P->isOsVisible()) { dev_P->clrOsVisible(); dev_P->setPrevOsVisible(); } else { dev_P->clrPrevOsVisible(); } } obj_P = (dptObject_C *) objectList.next(); } } //dptConnection_C::setPrevOsVisibles() - end //Function - dptConnection_C::lsuOffline() - start //=========================================================================== //Description: // This function sets all devices flagged as OS visible to previously //OS visible. //--------------------------------------------------------------------------- void dptConnection_C::lsuOffline() { dptDevice_C *dev_P; dptObject_C *obj_P = (dptObject_C *) objectList.reset(); while (obj_P!=NULL) { if (obj_P->isDevice()) { dev_P = (dptDevice_C *) obj_P; if (!dev_P->isOsVisible() && dev_P->isPrevOsVisible()) { // Prepare the LSU to go offline osdTargetOffline((uLONG)dev_P->myHBA_P()->getDrvrNum(), (uLONG)dev_P->getChan(), (uLONG)dev_P->getID(), (uLONG)dev_P->getLUN()); } } obj_P = (dptObject_C *) objectList.next(); } } //dptConnection_C::lsuOffline() - end //Function - dptConnection_C::~dptConnection_C() - start //=========================================================================== // //Description: // // This function is the destructor for the dptConnection_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptConnection_C::~dptConnection_C() { // If this connection is capable of I/O if (ioMethod!=DPT_IO_NONE) // Let the OS dependent layer know that the connection has // been removed osdDisconnected(ioMethod); #ifdef __DPT_ALLOC // Free all the CCBs engCCB_C *ccb_P = (engCCB_C *) ccbList.reset(); while (ccb_P!=NULL) { osdFree(ccb_P); ccb_P = (engCCB_C *) ccbList.next(); } #else ccbList.kill(); #endif } //dptConnection_C::~dptConnection_C() - end raidutils-0.0.6.orig/raideng/connect.hpp0000664000175000000620000002305510044153310020107 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __CONNECT_HPP #define __CONNECT_HPP //File - CONNECT.HPP //*************************************************************************** // //Description: // // This file contains class definitions for all the connection classes. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Class - dptCoreCon_C - start //=========================================================================== // //Description: // // This class defines an engine connection. Each time a connection //request is sent to the engine, an instance of this class is created. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptCoreCon_C : public dptCore_C { // Friends............................................ // Needs access to objectList friend class dptCoreMgr_C; // Needs access to suppressList friend class dptRAIDdrvr_C; // Message Handlers................................... // Attempts to delete the specified object from the engine DPT_RTN_T delMsgHandler(DPT_TAG_T); // Other Functions.................................... // Enters a device in the connection's suppressed devices list uSHORT enterSuppressed(dptCoreDev_C *); // Removes the specified object from the connection's lists void remFromCon(dptCoreObj_C *); // Removes the specified object from all core engine lists uSHORT remFromCore(dptCoreObj_C *); // Deletes unused missing objects void delMissing(); protected: // Data............................................... // The highest manager in the attachment chain dptCoreMgr_C *mgrZero_P; // A list of all objects associated with this connection dptCoreList_C objectList; // A list of all devices that have not bubbled up to manager // zero's logical device list dptCoreList_C suppressList; // Virtual Functions.................................. // Called prior to adding a device to the suppressed device list // - Can be used for sorting the suppressed device list virtual void preAddSuppress(dptCoreDev_C *) {} //PV // Allocates a new manager zero. // - This function should return NULL if a valid manager was // not created. virtual dptCoreMgr_C * newMgrZero() {return (NULL); } //PV public: // Constructor/Destructor............................. dptCoreCon_C(); ~dptCoreCon_C(); // Other Functions.................................... // Creates manager zero and performs related initialization such // as establishing an I/O link... uSHORT createMgrZero(); // Suppress the specified device to its origin uSHORT suppress(dptCoreDev_C *,uSHORT=1); // Attempt to unsuppress all devices void unSuppress(); // Handles message processing for this class DPT_RTN_T handleMessage(DPT_MSG_T, DPT_TAG_T, dptBuffer_S *, dptBuffer_S *, uLONG ); }; //dptCoreCon_C - end //Class - dptSCSIcon_C - start //=========================================================================== // //Description: // // This class defines a SCSI connection. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- //flags // 1=Partition table zapping is disabled const uSHORT FLG_CON_PART_ZAP_OFF = 0x0002; // 1=Software test code is enabled (Jeff Zeak's stuff) const uSHORT FLG_SW_TEST_CODE = 0x0004; class dptSCSIcon_C : public dptCoreCon_C { // Data............................................... // Miscellaneous flags - see bit definitions above uSHORT flags; // # bytes to return in the object ID information uSHORT idSize; // The # EISA/ISA slots supported uSHORT maxSlots; protected: // Data............................................... // Virtual Functions.................................. // Called prior to adding a device to the suppressed device list // - Can be used for sorting the suppressed device list virtual void preAddSuppress(dptCoreDev_C *); // Other Functions.................................... // Return the config. info for objects at the specified level DPT_RTN_T rtnConfigLevel(uSHORT,uSHORT,dptBuffer_S *); public: // Constructor/Destructor............................. dptSCSIcon_C::dptSCSIcon_C(); // Message Handlers................................... // Return the system configuration info to the specified buffer DPT_RTN_T rtnSysConfig(dptBuffer_S *); // Return object IDs based on specified object data DPT_RTN_T rtnIDfromData(dptBuffer_S *,dptBuffer_S *,uSHORT); // Return object IDs based on a specified object ASCII field DPT_RTN_T rtnIDfromASCII(dptBuffer_S *,dptBuffer_S *,uSHORT); // Return device IDs of all suppressed devices with no RAID parent DPT_RTN_T rtnHidden(dptBuffer_S *,uSHORT=0); // Return private data................................ // Return the # of ID bytes uSHORT getIDsize() { return (idSize); } // Return the maximum # of slots supported uSHORT getMaxSlots() { return (maxSlots); } // Boolean Functions.................................. // Determines if partition zapping is enabled uSHORT isPartZap() { return (!(flags & FLG_CON_PART_ZAP_OFF)); } // Enables partition zapping void setPartZap() { flags &= ~FLG_CON_PART_ZAP_OFF; } // Disables partition zapping void clrPartZap() { flags |= FLG_CON_PART_ZAP_OFF; } // Determines if software test code is enabled1 uSHORT isSwTestCode() { return (!(flags & FLG_SW_TEST_CODE)); } // Enables the software test code void setSwTestCode() { flags &= ~FLG_SW_TEST_CODE; } // Disables the software test code void clrSwTestCode() { flags |= FLG_SW_TEST_CODE; } // Other Functions.................................... // Checks for a duplicate DPT name uSHORT isDupName(uCHAR *,uSHORT); // Finds a manager when loading a configuration dptManager_C * findConfigMgr(uSHORT,dptAddr_S); }; //dptSCSIcon_C - end //Class - dptConnection_C - start //=========================================================================== // //Description: // // This class is the highest level DPT connection class. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptConnection_C : public dptSCSIcon_C { // Data............................................... // List of allocated CCBs for this connection dptCCBlist_C ccbList; protected: // Virtual Functions.................................. // Allocates a new manager zero. virtual dptCoreMgr_C * newMgrZero(); public: // Data............................................... // I/O method used by this connection uSHORT ioMethod; // Constructor/Destructor............................. ~dptConnection_C(); // Return private data................................ // Return the I/O method associated with this connection uSHORT getIOmethod() { return (ioMethod); } // Other Functions.................................... // Find the device with the specified magic # in the connections // engine object list (performs a "global" search) dptDevice_C * findMagicObject(uLONG inMagicNum) { return (::findMagicObject(objectList,inMagicNum,1)); } // Generate a unique magic number uLONG genMagicNum(); // Get a CCB to perform I/O engCCB_C * acquireCCB(); // Reserve space at the end of all non-removeable DASD devices void reserveEndOfDisks(); // Destroy block zero of all devices marked for partition table // zapping DPT_RTN_T zapPartitions(); // Flags all OS visible devices as previously OS visible void setPrevOsVisibles(); // Prepares an OS visible LSU to go offline void lsuOffline(); }; //dptConnection_C - end #endif raidutils-0.0.6.orig/raideng/core.cpp0000664000175000000620000000542210044153312017401 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - CORE.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptCore_C //class. // //Author: Doug Anderson //Date: 12/16/92 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" //Variables - Static -------------------------------------------------------- DPT_TAG_T dptCore_C::tagCntr = 0; uSHORT dptCore_C::classCnt = 0; //Prototypes - function ----------------------------------------------------- //Function - dptCore_C::dptCore_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptCore_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptCore_C::dptCore_C() { // Increment the class count classCnt++; // Assign the object's tag dptTag = ++tagCntr; } //dptCore_C::dptCore_C() - end raidutils-0.0.6.orig/raideng/core.hpp0000664000175000000620000000731610044153333017415 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __CORE_HPP #define __CORE_HPP //File - CORE.HPP //*************************************************************************** // //Description: // // This file contains the class definition for the most fundammental //DPT engine class dptCore_C. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Class - dptCore_C - start //=========================================================================== // //Description: // // This is the most fundamental class in the DPT class hiearchy. //All objects in the DPT engine should have this class as the //ultimate ancestor. // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. No error checking is performed on the tag counter. // If the tag counter were to wrap around to zero, // their could potentially be objects with the same tag # // which could result in the wrong object recieving an // event. This tag is not checked for wrap around // because it was originally implemented as a 32 bit counter // and the author assumed there would never be more than // 4 G objects created during the course of an application. // //--------------------------------------------------------------------------- class dptCore_C { // Friends............................................ // Needs access to the memAllocErr structure friend class dptCoreCon_C; // Data............................................... // Counter used to assign object tags static DPT_TAG_T tagCntr; // # of foundation objects in existence static uSHORT classCnt; // Unique # assigned to this object DPT_TAG_T dptTag; //protected: public: // Constructor/Destructor............................. dptCore_C(); virtual ~dptCore_C() { classCnt--; } // Return private data................................ // Return the object's tag - A unique number associated with this object DPT_TAG_T tag() { return (dptTag); } // Return the number of foundation objects in existence uSHORT numEngObjects() { return (classCnt); } }; //dptCore_C - end #endif raidutils-0.0.6.orig/raideng/core_ccb.cpp0000664000175000000620000003557310044153307020226 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - CORE_CCB.CPP //*************************************************************************** // //Description: // // This file contains function definitions for the coreCCB_C class. // //Author: Doug Anderson //Date: 4/8/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif //Function - coreCCB_C::coreCCB_C() - start //=========================================================================== //Description: // This function is the constructor for the coreCCB_C class. //--------------------------------------------------------------------------- coreCCB_C::coreCCB_C() : originList(0), scsiCDB_P(NULL), dataBuff_P(NULL), dataBuffSize(0), hba_P(NULL), logOffset(0) { } //coreCCB_C::coreCCB_C() - end //Function - coreCCB_C::init() - start //=========================================================================== // //Description: // // This function is performs a 1 time initialization of this CCB. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::init() { // Zero the DPT CCB data memset(this,0,sizeof(dptCCB_S)); // Set the easy access pointers scsiCDB_P = (uCHAR *) eataCP.scsiCDB; // Set the I/O data buffer pointer to the default buffer dataBuff_P = defData; dataBuffSize = DEFAULT_DATA_SIZE; // No HBA hba_P = NULL; // Default origin list originList = CCB_ORIG_PHY; // Clear the event logger offset logOffset = 0; // Clear the default data buffer clrData(); // Clear the request sense buffer clrReqSense(); } //coreCCB_C::init() - end //Function - coreCCB_C::target() - start //=========================================================================== // //Description: // // This function sets the CCB to target the specified SCSI object. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::target(dptObject_C *obj_P) { // Set the SCSI channel eataCP.devAddr = obj_P->getChan() << 5; // Set the SCSI ID eataCP.devAddr |= obj_P->getID() & 0x1f; // If the SCSI ID is greater than 31... if (obj_P->getID() > 0x1f) // Set the extended ID byte eataCP.extendedId = obj_P->getID(); // Set the SCSI LUN eataCP.message[0] &= 0xf8; eataCP.message[0] |= obj_P->getLUN() & 0x7; // Set the LUN field in the SCSI CDB scsiCDB_P[1] &= 0x1f; scsiCDB_P[1] |= obj_P->getLUN() << 5; // If the object is a device... if (obj_P->isDevice()) { // If this is a logical device... if (((dptDevice_C *)obj_P)->isLogical()) // Indicate logical device origin setLog(); else // Indicate physical device origin setPhy(); } else // Indicate manager origin setMgr(); // Set the CCB's HBA pointer hba_P = obj_P->myHBA_P(); // Set the HBA's driver reference number ctlrNum = hba_P->getDrvrNum(); } //coreCCB_C::target() - end //Function - coreCCB_C::target() - start //=========================================================================== // //Description: // // This function sets the CCB to target the specified SCSI address. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::target(dptAddr_S inAddr, dptHBA_C *inHBA_P, uSHORT inOrigin ) { // Set the SCSI channel eataCP.devAddr = inAddr.chan << 5; // Set the SCSI ID eataCP.devAddr |= inAddr.id & 0x1f; // If the SCSI ID is greater than 31... if (inAddr.id > 0x1f) // Set the extended ID byte eataCP.extendedId = inAddr.id; // Set the SCSI LUN eataCP.message[0] &= 0xf8; eataCP.message[0] |= inAddr.lun & 0x7; // Set the LUN field in the SCSI CDB scsiCDB_P[1] &= 0x1f; scsiCDB_P[1] |= inAddr.lun << 5; // If the object is a device... if (inOrigin==CCB_ORIG_LOG) // Indicate logical device origin setLog(); else if (inOrigin==CCB_ORIG_MGR) // Indicate manager origin setMgr(); else // Indicate physical device origin setPhy(); // Set the CCB's HBA pointer hba_P = inHBA_P; // Set the HBA's driver reference number ctlrNum = hba_P->getDrvrNum(); } //coreCCB_C::target() - end //Function - coreCCB_C::setLUN() - start //=========================================================================== // //Description: // // This function sets the SCSI LUN this CCB is to target. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::setLUN(uCHAR inLUN) { // Set the SCSI LUN in the SCSI message eataCP.message[0] &= 0xf8; eataCP.message[0] |= inLUN & 0x7; // Set the LUN in the SCSI CDB scsiCDB_P[1] |= inLUN << 5; } //coreCCB_C::setLUN() - end //Function - coreCCB_C::reInit() - start //=========================================================================== // //Description: // // This function re-initializes a CCB after it has been used. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::reInit() { // Initialize the EATA CP............................. // Note: The status packet address is handled by the OS specific HW layer uSHORT tempFlags = engFlags; // Zero the entire DPT CCB (minus engFlags) memset(this,0,sizeof(dptCCB_S)); engFlags = tempFlags; // Set disconnect & identify only eataCP.message[0] |= CP_DISCONNECT | CP_IDENTIFY; // Set auto-request sense only eataCP.flags |= CP_REQ_SENSE; // Set default I/O data length & buffer address eataCP.dataLength = DEFAULT_DATA_SIZE; eataCP.dataAddr = ptrToLong(defData); // Set up the default request sense buffer eataCP.reqSenseLen = DEFAULT_REQ_SENSE_SIZE; eataCP.reqSenseAddr = ptrToLong(defReqSense); // Set up virtual CP address eataCP.vCPaddr = ptrToLong(&eataCP); // Initialize the engine unique data.................. // Default = Not a RAID command clrRAIDcmd(); // Default = Not a logger command clrLoggerCmd(); // Initialize the origin list originList = CCB_ORIG_PHY; // Zero the event logger offset logOffset = 0; // Set the I/O data buffer pointer to the default buffer dataBuff_P = defData; dataBuffSize = DEFAULT_DATA_SIZE; // No HBA pointer hba_P = NULL; // Clear the no physical bit flag engFlags &= ~FLG_CCB_ENG_NO_PHYS; } //coreCCB_C::reInit() - end //Function - coreCCB_C::setPhysical() - start //=========================================================================== // //Description: // // This function sets the EATA physical bit and optionally sets //the physical bit in the SCSI CDB. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::setPhysical() { // Set the physical bit in the EATA command packet eataCP.physical |= 0x1; } //coreCCB_C::setPhysical() - end //Function - coreCCB_C::setInterpret() - start //=========================================================================== // //Description: // // This function sets the EATA interpret bit and optionally sets //the interpret bit in the SCSI CDB. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::setInterpret() { // Set the interpret bit in the EATA command packet eataCP.flags |= CP_INTERPRET; } //coreCCB_C::setInterpret() - end /* //Function - coreCCB_C::setCtlbits() - start //=========================================================================== // //Description: // // This function sets the physical and interpret bits in the SCSI //CDB control byte as specified. The SCSI opcode field is used to //find the size of the CDB. The control byte is assumed to be the //last byte in the CDB. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function requires that the SCSI opcode field is set to the // desired SCSI opcode. // //--------------------------------------------------------------------------- void coreCCB_C::setCtlBits(uCHAR ctlBits) { switch (scsiCDB_P[0]&0xf0) { // 6 byte CDBs - Group 0 case 0x00: case 0x10: scsiCDB_P[5] |= ctlBits; break; // 10 byte CDBs - Groups 1,2,3 case 0x20: case 0x30: case 0x40: case 0x50: case 0x60: // CDB size from NCR spec case 0x70: // CDB size from NCR spec scsiCDB_P[9] |= ctlBits; break; // 12 byte CDBs - Groups 4,5,6,7 case 0x80: // CDB size from NCR spec case 0x90: // CDB size from NCR spec case 0xa0: case 0xb0: case 0xc0: // CDB size from NCR spec case 0xd0: // CDB size from NCR spec case 0xe0: // CDB size from NCR spec case 0xf0: // CDB size from NCR spec scsiCDB_P[11] |= ctlBits; break; } // end switch() } //coreCCB_C_C::setCtlBits() - end */ //------------------------------------------ //Function - coreCCB_C::setNFW() - start //=========================================================================== // //Description: // // This function sets the EATA nested firmware bit. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::setNFW() { // Set the physical bit in the EATA command packet eataCP.nestedFW |= 0x1; } //coreCCB_C::setNFW() - end //Function - coreCCB_C::input() - start //=========================================================================== // //Description: // // This function sets the CCB's flags to indicate that data input //will be performed. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::input() { eataCP.flags |= CP_DATA_IN; eataCP.flags &= ~CP_DATA_OUT; } //coreCCB_C::input() - end //Function - coreCCB_C::output() - start //=========================================================================== // //Description: // // This function sets the CCB's flags to indicate that data output //will be performed. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::output() { eataCP.flags &= ~CP_DATA_IN; eataCP.flags |= CP_DATA_OUT; } //coreCCB_C::output() - end //Function - coreCCB_C::setDataBuff() - start //=========================================================================== // //Description: // // This function sets the CCB's flags to indicate that data output //will be performed. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::setDataBuff(uLONG inAddr,uLONG numBytes) { // Set the data buffer pointer dataBuff_P = (uCHAR *) longToPtr(inAddr); // Set the data buffer size dataBuffSize = numBytes; // Set the data address in the EATA CP eataCP.dataAddr = inAddr; // Set the transfer length in the EATA CP eataCP.dataLength = numBytes; // If everything else is already reversed... if (isReversed()) { reverseBytes(eataCP.dataAddr); reverseBytes(eataCP.dataLength); } } //coreCCB_C::setDataBuff() - end //Function - coreCCB_C::clrInterpret() - start //=========================================================================== // //Description: // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void coreCCB_C::clrInterpret() { eataCP.flags &= ~CP_INTERPRET; } //Function - coreCCB_C::isMultiInitiatorCmd() - start //=========================================================================== // //Description: is this command a multi initiator command // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR coreCCB_C::isMultiInitiatorCmd() { uCHAR rtnVal = FALSE; // read and write buffs if ((eataCP.scsiCDB[0] == 0x3b) || (eataCP.scsiCDB[0] == 0x3c)) rtnVal = TRUE; // mode sense - MI page if ((eataCP.scsiCDB[0] == 0x5a) && ((eataCP.scsiCDB[2] & 0x3f) == 0x2d)) rtnVal = TRUE; // mode select - MI page if ((eataCP.scsiCDB[0] == 0x55) && ((dataBuff_P[8] & 0x3f) == 0x2d)) rtnVal = TRUE; // log select - event page if ((eataCP.scsiCDB[0] == 0x4c) && ((dataBuff_P[0] & 0x3f) == 0x34)) rtnVal = TRUE; return rtnVal; } raidutils-0.0.6.orig/raideng/core_con.cpp0000664000175000000620000003241610044153310020241 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //*************************************************************************** // //Description: // // This file contains the function definitions for the dptCoreCon_C //class. // //Author: Doug Anderson //Date: 10/16/92 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" //Function - dptCoreCon_C::dptCoreCon_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptCoreCon_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptCoreCon_C::dptCoreCon_C() { mgrZero_P = NULL; } //dptCoreCon_C::dptCoreCon_C() - end //Function - dptCoreCon_C::enterSuppressed() - start //=========================================================================== // //Description: // // This function is called to enter an object in the connection's //suppressed devices list. // //Parameters: // //Return Value: // // 1 = The device was successfully flagged as suppressed. // 0 = The device could not be entered into the suppressList probably // due to a memory allocation error. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptCoreCon_C::enterSuppressed(dptCoreDev_C *dev_P) { uSHORT retVal = 1; // If the device is not already in the suppressed device list... if (!suppressList.exists(dev_P)) { retVal = 0; // Perform pre-suppression operations preAddSuppress(dev_P); // Attempt to add the device to the suppressed device list if (suppressList.add(dev_P)) { retVal = 1; // Flag the device as suppressed dev_P->coreFlags |= FLG_ENG_SUPPRESSED; } } return (retVal); } //dptCoreCon_C::enterSuppressed() - end //Function - dptCoreCon_C::suppress() - start //=========================================================================== // //Description: // // This function suppresses an object to its origin and enters it //in the suppressed device list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptCoreCon_C::suppress(dptCoreDev_C *dev_P,uSHORT desired) { uSHORT retVal = 0; // Add the specified device to the suppressed device list if (enterSuppressed(dev_P)) { retVal = 1; // If suppression is desired... if (desired) // Indicate that the device was deliberately suppressed dev_P->coreFlags |= FLG_ENG_SUP_DESIRED; // Remove from logical device lists if (dev_P->isLogical()) { if (dev_P->myMgr_P()->myMgr_P()!=NULL) // If logical, remove from all higher level managers dev_P->myMgr_P()->myMgr_P()->remLogical(dev_P); } else // If physical origin, remove from parent manager's logical // device list and all higher logical device lists. if (dev_P->myMgr_P() != NULL) dev_P->myMgr_P()->remLogical(dev_P); } return (retVal); } //dptCoreCon_C::suppress() - end //Function - dptCoreCon_C::unSuppress() - start //=========================================================================== // //Description: // // This function attempts to unsuppress all devices that weren't //intentionally suppressed. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptCoreCon_C::unSuppress() { dptCoreDev_C *dev_P = (dptCoreDev_C *) suppressList.reset(); while (dev_P!=NULL) { // Only attempt to unsuppress devices that were not // deliberately suppressed if (!(dev_P->isSupDesired())) { // Attempt to add the device to all logical device lists if (dev_P->myMgr_P()->bubble(dev_P)==1) { // Clear all suppression flags dev_P->coreFlags &= ~FLG_ENG_SUPPRESSED; dev_P->coreFlags &= ~FLG_ENG_SUP_DESIRED; // Remove the device from the suppressed list dev_P = (dptCoreDev_C *) suppressList.remove(); } else // Get the next device dev_P = (dptCoreDev_C *) suppressList.next(); } else // Get the next device dev_P = (dptCoreDev_C *) suppressList.next(); } } //dptCoreCon_C::unSuppress() - end //Function - dptCoreCon_C::createMgrZero() - start //=========================================================================== // //Description: // // This function creates and initializes the connections zero level //manager. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptCoreCon_C::createMgrZero() { // Allocate the new zero level manager mgrZero_P = newMgrZero(); if (mgrZero_P!=NULL) // Set the manager's connection mgrZero_P->conn_P = this; return (mgrZero_P!=NULL); } //dptCoreCon_C::createMgrZero() - end //Function - dptCoreCon_C::handleMessage() - start //=========================================================================== // //Description: // // This function processes messages for an engine connection. //If the event is not intercepted by the connection, it is //passed on to the appropriate connection object. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- #if (!defined(UNREFERENCED_PARAMETER)) # if defined(__UNIX__) # define UNREFERENCED_PARAMETER(x) # else # define UNREFERENCED_PARAMETER(x) (x) # endif #endif DPT_RTN_T dptCoreCon_C::handleMessage(DPT_MSG_T message, DPT_TAG_T tgtTag, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P, uLONG timeout ) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_INVALID_TGT_TAG; UNREFERENCED_PARAMETER(timeout); if (message == MSG_DELETE) // Attempt to delete the object from the engine retVal = delMsgHandler(tgtTag); else { // If targeted for object 0 or this connection... if ((tgtTag==0) || (tgtTag==tag())) // Event is for the zero level manager retVal = mgrZero_P->handleMessage(message,fromEng_P,toEng_P); else { // Get a pointer to the target object dptCoreObj_C *obj_P = (dptCoreObj_C *) objectList.getObject(tgtTag); if (obj_P!=NULL) // Pass the event on to the target object retVal = obj_P->handleMessage(message,fromEng_P,toEng_P); } } return(retVal); } //dptCoreCon_C::handleMessage() - end //Function - dptCoreCon_C::remFromCon() - start //=========================================================================== // //Description: // // This function removes the specified object from the connection's //lists. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptCoreCon_C::remFromCon(dptCoreObj_C *obj_P) { // Remove from the master object list objectList.remove(obj_P); // Remove from the suppressed device list suppressList.remove(obj_P); } //dptCoreCon_C::remFromCon() - end //Function - dptCoreCon_C::remFromCore() - start //=========================================================================== // //Description: // // This function removes the specified object from existence within //the core of the engine. Prior to removing the object the virtual //pre-delete function is called. The following action is taken based //upon the return status of the pre-delete function: // // 0 = Take no action // 1 = Remove from engine core and free from memory // 2 = Remove from engine core but do not free from memory // (The object must be maintained at a higher level) // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- uSHORT dptCoreCon_C::remFromCore(dptCoreObj_C *obj_P) { // Call the object's pre-delete handler uSHORT action = obj_P->preDelete(); if (action!=0) { // Remove the object from its manager obj_P->myMgr_P()->remFromMgr(obj_P); // Remove the object from the connection's lists remFromCon(obj_P); // Allow the manager to perform post delete operations obj_P->myMgr_P()->postDelete(obj_P); // If the object is to be deleted from memory... if (action==1) // Free the object from memory delete(obj_P); } return (action); } //dptCoreCon_C::remFromCore() - end //Function - dptCoreCon_C::delMsgHandler() - start //=========================================================================== // //Description: // // This function handles an external delete object message. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptCoreCon_C::delMsgHandler(DPT_TAG_T tgtTag) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_INVALID_TGT_TAG; // Get a pointer to the specified object dptCoreObj_C *obj_P = (dptCoreObj_C *) objectList.getObject(tgtTag); if (obj_P!=NULL) { if (remFromCore(obj_P)==0) retVal = MSG_RTN_FAILED | ERR_CANNOT_DELETE; else { retVal = MSG_RTN_COMPLETED; // Delete any missing objects that were freed by the deletion delMissing(); // Attempt to un-suppress any devices that may have been freed // by the removal unSuppress(); } } return (retVal); } //dptCoreCon_C::delMsgHandler() - end //Function - dptCoreCon_C::delMissing() - start //=========================================================================== // //Description: // // This function deletes any unused missing objects. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptCoreCon_C::delMissing() { uSHORT isMissingMgr = 0; // Delete all missing devices dptObject_C *obj_P = (dptObject_C *) objectList.reset(); while (obj_P!=NULL) { // If the object is missing... if (obj_P->isMissing()) { // If the object is a missing device... if (obj_P->isDevice()) // Attempt to delete the device remFromCore(obj_P); else isMissingMgr = 1; } // Get the next object obj_P = (dptObject_C *) objectList.next(); } if (isMissingMgr) { // Delete all missing managers obj_P = (dptObject_C *) objectList.reset(); while (obj_P!=NULL) { // If the object is a missing manager... if (obj_P->isManager() && obj_P->isMissing()) // Attempt to delete the manager remFromCore(obj_P); // Get the next object obj_P = (dptObject_C *) objectList.next(); } } } //dptCoreCon_C::delMissing() - end //Function - dptCoreCon_C::~dptCoreCon_C() - start //=========================================================================== // //Description: // // This function is the destructor for the dptCoreCon_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptCoreCon_C::~dptCoreCon_C() { // Delete manager zero if (mgrZero_P!=NULL) { // Delete all of manager zero's objects mgrZero_P->delAllObjects(); // Free from memory delete (mgrZero_P); } } //dptCoreCon_C::~dptCoreCon_C() - end raidutils-0.0.6.orig/raideng/core_dev.cpp0000664000175000000620000000760410044153310020241 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - CORE_DEV.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptCoreDev_C //class. // //Author: Doug Anderson //Date: 10/7/92 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" //Function - dptCoreDev_C::dptCoreDev_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptCoreDev_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptCoreDev_C::dptCoreDev_C() { // Clear all coreFlags coreFlags = 0; // Set the visible level to zero visibleLevel = 0; // Indicate that this object is a device setDevice(); } //dptCoreDev_C::dptCoreDev_C() - end //Function - dptCoreDev_C::supNotDesired() - start //=========================================================================== // //Description: // // This function removes the suppression desired status from this //device. The device will remain intentionally suppressed only if it //is a physical device attached to a non-bubbling manager. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptCoreDev_C::supNotDesired() { // If not a physical device attached to a non-bubbling manager... if (!(!myMgr_P()->isBubbler() && isPhysical())) // Clear the suppression desired flag coreFlags &= ~FLG_ENG_SUP_DESIRED; } //dptCoreDev_C::supNotDesired() - end //Function - dptCoreDev_C::getLevel() - start //=========================================================================== // //Description: // // This function returns the logical level of this device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptCoreDev_C::getLevel() { return (myMgr_P()->getDevLevel(this)); } //dptCoreDev_C::getLevel() - end raidutils-0.0.6.orig/raideng/core_fwd.hpp0000664000175000000620000000423010044153310020240 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __CORE_FWD_HPP #define __CORE_FWD_HPP //File - CORE_FWD.HPP //*************************************************************************** // //Description: // // This file contains forward references for the DPT engine core //classes. // //Author: Doug Anderson //Date: 3/9/93 // //Editors: // //Remarks: // // //*************************************************************************** //Forward References -------------------------------------------------------- class dptCore_C; class dptCoreEng_C; class dptCoreCon_C; class dptCoreObj_C; class dptCoreDev_C; class dptCoreMgr_C; #endif raidutils-0.0.6.orig/raideng/core_mgr.cpp0000664000175000000620000003136310044153310020247 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - CORE_MGR.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptCoreMgr_C //class. // //Author: Doug Anderson //Date: 10/14/92 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" //Function - dptCoreMgr_C::dptCoreMgr_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptCoreMgr_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptCoreMgr_C::dptCoreMgr_C() { // Clear all flags flags = 0; // Initialize this manager's level of operation level = 0; // Indicate that this object is a manager object setMgr(); } //dptCoreMgr_C::dptCoreMgr_C() - end //Function - dptCoreMgr_C::enterLog() - start //=========================================================================== // //Description: // // This function adds an object to this manager's logical devices list. // //Parameters: // //Return Value: // // 1 = The device was successfully entered into the engine core. // 0 = The device was not entered into the engine core and was deleted. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptCoreMgr_C::enterLog(dptCoreDev_C *inDev_P) { DPT_RTN_T retVal; uSHORT _status = 0; // Determine if it is OK to add this device if ((retVal = preEnterLog(inDev_P)) == MSG_RTN_COMPLETED) { // The device originates in a logical device list inDev_P->coreFlags |= FLG_ENG_LIST; // The object is attached to this manager. inDev_P->attachedTo_P = this; // Set the object's connection pointer inDev_P->conn_P = myConn_P(); // Add the object to the connection's master object list if (myConn_P()->objectList.addEnd(inDev_P)) { // Attempt to add the new device to this manager's logical device // list and all higher level managers' logical device lists _status = bubble(inDev_P); if (_status==2) // Call the handler for an incomplete bubble _status = myConn_P()->enterSuppressed(inDev_P); else if (_status==0) // Remove from the connection's master device list myConn_P()->objectList.remove(inDev_P); } // end if (objectList.addEnd()) if (_status==0) retVal = MSG_RTN_FAILED | ERR_MEM_ALLOC; } // end if (preEnterLog()) if (_status==0) // Call the handler for an invalid add to engine core notAddedToCore(inDev_P); return (retVal); } //dptCoreMgr_C::enterLog() - end //Function - dptCoreMgr_C::enterPhy() - start //=========================================================================== // //Description: // // This function adds an object to the physical device list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptCoreMgr_C::enterPhy(dptCoreObj_C *inObj_P) { DPT_RTN_T retVal; uSHORT _status = 0; dptCoreDev_C *dev_P; dptCoreMgr_C *mgr_P; // Determine if it is OK to enter this object if ((retVal = preEnterPhy(inObj_P))==MSG_RTN_COMPLETED) { retVal = MSG_RTN_FAILED | ERR_MEM_ALLOC; // Add the object to the connection's master object list if (myConn_P()->objectList.addEnd(inObj_P)) { if (preAddPhy(inObj_P)) { if (phyList.add(inObj_P)) { // The object is attached to this manager. inObj_P->attachedTo_P = this; // Set the object's connection pointer inObj_P->conn_P = myConn_P(); // If the object is a device... if (inObj_P->isDevice()) { // Cast the object as a device dev_P = (dptCoreDev_C *) inObj_P; // Set the object's highest visible level dev_P->visibleLevel = level + 1; // If this manager bubbles physical devices... if (isBubbler()) { // Bubble the object up the logical device chain _status = bubble(dev_P); if ((_status==2) || (_status==0)) // Enter in the connection's suppressed device list myConn_P()->enterSuppressed(dev_P); } // end if (isBubbler()) else { // Intentionally suppress the device myConn_P()->suppress(dev_P); } } // end if (isDevice()) else { // Cast the object as a manager mgr_P = (dptCoreMgr_C *) inObj_P; // Set the sub-manager's level mgr_P->level = level + 1; } // Call the post add physical handler postAddPhy(inObj_P); // The object was added to the engine core _status = 1; // Indicate success retVal = MSG_RTN_COMPLETED; } // end if (phyList.add()) } // end if (preAddPhy()) } // end if (objectList.addEnd()) } // end if (preEnterPhy()) if (_status==0) { // Remove from the connection's master device list myConn_P()->objectList.remove(inObj_P); // Call the handler for an invalid add to engine core notAddedToCore(inObj_P); } return (retVal); } //dptCoreMgr_C::enterPhy() - end //Function - dptCoreMgr_C::bubble() - start //=========================================================================== // //Description: // // This function attempts to add a device to the logical device list. //If the object is successfully added to this manager's logical device //list, the logical addition is passed to the next manager. // //Parameters: // //Return Value: // // 2 = The device was added to this manager's logical device list // but could not be added to a higher level manager's logical // device list (An incomplete bubble). // 1 = The device was added to or already existed in this manager's // logical device list and all higher level manager's logical // device lists. // 0 = The device could not be added to this manager's logical device // list. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptCoreMgr_C::bubble(dptCoreDev_C *inDev_P) { uSHORT retVal = 0; // Check if the device already exists if (logList.exists(inDev_P)) retVal = 1; else { // If the pre-add logical functions were performed OK... if (preAddLog(inDev_P)) { // Attempt to add the device to the logical device list if (logList.add(inDev_P)) { // Set the object's highest visible level inDev_P->visibleLevel = level; // Call the post enter logical handler postAddLog(inDev_P); retVal = 1; } } } if (retVal==1) { if (myMgr_P()!=NULL) { // Pass the addition up the attachment chain retVal = ((dptCoreMgr_C *)myMgr_P())->bubble(inDev_P); // If the next level failed, indicate an incomplete bubble if (retVal==0) retVal = 2; } } return (retVal); } //dptCoreMgr_C::bubble() - end //Function - dptCoreMgr_C::remLogical() - start //=========================================================================== // //Description: // // This function removes the specified device from this manager's //logical device list and passes the removal request up the attachment //chain. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptCoreMgr_C::remLogical(dptCoreDev_C *dev_P) { // Remove the device from this manager's logical device list logList.remove(dev_P); if (attachedTo_P!=NULL) // Pass the logical removal up the attachment chain attachedTo_P->remLogical(dev_P); } //dptCoreMgr_C::remLogical() - end //Function - dptCoreMgr_C::remFromMgr() - start //=========================================================================== // //Description: // // This function removes the specified object from this manager's lists. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptCoreMgr_C::remFromMgr(dptCoreObj_C *obj_P) { // If the object is a manager... if (obj_P->isManager()) // Delete all the manager's objects ((dptCoreMgr_C *)obj_P)->delAllObjects(); else // Remove from this manager's logical device list & all // higher level manager's logical device lists remLogical((dptCoreDev_C *)obj_P); // Remove the object from this manager's physical device list phyList.remove(obj_P); } //dptCoreMgr_C::remFromMgr() - end //Function - dptCoreMgr_C::delAllObjects() - start //=========================================================================== // //Description: // // This function deletes all objects attached directly to this manager. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptCoreMgr_C::delAllObjects() { dptCoreDev_C *dev_P; dptCoreObj_C *obj_P; // Delete all logical devices attached directly to this manager dev_P = (dptCoreDev_C *) logList.reset(); while (dev_P!=NULL) { if (dev_P->isMyObject(this) && dev_P->isLogical()) { // Remove the device from any higher level manager's log lists if (attachedTo_P!=NULL) // Pass the logical removal up the attachment chain attachedTo_P->remLogical(dev_P); // Remove the device from the connection's lists myConn_P()->remFromCon(dev_P); // Delete the device delete(dev_P); // Remove the device from this manager's logical device list dev_P = (dptCoreDev_C *) logList.remove(); } else // Get the next logical device dev_P = (dptCoreDev_C *) logList.next(); } // Delete all physical objects attached directly to this manager obj_P = (dptCoreObj_C *) phyList.reset(); while (obj_P!=NULL) { // If the object is a manager... if (obj_P->isManager()) // Delete all of the sub-manager's objects ((dptCoreMgr_C *)obj_P)->delAllObjects(); else // Remove from this manager's logical device list & all // higher level manager's logical device lists remLogical((dptCoreDev_C *)obj_P); // Remove the object from the connection's lists myConn_P()->remFromCon(obj_P); // Delete the object delete(obj_P); // Remove the object from this manager's physical object list obj_P = (dptCoreObj_C *) phyList.remove(); } } //dptCoreMgr_C::delAllObjects() - end //Function - dptCoreMgr_C::getDevLevel() - start //=========================================================================== // //Description: // // This function determines the logical level of the attached device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptCoreMgr_C::getDevLevel(dptCoreDev_C *dev_P) { uSHORT retVal = level; if (dev_P->isPhysical()) retVal++; return (retVal); } //dptCoreMgr_C::getDevLevel() - end raidutils-0.0.6.orig/raideng/core_obj.cpp0000664000175000000620000000623210044153333020236 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - CORE_OBJ.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptCoreObj_C //class. // //Author: Doug Anderson //Date: 10/22/92 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" //Function - dptCoreObj_C::dptCoreObj_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptCoreObj_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptCoreObj_C::dptCoreObj_C() { // Not associated with a connection conn_P = NULL; // Not attached to a manager attachedTo_P = NULL; // Clear all flags objFlags = 0; } //dptCoreObj_C::dptCoreObj_C() - end //Function - dptCoreObj_C::isMyObject() - start //=========================================================================== // //Description: // // This function determines if this object is attached to the //specified manager. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptCoreObj_C::isMyObject(dptCoreMgr_C *inMgr_P) { uSHORT retVal = 0; if (inMgr_P==attachedTo_P) retVal = 1; return (retVal); } //dptCoreObj_C::isMyObject() - end raidutils-0.0.6.orig/raideng/debug.cpp0000664000175000000620000000710510044153333017542 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "debug.h" #ifdef _SNI_MIPS #include #endif #if SNI_DEBUG != 0 int Debug::debugLevel = 10; Debug Debug::out; int Debug::count = 0; ofstream fst("/tmp/debug.log"); ostream *Debug::ost = &fst; #endif #ifdef SNI_DEBUG_TEST void test1(); main() { // debug output to "/tmp/foo.bar" instead of "/tmp/debug.log" //ofstream newFst("/tmp/foo.bar"); //DEBUG_SETOUTPUT(&newFst); // redirect debug output to cerr DEBUG_SETOUTPUT(cerr); DEBUG_SETLEVEL(5); //------------------------------------------------------------- cout << endl; cout << "before test1() Test1========================" << endl; test1(); cout << "after test1() Test1" << endl; // ==>output: // before test1() Test1======================== // // BEGIN 0: level1----------------- // otto=1234 localLevel=1 so eine Sahne // END 0: level1----------------- // after test1() Test1 //------------------------------------------------------------- DEBUG_OFF; cout << endl; cout << "before test1() Test2========================" << endl; test1(); cout << "after test1() Test2" << endl; // ==>output: // before test1() Test2======================== // after test1() Test2 //------------------------------------------------------------- DEBUG_ON; cout << endl; cout << "before test1() Test3========================" << endl; test1(); cout << "after test1() Test3" << endl; // ==>output: // before test1() Test3======================== // // BEGIN 0: level1----------------- // otto=1234 localLevel=1 so eine Sahne // otto=1234 localLevel=6 so eine Sahne // END 0: level1----------------- // after test1() Test3 } void test1() { DEBUG_BEGIN(1,test1); int kk = 11; int otto = 1234; const char str[] = "so eine Sahne"; DEBUG(1,"otto=" << otto << " localLevel=" << debug.GetLocalLevel() << " " << str); DEBUG(6,"otto=" << otto << " localLevel=" << debug.GetLocalLevel() << " " << str); } #endif // SNI_DEBUG_TEST raidutils-0.0.6.orig/raideng/debug.h0000664000175000000620000001437710046162262017223 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DEBUG_H #define __DEBUG_H #include "osd_defs.h" #ifndef _DPT_NETWARE #if HAVE_FSTREAM # include #else # if HAVE_FSTREAM_H # include # endif #endif #if HAVE_IOSTREAM # include #else # if HAVE_IOSTREAM_H # include # endif #endif #if HAVE_IOMANIP # include #else # if HAVE_IOMANIP_H # include # endif #endif #include #include #endif //#if defined(_DPT_ERGO) || defined (_DPT_NETWARE) || defined (_DPT_WIN_3X) || defined (_DPT_REAL) #define SNI_DEBUG 0 //#else //#define SNI_DEBUG 1 //#endif #if SNI_DEBUG == 0 # define DEBUG_ON # define DEBUG_OFF # define DEBUG_SETLEVEL(x) # define DEBUG_SETOUTPUT(x) # define DEBUG_BEGIN(lev,meth) # define DEBUG(l,x) # define DEBUG1(l,X) # define DEBUG2(l,X1,X2) # define DEBUG3(l,X1,X2,X3) #else //================================================================== #define DEBUG_ON Debug::SetDebugLevel(10) #define DEBUG_OFF Debug::SetDebugLevel(0) #define DEBUG_SETLEVEL(x) Debug::SetDebugLevel(x) #define DEBUG_SETOUTPUT(x) Debug::SetOutPut(x) #define DEBUG_BEGIN(level,meth) Debug debug(#meth,level) #define DEBUG(level,x) \ debug.SetLocalLevel(level); \ debug << dec \ << "<" << __FILE__ << ' ' << __LINE__ \ << "> " << x << endl #define DEBUG1(level,X) \ debug.SetLocalLevel(level); \ debug << dec \ << "<" << __FILE__ << ' ' << __LINE__ \ << "> "#X"=" << X << endl #define DEBUG2(level,X1,X2) \ debug.SetLocalLevel(level); \ debug << dec \ << "<" << __FILE__ << ' ' << __LINE__ \ << "> "#X1"=" << X1 << " "#X2"=" << X2 << endl #define DEBUG3(level,X1,X2,X3) \ debug.SetLocalLevel(level); \ debug << dec \ << "<" << __FILE__ << ' ' << __LINE__ \ << "> "#X1"=" << X1 \ << " "#X2"=" << X2 \ << " "#X3"=" << X3 << endl //================================================================== #define LSH(X) Debug &operator<<(X x) \ { if (level < Debug::debugLevel ) \ *Debug::ost << x; \ return *this; \ } typedef ostream &(*OMANI) (ostream &); typedef ios &(*SMANI) (ios &); typedef ios &(*SMANI) (ios &); class Debug { public: //---------------------------------------------------------------- Debug(const char *method=NULL, const int nl=0); ~Debug(void); LSH(int); LSH(unsigned int); LSH(short); LSH(unsigned short); LSH(long); LSH(unsigned long); LSH(float); LSH(double); LSH(char); LSH(unsigned char); LSH(void *); LSH(const char *); LSH(OMANI); LSH(SMANI); LSH(streambuf *); #if (!defined(_DPT_SOLARIS) && !defined(_DPT_OS2) && !defined(_DPT_BSDI) && !defined(_DPT_FREE_BSD) && !defined(_DPT_LINUX)) LSH(const SMANIP(int) &); LSH(const SMANIP(long) &); #endif ostream *operator ->() { return Debug::ost; }; operator void*() { return (void *)Debug::ost; }; int operator !() { return ! *Debug::ost; }; int GetLocalLevel (void) { return level; }; void SetLocalLevel (const int &nl) { level = nl; }; static void SetDebugLevel (const int &nl) ; static int GetDebugLevel (void) { return Debug::debugLevel; }; static void SetOutPut (ostream &post) { Debug::ost = &post; }; static void SetOutPut (ostream *post) { Debug::ost = post; }; private: //----------------------------------------------------------------- char method_[128]; int level; int printEnd; static int debugLevel; static ostream *ost; static Debug out; static int count; }; inline Debug::Debug(const char *meth, const int nl) : level(nl), printEnd(0) { if (meth != NULL) { sprintf(method_, "BEGIN %d: %s",count ,meth); if ( level < Debug::debugLevel) { printEnd = 1; Debug::out << dec << '\n' << method_ << "-----------------"; Debug::out << " global debug level = " << Debug::debugLevel; Debug::out << endl; } count++; } else method_[0] = '\0'; } inline Debug::~Debug(void) { if (method_[0] != '\0') { count--; memcpy(method_, "END ", 5); if ( printEnd ) { *Debug::ost << dec << method_ << "-----------------" << endl; } Debug::ost->flush(); } } inline void Debug::SetDebugLevel(const int &nl) { if (nl != Debug::debugLevel) { Debug::debugLevel = nl; #ifdef SNI_MIPS *Debug::ost << dec; *Debug::ost << "new global debug level = " << Debug::debugLevel; *Debug::ost << endl; #endif } } #endif #endif raidutils-0.0.6.orig/raideng/del1.cpp0000664000175000000620000000333510044153310017275 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ // Get the current pointer void *obj_P = cur(); if (obj_P!=NULL) { // destroy the DPT Object delete((DEL_TYPE *)obj_P); remove(); } // end if return (cur()); raidutils-0.0.6.orig/raideng/del2.cpp0000664000175000000620000000322610044153310017275 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ if (exists(obj_P)) // Destroy the object and remove it from the list del(); return (cur()); raidutils-0.0.6.orig/raideng/del_list.hpp0000664000175000000620000000351510044153332020260 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ protected: public: // Deletes the current object and removes it from the list void * del(); // Deletes the specified object and removes it from the list void * del(void *); // Deletes all objects in the list and all associated list elements void kill(); raidutils-0.0.6.orig/raideng/device.cpp0000664000175000000620000041225110175141261017717 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - DEVICE.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptDevice_C //class. // //Author: Doug Anderson //Date: 4/8/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" #if defined (_DPT_MACINTOSH) #include #include "SCSITypes.h" #endif #if !defined _DPT_UNIX && !defined _DPT_NETWARE && !defined _DPT_DOS extern "C" { uLONG osdTargetBusy(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); } #else uLONG osdTargetBusy(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); #endif // _DPT_UNIX const uINT I2O_LAP_SIZE = 4096; //Function - dptDevice_C::preDelete() - start //=========================================================================== // //Description: // // This function is called prior to deleting this object from the //engine. // //Parameters: // //Return Value: // // 0 = Take no action // 1 = Remove from engine core and free from memory // 2 = Remove from engine core but do not free from memory // (The object must be maintained at a higher level) // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptDevice_C::preDelete() { uSHORT retVal = 1; if (isComponent()) retVal = 0; else if (raidType!=0xffff) { dptDevice_C *comp_P = NULL; if (isReal()) { // Enter this device into the ex-real RAID list myMgr_P()->enterExRR(this); #ifdef _DPT_AIX if (getRAIDtype() == RAID_1) { uCHAR firstDrive = 1; // Flag the component devices for a partition zap (block zero) comp_P = (dptDevice_C *) compList.reset(); while (comp_P!=NULL) { if (!firstDrive) // Flag the device for a partition table zap comp_P->setPartitionZap(); firstDrive = 0; // Get the next component comp_P = (dptDevice_C *) compList.next(); } } #endif } // if (isReal()) // Flag the component devices for a partition zap (block zero) comp_P = (dptDevice_C *) compList.reset(); while (comp_P!=NULL) { // Clear the manual JBOD configured flag comp_P->scsiFlags2 &= ~FLG_DEV_MANUAL_JBOD_CONFIGURED; // Get the next component comp_P = (dptDevice_C *) compList.next(); } // Free this device's components freeComponents(); // This device no longer needs its component list // (Don't want components freed when this device is deleted) compList.flush(); retVal = 2; } return (retVal); } //dptDevice_C::preDelete() - end //Function - dptDevice_C::launchCCB() - start //=========================================================================== // //Description: // // This function is the starting point for sending a CCB to hardware. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::launchCCB(engCCB_C *ccb_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_ARTIFICIAL_IO; // Only send the CCB if this device is real and // The device cannot be failed and send a non-interpret command if (!isArtificial()) { // Target this device ccb_P->target(this); // Pass the CCB to this device's manager if ((retVal = myMgr_P()->passCCB(ccb_P)) == MSG_RTN_COMPLETED) // If the command completed with an error condition... if (!ccb_P->ok()) retVal = MSG_RTN_FAILED | ERR_SCSI_IO; } return (retVal); } //dptDevice_C::launchCCB() - end //Function - dptDevice_C::initRealLogical() - start //=========================================================================== // //Description: // // This function initializes a logical device utilizing a logical array //page (Set RAID type, build component list...) // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::initRealLogical() { // Indicate that this is a real device status.flags |= FLG_STAT_REAL; // Get the page code used by this device's manager uCHAR pageCode = (uCHAR) myMgr_P()->getLAPpage(); // If this device's manager supports a logical array page if (pageCode) { // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { char *buff_P = NULL; if (myHBA_P()->isI2O()) { buff_P = new char[I2O_LAP_SIZE]; if (buff_P != NULL) ccb_P->setDataBuff(ptrToLong(buff_P), I2O_LAP_SIZE); } if (pageCode == LAP_NCR1) // Initialize the CCB to do a mode sense page ccb_P->modeSense6(pageCode); else // Initialize the CCB to do a mode sense page ccb_P->modeSense(pageCode); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); // Send the CCB to hardware if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // Insure the proper mode page was returned if ((ccb_P->modeParam_P->getPageCode() & 0x3f)==pageCode) // Initialize the device from the logical array page data myMgr_P()->initRL(this,ccb_P); } // end if (launchCCB==MSG_RTN_COMPLETED) if (buff_P != NULL) delete[] buff_P; // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) } // end if (pageCode) } //dptDevice_C::initRealLogical() - end //Function - dptDevice_C::raidLAPcmd() - start //=========================================================================== // //Description: // // This function issues a logical array page command to hardware. // //Parameters: // //Return Value: // // 0 = // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This command can only be issued by logical devices. // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::raidLAPcmd(uCHAR action,uCHAR inFlags) { DPT_RTN_T retVal = MSG_RTN_IGNORED; dptDevice_C *dev_P; if (raidType!=RAID_NONE) { // If a redirectable command... if ((action == LAP_CMD_BUILD) || (action == LAP_CMD_REBUILD) || (action == LAP_CMD_VERIFY) || (action == LAP_CMD_VERIFY_FIX) || (action == LAP_CMD_VERIFY_ABORT) || (action == LAP_CMD_ABORT) || (action == LAP_CMD_MODIFY)) { // If not the top-level array on an I2O board... if (myHBA_P()->isI2O() && (parent.dev_P != NULL)) { dev_P = (dptDevice_C *) parent.dev_P; // Pass the command to the parent device return dev_P->raidLAPcmd(action, inFlags); } // If a driver level array on a non-I2O board... else if (!myHBA_P()->isI2O() && (getLevel() == 0)) { DPT_RTN_T tempRtn = MSG_RTN_COMPLETED; retVal = tempRtn; // Pass the command to each component device dev_P = (dptDevice_C *) compList.reset(); while (dev_P!=NULL) { tempRtn = dev_P->raidLAPcmd(action, inFlags); if (retVal == MSG_RTN_COMPLETED) retVal = tempRtn; dev_P = (dptDevice_C *) compList.next(); } return retVal; } } // If a rebuild command... if (action == LAP_CMD_REBUILD) { // Ensure proper component size retVal = checkRebuild(); } // If the HBA is operating in wolfpack cluster mode... if (myHBA_P()->isClusterMode()) { if (action == LAP_CMD_ADD) { // Attempt to SCSI reserve all component devices... dptDevice_C *comp_P = (dptDevice_C *) compList.reset(); while (comp_P) { retVal = comp_P->reserveDevice(); if (retVal != MSG_RTN_COMPLETED) { break; } comp_P = (dptDevice_C *) compList.next(); } } else { // Attempt to SCSI reserve this logical device retVal = reserveDevice(); } if (retVal == MSG_RTN_COMPLETED) { retVal = MSG_RTN_IGNORED; } else { retVal = ERR_RESERVATION_CONFLICT; } } // If no previous failures... if (retVal == MSG_RTN_IGNORED) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { char *buff_P = NULL; //If an I2O HBA... if (myHBA_P()->isI2O()) { buff_P = new char[I2O_LAP_SIZE]; if (buff_P != NULL) ccb_P->setDataBuff(ptrToLong(buff_P), I2O_LAP_SIZE); } if ((getLevel() >= 2) && (action == LAP_CMD_BUILD)) { // If this device's HBA supports the "interpret format"... if (myHBA_P()->isInterpretFormat()) retVal = doFormat(ccb_P,NULL,0x02,1); else retVal = doFormat(ccb_P,NULL,0x00,0); if (retVal == MSG_RTN_STARTED) retVal = MSG_RTN_COMPLETED; } // Build a logical array page select command else if (myMgr_P()->buildLAPselect(ccb_P,this,action,inFlags)) { // If deleting an array... if (action == LAP_CMD_DELETE) { // Get the latest status... updateLAPstatus(); // // *** Always do an action abort in case there is a diagnostic in // *** progress on a component device // // Send an abort action command ncrLAP1_S *mode_P = (ncrLAP1_S *) ccb_P->modeParam_P->getData(); mode_P->setStatus(LAP_CMD_ABORT); launchCCB(ccb_P); // Wait for the abort to complete time_t startTime,curTime; time(&startTime); do { // Get the latest status updateLAPstatus(); time(&curTime); // While not timed out and still performing the action... } while (((curTime - startTime) <= 15) && ((status.main == LAPM_REBUILD) || (status.main == LAPM_BUILD) || (status.main == LAPM_VERIFY) || (status.main == SMAIN_FW_DIAGNOSTIC))); // Send the original delete command mode_P->setStatus(LAP_CMD_DELETE); } // Send the CCB to hardware retVal = launchCCB(ccb_P); } else retVal = MSG_RTN_IGNORED; if (buff_P != NULL) delete[] buff_P; // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) } // (retVal == MSG_RTN_IGNORED) } // end if (raidType != RAID_NONE) return (retVal); } //dptDevice_C::raidLAPcmd() - end //Function - dptDevice_C::raidPAPcmd() - start //=========================================================================== // //Description: // // This function issues a physical array page command to hardware. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::raidPAPcmd(uCHAR action) { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (isReal()) { if (isLogical() || !myMgr_P()->isRAIDcapable()) { // If two manager's above is valid... if (myMgr_P()->myMgr_P()!=NULL) // Set the PAP using the second manager up the chain retVal = myMgr_P()->myMgr_P()->sendPAPcmd(this,action); } // If this is a physical HBA device... else { // Set the PAP using this device's manager retVal = myMgr_P()->sendPAPcmd(this,action); } // If this is a RAID component... if (parent.dev_P != NULL) { if (parent.dev_P->getRAIDtype() == RAID_HOT_SPARE) { ((dptDevice_C *)parent.dev_P)->updateStatus(1); // Adjust the Hot-Spare coverage myHBA_P()->updateHSprotection(); } else ((dptDevice_C *)parent.dev_P)->updateStatus(); } } return (retVal); } //dptDevice_C::raidPAPcmd() - end //Function - dptDevice_C::realInit() - start //=========================================================================== // //Description: // // This function initializes a real device. // //--------------------------------------------------------------------------- void dptDevice_C::realInit() { // Determine if the device is ready checkIfReady(); // Get the SCSI inquiry information engType = selfInquiry(); // Fix to make a segmented array with no LUN 0 look like a DASD device if (isLogical() && (engType == 0x1f)) { engType = 0; } // If the device is a physical device... // (Logical devices get their capacity from the RAID data if (!isLogical()) // Get the device's capacity getCapacity(); // Get the device's DPT name getDPTname(); // Get the device's transfer speed getXfrSpeed(); // Get the dual loop status getDualLoopInfo(); // Determine the drive's SMART status updateSmartStatus(); // Note: Emulation is checked after a logical device scan // Check for a reserve block and initialize dependent data initReserveBlockInfo(); // Set this device's diagnostic status updateDiagStatus(); } //dptDevice_C::realInit() - end //Function - dptDevice_C::checkForEmulation() - start //=========================================================================== // //Description: // // This function determines if this drive is being emulated. // //Parameters: // //Return Value: // // 1 = If there are no emulated drives associated with this HBA or // the emulated mode command is not supported by the HBA // 0 = Otherwise // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptDevice_C::checkForEmulation() { dptAddr_S emulAddr; dptEmulation_S *emul_P; uSHORT retVal = 0; uCHAR drive0cmos=1,drive1cmos=1; if ( (getObjType()==DPT_SCSI_DASD) && ((getLevel()==1) || (getLevel()==2)) ) { // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Get the system information osdGetSysInfo((sysInfo_S *)ccb_P->defData); // Get the CMOS drive entries drive0cmos = ccb_P->defData[0]; drive1cmos = ccb_P->defData[1]; // Initialize the CCB to do an emulated drive mode sense // Limit data buffer to 0x60 bytes ccb_P->modeSense(0x3d,0,0,0x60); // HBA should interpret this command ccb_P->setInterpret(); // Send the CCB to hardware DPT_RTN_T rtnStatus = launchCCB(ccb_P); if (rtnStatus == (MSG_RTN_FAILED | ERR_SCSI_IO)) // Only allow to fail 1 time retVal = 1; else if (rtnStatus == MSG_RTN_COMPLETED) { // Default = drive not emulated scsiFlags &= ~FLG_ENG_EMULATED; // Cast the return data as emulation data emul_P = (dptEmulation_S *) ccb_P->modeParam_P->getData(); // Reverse multi-byte data emul_P->swapCylinders(); // reverseBytes(emul_P->driveType); // Set HBA to this device's HBA emulAddr.hba = getHBA(); // Set to ID other than this device's SCSI ID emulAddr.id = getID() + 1; if ((emul_P->getStatus() & 0x03)==0) // Indicate that there are no emulated drives retVal = 1; else { // If this drive is emulated drive C: ... if (emul_P->getStatus() & 0x01) { scsiFlags &= ~FLG_ENG_EMU_01; emulAddr.chan = emul_P->getChanID0() >> 5; emulAddr.id = emul_P->getChanID0() & 0x1f; emulAddr.lun = emul_P->getLun0(); // If this drive is being emulated... if ((emulAddr==getAddr()) && (drive0cmos!=0) && (emul_P->getCylinders()!=0)) // Indicate that this drive is being emulated scsiFlags |= FLG_ENG_EMULATED; } // If this drive is emulated drive D: ... if ((emul_P->getStatus() & 0x2) && !isEmulated()) { scsiFlags |= FLG_ENG_EMU_01; emulAddr.chan = emul_P->getChanID1() >> 5; emulAddr.id = emul_P->getChanID1() & 0x1f; emulAddr.lun = emul_P->getLun1(); // If this drive is being emulated... if ((emulAddr==getAddr()) && (drive1cmos!=0) && (emul_P->getCylinders()!=0)) // Indicate that this drive is being emulated scsiFlags |= FLG_ENG_EMULATED; } // If this drive is being emulated... if (isEmulated()) { emulation.cylinders = emul_P->getCylinders(); emulation.heads = emul_P->getHeads(); emulation.sectors = emul_P->getSectors(); emulation.driveType = emul_P->getDriveType(); } } // end if (emul_P->status!=0) } // end if (status==MSG_RTN_COMPLETED) // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) } // end if (getObjType==DPT_SCSI_DASD...) return (retVal); } //dptDevice_C::checkForEmulation() - end //Function - dptDevice_C::setEmulation() - start //=========================================================================== // //Description: // // This function makes this device an emulated drive or removes //the emulation parameters from this drive. If the specified # of //cylinders is zero, this function removes this drive from being an //emulated drive. If the specified # of cylinders is not zero this //function makes this drive an emulated drive. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::setEmulation(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; uSHORT driveNum; engCCB_C *ccb_P; dptEmulation_S *emul_P; // If this device can be emulated or is alredy emulated... if (canEmulate() || isEmulated()) { retVal = MSG_RTN_DATA_UNDERFLOW; // Read the drive # (C: or D:) toEng_P->extract(driveNum); // Read the emulation parameters if (toEng_P->extract(&emulation,dptEmuParam_size)) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; ccb_P = getCCB(); if (ccb_P!=NULL) { // Zero the data buffer ccb_P->clrData(); // The HBA should interpret this command ccb_P->setInterpret(); // Initialize the CCB to do an emulation mode select ccb_P->modeSelect(0x3d,0x10+2); emul_P = (dptEmulation_S *) ccb_P->modeParam_P->getData(); // Set the emulation parameters emul_P->setCylinders(emulation.cylinders); emul_P->setHeads(emulation.heads); emul_P->setSectors(emulation.sectors); emul_P->setDriveType(emulation.driveType); // If this drive is to be emulated... if (emulation.cylinders!=0) emul_P->setStatus(emul_P->getStatus() | 0x10); // If emulation is to be removed... else if (scsiFlags & FLG_ENG_EMU_01) driveNum = 1; else driveNum = 0; // If drive C: ... if (driveNum==0) emul_P->setStatus(emul_P->getStatus() | 0x01); else emul_P->setStatus(emul_P->getStatus() | 0x02); // Reverse multi-byte data emul_P->swapCylinders(); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); // Set the emulation status checkForEmulation(); } } } return (retVal); } //dptDevice_C::setEmulation() - end //Function - dptDevice_C::canEmulate() - start //=========================================================================== // //Description: // // This function determines if this device can be an emulated drive. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptDevice_C::canEmulate() { uSHORT retVal = 0; // Determine if this device is capable of being emulated if ( !isComponent() && ((getLevel()==1) || (getLevel()==2)) && (getObjType()==DPT_SCSI_DASD) ) // Determine if the HBA can emulate a WD1003 if ( (myHBA_P()->getIRQnum()==14) && (myHBA_P()->isEdge()) && myHBA_P()->isPrimary() ) retVal = 1; return (retVal); } //dptDevice_C::canEmulate() - end //Function - dptDevice_C::checkIfCompsReady() - start //=========================================================================== //Description: // This function issues a test unit ready command to all underlying //physical components and sets the logical device's ready status //based on the component statuses. //--------------------------------------------------------------------------- void dptDevice_C::checkIfCompsReady() { clrResConflict(); // clear the reservation conflict bit status.flags &= ~FLG_STAT_READY; // clear the ready bit scsiFlags3 &= ~FLG_DEV_SPUN_DOWN; // clear the spun down bit dptDevice_C *comp_P = (dptDevice_C *) compList.reset(); // If no components... if (!comp_P) { checkIfReady(); // issue an actual test unit ready command } while (comp_P) { comp_P->checkIfCompsReady(); if (comp_P->isResConflict()) { setResConflict(); // set the reservation conflict bit } if (comp_P->isReady()) { status.flags |= FLG_STAT_READY; // set the ready bit } if (comp_P->scsiFlags3 & FLG_DEV_SPUN_DOWN) { scsiFlags3 |= FLG_DEV_SPUN_DOWN; // set the spun bit } comp_P = (dptDevice_C *) compList.next(); } } //dptDevice_C::checkIfCompsReady() - end //Function - dptDevice_C::checkIfReady() - start //=========================================================================== // //Description: // // This function issues test unit ready command to determine if the //device is ready. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::checkIfReady() { uSHORT repeatCnt = 2; uSHORT ready = 0; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { clrResConflict(); // clear the reservation conflict flag // Initialize the CCB to do a test unit ready ccb_P->testUnitReady(); while (!ready && repeatCnt--) { // Issue a Test Unit Ready command // (This will clear a unit attention) if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { ready = 1; scsiFlags3 &= ~FLG_DEV_SPUN_DOWN; // clear the spun down flag } // If the drive is spun down... else if ((ccb_P->scsiStatus == 2) && (ccb_P->defReqSense[12] == 0x04) && (ccb_P->defReqSense[13] = 0x02)) { scsiFlags3 |= FLG_DEV_SPUN_DOWN; // set the spun down flag } // If a reservation conflict... else if (ccb_P->scsiStatus == 0x18) { setResConflict(); // set the reservation conflict flag } } // Free the CCB ccb_P->clrInUse(); if (ready) { // Set the ready bit status.flags |= FLG_STAT_READY; } else { // Clear the ready bit status.flags &= ~FLG_STAT_READY; } } // end if (ccb_P!=NULL) } //dptDevice_C::checkIfReady() - end //Function - dptDevice_C::resetSCSI() - start //=========================================================================== // //Description: // // This function issues test unit ready and sets the EATA SCSI reset //bit to reset the SCSI bus. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::resetSCSI() { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to do a test unit ready ccb_P->testUnitReady(); // Set the SCSI reset bit ccb_P->eataCP.flags |= CP_SCSI_RESET; // Issue a Test Unit Ready command w/ SCSI reset retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) return (retVal); } //dptDevice_C::resetSCSI() - end //Function - dptDevice_C::getCapacity() - start //=========================================================================== // //Description: // // This function attempts to get the capacity of a device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::getCapacity() { sdRdCapacity_S *cap_P; // Initialize the capacity to zero capacity.maxPhysLBA = 0; capacity.maxLBA = 0; capacity.blockSize = 0; clrBlkSzNoChange(); // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { if ((getObjType()==DPT_SCSI_DASD) || (getObjType()==DPT_SCSI_CD_ROM) || (getObjType()==DPT_SCSI_WORM) || (getObjType()==DPT_SCSI_OPTICAL)) { // Initialize the CCB to do a read capacity ccb_P->readCapacity(); // Issue the read capacity command if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { cap_P = (sdRdCapacity_S *) ccb_P->defData; // Get into proper format cap_P->swapMaxLBA(); cap_P->swapBlockSize(); // Set the maximum physical capacity capacity.maxPhysLBA = cap_P->getMaxLBA(); // Set the maximum logical block address (LBA) capacity.maxLBA = cap_P->getMaxLBA(); if (getLevel()==2) { capacity.maxLBA = getLastUserBlk(); } // Set the block size capacity.blockSize = cap_P->getBlockSize(); phyBlockSize = (uSHORT) cap_P->getBlockSize(); } else { // Try to determine if the device is formatting setFmtStatus(getRequestSense(ccb_P)); } } // end if (devType==DASD) // If an HBA physical DASD device... if ((getObjType()==DPT_SCSI_DASD) && (getLevel()==2)) { // Indicates that this device cannot change its block size setBlkSzNoChange(); ccb_P->reInit(); // Get the format device page ccb_P->modeSense6(0x03); if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) { // Set the physical block size phyBlockSize = *(uSHORT *)(ccb_P->modeParam_P->getData()+10); reverseBytes(phyBlockSize); // If the format parameters are savable... if (ccb_P->modeParam_P->getPageCode() & 0x80) // Indicate that the block size may be changed clrBlkSzNoChange(); } } // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) // Determine if this device is protected by DPT's ECC algorithm if ((phyBlockSize == 528) && (capacity.blockSize == 512) && (myHBA_P()->isECCenabled())) setECCprotected(); else clrECCprotected(); } //dptDevice_C::getCapacity() - end //Function - dptDevice_C::getXfrSpeed() - start //=========================================================================== // //Description: // // This function determines the negotiated SCSI transfer speed for //this device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::getXfrSpeed() { if (getLevel()==2) { // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // perform 2 test unit readies so that the FW negotiates // width and synch. These values are dynamic in the FW for (int x = 0; x < 2; x++) { ccb_P->target(this); ccb_P->testUnitReady(); launchCCB(ccb_P); ccb_P->reInit(); } // Initialize the CCB to do a log sense page 0x33 // Limit data buffer to 0xff bytes ccb_P->logSense(0x33,0,0xff); // Set the interpret bit ccb_P->setInterpret(); // Send the CCB to hardware if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { ccb_P->initLogSense(); // Find parameter #5 if (ccb_P->log.find(0x5)!=NULL) { // Get the SCSI offset scsiOffset = ccb_P->log.data_P()[0]; // Get the SCSI chip clock speed xfrSpeed = ccb_P->log.data_P()[2]; xfrSpeed <<= 8; xfrSpeed |= ccb_P->log.data_P()[3]; // If synchronous, get the negotiated xfr speed if (scsiOffset && ccb_P->log.data_P()[1]) xfrSpeed /= ccb_P->log.data_P()[1]; // If wide transfers were negotiated... if (ccb_P->log.flags() & 0x40) // Double the negotiated transfer speed xfrSpeed <<= 1; } } // end if (launchCCB()==MSG_RTN_COMPLETED) if (myHBA_P()->isUDMA()) { udmaModeSupported = 0; udmaModeSelected = 0; ccb_P->reInit(); // Initialize the CCB to do a log sense page 0x39 // Limit data buffer to 0xff bytes ccb_P->logSense(0x39,0,0xff); // Set the interpret bit ccb_P->setInterpret(); // Send the CCB to hardware if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { ccb_P->initLogSense(); // Find parameter 0x01 if (ccb_P->log.find(0x01)!=NULL) { uCHAR tempMode = ccb_P->log.data_P()[180]; tempMode >>= 1; while (tempMode) { udmaModeSupported++; tempMode >>= 1; } tempMode = ccb_P->log.data_P()[181]; tempMode >>= 1; while (tempMode) { udmaModeSelected++; tempMode >>= 1; } } } } // Free the CCB ccb_P->clrInUse(); } // end if (ccb_!=NULL) } } //dptDevice_C::getXfrSpeed() - end //Function - dptDevice_C::getDualLoopInfo() - start //=========================================================================== //Description: // This function gets the dual loop status of the device. //--------------------------------------------------------------------------- void dptDevice_C::getDualLoopInfo() { if (getLevel()==2) { // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to do a log sense page 0x33 // Limit data buffer to 0xff bytes ccb_P->logSense(0x33,0,0xff); // Set the interpret bit ccb_P->setInterpret(); // Send the CCB to hardware if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { ccb_P->initLogSense(); // Find parameter 0x11 if (ccb_P->log.find(0x11)!=NULL) { scsiFlags3 &= ~0xff; scsiFlags3 |= FLG_DEV_SPEED_VALID; scsiFlags3 |= ccb_P->log.data_P()[0]; p2Flags = ccb_P->log.data_P()[3]; uLONG tempSpeed = getU4(ccb_P->log.data_P(), 4); #ifndef _DPT_BIG_ENDIAN osdSwap4(&tempSpeed); #endif busSpeed = (uSHORT)(tempSpeed / 1000000L); } } // end if (launchCCB()==MSG_RTN_COMPLETED) // Free the CCB ccb_P->clrInUse(); } // end if (ccb_!=NULL) } } //dptDevice_C::getDualLoopInfo() - end //Function - dptDevice_C::checkForPartition() - start //=========================================================================== // //Description: // // This function checks for a valid partition table on this drive. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::checkForPartition() { uLONG lastBlock = 0; uSHORT i = 0; // Clear the partition table flags scsiFlags &= ~FLG_ENG_PTABLE; scsiFlags &= ~FLG_ENG_PTBL_OVERRUN; // Clear the last partition block used lastPartitionBlk = 0; // If this is a drive... if ((getObjType()==DPT_SCSI_DASD) && !isFailed()) { // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to perform a read operation of sector 0 ccb_P->read(0L,1,512,ptrToLong(ccb_P->dataBuff_P)); #if defined (_DPT_MACINTOSH) if(launchCCB(ccb_P)==MSG_RTN_COMPLETED) { Block0 *blk0 = (Block0 *) ccb_P->dataBuff_P; // make sure block 0 is valid if(blk0->sbSig == sbSIGWord) { // Initialize the CCB to perform a read operation of sector 1 ccb_P->read(1L,1,512,ptrToLong(ccb_P->dataBuff_P)); // Read the first partition map block if(launchCCB(ccb_P)==MSG_RTN_COMPLETED) { Partition *prtn = (Partition *)ccb_P->dataBuff_P; // remember how many partition block there are unsigned long pmMapBlkCnt = prtn->pmMapBlkCnt; for(unsigned long i = 0; i < pmMapBlkCnt; i++) { // read a partition map entry ccb_P->read((unsigned long)i+1,1,512,ptrToLong(ccb_P->dataBuff_P)); if(launchCCB(ccb_P)==MSG_RTN_COMPLETED) { prtn = (Partition *)ccb_P->dataBuff_P; // make sure the partition block is valid if(prtn->pmSig == pMapSIG || prtn->pmSig == pdSigWord) { // Indicate that a valid partition table was found scsiFlags |= FLG_ENG_PTABLE; // figure out where the partition ends lastBlock = prtn->pmPyPartStart + prtn->pmPartBlkCnt; if(lastBlock > lastPartitionBlk) { lastPartitionBlk = lastBlock; if (lastPartitionBlk > getMaxPhyLBA()) { lastPartitionBlk = getMaxPhyLBA(); scsiFlags |= FLG_ENG_PTBL_OVERRUN; } } } } } } } } #else if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // If a standard FDISK partition if ((ccb_P->dataBuff_P[510] == 0x55) && (ccb_P->dataBuff_P[511] == 0xaa)) { partition_S *part_P = NULL; sectorZero_S *zero_P = (sectorZero_S *) ccb_P->dataBuff_P; // Indicate that a valid partition table was found scsiFlags |= FLG_ENG_PTABLE; // Check all four partition structures for for (i=0;i<=3;i++) { part_P = &zero_P->partition[i]; // If this is a valid partition... if (part_P->opSys && part_P->numSectors) { // Calculate the last block in the partition lastBlock = part_P->precedeSectors + part_P->numSectors - 1; if (lastBlock > lastPartitionBlk) { lastPartitionBlk = lastBlock; if (lastPartitionBlk > getMaxPhyLBA()) { lastPartitionBlk = getMaxPhyLBA(); scsiFlags |= FLG_ENG_PTBL_OVERRUN; } } } } } // If a Solaris partition was detected else if ((ccb_P->dataBuff_P[508] == 0xda) && (ccb_P->dataBuff_P[509] == 0xbe)) { // Indicate that a valid partition table was found scsiFlags |= FLG_ENG_PTABLE; // Indicate that a Solaris partition was found setSolarisPartition(); // Assume we can only grab RESERVED_SPACE_SUN blocks //lastPartitionBlk = getMaxPhyLBA() - RESERVED_SPACE_SOLARIS; } } #endif // Free the CCB ccb_P->clrInUse(); } } } //dptDevice_C::checkForPartition() - end /* //Function - dptDevice_C::dsplyPartInfo() - start //=========================================================================== // //Description: // // This function displays partition table information. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::dsplyPartInfo(sectorZero_S *zero_P) { extern void cout1024(float,int=0); partition_S *part_P; uSHORT i; float floatCap; // Display drive information cout << "Partition table detected: "; // Display the vendor ID cout << setw(8) << descr.vendorID; cout << setw(16) << descr.productID; cout << ", HBA=" << (uSHORT)getHBA(); cout << ", Chan=" << (uSHORT)getChan(); cout << ", ID=" << dec << (uSHORT) getID(); cout << ", LUN=" << dec << (uSHORT) getLUN(); cout << endl; // Display the capacity cout << "Disk Capacity: "; cout.setf(ios::right,ios::adjustfield); cout.width(5); if (capacity.maxLBA!=0) { floatCap = ((float)capacity.maxLBA+1) * capacity.blockSize; cout1024(floatCap); cout << ' '; } else cout << "N/" << setw(2) << "A "; cout << ", " << hex << setw(8) << capacity.maxLBA << "h blocks" << endl; // Indicate that a valid partition table was found scsiFlags |= FLG_ENG_PTABLE; // Check all four partition structures for for (i=0;i<=3;i++) { part_P = &zero_P->partition[i]; // If this is a valid partition... if (part_P->opSys && part_P->numSectors) { cout << " Partition #" << dec << i << ": OS = "; cout.width(14); cout.setf(ios::left,ios::adjustfield); switch (part_P->opSys) { case 0x00: cout << "Unknown"; break; case 0x01: cout << "DOS - 12 bit"; break; case 0x04: cout << "DOS - 16 bit"; break; case 0x05: cout << "DOS - Extend"; break; case 0x06: cout << "DOS 5.0"; break; case 0x63: cout << "UNIX"; break; case 0x64: cout << "Novell"; break; case 0x65: cout << "Novell"; break; case 0x75: cout << "PCIX"; break; case 0xdb: cout << "CP/M"; break; case 0xff: cout << "BBT"; break; default: cout.setf(ios::right,ios::adjustfield); cout.width(4); cout << hex << (uSHORT) part_P->opSys << 'h'; cout << " *** Record Code # and Operating System ***"; cout << "\a\a"; break; } cout << endl; // If the partition table includes the last LBA... // if (lastPartitionBlk>=capacity.maxPhysLBA) // Indicate that the reserve block may be in danger // scsiFlags |= FLG_ENG_PTBL_OVERRUN; cout.setf(ios::right,ios::adjustfield); cout << " Start Block = " << setw(8) << hex << part_P->precedeSectors << "h, ("; floatCap = ((float)part_P->precedeSectors) * capacity.blockSize; cout1024(floatCap); cout << " bytes)" << endl; cout << " End Block = " << setw(8) << hex << part_P->precedeSectors + part_P->numSectors - 1 << "h, ("; floatCap = ((float)part_P->precedeSectors + part_P->numSectors - 1) * capacity.blockSize; cout1024(floatCap); cout << " bytes)" << endl; cout << " Total Blocks = " << setw(8) << hex << part_P->numSectors << "h, ("; floatCap = ((float)part_P->numSectors) * capacity.blockSize; cout1024(floatCap); cout << " bytes)"; cout << " <<< Press any key >>>"; getch(); cout << endl; } } cout << endl; } //dptDevice_C::dsplyPartInfo() - end */ //Function - dptDevice_C::readReserveBlock() - start //=========================================================================== // //Description: // // This function reads the reserve block associated with this device. //If a valid reserve block is found, a pointer to the CCB with the //reserve block data is returned. If a valid reserve block is not //found a NULL pointer is returned. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function assumes the device capacity has already been // obtained. // // 2. It is the responsibility of the calling routine to insure // that the CCB gets freed. // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::readReserveBlock(engCCB_C *ccb_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; // If this is a non-removeable FW physical DASD device... if ((getObjType()==DPT_SCSI_DASD) && (getLevel()==2) && !isRemoveable() && (capacity.maxPhysLBA>0)) { // Initialize the CCB to perform a read operation ccb_P->read(capacity.maxPhysLBA,1,512,ptrToLong(ccb_P->dataBuff_P)); retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) { // If the reserve block ID does not exist... if (getU4(ccb_P->dataBuff_P,0)!=FW_RB_INDICATOR) retVal = MSG_RTN_FAILED | ERR_RESERVE_BLK_SIG; } } return (retVal); } //dptDevice_C::readReserveBlock() - end //Function - dptDevice_C::initReserveBlockInfo() - start //=========================================================================== // //Description: // // This function reads the DPT reserve block and initializes data //structures dependent on reserve block information. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::initReserveBlockInfo() { if ((getObjType() == DPT_SCSI_DASD) && (getLevel() == 2)) { // Clear the valid reserve block flag and downloaded FW flag scsiFlags &= ~FLG_ENG_RESERVE_BLOCK & ~FLG_ENG_DFW; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { if (readReserveBlock(ccb_P)==MSG_RTN_COMPLETED) { scsiFlags |= FLG_ENG_RESERVE_BLOCK; // Check for the downloaded firmware indicator if ((ccb_P->dataBuff_P[0x2c]=='F') && (ccb_P->dataBuff_P[0x2d]=='W')) // Indicate that there is downloaded FW on this drive scsiFlags |= FLG_ENG_DFW; // Check for a format failure checkFmtFailure(ccb_P); } // Free the CCB ccb_P->clrInUse(); } } } //dptDevice_C::initReserveBlockInfo() - end //Function - dptDevice_C::rtnSWreserveBlock() - start //=========================================================================== // //Description: // // This function is the message handler to return the 128 byte //software portion of the DPT reserve block. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::rtnSWreserveBlock(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Read the reserve block retVal = readReserveBlock(ccb_P); if (retVal == MSG_RTN_COMPLETED) { retVal = MSG_RTN_DATA_OVERFLOW; // Prepare the output buffer for new data fromEng_P->reset(); // Return the software portion of the DPT reserve block if (fromEng_P->insert(ccb_P->dataBuff_P+384,128)) retVal = MSG_RTN_COMPLETED; } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptDevice_C::rtnSWreserveBlock() - end //Function - dptDevice_C::writeSWreserveBlock() - start //=========================================================================== // //Description: // // This function writes to the 128 byte SW portion of the DPT //reserve block. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::writeSWreserveBlock(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Read the DPT reserve block engCCB_C *ccb_P = getCCB(); // If a valid DPT reserve block was read... if (ccb_P!=NULL) { // Read the reserve block retVal = readReserveBlock(ccb_P); if (retVal == MSG_RTN_COMPLETED) { retVal = MSG_RTN_DATA_UNDERFLOW; // Get the data to save to the SW portion of the reserve block if (toEng_P->extract(ccb_P->dataBuff_P+384,128)) { // Reinitialize the CCB ccb_P->reInit(); // Initialize the CCB to perform a write operation ccb_P->write(capacity.maxPhysLBA,1,512,ptrToLong(ccb_P->dataBuff_P)); // Send the CCB to hardware retVal = launchCCB(ccb_P); } } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptDevice_C::writeSWreserveBlock() - end //Function - dptDevice_C::setLAPstatus() - start //=========================================================================== // //Description: // // This function sets the logical array page status for this device. //If this device is a software array, the status of all FW level arrays //are checked and the worst FW array status is returned as the software //array status. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptDevice_C::setLAPstatus(uCHAR inStatus, uLONG *rtnErrCnt_P, uLONG *rtnTotalBlks_P ) { uLONG blksCompleted = 1; uLONG errCnt = 0; uLONG totalBlks = 1; DEBUG_BEGIN(1, dptDevice_C::setLAPstatus()); if (isLogical() && (getRAIDtype()!=RAID_NONE)) { // Indicate that the main & sub status fields are LAP status status.flags &= ~FLG_STAT_PAP; status.flags |= FLG_STAT_LAP; // Set the device's status status.main = inStatus & 0xf; status.sub = inStatus >> 4; DEBUG(1, "LSU " << PRT_ADDR << "level" << (int)getLevel() << \ PRT_STAT << "rtype=" << getRAIDtype() ); switch (status.main) { case 0: status.display = DSPLY_STAT_OPTIMAL; break; case 2: case 3: status.display = DSPLY_STAT_BUILD; break; case 4: if (status.sub==LAPS_BUILD) status.display = DSPLY_STAT_BUILD; else if (status.sub==LAPS_BUILD_REQUIRED) status.display = DSPLY_STAT_WARNING; else status.display = DSPLY_STAT_FAILED; break; case 11: status.display = DSPLY_STAT_BUILD; break; case SMAIN_FW_DIAGNOSTIC: case 10: status.display = DSPLY_STAT_IMPACTED; break; default: status.display = DSPLY_STAT_WARNING; break; } // If driver level array and not a dual level firmware array... if ((getLevel()==0) && (status.main!=4) && !myHBA_P()->isI2O()) { uLONG compBlksCompleted = 0; uLONG compErrCnt; uLONG compPercent,curPercent,compMaxLBA; uSHORT compPriority=6; // Get a component failure count uSHORT statPriority = 7; dptDevice_C *dev_P = (dptDevice_C *) compList.reset(); while (dev_P!=NULL) { // If logical component... if (dev_P->isLogical()) { // check for FW diags dev_P->updateStatus(); // if FW diags are not going if (dev_P->status.main != SMAIN_FW_DIAGNOSTIC) { // compPriority = 8; // Update the component's LAP status dev_P->updateLAPstatus(0,&compBlksCompleted,&compErrCnt); } switch (dev_P->status.main) { case 0: compPriority = 6; break; // Optimal case 1: compPriority = 2; break; // Degraded case 2: compPriority = 3; break; // Rebuilding case 4: compPriority = 0; break; // Dead case 5: compPriority = 5; break; // Warning case 10: compPriority = 4; break; // Verifying case 11: compPriority = 1; break; // Building } if (dev_P->isMissing()) { // Mark the SW array as failed status.main = 4; status.sub = 0; status.display = DSPLY_STAT_FAILED; statPriority = 0; } else if (compPriority < statPriority) { // do nothing if a component is doing diags if (dev_P->status.main != SMAIN_FW_DIAGNOSTIC) { statPriority = compPriority; // Use the component status status = dev_P->status; // Initialize the progress blksCompleted = compBlksCompleted; totalBlks = dev_P->getLastLBA(); errCnt = compErrCnt; } } else if (compPriority==statPriority) { compMaxLBA = dev_P->getLastLBA(); // Prevent divide by zero if (compMaxLBA==0) compMaxLBA = 1; if (totalBlks==0) totalBlks = 1; // Compute the percentage complete // Note: This will not work for LSUs greater than 21G compPercent = (compBlksCompleted*100)/compMaxLBA; curPercent = (blksCompleted*100)/totalBlks; // If this device is the least complete... if (compPercent < curPercent) { // Use this device's progress blksCompleted = compBlksCompleted; totalBlks = compMaxLBA; } errCnt += compErrCnt; } } else { // Update the physical device status dev_P->updateStatus(); // If a physical device is failed... if (dev_P->isFailed() || dev_P->isMissing()) { // Mark the SW array as failed status.main = 4; status.sub = 0; status.display = DSPLY_STAT_FAILED; } } dev_P = (dptDevice_C *) compList.next(); } } // Question: Does it make sense to check physical device status here ?? // If firmware level array... if ((getLevel()==1) && (status.main!=4) && (status.main!=2)) { uSHORT PhysFailed = 0; uSHORT RaidType = getRAIDtype(); dptDevice_C *dev_P = (dptDevice_C *) compList.reset(); // look thru all components while (dev_P!=NULL) { // If logical component... if (dev_P->isPhysical()) { // Update the physical device status dev_P->updateStatus(); // Note: updateDiagStatus() is called by updateStatus(). DEBUG(1, "comp" << PRT_DADDR(dev_P) << "fail=" << \ (int)dev_P->isFailed() << PRT_DSTAT(dev_P) << \ "f_cnt=" << PhysFailed); // If a physical device is failed && the array is optimal... if ((dev_P->isFailed() || dev_P->isMissing()) && (status.main == 0)) { dev_P->status.main = PAPM_FAILED; if ((RaidType == RAID_0) || (PhysFailed)) { // Mark the FW array as missing //status.display = DSPLY_STAT_MISSING; status.display = DSPLY_STAT_FAILED; status.main = LAPM_FAILED; status.sub = LAPS_MULTIPLE_DRIVES; status.flags |= FLG_STAT_ALARM_ON; } else { // Mark the FW array as impacted //(firmware will degrade upon first write operation) status.display = DSPLY_STAT_IMPACTED; status.flags &= ~(FLG_STAT_LAP | FLG_STAT_PAP); status.main = 0; status.sub = 0; } PhysFailed++; } #ifdef RAID_FIX if (RaidType == RAID_HOT_SPARE) { if (dev_P->status.main == SMAIN_FW_DIAGNOSTIC) { dev_P->setUserDiagFlag(); //dev_P->status.flags |= FLG_STAT_PAP; // status.main = dev_P->status.main; // status.sub = dev_P->status.sub; } else dev_P->clrUserDiagFlag(); } if (dev_P->status.flags & FLG_STAT_DIAGNOSTICS) { dev_P->status.main == SMAIN_FW_DIAGNOSTIC; status.display = DSPLY_STAT_IMPACTED; status.flags &= ~(FLG_STAT_LAP | FLG_STAT_PAP); } #endif } dev_P = (dptDevice_C *) compList.next(); } } } if (rtnErrCnt_P!=NULL) *rtnErrCnt_P = errCnt; if (rtnTotalBlks_P!=NULL) *rtnTotalBlks_P = totalBlks; return (blksCompleted); } //dptDevice_C::setLAPstatus() - end //Function - dptDevice_C::getPAPindex() - start //=========================================================================== //Description: // This function returns an index into the physical array page //corresponding to this device. //--------------------------------------------------------------------------- uSHORT dptDevice_C::getPAPindex(engCCB_C *ccb_P) { uSHORT index = 0xffff; if (myHBA_P()->isI2OVer2()) { if (ccb_P == NULL) index = 0; else { uCHAR *data_P = ccb_P->modeParam_P->getData(); uLONG numBytes = getU4(data_P,0); #ifndef _DPT_BIG_ENDIAN osdSwap4(&numBytes); #endif numBytes <<= 2; data_P += 4; uLONG i; if (numBytes > 0xffff) //TEMP return index; for (i=0; i < numBytes; i += 4) { if ((getChan() == (data_P[i] >> 4)) && (getLUN() == (data_P[i] & 0x0f)) && (getID() == data_P[i + 1])) { index = (uSHORT) (4 + i + 2); break; } } } } else if (getLUN()==0) { if (myHBA_P()->isI2O()) { index = (getID() & 0x1f) | ((getID() & 0x60) << 1) | (getChan() << 5); } else { index = (getID() * 15) + (getChan()-myMgr_P()->getMinAddr().chan); } } return (index); } //dptDevice_C::getPAPindex() - end //Function - dptDevice_C::setPAPstatus() - start //=========================================================================== // //Description: // // This function sets the physical array page status for this device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::setPAPstatus(engCCB_C *ccb_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; uCHAR papStatus; uSHORT index = getPAPindex(ccb_P); if ((index!=0xffff) && (getRAIDtype()==RAID_NONE) && isReal()) { retVal = MSG_RTN_COMPLETED; // Indicate that the main & sub status fields are PAP status status.flags &= ~FLG_STAT_LAP; status.flags |= FLG_STAT_PAP; if ((status.main != PMAIN_STAT_FORMAT) && (status.main != SMAIN_FW_DIAGNOSTIC) && !isHWmismatch()) { // Get the PAP status papStatus = ccb_P->modeParam_P->getData()[index]; uCHAR buffer[512]; memcpy(buffer, ccb_P->modeParam_P->getData(), 512); status.main = papStatus & 0x0f; status.sub = (papStatus & 0x70) >> 4; // Set display status based on physical array page status switch (status.main) { case PAPM_NON_EXISTENT: break; case PAPM_OPTIMAL: case 10: case PAPM_UNCONFIGURED: status.display = DSPLY_STAT_OPTIMAL; break; case PAPM_FAILED: case PAPM_PARAMETER_MISMATCH: status.display = DSPLY_STAT_FAILED; break; // If building or rebuilding... case PAPM_REPLACED: if ((status.sub==1) || (status.sub==2)) status.display = DSPLY_STAT_IMPACTED; else status.display = DSPLY_STAT_FAILED; break; case PAPM_VERIFY: status.display = DSPLY_STAT_IMPACTED; break; case PAPM_BUILD: if (status.sub == PAPS_BUILD_EXPAND) status.display = DSPLY_STAT_IMPACTED; else status.display = DSPLY_STAT_BUILD; break; default: status.display = DSPLY_STAT_WARNING; break; } } // If dual loop is active if (p2Flags & FLG_DEV_P2_VALID) { // If one of the dual loop channels is down (not active) if ((scsiFlags3 & (FLG_DEV_P2_ACTIVE | FLG_DEV_P1_ACTIVE)) != (FLG_DEV_P2_ACTIVE | FLG_DEV_P1_ACTIVE)) { if (status.display != DSPLY_STAT_FAILED) status.display = DSPLY_STAT_WARNING; } } } // end if (index!=0xffff) return(retVal); } //dptDevice_C::setPAPstatus() - end /*DPT_RTN_T dptDevice_C::updateLAPstatus(uSHORT setCapacity, uLONG *blksComplete_P, uLONG *errCnt_P, uLONG *totalBlks_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; uLONG progress; ncrLAP1_S *mode_P; // Get the page code used by this device's manager uCHAR pageCode = (uCHAR) myMgr_P()->getLAPpage(); // If this device's manager supports a logical array page if (pageCode && isReal() && isLogical()) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { if (pageCode == LAP_NCR1) // Initialize the CCB to do a mode sense page ccb_P->modeSense6(pageCode); else // Initialize the CCB to do a mode sense page ccb_P->modeSense(pageCode); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); // Send the CCB to hardware retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) { // Insure the proper mode page was returned if ((ccb_P->modeParam_P->getPageCode() & 0x3f)==pageCode) { // Cast the return data as NCR LAP data mode_P = (ncrLAP1_S *) ccb_P->modeParam_P->getData(); // If SW level array... if (getLevel()==0) { // Set the LAP status - get array progress progress = setLAPstatus(mode_P->getStatus(),errCnt_P,totalBlks_P); } else { // Set the logical array page status setLAPstatus(mode_P->getStatus()); // Get the RAID build/rebuild/verify progress progress = mode_P->swapCompleted(); // If the verify error count is desired... if (errCnt_P!=NULL) // Return the verify error count *errCnt_P = mode_P->swapVerifyErrCnt(); // If the total # of blocks is desired... if (totalBlks_P!=NULL) { *totalBlks_P = 0; if ((pageCode == LAP_DPT1) && myHBA_P()->isECCsizeErr()) // Get the last ECC conversion block *totalBlks_P = ((dptLAP1_S *)mode_P)->swapLastECCblk(); // If no ECC conversion block is available... if (*totalBlks_P == 0) *totalBlks_P = capacity.maxLBA; } } // If the RAID build/rebuild/verify progress is desired... if (blksComplete_P!=NULL) *blksComplete_P = progress; // If capacity should be updated... if (setCapacity) { // Update the capacity information mode_P->swapNumBlocks(); mode_P->swapLsuBlockSize(); capacity.maxLBA = capacity.maxPhysLBA = mode_P->getNumBlocks() - 1; if (getLevel()==2) capacity.maxLBA = getLastUserBlk(); capacity.blockSize = mode_P->getLsuBlockSize(); } } } // end if (retVal==MSG_RTN_COMPLETED) // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) } // end if (pageCode) return (retVal); } */ //Function - dptDevice_C::updateLAPstatus() - start //=========================================================================== // //Description: // // This function gets a logical array page. This device's status //and optionally its capacity information are updated. // //Parameters: // //Return Value: // // The build/rebuild/verify progress. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::updateLAPstatus(uSHORT setCapacity, uLONG *blksComplete_P, uLONG *errCnt_P, uLONG *totalBlks_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; DEBUG_BEGIN(5, dptDevice_C::updateLAPstatus()); // Get the page code used by this device's manager uCHAR pageCode = (uCHAR) myMgr_P()->getLAPpage(); #ifdef _SINIX_ADDON if (pageCode == LAP_DPT1) // SNI Fix: Verify does not work with FW UX2. - michiz // We know, that FW UX2 uses LAP_DPT1, newer ones will use LAP_DPT2. scsiFlags2 |= FLG_DEV_NO_VERIFY; #endif /* Not supposed to redirect status requests // If not the top-level array on an I2O board... if (myHBA_P()->isI2O() && (parent.dev_P != NULL)) { dev_P = (dptDevice_C *) parent.dev_P; // Pass the command to the parent device return dev_P->updateLAPstatus(setCapacity, blksComplete_P, errCnt_P, totalBlks_P); } */ // If this device's manager supports a logical array page if (pageCode && isReal() && isLogical()) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { if (pageCode == LAP_NCR1) // Initialize the CCB to do a mode sense page ccb_P->modeSense6(pageCode); else // Initialize the CCB to do a mode sense page ccb_P->modeSense(pageCode); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); // Send the CCB to hardware retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) { // Insure the proper mode page was returned if ((ccb_P->modeParam_P->getPageCode() & 0x3f)==pageCode) { // check to see what LAP page we got if ((pageCode == LAP_DPT1) || (pageCode == LAP_NCR1)) retVal = updateLAP1status(ccb_P->modeParam_P->getData(), pageCode, setCapacity, blksComplete_P, errCnt_P, totalBlks_P); else if (pageCode == LAP_DPT2) retVal = updateLAP2status(ccb_P->modeParam_P->getData(), setCapacity, blksComplete_P, errCnt_P, totalBlks_P); } } // Free the CCB ccb_P->clrInUse(); } } return (retVal); } //dptDevice_C::updateLAPstatus() - end //Function - dptDevice_C::updateLAP1status() - start //=========================================================================== // //Description: // // This function gets a logical array page (NCR or DPT 1). This device's status //and optionally its capacity information are updated. // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::updateLAP1status(void *data_P, uSHORT pageCode, uSHORT setCapacity, uLONG *blksComplete_P, uLONG *errCnt_P, uLONG *totalBlks_P ) { DEBUG_BEGIN(5, dptDevice_C::updateLAP1status()); DPT_RTN_T retVal = MSG_RTN_COMPLETED; uLONG progress; ncrLAP1_S *mode_P; // Cast the return data as NCR LAP data mode_P = (ncrLAP1_S *) data_P; // If SW level array... if (getLevel()==0) { // Set the LAP status - get array progress progress = setLAPstatus(mode_P->getStatus(),errCnt_P,totalBlks_P); } else { // Set the logical array page status setLAPstatus(mode_P->getStatus()); // Get the RAID build/rebuild/verify progress #if defined(SNI_MIPS) && (_DPT_BIG_ENDIAN) progress = mode_P->getCompleted(); #else progress = mode_P->swapCompleted(); #endif // If the verify error count is desired... if (errCnt_P!=NULL) { // Return the verify error count #if defined(SNI_MIPS) && (_DPT_BIG_ENDIAN) *errCnt_P = mode_P->getVerifyErrCnt(); #else *errCnt_P = mode_P->swapVerifyErrCnt(); #endif } // If the total # of blocks is desired... if (totalBlks_P!=NULL) { *totalBlks_P = 0; if ((pageCode == LAP_DPT1) && myHBA_P()->isECCsizeErr()) { // Get the last ECC conversion block #if defined(SNI_MIPS) && (_DPT_BIG_ENDIAN) *totalBlks_P = ((dptLAP1_S *)mode_P)->getLastECCblk(); #else *totalBlks_P = ((dptLAP1_S *)mode_P)->swapLastECCblk(); #endif } // If no ECC conversion block is available... if (*totalBlks_P == 0) *totalBlks_P = capacity.maxLBA; } } // If the RAID build/rebuild/verify progress is desired... if (blksComplete_P!=NULL) *blksComplete_P = progress; // If capacity should be updated... if (setCapacity) { // Update the capacity information #if defined(SNI_MIPS) && (_DPT_BIG_ENDIAN) mode_P->getNumBlocks(); mode_P->getLsuBlockSize(); #else mode_P->swapNumBlocks(); mode_P->swapLsuBlockSize(); #endif capacity.maxLBA = capacity.maxPhysLBA = mode_P->getNumBlocks() - 1; if (getLevel()==2) capacity.maxLBA = getLastUserBlk(); capacity.blockSize = mode_P->getLsuBlockSize(); } DEBUG(5, PRT_ADDR << "capacity=" << capacity.maxLBA << " blocks"); return (retVal); } //dptDevice_C::updateLAP1status() - end //Function - dptDevice_C::updateLAP2status() - start //=========================================================================== // //Description: // // This function gets a logical array page (DPT 2). This device's status //and optionally its capacity information are updated. // //Parameters: // //Return Value: // // The build/rebuild/verify progress. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::updateLAP2status(void *data_P, uSHORT setCapacity, uLONG *blksComplete_P, uLONG *errCnt_P, uLONG *totalBlks_P ) { DEBUG_BEGIN(5, dptDevice_C::updateLAP2status()); DPT_RTN_T retVal = MSG_RTN_COMPLETED; uLONG progress; dptLAP2_S *mode_P = (dptLAP2_S *)data_P; // If SW level array and not dual level I2O... if ((getLevel()==0) && !myHBA_P()->isI2O()) { // Set the LAP status - get array progress progress = setLAPstatus(mode_P->getStatus(),errCnt_P,totalBlks_P); } else { // Set the logical array page status setLAPstatus(mode_P->getStatus()); // Get the RAID build/rebuild/verify progress #if defined(SNI_MIPS) && (_DPT_BIG_ENDIAN) progress = mode_P->getBlksComplete(); #else progress = mode_P->swapBlksComplete(); #endif // If the verify error count is desired... if (errCnt_P!=NULL) { // Return the verify error count #if defined(SNI_MIPS) && (_DPT_BIG_ENDIAN) *errCnt_P = mode_P->getVerifyErrors(); #else *errCnt_P = mode_P->swapVerifyErrors(); #endif } // If the total # of blocks is desired... if (totalBlks_P!=NULL) *totalBlks_P = capacity.maxLBA; } // If the RAID build/rebuild/verify progress is desired... if (blksComplete_P!=NULL) *blksComplete_P = progress; // If capacity should be updated... if (setCapacity) { // Update the capacity information #if defined(SNI_MIPS) && (_DPT_BIG_ENDIAN) mode_P->getLsuCapacity(); #else mode_P->swapLsuCapacity(); #endif mode_P->swapLsuBlockSize(); capacity.maxLBA = capacity.maxPhysLBA = mode_P->getLsuCapacity() - 1; if (getLevel()==2) capacity.maxLBA = getLastUserBlk(); capacity.blockSize = mode_P->getLsuBlockSize(); } DEBUG(5, PRT_ADDR << "capacity=" << capacity.maxLBA << " blocks"); return (retVal); } //dptDevice_C::updateLAP2status() - end //Function - dptDevice_C::updatePAPstatus() - start //=========================================================================== // //Description: // // This function updates this device's physical array page status. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::updatePAPstatus() { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (isLogical() || !myMgr_P()->isRAIDcapable()) { // If two manager's above is valid... if (myMgr_P()->myMgr_P()!=NULL) // Set the PAP using the second manager up the chain retVal = myMgr_P()->myMgr_P()->setPAPinfo(this); } // if (isPhysical())... else { // If formatting... if (status.main == PMAIN_STAT_FORMAT) { // Check the format status checkFmtStatus(); retVal = MSG_RTN_COMPLETED; } else // Set the PAP using this device's manager retVal = myMgr_P()->setPAPinfo(this); } return (retVal); } //dptDevice_C::updatePAPstatus() - end //Function - dptDevice_C::updateStatus() - start //=========================================================================== // //Description: // // This function updates the status for this device. // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::updateStatus(uSHORT updateCapacity, dptBuffer_S *fromEng_P ) { DEBUG_BEGIN(2, dptDevice_C::updateStatus()); DPT_RTN_T retVal = MSG_RTN_COMPLETED; // Update the status of a firmware based diagnostic updateDiagStatus(); // If there is not an active F/W diagnostic and this is a DASD device... if ((status.main != SMAIN_FW_DIAGNOSTIC) && (getObjType() == DPT_SCSI_DASD)) { if (isLogical() && (getRAIDtype()!=RAID_NONE)) { if (!isExpandedArray()) { // Update this device's status using the logical array page retVal = updateLAPstatus(updateCapacity); } // Determine the ready status of this logical device checkIfCompsReady(); } else { // Update the dual loop status getDualLoopInfo(); // Update this device's status using the physical array page retVal = updatePAPstatus(); } // Don't allow an ignored if (retVal == MSG_RTN_IGNORED) retVal = MSG_RTN_COMPLETED; } // If the device is optimal and application diagnostics are active... if ((status.display==DSPLY_STAT_OPTIMAL) && (status.flags & FLG_STAT_DIAGNOSTICS)) status.display = DSPLY_STAT_IMPACTED; // If a physical device... if (isPhysical()) { // Perform a test unit ready cmd checkIfReady(); // If removeable media or no capacity info if (isReady() && (isRemoveable() || (capacity.maxLBA == 0))) { // Try to get the media capacity getCapacity(); // If valid capacity info... if (capacity.maxLBA != 0) // Initialize the reserve block info initReserveBlockInfo(); } // if the device is not ready and it is not formatting (and not removeable) if (!isReady() && !(status.main == PMAIN_STAT_FORMAT) && !isRemoveable()) { status.display = DSPLY_STAT_MISSING; DEBUG(1, "Device " << PRT_ADDR << "set to missing" ); } else if (status.display == DSPLY_STAT_MISSING) { DEBUG(1, "Device " << PRT_ADDR << "set to optimal" ); status.display = DSPLY_STAT_OPTIMAL; } // Update the device's SMART status updateSmartStatus(); } if (fromEng_P != NULL) { if (!fromEng_P->insert(&status,sizeof(dptStatus_S))) { // If not another type of error... if (retVal == MSG_RTN_COMPLETED) retVal = MSG_RTN_DATA_OVERFLOW; } } return (retVal); } //dptDevice_C::updateStatus() - end //Function - dptDevice_C::updateDiagStatus() - start //=========================================================================== // //Description: // // This function updates the diagnostic status of a device. // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::updateDiagStatus(dptBuffer_S *fromEng_P) { // If F/W diags not supported or not a F/W logical or physical device... if (!isFWdiagCapable()) return(ERR_DIAG_NOT_ACTIVE); DPT_RTN_T retVal = ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P != NULL) { // Determine if there is an active diagnostic ccb_P->mfCmd(MFC_DIAG_STATUS); ccb_P->target(this); ccb_P->setInterpret(); ccb_P->input(); retVal = ERR_DIAG_NOT_ACTIVE; // If the diagnostic is active... if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) { retVal = MSG_RTN_COMPLETED; // If a verify, rebuild, build, expand, don't update the status // through the diag status command (let the LAP command do it) if ((ccb_P->defData[0] != SSUB_VERIFY) && (ccb_P->defData[0] != SSUB_REBUILD) && (ccb_P->defData[0] != SSUB_BUILD) && (ccb_P->defData[0] != SSUB_EXPAND)) { // If a diagnostic was not previously active... if (status.main != SMAIN_FW_DIAGNOSTIC) { status.main = SMAIN_FW_DIAGNOSTIC; status.sub = ccb_P->defData[0]; status.display = DSPLY_STAT_IMPACTED; // Clear the LAP & PAP status indicators status.flags &= ~(FLG_STAT_LAP | FLG_STAT_PAP); dptDevice_C *comp_P = (dptDevice_C *) compList.reset(); while (comp_P) { // Indicate that the component is impacted comp_P->setUserDiagFlag(); comp_P->updateStatus(); comp_P = (dptDevice_C *) compList.next(); } } status.main = SMAIN_FW_DIAGNOSTIC; status.sub = ccb_P->defData[0]; status.display = DSPLY_STAT_IMPACTED; // Clear the LAP & PAP status indicators status.flags &= ~(FLG_STAT_LAP | FLG_STAT_PAP); } } if ((status.main == SMAIN_FW_DIAGNOSTIC) && (retVal != MSG_RTN_COMPLETED)) { // Initialize the status to a non-diagnostic state status.main = 0; status.sub = 0; status.display = DSPLY_STAT_OPTIMAL; dptDevice_C *comp_P = (dptDevice_C *) compList.reset(); while (comp_P) { // Indicate that the component is no longer impacted comp_P->clrUserDiagFlag(); comp_P->updateStatus(); comp_P = (dptDevice_C *) compList.next(); } } // If returning progress information... if (fromEng_P != NULL && (status.main != LAPM_EXPAND)) { // If a diagnostic is active... if (retVal == MSG_RTN_COMPLETED) { // Return the diagnostic progress information dptDiagProgress_S *dp_P = (dptDiagProgress_S *) ccb_P->defData; dp_P->scsiSwap(); uLONG tempLong = dp_P->getCurBlock(); fromEng_P->insert(tempLong); tempLong = 0; // If a device buffer test... if ((dp_P->getTestType()==SSUB_BUFFER_READ) || (dp_P->getTestType()==SSUB_BUFFER_RW)) fromEng_P->insert(tempLong); // If random sector media test... else if (!(dp_P->getFlags() & DIAG_FLG_ALL_SECTORS) && ((dp_P->getTestType()==SSUB_MEDIA_READ) || (dp_P->getTestType()==SSUB_MEDIA_RW))) fromEng_P->insert(tempLong); else fromEng_P->insert(capacity.maxPhysLBA); fromEng_P->insert(&status,sizeof(dptStatus_S)); tempLong = dp_P->getCurNumErrors(); fromEng_P->insert(tempLong); tempLong = dp_P->getIterations(); fromEng_P->insert(tempLong); tempLong = dp_P->getCurIteration(); fromEng_P->insert(tempLong); tempLong = dp_P->getFirstErrBlk(); fromEng_P->insert(tempLong); uCHAR tempChar = dp_P->getTestType(); fromEng_P->insert(tempChar); tempChar = dp_P->getFlags(); fromEng_P->insert(tempChar); uSHORT tempShort = dp_P->getMaxErrCnt(); fromEng_P->insert(tempShort); tempChar = dp_P->getPercent(); if (!fromEng_P->insert(tempChar)) retVal = MSG_RTN_DATA_OVERFLOW; } else { // Zero the progress information memset(fromEng_P->data,0,6*sizeof(uLONG)+sizeof(dptStatus_S)); fromEng_P->writeIndex = 6*sizeof(uLONG)+sizeof(dptStatus_S); } } else if (status.main == LAPM_EXPAND) retVal = MSG_RTN_IGNORED; // Determine if there is a scheduled diagnostic ccb_P->reInit(); ccb_P->mfCmd(MFC_DIAG_QUERY_SCHEDULE); ccb_P->target(this); ccb_P->setInterpret(); ccb_P->input(); // Update the scheduled diagnostic test type scheduledDiag = (launchCCB(ccb_P) == MSG_RTN_COMPLETED) ? ccb_P->defData[0] : 0; // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptDevice_C::updateDiagStatus() - end //Function - dptDevice_C::checkFmtStatus() - start //=========================================================================== // //Description: // // This function determines if this drive is formatting. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptDevice_C::checkFmtStatus(uLONG *totalBlks_P) { uLONG blksComplete = 0; // To insure a zero doesn't get returned in totalBlks_P if (totalBlks_P != NULL) { if ((*totalBlks_P = getMaxPhyLBA()) == 0) *totalBlks_P = 0xffff; } // If a format failure... Don't update the status if ((status.main == PMAIN_STAT_FORMAT) && ((status.sub == PSUB_STAT_FMT_FAILED) || (status.sub == PSUB_STAT_CLR_FAILED))) return (blksComplete); engCCB_C *ccb_P = getCCB(); if (ccb_P != NULL) { status.display = DSPLY_STAT_OPTIMAL; status.main = 2; status.sub = 0; // Initialize the CCB to perform a request sense ccb_P->reqSense(); if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // Set the format status setFmtStatus(ccb_P->dataBuff_P); // If progress is available and desired... if ((ccb_P->dataBuff_P[15] & 0x80) && (totalBlks_P != NULL)) { uSHORT SCSIpercent = *(uSHORT *)(ccb_P->dataBuff_P+16); reverseBytes(SCSIpercent); *totalBlks_P = getMaxPhyLBA(); // If no capacity info is available... if (*totalBlks_P == 0) { // Return the request sense info directly blksComplete = SCSIpercent; *totalBlks_P = 0xffff; } else // Return the block completed blksComplete = (*totalBlks_P >> 16) * SCSIpercent; } } // Free the CCB ccb_P->clrInUse(); } // If the format has completed... if (status.main != PMAIN_STAT_FORMAT) { // Re-initialize the device realInit(); // If an HBA physical device... if (getLevel()==2) { #ifdef _SINIX_ADDON // SNI: Reserve only one block on scsi disks. reserveEndOfDisk(0x1); #else // Reserve space for use by DPT reserveEndOfDisk(RESERVED_SPACE_DISK); #endif } } return (blksComplete); } //dptDevice_C::checkFmtStatus() - end //Function - dptDevice_C::setFmtStatus() - start //=========================================================================== // //Description: // // This function sets this device's format status based on the //information in the specified request sense buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::setFmtStatus(uCHAR *reqSense_P) { if (reqSense_P != NULL) { // If sense key == Not Ready if (((reqSense_P[2] & 0x0f) == 0x02) && (reqSense_P[12] == 0x04)) { // If format in progress or DPT format clearing phase if ((reqSense_P[13] == 0x04) || (reqSense_P[13] == 0x84)) { status.main = PMAIN_STAT_FORMAT; status.display = DSPLY_STAT_BUILD; // If clearing... if (reqSense_P[13] == 0x84) status.sub = PSUB_STAT_CLEARING; else status.sub = 0; } } } } //dptDevice_C::setFmtStatus() - end //Function - dptDevice_C::checkFmtFailure() - start //=========================================================================== // //Description: // // This function checks the format failed and format clear failed //bits in the reserve block. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::checkFmtFailure(engCCB_C *ccb_P) { // Check the reserve block version # if ((ccb_P->dataBuff_P[0x3f] >= 4) && !myHBA_P()->isI2O()) { // If a format failure... if (ccb_P->dataBuff_P[0x12] & 0x08) { status.display = DSPLY_STAT_BUILD; status.main = PMAIN_STAT_FORMAT; status.sub = PSUB_STAT_FMT_FAILED; } // If a format clear failure... else if (ccb_P->dataBuff_P[0x12] & 0x10) { status.display = DSPLY_STAT_BUILD; status.main = PMAIN_STAT_FORMAT; status.sub = PSUB_STAT_CLR_FAILED; } } } //dptDevice_C::checkFmtFailure() - end //Function - dptDevice_C::handleMessage() - start //=========================================================================== // //Description: // // This routine handles DPT events for the dptRAIDdev_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Perform a destructive build case MSG_RAID_BUILD: if (isReal()) retVal = raidLAPcmd(LAP_CMD_BUILD); break; // Perform a non-destructive build (rebuild) case MSG_RAID_REBUILD: if (isReal()) retVal = raidLAPcmd(LAP_CMD_REBUILD); break; // Perform a verify case MSG_RAID_VERIFY: if (isReal()) { uCHAR flags = 0; if ( ((dptBuffer_S *)toEng_P)->extract(flags) ) // Allow user to set abort on error flag flags &= 0x04; retVal = raidLAPcmd(LAP_CMD_VERIFY,flags); } break; // Perform a verify and fix on error case MSG_RAID_VERIFY_FIX: if (isReal()) { uCHAR flags = 0; if ( ((dptBuffer_S *)toEng_P)->extract(flags) ) // Allow user to set abort on error flag flags &= 0x04; retVal = raidLAPcmd(LAP_CMD_VERIFY_FIX,flags); } break; // Perform a verify and abort on error case MSG_RAID_VERIFY_ABORT: if (isReal()) retVal = raidLAPcmd(LAP_CMD_VERIFY_ABORT); break; // Abort the current RAID action case MSG_RAID_ABORT: if (isReal()) retVal = raidLAPcmd(LAP_CMD_ABORT); break; // Update this device's status case MSG_UPDATE_STATUS: if (isReal()) retVal = updateStatus(0,fromEng_P); break; // Get the RAID build/rebuild/verify progress case MSG_RAID_GET_PROGRESS: if (isReal()) retVal = rtnProgress(fromEng_P); break; // Force the device into the specified state case MSG_FORCE_STATE: // If no state was specified... if (toEng_P->writeIndex < 1L) retVal = MSG_RTN_DATA_UNDERFLOW; else // Attempt to force this device's state retVal = raidPAPcmd(toEng_P->data[0]); break; // Perform a SCSI read command case MSG_SCSI_READ: retVal = readHandler(toEng_P,fromEng_P); break; // Perform a SCSI write command case MSG_SCSI_WRITE: retVal = writeHandler(toEng_P); break; // Perform a low level SCSI format on this device case MSG_SCSI_FORMAT: retVal = fmtHandler(toEng_P,fromEng_P); break; // Add or remove this drive as an emulated drive case MSG_SET_EMULATION: retVal = setEmulation(toEng_P); break; // Save the 128 byte software buffer in the reserve block case MSG_SET_RB_BUFFER: retVal = writeSWreserveBlock(toEng_P); break; // Read the 128 byte software buffer from the reserve block case MSG_GET_RB_BUFFER: retVal = rtnSWreserveBlock(fromEng_P); break; // Return the device statistics information case MSG_GET_IO_STATS: retVal = rtnIOstats(fromEng_P); break; // Clear the device statistics information case MSG_CLEAR_IO_STATS: retVal = getIOstats(NULL,0); break; // Indicate that the device is performing diagnostics case MSG_DIAGNOSTICS_ON: retVal = MSG_RTN_COMPLETED; setUserDiagFlag(); break; // Clear the diagnostics flag case MSG_DIAGNOSTICS_OFF: retVal = MSG_RTN_COMPLETED; clrUserDiagFlag(); break; // Reset the SCSI bus case MSG_RESET_SCSI_BUS: retVal = resetSCSI(); break; // Reserve the specified # of blocks at the end of the disk case MSG_RESERVE_BLOCKS: retVal = handleREOD(toEng_P); break; // Quiet the SCSI bus/blink this device's LED case MSG_QUIET: retVal = quietBus(toEng_P); break; // Schedule a F/W based diagnostic on this device case MSG_DIAG_SCHEDULE: if (isReal() && isFWdiagCapable()) retVal = scheduleDiag(toEng_P); break; // Unschedule a F/W based diagnostic on this device case MSG_DIAG_UNSCHEDULE: if (isReal() && isFWdiagCapable()) retVal = sendMFC(MFC_DIAG_UNSCHEDULE); break; // Stop an active F/W based diagnostic on this device case MSG_DIAG_STOP: if (isReal() && isFWdiagCapable()) retVal = sendMFC(MFC_DIAG_STOP); break; // Return F/W diagnostic scheduling information for this device case MSG_DIAG_GET_SCHEDULE: if (isReal() && isFWdiagCapable()) retVal = queryDiag(fromEng_P); break; // Enable SMART emulation case MSG_SMART_EMUL_ON: // If a real DASD device... if (isReal() && (getObjType() == DPT_SCSI_DASD)) retVal = sendMFC(MFC_SMART_EMUL_ON,0x01); break; // Disable SMART emulation case MSG_SMART_EMUL_OFF: // If a real DASD device... if (isReal() && (getObjType() == DPT_SCSI_DASD)) retVal = sendMFC(MFC_SMART_EMUL_OFF,0x01); break; //dz case MSG_STATS_LOG_READ: case MSG_STATS_LOG_CLEAR: case MSG_STATS_LOG_GET_STATUS: case MSG_STATS_LOG_SET_STATUS: // Send to the statistics logger retVal = osdLoggerCmd(message, (void*)toEng_P,(dptData_S*)fromEng_P,(unsigned short)myConn_P()->getIOmethod(), (unsigned long)0,(unsigned long)magicNum); break; //dz case MSG_GET_ACCESS_RIGHTS: retVal = GetAccessRights(fromEng_P); break; case MSG_SET_ACCESS_RIGHTS: retVal = SetAccessRights(fromEng_P, toEng_P); break; // Initialize the device busy logic case MSG_CHECK_BUSY: retVal = checkBusy(fromEng_P); break; case MSG_RAID_SET_LUN_SEGMENTS: retVal = setLunSegments(toEng_P); break; case MSG_RAID_GET_LUN_SEGMENTS: retVal = getLunSegments(fromEng_P); break; default: // Call base class event handler retVal = dptRAIDdev_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return (retVal); } //dptDevice_C::handleMessage() - end //Function - dptDevice_C::setLunSegments() - start //=========================================================================== //Description: // This function sets the LUN segmenting for this array. //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::setLunSegments(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (myHBA_P()->isSegSupported()) { // Note: The caller should be able to specify numSegs == 0 and segSize == 0 // and this code will still work with the default internal sizes. // numSegs is ignored completey and segSize just skips extraneous data // if it is greater than the default internal size (presently 36 bytes). uLONG numSegs = 0; uLONG segSize = 0; toEng_P->extract(numSegs); toEng_P->extract(segSize); if (segSize < 36) { segSize = 36; } if (segment_P == NULL) { segment_P = new dptLAP2segment_S[8]; maxSegments = 8; } memset(segment_P, 0, dptLAP2segment_S::size() * 8); uLONG i = 0; arraySegment_S inSegment; char *ch_P = NULL; for (i=0; i < maxSegments; i++) { segment_P[i].setPageCode(0x33); segment_P[i].setPageLength(0x26); segment_P[i].setSegmentIndex((uCHAR)i); segment_P[i].setSegmentCount(8); if (toEng_P->extract(&inSegment, 36)) { ch_P = (char *) (segment_P+i); ch_P += 4; memcpy(ch_P, &inSegment, 36); if (segSize > 36) { toEng_P->skip(segSize - 36); } } } retVal = raidLAPcmd(LAP_CMD_SEGMENT); } return (retVal); } //dptDevice_C::setLunSegments() - end //Function - dptDevice_C::getLunSegments() - start //=========================================================================== //Description: // This function returns the LUN segmenting for this array. //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::getLunSegments(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (segment_P != NULL) { retVal = MSG_RTN_COMPLETED; uLONG tempUL = maxSegments; fromEng_P->insert(tempUL); tempUL = 36; fromEng_P->insert(tempUL); char *outSegment_P = NULL; uLONG i = 0; for (i=0; i < maxSegments; i++) { outSegment_P = (char *) (segment_P + i); outSegment_P += 4; if (!fromEng_P->insert(outSegment_P, 36)) { retVal = MSG_RTN_DATA_OVERFLOW; } } } return (retVal); } //dptDevice_C::getLunSegments() - end //Function - dptDevice_C::checkBusy() - start //=========================================================================== //Description: // This function checks if this device is flagged as busy. A device //may be flagged as busy if it is mounted by the OS or is known to be //in use and is not to be included in an array. //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::checkBusy(dptBuffer_S *fromEng_P) { uLONG busyStatus = osdTargetBusy(getHBA(), getChan(), getID(), getLUN()); DPT_RTN_T retVal = (fromEng_P->insert(busyStatus)) ? MSG_RTN_COMPLETED : MSG_RTN_DATA_OVERFLOW; if ((busyStatus & 0x80000000) && (busyStatus != 0xffffffff)) { retVal = ERR_BUSY_CHECK_FAILED; } else if (busyStatus == 2) { retVal = MSG_RTN_IGNORED; } return (retVal); } //dptDevice_C::checkBusy() //Function - dptDevice_C::queryDiag() - start //=========================================================================== // //Description: // // This function returns detailed information about a scheduled //diagnostic. // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::queryDiag(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB for a DPT multi-function command ccb_P->mfCmd(MFC_DIAG_QUERY_SCHEDULE); // Target this device ccb_P->target(this); // The HBA must intercept this command ccb_P->setInterpret(); // Transfer data from the HBA ccb_P->input(); // Send the CCB to hardware if ((retVal = launchCCB(ccb_P)) == MSG_RTN_COMPLETED) { // Swap the data into little endian format dptScheduleDiag_S *sd_P = (dptScheduleDiag_S *) ccb_P->defData; sd_P->scsiSwap(); // Return the diagnostic scheduling information if (!fromEng_P->insert(ccb_P->defData,dptScheduleDiag_S::size())) retVal = MSG_RTN_DATA_OVERFLOW; } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptDevice_C::queryDiag() - end //Function - dptDevice_C::scheduleDiag() - start //=========================================================================== // //Description: // // This function schedules a firmware based diagnostic on this //device. // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::scheduleDiag(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = ERR_GET_CCB; // If their is already a diagnostic scheduled on this device... if (scheduledDiag) retVal = MSG_RTN_FAILED | ERR_DIAG_SCHEDULED; // If this is a component of a firmware array... else if (isComponent() && (getLevel() == 2)) // If the parent or any components have a diagnostic scheduled... if (parent.dev_P->chkCompDiags()) retVal = MSG_RTN_FAILED | ERR_DIAG_SCHEDULED; // Copy the specified data into the user if (toEng_P->writeIndex > dptScheduleDiag_S::size()) retVal = MSG_RTN_DATA_OVERFLOW; else if (toEng_P->writeIndex == 0) retVal = MSG_RTN_DATA_UNDERFLOW; // If its OK to start the diagnostic... if (retVal == ERR_GET_CCB) { engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB for a DPT multi-function command ccb_P->mfCmd(MFC_DIAG_SCHEDULE); // Target this device ccb_P->target(this); // The HBA must intercept this command ccb_P->setInterpret(); // Initialize the output data buffer ccb_P->clrData(); // Transfer data to the HBA ccb_P->output(); // Copy the user data into the output buffer toEng_P->extract(ccb_P->defData,toEng_P->writeIndex); // Swap the bytes into big endian format dptScheduleDiag_S *sd_P = (dptScheduleDiag_S *) ccb_P->defData; sd_P->scsiSwap(); #ifdef _SINIX_ADDON if ((sd_P->getTestType() == SSUB_VERIFY) && (scsiFlags2 & FLG_DEV_NO_VERIFY)) retVal = ERR_DIAG_NOT_ACTIVE; else // Send the CCB to hardware if ((retVal = launchCCB(ccb_P)) == MSG_RTN_COMPLETED) // Set the diagnostic status updateDiagStatus(); #else // Send the CCB to hardware if ((retVal = launchCCB(ccb_P)) == MSG_RTN_COMPLETED) // Set the diagnostic status updateDiagStatus(); #endif // Free the CCB ccb_P->clrInUse(); } } return (retVal); } //dptDevice_C::scheduleDiag() - end //Function - dptDevice_C::isFWdiagCapable() - start //=========================================================================== // //Description: // // This function determines if this device is capable of performing //firmware based diagnostics. // //--------------------------------------------------------------------------- uINT dptDevice_C::isFWdiagCapable() { return (myHBA_P()->isFWdiagCapable() && (getLevel() >= 1) && (getLevel() <=2)); } //dptDevice_C::isFWdiagCapable() - end //Function - dptDevice_C::checkRebuild() - start //=========================================================================== //Description: // This function checks all components to ensure a successful //rebuild operation can be performed. //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::checkRebuild() { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (isReal() && isLogical()) { // If a software array... if (getLevel() == 0) { // Check the dptDevice_C *comp_P = (dptDevice_C *) compList.reset(); while (comp_P != NULL) { // If a logical component (safety)... if (comp_P->isLogical()) { // Check the logical's components retVal = comp_P->checkRebuild(); if (retVal != MSG_RTN_IGNORED) break; } comp_P = (dptDevice_C *) compList.next(); } } else { // # of data drives in the array uLONG numDataDrives = compList.getNumObjs() - redundants; // Minimum component capacity uLONG minCompCapacity = capacity.maxLBA; uLONG raidTableSize = (myHBA_P()->isI2O()) ? GEN5_RAID_TABLE_SIZE : RAID_TABLE_SIZE; if (numDataDrives) minCompCapacity = (minCompCapacity / numDataDrives) + raidTableSize; // Check all component capacities dptDevice_C *comp_P = (dptDevice_C *) compList.reset(); while (comp_P != NULL) { // If a physical component... if (!comp_P->isLogical()) // Update the component's capacity comp_P->getCapacity(); // If a non-zero capacity and the component is too small... if (comp_P->getMaxPhyLBA() && (comp_P->getMaxPhyLBA() < minCompCapacity)) retVal = MSG_RTN_FAILED | ERR_RAID_COMP_SIZE; comp_P = (dptDevice_C *) compList.next(); } } } return (retVal); } //dptDevice_C::checkRebuild() - end //Function - dptDevice_C::rtnProgress() - start //=========================================================================== // //Description: // // This function returns the progress status of a build/rebuild/verify //operation. // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::rtnProgress(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; uLONG verifyErrorCnt = 0; uLONG totalBlks; uLONG progress; // If formatting... if (status.main == PMAIN_STAT_FORMAT) { retVal = MSG_RTN_COMPLETED; progress = checkFmtStatus(&totalBlks); } else { // Update the diagnostic status and return the progress info retVal = updateDiagStatus(fromEng_P); // If progress information was returned from the diag status cmd... if ((retVal == MSG_RTN_COMPLETED) || (retVal == MSG_RTN_DATA_OVERFLOW)) return (retVal); retVal = MSG_RTN_IGNORED; fromEng_P->reset(); // If an array... if (getRAIDtype()!=RAID_NONE) { // Determine if any component has a diagnostic in progress uINT compDiagInProgress = 0; dptDevice_C *comp_P = (dptDevice_C *) compList.reset(); while (comp_P) { comp_P->updateDiagStatus(); if (comp_P->status.main == SMAIN_FW_DIAGNOSTIC) { compDiagInProgress = 1; break; } comp_P = (dptDevice_C *) compList.next(); } // If no component has a diagnostic in progress if (!compDiagInProgress) // Update the current progress retVal = updateLAPstatus(0,&progress,&verifyErrorCnt,&totalBlks); } } if (retVal == MSG_RTN_COMPLETED) { // Return the last block completed fromEng_P->insert(progress); // Return the capacity fromEng_P->insert(totalBlks); // Return the device's status fromEng_P->insert(&status,sizeof(dptStatus_S)); // Return the device's verify error count fromEng_P->insert(verifyErrorCnt); // Insert all zeros for the diagnostic specific information uLONG tempLong = 0; uCHAR tempChar = 0; fromEng_P->insert(tempLong); fromEng_P->insert(tempLong); fromEng_P->insert(tempLong); fromEng_P->insert(tempLong); if (!fromEng_P->insert(tempChar)) retVal = MSG_RTN_DATA_OVERFLOW; } return (retVal); } //dptDevice_C::rtnProgress() - end //Function - dptDevice_C::saveDPTname() - start //=========================================================================== // //Description: // // This function saves the device's DPT name to hardware. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::saveDPTname() { DPT_RTN_T retVal = MSG_RTN_IGNORED; if ( isReal() && (getRAIDtype()!=RAID_NONE) && (getLevel() <= 1) && (scsiFlags & FLG_ENG_NEW_NAME) ) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Clear the data buffer ccb_P->clrData(); // Prepare the CCB to do a mode select ccb_P->modeSelect(DPT_NAME_PAGE,DPT_NAME_SIZE+2); //Indicate that this is a RAID command ccb_P->setRAIDcmd(); // Copy the DPT name into the output buffer memcpy(ccb_P->modeParam_P->getData(),dptName,DPT_NAME_SIZE); // Send the CCB to hardware retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) // Clear the new name flag scsiFlags &= ~FLG_ENG_NEW_NAME; // Free the CCB ccb_P->clrInUse(); } } return (retVal); } //dptDevice_C::saveDPTname() - end //Function - dptDevice_C::getDPTname() - start //=========================================================================== // //Description: // // This function reads the device's DPT name from hardware. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::getDPTname() { DPT_RTN_T retVal = MSG_RTN_IGNORED; if ( (getRAIDtype()!=RAID_NONE) && (getLevel() <= 1) ) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Prepare the CCB to do a mode select ccb_P->modeSense(DPT_NAME_PAGE); //Indicate that this is a RAID command ccb_P->setRAIDcmd(); // Send the CCB to hardware if ((retVal = launchCCB(ccb_P))==MSG_RTN_COMPLETED) { // Copy the DPT name into the output buffer memcpy(dptName,ccb_P->modeParam_P->getData(),DPT_NAME_SIZE); // Null terminate the DPT name string dptName[DPT_NAME_SIZE] = 0; // Clear the new name flag scsiFlags &= ~FLG_ENG_NEW_NAME; } // Free the CCB ccb_P->clrInUse(); } } return (retVal); } //dptDevice_C::getDPTname() - end //Function - dptDevice_C::writeHandler() - start //=========================================================================== // //Description: // // This function performs a SCSI write operation for this device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::writeHandler(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; engCCB_C *ccb_P; uLONG rwStartLBA; uSHORT rwBlocks; if (isReal()) { retVal = MSG_RTN_DATA_UNDERFLOW; // Get the read/write start LBA toEng_P->extract(rwStartLBA); // Get the read/write # of blocks if (toEng_P->extract(rwBlocks)) { // Insure the data buffer is as large as the block count if ((capacity.blockSize*rwBlocks) <= (toEng_P->allocSize-toEng_P->readIndex)) { // Insure the request doesn't exceed the device's capacity if ((rwStartLBA+rwBlocks-1)>capacity.maxPhysLBA) retVal = MSG_RTN_FAILED | ERR_RW_EXCEEDS_CAPACITY; else { retVal = MSG_RTN_FAILED | ERR_GET_CCB; ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to do a SCSI write ccb_P->write(rwStartLBA,rwBlocks,(uSHORT)capacity.blockSize, ptrToLong(toEng_P->data+toEng_P->readIndex)); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); } } } } } return (retVal); } //dptDevice_C::writeHandler() - end //Function - dptDevice_C::readHandler() - start //=========================================================================== // //Description: // // This function performs a SCSI read operation for this device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::readHandler(dptBuffer_S *toEng_P, dptBuffer_S *fromEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; engCCB_C *ccb_P; uLONG rwStartLBA; uSHORT rwBlocks; if (isReal()) { retVal = MSG_RTN_DATA_UNDERFLOW; // Get the read/write start LBA toEng_P->extract(rwStartLBA); // Get the read/write # of blocks if (toEng_P->extract(rwBlocks)) { retVal = MSG_RTN_DATA_OVERFLOW; // Insure the data buffer is as large as the block count if ((capacity.blockSize*rwBlocks) <= fromEng_P->allocSize) { // Insure the request doesn't exceed the device's capacity if ((rwStartLBA+rwBlocks-1)>capacity.maxPhysLBA) retVal = MSG_RTN_FAILED | ERR_RW_EXCEEDS_CAPACITY; else { retVal = MSG_RTN_FAILED | ERR_GET_CCB; ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to do a SCSI read ccb_P->read(rwStartLBA,rwBlocks,(uSHORT)capacity.blockSize, ptrToLong(fromEng_P->data)); // Send the CCB to hardware retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) // Set the return data size fromEng_P->writeIndex = capacity.blockSize*rwBlocks; // Free the CCB ccb_P->clrInUse(); } } } } } return (retVal); } //dptDevice_C::readHandler() - end //Function - dptDevice_C::fmtHandler() - start //=========================================================================== // //Description: // // This function attempts to perform a low-level SCSI format on //this device. // // fmtControl: // Bit: Description, If set... // ---- ---------------------- // 0 Disable certification // 1 Attempt to terminate immediately // 2 (Used internally as the valid init pattern bit) // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- // header lengths #define MODE_PARAM_HEADER_LEN 4 #define MODE_PARAM_BLOCK_LEN 8 #define FORMAT_DEVICE_BLOCK_LEN 24 // Mode param header field offsets #define MODE_PARAM_BLOCK_HEADER_BLK_DESC_LEN_OFST 3 // Mode param block field offsets #define MODE_PARAM_BLOCK_BLOCK_SIZE_OFST 5 #define MODE_PARAM_BLOCK_NUM_BLOCKS_OFST 1 // format block field offsets #define FORMAT_DEVICE_BLOCK_LEN_OFST 5 #define TRUE 1 #define FALSE 0 DPT_RTN_T dptDevice_C::fmtHandler(dptBuffer_S *toEng_P, dptBuffer_S *fromEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; uSHORT fmtControl; uSHORT blockSize = 0; uSHORT initPattern; uSHORT blockSizeFailure = 0; engCCB_C *ccb_P; int is_Cheetah = FALSE; // If this device is real... if (isReal()) { // If a format is currently in progress... if (((status.main == PMAIN_STAT_FORMAT) && ((status.sub == PSUB_STAT_IN_PROGRESS) || status.sub == PSUB_STAT_CLEARING))) return (MSG_RTN_FAILED | ERR_FORMATTING); // Get the format control flags if (!toEng_P->extract(fmtControl)) // Use defaults fmtControl = 0; // Get the specified block size if (!toEng_P->extract(blockSize)) // Indicate that a block size was not specified blockSize = 0; // Get the specified initialization pattern if (toEng_P->extract(initPattern)) // Indicate that an initialization pattern was specified fmtControl |= 0x04; else { initPattern = 0; // Indicate that no initilization pattern was specified fmtControl &= ~0x04; } retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get the CCB ccb_P = getCCB(); if (ccb_P!=NULL) { int isSeagate = 0; // If the block size needs to be changed... if (blockSize && (blockSize != phyBlockSize)) { reverseBytes(blockSize); // If a Seagate drive... (Fix for Seagate Cheetah drives) if (findSubString((uCHAR *)"SEAGATE", (uCHAR *)descr.vendorID, 8, 8, 0x02)) { isSeagate = 1; memset(ccb_P->dataBuff_P, 0, 12); ccb_P->dataBuff_P[3] = 8; // Set the last 2 bytes to the desired block size setU2(ccb_P->dataBuff_P, 10, blockSize); // Initialize the CDB ccb_P->modeSelect6(0, 0, 0); // Send the block descriptor only if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) blockSizeFailure = 0; ccb_P->reInit(); } blockSizeFailure = 1; // Get the format device page ccb_P->modeSense6(0x03,0,8); if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) { ccb_P->reInit(); // Clear the mode parameter header and block descriptor bytes memset(ccb_P->dataBuff_P, 0, 3); long blockDescriptorLen = ccb_P->dataBuff_P[3]; uCHAR *blockDescriptor_P = ccb_P->dataBuff_P + sizeof(modeHeader6_S); // For each block descriptor... while (blockDescriptorLen > 0) { // Clear the first 6 bytes memset(blockDescriptor_P, 0, 6); // Set the last 2 bytes to the desired block size setU2(blockDescriptor_P, 6, blockSize); // Decrement the block descriptor count blockDescriptorLen -= 8; // Point to the next block descriptor blockDescriptor_P += 8; } // Initialize the CCB ccb_P->modeSelect6(0x03,0x16+2); // Set the desired block size in the mode page data setU2(ccb_P->modeParam_P->getData(),10,blockSize); if (fmtControl & 0x08) // Allow drive to compute sectors/track setU2(ccb_P->modeParam_P->getData(),8,0); // Send the format device page if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) blockSizeFailure = 0; } ccb_P->reInit(); } // If the desired block size could not be set... if (blockSizeFailure) retVal = MSG_RTN_FAILED | ERR_FORMAT_BLK_SIZE; else { // Clear all unused flags fmtControl &= 0x07; // If a Seagate drive on a Gen-4 or older controller... if (isSeagate && !myHBA_P()->isI2O()) { // Send an un-embellished format command directly to the device ccb_P->eataCP.scsiCDB[0] = 0x04; // Send the format command if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) blockSizeFailure = 0; } // If this device's HBA supports the "interpret format"... else if (myHBA_P()->isInterpretFormat()) // Try to let the HBA disconnect & initialize the drive retVal = doFormat(ccb_P,fromEng_P,fmtControl,initPattern,1); // Send the format command directly to the device else { // Issue the SCSI format directly to the device retVal = doFormat(ccb_P,fromEng_P,fmtControl,initPattern,0); // If terminate immediate was set & a failure occurred... if ((fmtControl & 0x02) && (retVal & MSG_RTN_FAILED)) { // Clear the terminate immediate bit and try again fmtControl &= ~0x0002; // Issue the SCSI format directly to the device retVal = doFormat(ccb_P,fromEng_P,fmtControl,initPattern,0); } } // If the format has been started... if ((retVal == MSG_RTN_STARTED) || (retVal == MSG_RTN_COMPLETED)) { status.display = DSPLY_STAT_BUILD; status.main = PMAIN_STAT_FORMAT; status.sub = 0; if (retVal == MSG_RTN_COMPLETED) updateStatus(); } } // Free the CCB ccb_P->clrInUse(); } } return (retVal); } //dptDevice_C::fmtHandler() - end //Function - dptDevice_C::doFormat() - start //=========================================================================== // //Description: // // This function actually issues a SCSI format to a device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::doFormat(engCCB_C *ccb_P, dptBuffer_S *fromEng_P, uSHORT fmtFlags, uSHORT initPattern, uSHORT goThruHBA ) { // If quantum drive... if (memcmp(descr.vendorID,"QUANTUM",7)==0) { ccb_P->reInit(); ccb_P->modeSense6(0x39); // Send the CCB to hardware launchCCB(ccb_P); ccb_P->reInit(); ccb_P->defData[0] = 0; // Enable the Quantum unique initialization byte (byte #2) // in the format CDB ccb_P->modeParam_P->getData()[0] |= 0x08; ccb_P->modeSelect6(0x39,6+2); // Send the CCB to hardware launchCCB(ccb_P); } ccb_P->reInit(); ccb_P->clrData(); // Initialize the CCB to perform a SCSI format ccb_P->format(fmtFlags,initPattern); // If it is desired to let the HBA disconnect and initialize the device... if (goThruHBA) ccb_P->setInterpret(); // Send the CCB to hardware DPT_RTN_T retVal = launchCCB(ccb_P); if (retVal != MSG_RTN_COMPLETED) { // Get a pointer to the request sense info uCHAR *reqSense_P = getRequestSense(ccb_P); if (reqSense_P !=NULL) { fromEng_P->reset(); // Return the request sense data fromEng_P->insert(reqSense_P,ccb_P->eataCP.reqSenseLen); } } // If the terminate immediate bit was set... else if (fmtFlags & 0x02) // Indicate that a format is in progress... retVal = MSG_RTN_STARTED; return (retVal); } //dptDevice_C::doFormat() - end //Function - dptDevice_C::getRequestSense() - start //=========================================================================== // //Description: // // This function returns a pointer to the request sense buffer //associated with the command in the specified CCB. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR * dptDevice_C::getRequestSense(engCCB_C *ccb_P) { uCHAR *reqSense_P = NULL; // If a check condition.. if (ccb_P->scsiStatus == 2) { // If auto request sense was enabled... if (ccb_P->eataCP.flags & CP_REQ_SENSE) // Return the sense information to the user reqSense_P = ccb_P->defReqSense; else { ccb_P->reInit(); // Initialize the CCB to perform a request sense ccb_P->reqSense(); if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) reqSense_P = ccb_P->dataBuff_P; } } return (reqSense_P); } //dptDevice_C::getRequestSense() - end //Function - dptDevice_C::rtnConfigInfo() - start //=========================================================================== // //Description: // // This function returns this object's configuration information. //This is the information that is stored in the system configuration //file. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::rtnConfigInfo(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; uLONG bytesLeft,bytesNeeded; uLONG compSize; dptAddr_S devAddr; dptBasic_S *basic_P; uLONG startObjIndex; //uLONG actualBytesWritten; uLONG *objSize_P; // Get the # of bytes remaining in the buffer bytesLeft = fromEng_P->allocSize - fromEng_P->writeIndex; // Calculate the component list size compSize = compList.size() * (sizeof(raidRange_S) + sizeof(dptAddr_S)); // Calculate the # of bytes required to save the config. info bytesNeeded = sizeof(uLONG) + infoSize() + sizeof(uLONG) + compSize; // If there is enough space to return this object's information... if (bytesLeft >= bytesNeeded) { // Indicate that this object's info was returned retVal = MSG_RTN_COMPLETED; // Return the size of the object info objSize_P = (uLONG *) (fromEng_P->data+fromEng_P->writeIndex); fromEng_P->insert(infoSize()); // Get a pointer to this object's config. info basic_P = (dptBasic_S *) (fromEng_P->data+fromEng_P->writeIndex); // Return this object's information startObjIndex = fromEng_P->writeIndex; rtnInfo(fromEng_P); // hnt - CR 2392 - Some of the members in the dptDevInfo_S struct are packed // on a 2-byte boundary so when infoSize() returns the size, it may actually // be greater than the number of bytes written out due to the packing under // GNU C *objSize_P = fromEng_P->writeIndex - startObjIndex; if (basic_P->attachedTo!=0) { // Return this object's manager SCSI ID instead of tag basic_P->attachedTo = myMgr_P()->getAddrL(); // Reverse the SCSI address bytes reverseBytes((uLONG &) basic_P->attachedTo); } // Return the component list size fromEng_P->insert(compSize); // Return the component information dptDevice_C *dev_P = (dptDevice_C *) compList.reset(); while (dev_P!=NULL) { devAddr = dev_P->getAddr(); // Return the component's SCSI address fromEng_P->insert(&devAddr,sizeof(dptAddr_S)); // Return the component's stripe information fromEng_P->insert(dev_P->parent.startLBA); fromEng_P->insert(dev_P->parent.stripeSize); fromEng_P->insert(dev_P->parent.numStripes); // Get the next device dev_P = (dptDevice_C *) compList.next(); } } return (retVal); } //dptDevice_C::rtnConfigInfo() - end //Function - dptDevice_C::rtnIOstats() - start //=========================================================================== // //Description: // // Return this device's statistics information. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::rtnIOstats(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; if (fromEng_P->allocSize>=sizeof(devStats_S)) { // Initialize the return statistics to zero memset(fromEng_P->data,0,sizeof(devStats_S)); // Get this device's statistics retVal = getIOstats((uLONG *)fromEng_P->data,1); // Set the buffer's write indexes fromEng_P->writeIndex = sizeof(devStats_S); } return (retVal); } //dptDevice_C::rtnIOstats() - end //Function - dptDevice_C::getIOstats() - start //=========================================================================== // //Description: // // This function gets the read/write statistics information for //this device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::getIOstats(uLONG *statBuff_P,uCHAR savePage) { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (getObjType()==DPT_SCSI_DASD) { if (myHBA_P()->isI2O()) { // If a physical device or top level array if ((getLevel() == 2) || (parent.dev_P == NULL)) // Add this device's read/write stats to the stat buffer retVal = addRWstats(statBuff_P,savePage); // If clearing the stats... if (!savePage) { if (retVal == MSG_RTN_IGNORED) retVal = MSG_RTN_COMPLETED; // For all components... dptDevice_C *dev_P = (dptDevice_C *) compList.reset(); while (dev_P!=NULL) { // Return the component's statistic information if (retVal == MSG_RTN_COMPLETED) retVal = dev_P->getIOstats(statBuff_P,savePage); else dev_P->getIOstats(statBuff_P,savePage); if (retVal == MSG_RTN_IGNORED) retVal = MSG_RTN_COMPLETED; // Get the next component dev_P = (dptDevice_C *) compList.next(); } } } else { // If clearing stats or an array... if ((getLevel()<=1) || !savePage) { retVal = MSG_RTN_COMPLETED; // For all components... dptDevice_C *dev_P = (dptDevice_C *) compList.reset(); while (dev_P!=NULL) { // Don't duplicate stats for phys device at FW array ID if ((getLevel()!=1) || (getID()!=dev_P->getID())) { // Return the component's statistic information if (retVal == MSG_RTN_COMPLETED) retVal = dev_P->getIOstats(statBuff_P,savePage); else dev_P->getIOstats(statBuff_P,savePage); } // Get the next component dev_P = (dptDevice_C *) compList.next(); } } // If clearing stats or a firmware level logical or physical if (!savePage || ((getLevel()>=1) && (getLevel()<=2))) // Add this device's read/write stats to the stat buffer retVal = addRWstats(statBuff_P,savePage); } } // end if (getObjType()==DPT_SCSI_DASD) return (retVal); } //dptDevice_C::getIOstats() - end //Function - dptDevice_C::setLAPcopyDir() - start //=========================================================================== // //Description: // // This function sets the logical array page RAID-1 rebuild (copy) //direction. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::setLAPcopyDir(uCHAR ©Dir) { dptDevice_C *comp1_P,*comp2_P; dptDevice_C *target_P = NULL; dptDevice_C *source_P = NULL; // If HBA level RAID-1... if ((getRAIDtype()==1) && (getLevel()==1)) { // Get a pointer to the first component comp1_P = (dptDevice_C *) compList.reset(); // Get a pointer to the second component comp2_P = (dptDevice_C *) compList.next(); if ((comp1_P!=NULL) && (comp2_P!=NULL)) { // If the first component is the copy target... if (comp1_P->isCopyTarget()) { target_P = comp1_P; source_P = comp2_P; } // If the second component is the copy target... else if (comp2_P->isCopyTarget()) { target_P = comp2_P; source_P = comp1_P; } if (target_P!=NULL) { // If the target's SCSI address is greater than the source... if (target_P->getAddr()>source_P->getAddr()) copyDir |= 0xc0; else copyDir |= 0x80; } } } } //dptDevice_C::setLAPcopyDir() - end /* //Function - dptDevice_C::writeFWD() - start //=========================================================================== // //Description: // // This function writes to the downloaded firmware portion of the //reserve block. If numBlocks or startAddr is zero, this function //will clear the downloaded firmware indicator. Otherwise, the //downloaded firmware number of blocks and start address will be set //to the specified values. // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::writeFWD(engCCB_C *ccb_P, uSHORT numBlocks, uLONG startAddr ) { DPT_RTN_T retVal; // Re-initialize the CCB ccb_P->reInit(); // Initialize the CCB to perfrom a SCSI read ccb_P->read(getMaxPhyLBA(),1,512,ptrToLong(ccb_P->defData)); // Read the reserve block if ((retVal = launchCCB(ccb_P))==MSG_RTN_COMPLETED) { // Set the downloaded FW indicator ("FW" | numBlocks) uLONG indicator = 0x46570000L | numBlocks; // If no blocks or an invalid start address specified... if ((numBlocks==0) || (startAddr==0)) { // Clear the downloaded FW indicator indicator = 0; startAddr = 0; } reverseBytes(indicator); setU4(ccb_P->defData,0x2c,indicator); // Set the downloaded FW start address reverseBytes(startAddr); setU4(ccb_P->defData,0x30,startAddr); // Initialize the CCB to perform a SCSI write ccb_P->write(getMaxPhyLBA(),1,512,ptrToLong(ccb_P->defData)); // Write the modified reserve block retVal = launchCCB(ccb_P); } return (retVal); } //dptDevice_C::writeFWD() - end */ //Function - dptDevice_C::handleREOD() - start //=========================================================================== // //Description: // // This function reserves space at the end of a non-removeable DASD //device for use by DPT. This space is currently used for a reserve block, //a RAID table, and downloaded FW code. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::handleREOD(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; uSHORT numBlocks; // Get the number of blocks to reserve if (toEng_P->extract(numBlocks)) // Reserve the specified # of blocks retVal = reserveEndOfDisk(numBlocks); return(retVal); } //dptDevice_C::handleREOD() - end //Function - dptDevice_C::reserveEndOfDisk() - start //=========================================================================== // //Description: // // This function reserves space at the end of a non-removeable DASD //device for use by DPT. This space is currently used for a reserve block, //a RAID table, and downloaded FW code. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- #ifdef _SINIX_ADDON DPT_RTN_T dptDevice_C::reserveEndOfDisk(uLONG numBlocks) #else DPT_RTN_T dptDevice_C::reserveEndOfDisk(uSHORT numBlocks) #endif { DEBUG_BEGIN(6, dptDevice_C::reserveEndOfDisk()); DPT_RTN_T retVal; if (isRemoveable()) retVal = MSG_RTN_FAILED | ERR_RSV_REMOVEABLE; else if (getObjType()!=DPT_SCSI_DASD) retVal = MSG_RTN_FAILED | ERR_RSV_NOT_DASD; else if (numBlocks==0) retVal = MSG_RTN_FAILED | ERR_RSV_NON_ZERO; else { retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Zero the data buffer ccb_P->clrData(); // Initialize the CCB to do a mode select page 0x3e ccb_P->modeSelect6(0x3e,0x010+2); // Set the interpret bit ccb_P->setInterpret(); uLONG startLBA = capacity.maxPhysLBA - numBlocks + 1; reverseBytes(startLBA); setU4(ccb_P->modeParam_P->getData(),0,startLBA); // Send the CCB to hardware retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) capacity.maxLBA = capacity.maxPhysLBA - numBlocks; // Free the CCB ccb_P->clrInUse(); DEBUG(6, PRT_ADDR << (int)numBlocks << "reserved at end of disk"); } // end if (ccb_P!=NULL) } return(retVal); } //dptDevice_C::reserveEndOfDisk() - end //Function - dptDevice_C::getLastUserBlk() - start //=========================================================================== // //Description: // // This function reads the first reserved block used by DPT and //returns the last block available for use by an OS. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptDevice_C::getLastUserBlk() { // Default is the physical capacity uLONG retVal = capacity.maxPhysLBA; // If this is an HBA physical DASD device... if ((getLevel()==2) && (getObjType()==DPT_SCSI_DASD)) { // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to do a log sense page 0x3e // Limit data buffer to 0x60 bytes ccb_P->modeSense(0x3e,0x60); // Set the interpret bit ccb_P->setInterpret(); // Send the CCB to hardware if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // Get the first reserved block # uLONG startLBA = getU4(ccb_P->modeParam_P->getData(),0); reverseBytes(startLBA); // If there is a valid first reserved block # if ((startLBA>0) && (startLBA<=capacity.maxPhysLBA)) { // Return the first block available for use retVal = startLBA - 1; } } // end if (launchCCB()) // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) } // end if (HBA physical DASD) return(retVal); } //dptDevice_C::getLastUserBlk() - end //Function - dptDevice_C::enableTempSpace() - start //=========================================================================== // //Description: // // This function attempts to reserve 0x200 blocks at the end of //all HBA physical component devices. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::enableTempSpace() { DEBUG_BEGIN(1, dptDevice_C::enableTempSpace()); #ifdef _SINIX_ADDON uLONG spaceToReserve; #else uSHORT spaceToReserve; #endif dptDevice_C *comp_P = (dptDevice_C *) compList.reset(); while (comp_P!=NULL) { // If temporary space has been allocated... if (comp_P->prevMaxLBA!=0) { // Determine how much space to reserve #ifdef _SINIX_ADDON spaceToReserve = comp_P->getMaxPhyLBA() - comp_P->getLastLBA(); DEBUG(1, PRT_DADDR(comp_P) << \ " reserveEndOfDisk: new=" << spaceToReserve << " old=" << \ (int) (comp_P->getMaxPhyLBA() - comp_P->prevMaxLBA)); #else spaceToReserve = (uSHORT) (comp_P->getMaxPhyLBA() - comp_P->getLastLBA()); // Limit reserved space (safety) if (spaceToReserve > RESERVED_SPACE_RAID) spaceToReserve = RESERVED_SPACE_RAID; DEBUG(1, PRT_DADDR(comp_P) << " spaceToReserve: " << spaceToReserve); #endif // Reserve the space comp_P->reserveEndOfDisk(spaceToReserve); // Clear the previous max LBA comp_P->prevMaxLBA = 0; } comp_P = (dptDevice_C *) compList.next(); } } //dptDevice_C::enableTempSpace() - end //Function - dptDevice_C::zapPartition() - start //=========================================================================== // //Description: // // This function clears block zero of this device to delete a //partition table that may exist on the device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::zapPartition() { DPT_RTN_T retVal = MSG_RTN_COMPLETED; #ifdef _DPT_AIX uLONG zap = myConn_P()->isPartZap(); myConn_P()->setPartZap(); #endif // If partition table zapping is enabled... if (myConn_P()->isPartZap()) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Zero the data bytes ccb_P->clrData(); // If FW physical level or higher... //if (getLevel()<=2) - Fix zapping a valid drive's parition table when redirection is active // Don't set the EATA physical unit bit //ccb_P->setNoEATAphys(); // Clear block 0 ccb_P->write(0x00L,1,(uSHORT)capacity.blockSize,ptrToLong(ccb_P->defData)); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Clear block 1-16 # if (defined(_DPT_FREE_BSD) || defined(_DPT_BSDI)) long block = 0; while (retVal == MSG_RTN_COMPLETED) { ccb_P->reInit(); ccb_P->write(++block,1,(uSHORT)capacity.blockSize,ptrToLong(ccb_P->defData)); // Send the CCB to hardware retVal = launchCCB(ccb_P); if (block == 15) { break; } } # else /* Solaris and others */ if (retVal == MSG_RTN_COMPLETED) { // Clear block 1 ccb_P->reInit(); ccb_P->write(0x01L,1,(uSHORT)capacity.blockSize,ptrToLong(ccb_P->defData)); // Send the CCB to hardware retVal = launchCCB(ccb_P); } # endif // Free the CCB ccb_P->clrInUse(); } } #ifdef _DPT_AIX if (!zap) myConn_P()->clrPartZap(); #endif return (retVal); } //dptDevice_C::zapPartition() - end //Function - dptDevice_C::zapCompPartitions() - start //=========================================================================== // //Description: // // This function clears block zero of this device to delete a //partition table that may exist on the device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevice_C::zapCompPartitions() { dptDevice_C *comp_P = (dptDevice_C *) compList.reset(); while (comp_P!=NULL) { // Delete the component device's partition table comp_P->zapPartition(); // Get the next component comp_P = (dptDevice_C *) compList.next(); } } //dptDevice_C::zapCompPartitions() - end //Function - dptDevice_C::quietBus() - start //=========================================================================== // //Description: // // This function quiets the SCSI bus and optionally blinks the //LED of this device. // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::quietBus(dptBuffer_S *toEng_P) { uSHORT blinkMode = 1; uCHAR modifier = 0x80; if (!toEng_P->extract(blinkMode)) blinkMode = 0; if (blinkMode) modifier = 0xa0; return (sendMFC(MFC_QUIET,modifier)); } //dptDevice_C::quietBus() - end //Function - dptDevice_C::sendMFC() - start //=========================================================================== // //Description: // // This function sends a RAID multi-function command to this HBA. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::sendMFC(uCHAR inCmd,uCHAR inModifier) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB for a DPT multi-function command ccb_P->mfCmd(inCmd,inModifier); // Target this device ccb_P->target(this); // The controller should interpret this command ccb_P->setInterpret(); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptDevice_C::sendMFC() - end //Function - dptDevice_C::setPhyMagicNum() - start //=========================================================================== // //Description: // This function attempts to set a physical device's magic number //when the physical device is located on a different HBA than the array //being created. // // Warning: Because this function may call genMagicNum(), it should // never be called from within an objectList loop since // genMagicNum() also iterates through the objectList loop // and a re-entrancy error would occur. //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::setPhyMagicNum() { DPT_RTN_T retVal = ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P) { ccb_P->clrData(); // The HBA should interpret this command ccb_P->setInterpret(); // Initialize the CCB to do a physical device magic # page ccb_P->modeSelect(0x32,0x04+2); uLONG *magic_P = (uLONG *) ccb_P->modeParam_P->getData(); // If no magic number has been assigned to this drive... if (!getMagicNum()) // Assign a magic number magicNum = myConn_P()->genMagicNum(); // Set the magic # setU4(magic_P,0,getMagicNum()); #if !defined (SNI_MIPS) && !defined(_DPT_BIG_ENDIAN) osdSwap4(magic_P); #endif // If the command was successful retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptDevice_C::setPhyMagicNum() - end //Function - dptDevice_C::updateSmartStatus() - start //=========================================================================== // //Description: // This function updates a drive's SMART status. // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::updateSmartStatus() { DPT_RTN_T retVal = ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P) { // Initialize the CCB for a DPT multi-function command ccb_P->mfCmd(MFC_SMART_STATUS); // Target this device ccb_P->target(this); // The controller should interpret this command ccb_P->setInterpret(); // The status command ccb_P->input(); // Send the CCB to hardware if ((retVal = launchCCB(ccb_P)) == MSG_RTN_COMPLETED) { // If the device's SMART feature is enabled... if (ccb_P->defData[0] & 0x01) scsiFlags2 |= FLG_DEV_SMART_ACTIVE; else scsiFlags2 &= ~FLG_DEV_SMART_ACTIVE; // If SMART emulation is enabled... if (ccb_P->defData[0] & 0x02) scsiFlags2 |= FLG_DEV_SMART_EMULATION; else scsiFlags2 &= ~FLG_DEV_SMART_EMULATION; } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptDevice_C::updateSmartStatus() - end //Function - - start //=========================================================================== // //Description: // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::SetAccessRights(dptBuffer_S *from_P, dptBuffer_S *to_P) { // remote hbas do not show up in the list if ((strncmp(descr.vendorID, "DPT", 3) == 0) && (engType == 3)) return MSG_RTN_COMPLETED; DPT_RTN_T rtnVal = ERR_GET_CCB; // we are a component so set the rights from the raid parent if (isComponent() && getLevel() == 0) { ((dptDevice_C *)parent.dev_P)->SetAccessRights(from_P, to_P); } else { uCHAR acquire; // pull out the rights if (!to_P->extract(acquire)) rtnVal = MSG_RTN_DATA_UNDERFLOW; // pull out the new rights dptMultiInitList_S devRights; if (!to_P->extract(&devRights, devRights.size())) rtnVal = MSG_RTN_DATA_UNDERFLOW; // get the chan id uCHAR chanID = getAddr().chan << 5; chanID |= getAddr().id & 0x1f; devRights.setChanID(chanID); if (getAddr().id > 0x1f) devRights.setExtendedId(getAddr().id); // swap the rights devRights.scsiSwap(); engCCB_C *ccb_P = getCCB(); if (ccb_P) { // target the hba ccb_P->target(myHBA_P()); // get the hba's portion of the rights ccb_P->modeSense(0x2d); // send it if ((rtnVal = myHBA_P()->passCCB(ccb_P)) == MSG_RTN_COMPLETED) { dptMultiInitPage_S page, *page_P; // copy the hba's poritons of the access rights memcpy(&page, ccb_P->modeParam_P->getData(), page.size()); ccb_P->reInit(); ccb_P->target(myHBA_P()); // get the access rights mode page ccb_P->modeSelect(0x2d,(uSHORT) (2+dptMultiInitPage_S::size() + dptMultiInitList_S::size()), (acquire >> 1) | 0x80); ccb_P->modeParam_P->setPageCode(0x2d); // copy the data over page_P = (dptMultiInitPage_S *) ccb_P->modeParam_P->getData(); // what are we doing? memcpy(page_P, &page, page.size()); page_P->setAction((acquire & 0x01)+1); // go to just after the page page_P++; memcpy(page_P, &devRights, devRights.size()); // send the command if ((rtnVal = myHBA_P()->passCCB(ccb_P)) != MSG_RTN_COMPLETED) from_P->insert(tag()); } ccb_P->clrInUse(); } } return rtnVal; } // - end //Function - - start //=========================================================================== // //Description: // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDevice_C::GetAccessRights(dptBuffer_S *from_P) { // remote hbas do not show up in the list if ((strncmp(descr.vendorID, "DPT", 3) == 0) && (engType == 3)) return MSG_RTN_COMPLETED; DPT_RTN_T rtnVal = ERR_GET_CCB; // we are a component so set the rights from the raid parent if (isComponent() && getLevel() == 0) { ((dptDevice_C *)parent.dev_P)->GetAccessRights(from_P); } else { // my address dptAddr_S lookFor = getAddr(); engCCB_C *ccb_P = getCCB(); if (ccb_P) { // we are a component so get the rights from the raid parent if (isComponent()) lookFor = parent.dev_P->getAddr(); // target the hba ccb_P->target(myHBA_P()); // get the access rights mode page ccb_P->modeSense(0x2d); // send the command if ((rtnVal = myHBA_P()->passCCB(ccb_P)) == MSG_RTN_COMPLETED) { rtnVal = ERR_INVALID_TGT_TAG; // how many devices are there in the list uLONG numDevs = ccb_P->modeParam_P->getLength(); numDevs -= dptMultiInitPage_S::size(); numDevs /= dptMultiInitList_S::size(); int found = 0; // the first device in the list dptMultiInitList_S *devRights_P = (dptMultiInitList_S *) &ccb_P->modeParam_P->getData()[dptMultiInitPage_S::size()]; // setup the address to look for uCHAR chanID = lookFor.chan << 5; chanID |= lookFor.id & 0x1f; uCHAR extendedId = (lookFor.id > 0x1f) ? lookFor.id : 0; // for all there are or we found one while(numDevs-- && !found) { // swap it devRights_P->scsiSwap(); // do they match? if ((devRights_P->getChanID() == chanID) && (devRights_P->getExtendedId() == extendedId)) { // we found it, copy the data over found = 1; from_P->insert(devRights_P, devRights_P->size()); rtnVal = MSG_RTN_COMPLETED; } // next device devRights_P++; } } // Free the CCB ccb_P->clrInUse(); } } return rtnVal; } raidutils-0.0.6.orig/raideng/device.hpp0000664000175000000620000007352710044153310017726 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DEVICE_HPP #define __DEVICE_HPP //File - DEVICE.HPP //*************************************************************************** // //Description: // // This file contains the class definitions for all DPT device classes. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Class - dptCoreDev_C - start //=========================================================================== // //Description: // // This is the base class for all device classes (drives, tapes...). // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- //coreFlags // 1=Originates in a logical device list // 0=Originates in a physical device list const uSHORT FLG_ENG_LIST = 0x0001; // 1=The device is suppressed, 0=The device is not suppressed const uSHORT FLG_ENG_SUPPRESSED = 0x0002; // 1=The device was deliberately suppressed const uSHORT FLG_ENG_SUP_DESIRED = 0x0004; class dptCoreDev_C : public dptObject_C { // Friends............................................ // Needs to set attachedTo_P friend class dptCoreMgr_C; // Needs to access suppression flags friend class dptCoreCon_C; // Needs access to coreFlags friend class dptManager_C; // Data............................................... // Miscellaneous flags - see bit definitions above uSHORT coreFlags; // The highest level at which this device is visible uSHORT visibleLevel; protected: public: // Constructor/Destructor............................. dptCoreDev_C(); // Return private data................................ // Return this device's level of operation uSHORT getLevel(); // Return the highest level at which this manager is visible uSHORT getVisibility() { return (visibleLevel); } // Boolean Functions.................................. // Determines if this device originates in a logical device list uSHORT isLogical() { return (coreFlags & FLG_ENG_LIST); } // Determines if this device originates in a logical device list uSHORT isPhysical() { return (!(coreFlags & FLG_ENG_LIST)); } // Determines if a device is suppressed uSHORT isSuppressed() { return (coreFlags & FLG_ENG_SUPPRESSED); } // Determines if suppression is desired uSHORT isSupDesired() { return (coreFlags & FLG_ENG_SUP_DESIRED); } // Other Functions.................................... // Removes the suppression desired status from this device void supNotDesired(); }; //dptCoreDev_C - end //Class - dptSCSIdev_C::- start //=========================================================================== // //Description: // // This class defines a SCSI device. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- //scsiFlags // 1=The device is an emulated drive const uSHORT FLG_ENG_EMULATED = 0x0001; // 1=The device is emulated drive 1 (D:) // 0=The device is emulated drive 0 (C:) const uSHORT FLG_ENG_EMU_01 = 0x0002; // 1=The device has removeable media const uSHORT FLG_ENG_REMOVEABLE = 0x0004; // 1=The DPT name has not been saved to hardware const uSHORT FLG_ENG_NEW_NAME = 0x0008; // 1=A valid partition table was found on this device const uSHORT FLG_ENG_PTABLE = 0x0010; // 1=A valid partition uses the reserved block of this drive const uSHORT FLG_ENG_PTBL_OVERRUN = 0x0020; // 1=A DPT reserve block was detected at the end of this drive const uSHORT FLG_ENG_RESERVE_BLOCK = 0x0040; // 1=Downloaded firmware code exists on this drive const uSHORT FLG_ENG_DFW = 0x0080; // 1=This device has a valid previous SCSI address const uSHORT FLG_ENG_VALID_PADDR = 0x0100; // 1=This device is ECC protected const uSHORT FLG_ENG_ECC_PROTECTED = 0x0200; // this device is a new device to the array const uSHORT FLG_NEW_COMP = 0x0400; // this device is a expanded array const uSHORT FLG_EXPANDED_ARRAY = 0x8000; class dptSCSIdev_C : public dptCoreDev_C { // Friends............................................ // Needs access to dptName friend class dptSCSIcon_C; // Needs access to capacity friend class dptManager_C; // Needs access to capacity friend class dptRAIDdev_C; // Message Handlers................................... // Attempts to set this device's DPT name field DPT_RTN_T setDPTname(dptBuffer_S *); protected: // Data............................................... // Miscellaneous flags - see bit definitions above uSHORT scsiFlags; // More miscellaneous flags - see bit definitions in get_info.h uSHORT scsiFlags2; // More miscellaneous flags - see bit definitions in get_info.h uLONG scsiFlags3; // Path 2 flags uCHAR p2Flags; // Filler for long word alignment uCHAR notUsed[3]; // Negotiated bus speed in Mhz uSHORT busSpeed; // 0=Async mode, Non-zero = SCSI offset uSHORT scsiOffset; // SCSI transfer speed uSHORT xfrSpeed; // DPT unique device name uCHAR dptName[DPT_NAME_SIZE+2]; // Last block used by a partition uLONG lastPartitionBlk; // Last logical block prior to becoming a component device uLONG prevMaxLBA; // Device capacity information dptCapacity_S capacity; // Emulated parameter information dptEmuParam_S emulation; // This device's physical block (sector) size uSHORT phyBlockSize; // Virtual Functions.................................. // Return object information in the specified output buffer virtual DPT_RTN_T rtnInfo(dptBuffer_S *); // Set removeable media flag virtual void setRemoveable() { scsiFlags |= FLG_ENG_REMOVEABLE; } // Set SAF-TE flag virtual void setSAFTE() { scsiFlags2 |= FLG_DEV_SAFTE; }; // Set SCSI-3 Enclosure Services flag virtual void setSES() { scsiFlags2 |= FLG_DEV_SES; }; // Set absent object information from the specified input buffer virtual DPT_RTN_T setInfo(dptBuffer_S *,uSHORT); // Set the various object flags virtual void setObjFlags(uSHORT,uSHORT); // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); public: // Constructor/Destructor............................. dptSCSIdev_C(); ~dptSCSIdev_C(); // Virtual Functions.................................. // Return the size of this object's information structure virtual uLONG infoSize() { return (sizeof(dptDevInfo_S)); } // Get this object's flags virtual void getObjFlags(uSHORT &flg); // Set private data................................... // Indicate that a SCSI address change has occurred void setAddrChange() { status.flags |= FLG_STAT_ADDR_CHANGE; } // Clear SCSI address change indicator void clrAddrChange() { status.flags &= ~FLG_STAT_ADDR_CHANGE; } // Return private data................................ // The SCSI transfer speed uSHORT getXfrSpeed() { return (xfrSpeed); } // The last available LBA uLONG getLastLBA() { return (capacity.maxLBA); } // The last available physical LBA uLONG getMaxPhyLBA() { return (capacity.maxPhysLBA); } // The block claimed by a partition table uLONG getLastPartBlk() { return (lastPartitionBlk); } // Boolean Functions.................................. // Determines if the device has removeable media uSHORT isRemoveable() { return (scsiFlags & FLG_ENG_REMOVEABLE); } // Determines if the device is an emulated drive uSHORT isEmulated() { return (scsiFlags & FLG_ENG_EMULATED); } // Determines if this device is a ghost device uSHORT isGhost() { return (status.display==DSPLY_STAT_GHOST); } // Determines if this device is in a failed state uSHORT isFailed() { return (status.display==DSPLY_STAT_FAILED); } // Determines if this device is in optimal status uSHORT isOptimal() { return (status.display==DSPLY_STAT_OPTIMAL); } // Determines if this device has changed SCSI addresses uSHORT isAddrChange() { return (status.flags & FLG_STAT_ADDR_CHANGE); } // Determines if the previous address data is valid uSHORT isValidPrevAddr() { return (scsiFlags & FLG_ENG_VALID_PADDR); } // Determines if this drive is protected by DPT's ECC algorithm uSHORT isECCprotected() { return (scsiFlags & FLG_ENG_ECC_PROTECTED); } // Indicate that this drive is ECC protected void setECCprotected() { scsiFlags |= FLG_ENG_ECC_PROTECTED; } // Indicate that this drive is not ECC protected void clrECCprotected() { scsiFlags &= ~FLG_ENG_ECC_PROTECTED; } // Determines if this drive cannot change its block size // If this flag is not set, the block size may or may not // be changeable. If this flag is set, the block size is not // changeable. uSHORT isBlkSzNoChange() { return (scsiFlags2 & FLG_DEV_BLK_SZ_NO_CHG); } // Indicate that this drive cannot change its block size void setBlkSzNoChange() { scsiFlags2 |= FLG_DEV_BLK_SZ_NO_CHG; } // Indicate that this drive cannot change its block size void clrBlkSzNoChange() { scsiFlags2 &= ~FLG_DEV_BLK_SZ_NO_CHG; } // Sets the flag to indicate that a physical drive is a component // of a real array that has been deleted in the engine, but still // exists in hardware. void setHWmismatch1() { scsiFlags2 |= FLG_DEV_ARRAY_COMPONENT; } // Sets the flag to indicate that a physical drive is a component // of an array that exists in the engine, but has not been set // in hardware. void setHWmismatch2() { scsiFlags2 |= FLG_DEV_NEW_COMPONENT; } // Clears both hardware mismatch flags void clrHWmismatch2() { scsiFlags2 &= ~FLG_DEV_NEW_COMPONENT; } // Clears both hardware mismatch flags void clrHWmismatch() { scsiFlags2 &= ~(FLG_DEV_ARRAY_COMPONENT | FLG_DEV_NEW_COMPONENT); } // Determines if either hardware mismatch flag is set uSHORT isHWmismatch() { return (scsiFlags2 & (FLG_DEV_ARRAY_COMPONENT | FLG_DEV_NEW_COMPONENT)); } // determines if the array has been changed (expanded, etc) uSHORT isExpandedArray() { return (scsiFlags2 & FLG_DEV_ARRAY_EXPANDED); } // set the expanded array void setExpandedArray() { scsiFlags2 |= FLG_DEV_ARRAY_EXPANDED; } void clrExpandedArray() { scsiFlags2 &= ~FLG_DEV_ARRAY_EXPANDED; } // determines if this device was added to the array after it was built uSHORT isNewDeviceToArray() { return (scsiFlags2 & FLG_DEV_EXPANDED_COMPONENT); } void setNewDeviceToArray() { scsiFlags2 |= FLG_DEV_EXPANDED_COMPONENT; } void clrNewDeviceToArray() { scsiFlags2 &= ~FLG_DEV_EXPANDED_COMPONENT; } // Determines if a Solaris partition has been detected uSHORT isSolarisPartition() { return (scsiFlags2 & FLG_DEV_SOLARIS_PARTITION); } void setSolarisPartition() { scsiFlags2 |= FLG_DEV_SOLARIS_PARTITION; } void clrSolarisPartition() { scsiFlags2 &= ~FLG_DEV_SOLARIS_PARTITION; } // Determines if a SCSI reservation conflict error was received uLONG isResConflict() { return (scsiFlags3 & FLG_DEV_RES_CONFLICT); } void setResConflict() { scsiFlags3 |= FLG_DEV_RES_CONFLICT; } void clrResConflict() { scsiFlags3 &= ~FLG_DEV_RES_CONFLICT; } }; //dptSCSIdev_C - end //Class - dptRAIDdev_C - start //=========================================================================== // //Description: // // This class defines a RAID device. // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. The RAID device class is dependent on the SCSI device class. // //--------------------------------------------------------------------------- //raidFlags - bit definitions // 1=The device is restricted from being a RAID component device // (set by internal engine code) const uSHORT FLG_RDEV_ENG_RESTRICT = 0x0001; // 1=The device is restricted from being a RAID component device // (set by external source) const uSHORT FLG_RDEV_USER_RESTRICT = 0x0002; // 1=The device is protected by a Hot Spare const uSHORT FLG_RDEV_HS_PROTECTED = 0x0004; // 1=This drive should be the target drive for a RAID-1 rebuild cmd const uSHORT FLG_RDEV_RAID1_TARGET = 0x0008; // 1=This drive needs to have its partition table zapped const uSHORT FLG_RDEV_ZAP_PARTITION = 0x0010; // 1=This device is a newly created RAID-0 device // (Used for partition zapping) const uSHORT FLG_RDEV_NEW_RAID0 = 0x0020; // 1=Stripe size must be a multiple of the underlying stripe size const uSHORT FLG_RDEV_SS_MULTIPLE = 0x0100; // 1=Optimize for capacity when varying stripe sizes are permitted const uSHORT FLG_RDEV_CAPACITY_OPT = 0x0200; // 1=The newPhyStatus byte contains a valid value to use when // issuing LAP #2 (mode page 0x30) const uSHORT FLG_RDEV_NEWPHYSTATUS = 0x0400; class dptRAIDdev_C : public dptSCSIdev_C { // Friends............................................ // Needs access to RAID type friend class dptRAIDmgr_C; // Needs access to RAID type friend class dptManager_C; // Other Functions.................................... // Check this device against the specified RAID definition // and requirement flags DPT_RTN_T okRequired(raidDef_S *&); // Check the component devices against the specified permission flags DPT_RTN_T okPermission(raidDef_S *&); // Compute component stripe size & number of stripes based on // specified input header void computeComps(raidHeader_S *&,raidDef_S *&); // Compute the stripe size for RAIDs with varying stripe sizes uLONG calcVaryStripe(raidDef_S *&,raidHeader_S *&); // Compute the stripe size for all zero value stripe sizes uLONG calcStripeSize(uLONG,uSHORT=0); // Compute the # of stripes for all zero value # of stripes uLONG calcNumStripes(); // Get the master stripe size (sum of stripe sizes of all data drives) // (Only valid for newly created RAID devices) uLONG getMasterStripe(); // Return the last LBA used by a parent device uLONG getLastParentLBA(); // Return a pointer to the next manager that can use this device // as a RAID component device. dptSCSImgr_C * nextRAIDmgr(); // Get the underlying number of stripes for this device // uLONG getUnderCount(); protected: // Data............................................... // Miscellaneous flags - see bit definitions above uSHORT raidFlags; // Parent RAID device information raidParent_S parent; // RAID type (0,1,3,5,...,RAID_HOT_SPARE) uSHORT raidType; // Number of redundant components uSHORT redundants; // The current scheduled F/W based diagnostic test type uCHAR scheduledDiag; // Proposed new physical device status // (Used internally to the engine to force a physical device state) uCHAR newPhyStatus; // Initialized component count (used as an aid in computing RAID tables entry count) uLONG compCount; // Last LBA for RAID purposes (when drive size ranges are active) uLONG maxRaidLBA; // Contains the OS visible flags uINT osVisible; // The maximum UDMA mode support by the device uCHAR udmaModeSupported; // The current operational UDMA mode uCHAR udmaModeSelected; // Used to limit the reserved space when expanding RAID-5's created with SMOR // that have less than 1M reserved. uLONG minReservedSpace; // Virtual Functions.................................. // Set RAID information from the specified input buffer virtual DPT_RTN_T setInfo(dptBuffer_S *,uSHORT); // Return object information in the specified output buffer virtual DPT_RTN_T rtnInfo(dptBuffer_S *); // Called prior to removing this object from the engine core. // Return values: // 0 = Take no action // 1 = Remove from engine core and free from memory // 2 = Remove from engine core but do not free from memory // (The object must be maintained at a higher level) virtual uSHORT preDelete(); // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); // Message Handlers................................... // Flags this device as the target for a RAID-1 copy DPT_RTN_T handleCopyTarget(); // Other Functions.................................... // Marks this drive as the target drive for a RAID-1 rebuild (copy) DPT_RTN_T setCopyTarget(dptRAIDdev_C *); // Temporarily reserve blocks at the end of all HBA // physical component devices void reserveTempSpace(); // assigns a new magic number for the array and its comps DPT_RTN_T remagicNumberArray(); public: // Data............................................... // List of component devices dptCoreList_C compList; dptLAP2segment_S *segment_P; // Pointer to the LUN segmenting info uLONG maxSegments;// Maximum number of LUN segments this array supports // Constructor/Destructor............................. dptRAIDdev_C(); ~dptRAIDdev_C(); // Virtual Functions.................................. // Get this object's flags virtual void getObjFlags(uSHORT &flg); // Boolean Functions.................................. // Determines if this device is visible to the OS uINT isOsVisible() { return (osVisible & 0x01); } void setOsVisible() { osVisible |= 0x01; } void clrOsVisible() { osVisible &= ~0x01; } // Determines if this device used to be visible to the OS uINT isPrevOsVisible() { return (osVisible & 0x02); } void setPrevOsVisible() { osVisible |= 0x02; } void clrPrevOsVisible() { osVisible &= ~0x02; } // Determines if this device is restricted from being a RAID // component device. uSHORT isRestricted() { return (raidFlags & (FLG_RDEV_ENG_RESTRICT | FLG_RDEV_USER_RESTRICT)); } // Determines if this drive is the target of a RAID-1 rebuild (copy) uSHORT isCopyTarget() { return (raidFlags & FLG_RDEV_RAID1_TARGET); } // Determines if this device is a component device uSHORT isComponent() { return (parent.dev_P!=NULL); } // Determines if blocked zero should be zapped uSHORT isPartitionMarked() { return (raidFlags & FLG_RDEV_ZAP_PARTITION); } // Flag block zero for zapping void setPartitionZap() { raidFlags |= FLG_RDEV_ZAP_PARTITION; } // Remove block zero zapping marker void clrPartitionZap() { raidFlags &= ~FLG_RDEV_ZAP_PARTITION; } // Determines if this is a newly created RAID-0 device uSHORT isNewRAID0() { return (raidFlags & FLG_RDEV_NEW_RAID0); } // Indicate that this is a new RAID-0 device void setNewRAID0() { raidFlags |= FLG_RDEV_NEW_RAID0; } // Clear the new RAID-0 device indicator void clrNewRAID0() { raidFlags &= ~FLG_RDEV_NEW_RAID0; } // Detemermines if this device is a valid Hot-Spare uSHORT isValidHotSpare(); // is this device hotspare protected uSHORT isHSprotected() { return (raidFlags & FLG_RDEV_HS_PROTECTED); } uSHORT isNewPhyStatus() { return (raidFlags & FLG_RDEV_NEWPHYSTATUS); } // Sets the proposed new physical device status void setNewPhyStatus(uCHAR,uCHAR=0); // Clear the new physical device status flag/state void clrNewPhyStatus() { newPhyStatus = 0; raidFlags &= ~FLG_RDEV_NEWPHYSTATUS; } // Return private data................................ // Return the device's RAID type uSHORT getRAIDtype() { return (raidType); } // Return the scheduled diagnostic test type uCHAR getScheduledDiag() { return (scheduledDiag); } // Other Functions.................................... // Get a SCSI address from the components' SCSI addresses uSHORT getCompAddr(dptCoreList_C &,uSHORT=0); // Make this device a component of the specified parent device void enterParent(dptRAIDdev_C *,raidCompList_S *,uSHORT=0); // Make this device a component of the specified parent device void enterParent(dptRAIDdev_C *,uLONG,uLONG,uSHORT=0); // Free this device's components void freeComponents(); // Verify this device against the specified RAID definition DPT_RTN_T okRAIDdevice(raidHeader_S *&,raidDef_S *&); // Get the largest component stripe size uLONG getMaxCompStripe(); // Get the smallest component stripe size uLONG getMinCompStripe(); // Sets a flag indicating that this drive is covered by a // Hot Spare drive. void setHScoverage(uLONG); // Determines if a F/W based diagnostic is scheduled on this // firmware array or any component device uINT chkCompDiags(); // Return the component count uLONG getCompCount() const { return compCount; } // Increment the component count void incCompCount() { ++compCount; } // Decrement the component count void decCompCount(); // Update maxRaidLBA from the manager's drive size table void updateMaxRaidLBA(); // Return maxRaidLBA uLONG getMaxRaidLBA() const { return maxRaidLBA; } // tell the FW to expand the array DPT_RTN_T EnableExpandArray(); }; //dptRAIDdev_C - end //Class - dptDevice_C - start //=========================================================================== // //Description: // // This class is the highest level DPT device class. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptDevice_C : public dptRAIDdev_C { // Friends............................................ // Needs access to protected functions friend class dptManager_C; friend class dptHBA_C; protected: // Virtual Functions.................................. // Called prior to removing this object from the engine core. // Return values: // 0 = Take no action // 1 = Remove from engine core and free from memory // 2 = Remove from engine core but do not free from memory // (The object must be maintained at a higher level) virtual uSHORT preDelete(); // Entry point to send a CCB to hardware virtual DPT_RTN_T launchCCB(engCCB_C *); // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); // Other Functions.................................... // Get an index into a physical array page table for this device uSHORT getPAPindex(engCCB_C *ccb_P=NULL); // Update this device's physical array page status DPT_RTN_T updatePAPstatus(); // Updates the status of a scheduled or running F/W diagnostic DPT_RTN_T updateDiagStatus(dptBuffer_S *fromEng_P=NULL); // Update a device's SMART status DPT_RTN_T updateSmartStatus(); // Saves the DPT name to hardware DPT_RTN_T saveDPTname(); // Reads the DPT name from hardware DPT_RTN_T getDPTname(); // Get the negotiated SCSI transfer speed void getXfrSpeed(); // Update the dual loop status void getDualLoopInfo(); // Determines if this device can be an emulated drive uSHORT canEmulate(); // Get this device's statistics information DPT_RTN_T getIOstats(uLONG *,uCHAR); // Sets the copy direction for a RAID-1 array rebuild void setLAPcopyDir(uCHAR &); // Returns the last block not reserved by DPT uLONG getLastUserBlk(); // Update this device's format status uLONG checkFmtStatus(uLONG *totalBlks_P=NULL); // Check the format failure bits in the reserve block void checkFmtFailure(engCCB_C *); // Send a multi-function command to the HBA DPT_RTN_T sendMFC(uCHAR,uCHAR=0); // Checks to ensure a rebuild can be performed DPT_RTN_T checkRebuild(); // Message Handlers................................... // Return the build/rebuild/verify progress for this device DPT_RTN_T rtnProgress(dptBuffer_S *); // Update this device's status DPT_RTN_T updateStatus(uSHORT=0,dptBuffer_S *fromEng_P=NULL); // Performs a SCSI read command to this device DPT_RTN_T readHandler(dptBuffer_S *,dptBuffer_S *); // Performs a SCSI write command to this device DPT_RTN_T writeHandler(dptBuffer_S *); // Performs a low level SCSI format on this device DPT_RTN_T fmtHandler(dptBuffer_S *,dptBuffer_S *); // Actually issues the format command to a device DPT_RTN_T doFormat(engCCB_C *,dptBuffer_S *,uSHORT=0,uSHORT=0,uSHORT=0); // Add or remove this drive as an emulated drive DPT_RTN_T setEmulation(dptBuffer_S *); // Save a 128 byte buffer to the reserve block of this device DPT_RTN_T writeSWreserveBlock(dptBuffer_S *); // Read the 128 byte software buffer from the reserve block DPT_RTN_T rtnSWreserveBlock(dptBuffer_S *); // Return the device statistics DPT_RTN_T rtnIOstats(dptBuffer_S *); // Resets the SCSI bus DPT_RTN_T resetSCSI(); // Quiet the SCSI bus (blink this device's LED) DPT_RTN_T quietBus(dptBuffer_S *); // Schedules/Starts a F/W based diagnostic DPT_RTN_T scheduleDiag(dptBuffer_S *); // Return F/W diagnostic scheduling information DPT_RTN_T queryDiag(dptBuffer_S *); DPT_RTN_T updateLAP1status(void *, uSHORT, uSHORT=0,uLONG *prog_P=NULL, uLONG *errCnt_P=NULL, uLONG *totalBlks_P=NULL); DPT_RTN_T updateLAP2status(void *, uSHORT=0,uLONG *prog_P=NULL, uLONG *errCnt_P=NULL, uLONG *totalBlks_P=NULL); DPT_RTN_T SetAccessRights(dptBuffer_S *, dptBuffer_S *); DPT_RTN_T GetAccessRights(dptBuffer_S *); DPT_RTN_T checkBusy(dptBuffer_S *fromEng_P); // Sets the LUN segmenting for an array DPT_RTN_T setLunSegments(dptBuffer_S *); // Returns the LUN segmenting of an array DPT_RTN_T getLunSegments(dptBuffer_S *); public: // Virtual Functions.................................. // Return object info for system config. file virtual DPT_RTN_T rtnConfigInfo(dptBuffer_S *); // Other Functions.................................... // Initializes a real logical device (builds components...) void initRealLogical(); // Issues a logical array page command DPT_RTN_T raidLAPcmd(uCHAR,uCHAR=0); // Issues a physical array page command DPT_RTN_T raidPAPcmd(uCHAR); // Performs initialization of a real object (SCSI Inquiry...) virtual void realInit(); // Set the logical array page status for this device uLONG setLAPstatus(uCHAR,uLONG *rtnErrCnt=NULL, uLONG *rtnTotalBlks=NULL); // Set the physical array page status for this device DPT_RTN_T setPAPstatus(engCCB_C *); // Write the firmware download portion of the reserve block // DPT_RTN_T writeFWD(engCCB_C *,uSHORT=0,uLONG=0); // Reserve the specified # of blocks at the end of a DASD device #ifdef _SINIX_ADDON DPT_RTN_T reserveEndOfDisk(uLONG); #else DPT_RTN_T reserveEndOfDisk(uSHORT); #endif // Message handler to reserve blocks at the end of the disk DPT_RTN_T handleREOD(dptBuffer_S *); // Read the DPT reserve block DPT_RTN_T readReserveBlock(engCCB_C *); // Check for a partition table void checkForPartition(); // Check for a DPT reserve block && initialize dependent data void initReserveBlockInfo(); // Determines if this device is an emulated drive uSHORT checkForEmulation(); // Perform a test unit ready to this device void checkIfReady(); // Checks if components are ready and set logical ready status accordingly void checkIfCompsReady(); // Performs a ready capacity to get this device's capacity info void getCapacity(); // Update this device's LAP information DPT_RTN_T updateLAPstatus(uSHORT=0,uLONG *prog_P=NULL, uLONG *errCnt_P=NULL, uLONG *totalBlks_P=NULL); // Display partition table information - Debug only! void dsplyPartInfo(sectorZero_S *); // Reserve blocks at the end of all HBA physical // component devices void enableTempSpace(); // Clears block zero DPT_RTN_T zapPartition(); // Clears block zero on all component devices void zapCompPartitions(); // Set this device's format status void setFmtStatus(uCHAR *); // Get the request sense info associated with the specified CCB uCHAR * getRequestSense(engCCB_C *); // Determines if this device is capable of executing F/W // based diagnostics uINT isFWdiagCapable(); // Set a physical device's RAID magic # DPT_RTN_T setPhyMagicNum(); }; //dptDevice_C - end #endif raidutils-0.0.6.orig/raideng/dpt_fwd.hpp0000664000175000000620000000427410044153310020107 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPT_FWD_HPP #define __DPT_FWD_HPP //File - SCSI_FWD.HPP //*************************************************************************** // //Description: // // This file contains forward references for the final DPT engine //classes. // //Author: Doug Anderson //Date: 4/5/93 // //Editors: // //Remarks: // // //*************************************************************************** //Forward References -------------------------------------------------------- class dptConnection_C; class dptObject_C; class dptDevice_C; class dptManager_C; class dptDriver_C; class dptHBA_C; class dptBCD_C; class dptRAIDbcd_C; #endif raidutils-0.0.6.orig/raideng/dpt_osd.h0000664000175000000620000001040110044153313017544 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPT_OSD_H #define __DPT_OSD_H /* * DPT EATA packet to I2O packet conversion utility. */ #if (!defined(IN)) # define IN #endif #if (!defined(OUT)) # define OUT #endif #if (!defined(INOUT)) # define INOUT #endif #if (!defined(EXTERNAL)) # define EXTERNAL extern #endif #if (!defined(STATIC)) # define STATIC static #endif #if (!defined(PUBLIC)) # define PUBLIC #endif #if (!defined(INLINE)) # define INLINE #endif #if (!defined(__P)) # define __P(protos) protos /* full-blown ANSI C */ #endif #if (!defined(__FAR__)) # define __FAR__ #endif #ifdef __SPARC__ # include #endif /* __SPARC__ */ #include #include /* Required to get dpt_eata.h to define eataCP_getSgAddr(x) */ #define osdPhys(x) (unsigned long)(x) #define osdVirt(x) (unsigned char far *)(x) #if defined(__UNIX__) #define UNREFERENCED_PARAMETER(x) #else #define UNREFERENCED_PARAMETER(x) (x) #endif /* * If there is a local swapping utility that is more efficient than * the one in dptalign.h then please override it here! */ /* * Removes any clock based timeouts. */ //#define osdClockTick #undef osdBcopy #define osdBcopy(x,y,z) memcpy(y,x,z) #undef osdBzero #define osdBzero(x,y) memset(x,0,y) #define osdAlloc(x) malloc(x) #define osdFree(x,y) free(x) #define osdEata4(x) (*(unsigned long __FAR__ *)(x)) #define pushInterrupts() #define popInterrupts() #define enableInterrupts() #define osdStartI2OCp _osdStartI2OCp #define NUM_CALLBACK 1 #define NUM_DEVICES -1 #define NUM_CONTROLLERS 16 typedef unsigned char Controller_t; /* Controller virtualization */ typedef void __FAR__ * Status_t; /* Returned Status Packet */ typedef sdRequestSense_S __FAR__ * Sense_t; /* Return sense packet */ typedef void * InComing_t; /* Incoming packets to system */ typedef void * OutGoing_t; /* Outgoing packets to Drive system */ /* Completion routine */ #ifdef _DPT_LINUX // hnt - for some reason, GCC hates the other prototype typedef void (__FAR__ * __FAR__ Callback_t) (Controller_t controller, Status_t status, Sense_t sense); #else typedef void (__FAR__ * __FAR__ Callback_t) __P((Controller_t controller, Status_t status, Sense_t sense)); #endif #if (defined(__cplusplus)) extern "C" { #endif int _osdStartI2OCp(Controller_t controller, OutGoing_t packet, Callback_t callback); #if (defined(__cplusplus)) } #endif #endif /* __DPT_OSD_H */ raidutils-0.0.6.orig/raideng/dptcbuff.c0000664000175000000620000001323210044153332017706 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #ifdef __OS2__ #define INCL_BASE #include #endif #ifdef __cplusplus extern "C" { #endif /* set the buffer's allocSize */ /* must be done before you use the buffer */ void BufferSetAllocSize(void *buf, uLONG size) { dptData_S *bp; bp = (dptData_S *)buf; bp->allocSize = size - sizeof(dptData_S) + 1; } /* reset to beginning of buffer */ void BufferReset(void *buf) { dptData_S *bp; bp = (dptData_S *)buf; bp->writeIndex = 0; bp->readIndex = 0; } /* Clear the entire data buffer */ void BufferClear(void *buf) { dptData_S *bp; bp = (dptData_S *)buf; memset(bp->data,0x00,(uINT)bp->allocSize); } /* Prepare the buffer for reading */ void BufferReplay(void *buf) { dptData_S *bp; bp = (dptData_S *)buf; bp->readIndex = 0; } /* Read the next available data from the buffer */ uSHORT BufferExtract(void *buf, void *dest_P, uSHORT destSize) { dptData_S *bp; uLONG numToCopy,numLeft; bp = (dptData_S *)buf; numToCopy = 0; if (bp->writeIndex > bp->readIndex) { numLeft = bp->writeIndex - bp->readIndex; numToCopy = (numLeft>destSize) ? destSize : numLeft; memcpy(dest_P,&bp->data[bp->readIndex],(uINT)numToCopy); bp->readIndex += numToCopy; } if(numToCopy == destSize) return (1); else return (0); } /* Increment the buffer's read index without extracting any information */ uSHORT BufferSkip(void *buf, uSHORT destSize) { dptData_S *bp; uLONG numToCopy, numLeft; bp = (dptData_S *)buf; numToCopy = 0; if (bp->writeIndex > bp->readIndex) { numLeft = bp->writeIndex - bp->readIndex; numToCopy = (numLeft>destSize) ? destSize : numLeft; bp->readIndex += numToCopy; } if(numToCopy == destSize) return (1); else return (0); } /* Write data to the next available location within the data buffer */ uSHORT BufferInsert(void *buf, void *src_P, uSHORT srcSize) { dptData_S *bp; uLONG numToCopy, numLeft; bp = (dptData_S *)buf; numToCopy = 0; if (bp->allocSize > bp->writeIndex) { numLeft = bp->allocSize - bp->writeIndex; numToCopy = (numLeft>srcSize) ? srcSize : numLeft; memcpy(&bp->data[bp->writeIndex],src_P,(uINT)numToCopy); bp->writeIndex += numToCopy; } if (numToCopy == srcSize) return (1); else return (0); } /* Write uLONG to the next available location within the data buffer */ uSHORT BufferInsertULONG(void *buf, uLONG src) { dptData_S *bp; uLONG numToCopy, numLeft; bp = (dptData_S *)buf; numToCopy = 0; if(bp->allocSize > bp->writeIndex) { numLeft = bp->allocSize - bp->writeIndex; numToCopy = (numLeft > sizeof(uLONG)) ? sizeof(uLONG) : numLeft; memcpy(&bp->data[bp->writeIndex],&src,(uINT)numToCopy); bp->writeIndex += numToCopy; } if(numToCopy == sizeof(uLONG)) return (1); else return (0); } /* Write uSHORT to the next available location within the data buffer */ uSHORT BufferInsertUSHORT(void *buf, uSHORT src) { dptData_S *bp; uLONG numToCopy, numLeft; bp = (dptData_S *)buf; numToCopy = 0; if(bp->allocSize > bp->writeIndex) { numLeft = bp->allocSize - bp->writeIndex; numToCopy = (numLeft > sizeof(uSHORT)) ? sizeof(uSHORT) : numLeft; memcpy(&bp->data[bp->writeIndex],&src,(uINT)numToCopy); bp->writeIndex += numToCopy; } if(numToCopy == sizeof(uSHORT)) return (1); else return (0); } /* Write uCHAR to the next available location within the data buffer */ uSHORT BufferInsertuCHAR(void *buf, uCHAR src) { dptData_S *bp; uLONG numToCopy, numLeft; bp = (dptData_S *)buf; numToCopy = 0; if(bp->allocSize > bp->writeIndex) { numLeft = bp->allocSize - bp->writeIndex; numToCopy = (numLeft > sizeof(uCHAR)) ? sizeof(uCHAR) : numLeft; memcpy(&bp->data[bp->writeIndex],&src,(uINT)numToCopy); bp->writeIndex += numToCopy; } if(numToCopy == sizeof(uCHAR)) return (1); else return (0); } /* Sets the number of bytes that can be extracted from the buffer */ void BufferSetExtractSize(void *buf, uSHORT inSize) { dptData_S *bp; bp = (dptData_S *)buf; /* Take the minimum of the buffer size and the request size */ bp->writeIndex = (bp->allocSize>inSize) ? inSize : bp->allocSize; } #ifdef __cplusplus } /* extern C */ #endif raidutils-0.0.6.orig/raideng/dptcbuff.h0000664000175000000620000000637210044153332017722 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #ifdef __cplusplus extern "C" { #endif uLONG DPT_OpenEngine(void); uLONG DPT_CloseEngine(void); DPT_RTN_T DPT_CallEngine(DPT_TAG_T EngineTag, DPT_MSG_T event, DPT_TAG_T target, void *fromEng_P, void *toEng_P,uLONG timeout); #ifdef _SINIX #define dptData_S dptBuffer_S #define BufferSetAllocSize(buf,len) (buf)->allocSize=(len)-sizeof(dptBuffer_S) #define BufferReset(buf) (buf)->reset() #define BufferClear(buf) (buf)->clear() #define BufferReplay(buf) (buf)->readIndex = 0 #define BufferExtract(buf,datap,len) ((dptBuffer_S *)(buf))->extract((datap),(len)) #define BufferSkip(buf,len) (buf)->skip((len)) #define BufferInsert(buf,datap,len) (buf)->insert(datap,(uLONG)(len)) #define BufferInsertULONG(buf,data) (buf)->insert((uLONG)(data)) #define BufferInsertUSHORT(buf,data) (buf)->insert((uSHORT)(data)) #define BufferInsertuCHAR(buf,data) (buf)->insert((uCHAR)(data)) #define BufferSetExtractSize(buf,len) (buf)->setExtractSize((len)) #else void BufferSetAllocSize(void *buf, uSHORT size); void BufferReset(void *buf); void BufferClear(void *buf); void BufferReplay(void *buf); uSHORT BufferExtract(void *buf, void *data, uSHORT size); uSHORT BufferSkip(void *buf, uSHORT size); uSHORT BufferInsert(void *buf, void *data, uSHORT size); uSHORT BufferInsertULONG(void *buf, uLONG data); uSHORT BufferInsertUSHORT(void *buf, uSHORT data); uSHORT BufferInsertuCHAR(void *buf, uCHAR data); void BufferSetExtractSize(void *buf, uSHORT size); #endif #ifdef __cplusplus } #endif raidutils-0.0.6.orig/raideng/dptdebug.h0000664000175000000620000010134210044153332017714 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * Standard debugger handler. * * Author: Mark Salyzyn */ /* Is it SMOR? */ #if (defined(DEBUG)) # if (defined(I2O_TOO)||defined(NO_MOUSE)||defined(REQUEST_SENSE_TEST)||defined(FLASH_HBA)||defined(DO_DRIVER)||defined(ENABLE_FORMATS)||defined(ZAP_DRIVES)||defined(REBUILD_ARRAY)||defined(MINIMAL_BUILD)) /* * SMOR's screen write capability. */ extern "C" { extern void AbsoluteWrite(int x, int y, int attribute, char * string); extern unsigned sleep(unsigned seconds); } # if (!defined(DEBUG_SCREEN_WIDTH)) # define DEBUG_SCREEN_WIDTH 50 # endif # if (!defined(DEBUG_SCREEN_HEIGHT)) # define DEBUG_SCREEN_HEIGHT 1 # endif STATIC INLINE void printCharacter(char character) { char Buffer[2]; static char CurrentPosition; # if (defined(DEBUG_SCREEN_HEIGHT)) # if (DEBUG_SCREEN_HEIGHT > 1) static char CurrentLine; # define printCharacterLine (25-DEBUG_SCREEN_HEIGHT) # else # define CurrentLine 0 # endif # else # define CurrentLine 0 # endif static char DoNotClear; # define printCharacterStart (80-DEBUG_SCREEN_WIDTH) if ((CurrentPosition < printCharacterStart) || (CurrentPosition > 80)) { CurrentPosition = printCharacterStart; } # if (defined(DEBUG_SCREEN_HEIGHT)) # if (DEBUG_SCREEN_HEIGHT > 1) if ((CurrentLine < printCharacterLine) || (CurrentLine > 25)) { CurrentLine = printCharacterLine; } # endif # endif switch (character) { case '\b': if (CurrentPosition > printCharacterStart) { --CurrentPosition; } break; case '\t': if (CurrentPosition < 80) { CurrentPosition = (((CurrentPosition & ~7) | 7) + 1); } break; case '\n': # if (defined(DEBUG_SCREEN_HEIGHT)) # if (DEBUG_SCREEN_HEIGHT > 1) if (++CurrentLine >= 25) { CurrentLine = printCharacterLine; sleep (5); } # else sleep(2); # endif # else sleep(2); # endif DoNotClear = (char)-1; case '\r': ++DoNotClear; CurrentPosition = printCharacterStart; break; default: Buffer[1] = '\0'; if (((DoNotClear == 0) && (CurrentPosition == printCharacterStart)) || (CurrentPosition >= 80)) { unsigned char Position = printCharacterStart; if (CurrentPosition >= 80) { # if (defined(DEBUG_SCREEN_HEIGHT)) # if (DEBUG_SCREEN_HEIGHT > 1) if (CurrentLine >= 25) { CurrentLine = printCharacterLine; sleep (5); } # else sleep (2); # endif # else sleep (2); # endif } Buffer[0] = ' '; while (Position < 80) { AbsoluteWrite(Position++, CurrentLine, 113, Buffer); } if (CurrentPosition >= 80) { CurrentPosition = printCharacterStart + 2; Buffer[0] = '+'; AbsoluteWrite(printCharacterStart, CurrentLine, 113, Buffer); } } DoNotClear = 0; Buffer[0] = character; AbsoluteWrite(CurrentPosition++, CurrentLine, 113, Buffer); } # undef CurrentLine } STATIC INLINE void printString(char * string) { while (*string) { printCharacter (*string++); } } STATIC INLINE void printNumber(unsigned long value, int base, int length) { unsigned char buffer[12]; unsigned char * cp = &buffer[(sizeof(buffer) / sizeof(buffer[0])) - 1]; unsigned long b = base; unsigned char l = length; if (base < 0) { b = -base; } if (length < 0) { l = -length; } if (l >= sizeof(buffer)) { l = sizeof(buffer) - 1; } *cp = '\0'; if (value) do { *(--cp) = (unsigned char)(value % b); if (*cp > 9) { *cp += 'A' - '9' - 1; } *cp += '0'; } while ((--l > 0) && (value /= b)); else { *(--cp) = '0'; --l; } if (length > 0) while (l > 0) { *(--cp) = (base < 0) ? '0' : ' '; --l; } printString((char *)cp); while ((l > 0) && (l < 80)) { printString (" "); --l; } } # if (!defined(DEBUG_PUTS)) # define DEBUG_PUTS(string) printString((char *)string) # endif # if (!defined(DEBUG_NUMBER)) # define DEBUG_NUMBER(value,base,length) printNumber(value,base,length) # endif # if (!defined(DEBUG_ARRAY)) # define DEBUG_ARRAY(pointer,type,size) \ debugArray((unsigned char __FAR__ *)(pointer),type,(unsigned)(size)) # define DEBUG_array # endif # if (!defined(DEBUG_strlen)) # define DEBUG_strlen(string) strlen((char *)string) # endif # elif (defined(__BORLANDC__) && defined(FAR_DATA)) /* Is it I2ODDL? */ # include "iobios.h" # if (!defined(DEBUG_PUTS)) # define DEBUG_PUTS(string) printString(string) # endif # if (!defined(DEBUG_NUMBER)) # define DEBUG_NUMBER(value,base,length) printNumber(value,base,length) # endif # if (!defined(DEBUG_ARRAY)) # define DEBUG_ARRAY(pointer,type,size) \ debugArray((unsigned char __FAR__ *)(pointer),type,(unsigned)(size)) # define DEBUG_array # endif # endif /* !SMOR? && !I2ODDL? */ #endif /* DEBUG */ #if (defined(DEBUG) || defined(DEBUG_PUTS) || defined(DEBUG_NUMBER) || defined(DEBUG_FUNCTION)) # if (!defined(DEBUG_PUTS)) # define DEBUG_PUTS(string) # endif # if (!defined(DEBUG_NUMBER)) # define DEBUG_NUMBER(value,base,length) # endif # if (!defined(DEBUG_FUNCTION)) # define DEBUG_FUNCTION(tag) # endif # if (!defined(DEBUG_ARRAY)) # define DEBUG_ARRAY(pointer,type,size) # undef DEBUG_array # endif # if (!defined(DEBUG_SCREEN_WIDTH)) # define DEBUG_SCREEN_WIDTH 80 # endif /* * buffer tags */ # define TAG_NULL 0 # define TAG_IN 1 # define TAG_OUT 2 # define TAG_INTERMEDIATE 3 /* * buffer types */ # define TYPE_NULL 0 # define TYPE_STRING 1 # define TYPE_S8 2 # define TYPE_U8 3 # define TYPE_X8 4 # define TYPE_S16 5 # define TYPE_U16 6 # define TYPE_X16 7 # define TYPE_S32 8 # define TYPE_U32 9 # define TYPE_X32 10 # define TYPE_STRUCT 11 typedef struct { unsigned short size:8; /* May grow */ # define DebugEventMaxSize 255 unsigned short type:4; /* May grow */ unsigned short tag:4; /* Bound to grow */ unsigned char buffer[1]; } DebugEvent_S; PUBLIC unsigned long DebugEvent[1024]; PUBLIC DebugEvent_S * In_DebugEvent = (DebugEvent_S *)DebugEvent; # if (!defined(DEBUG_strlen)) # define DEBUG_strlen(string) Strlen((unsigned char *)string) STATIC INLINE unsigned Strlen (unsigned char * String) { unsigned count = 0; while (*(String++)) { ++count; } return (count); } # endif # if (defined(DEBUG_array)) STATIC INLINE void debugArray( unsigned char __FAR__ * pointer, unsigned char element, unsigned short size) { unsigned column; unsigned long value; int base, length, minus, first; for (first = 1; size != 0;--size) { minus = 0; switch (element) { case TYPE_S8: if (*((char __FAR__ *)pointer) < 0) { ++minus; value = -*((char __FAR__ *)pointer); } else { case TYPE_U8: value = *pointer; } ++pointer; base = 10; length = 3; break; case TYPE_X8: value = *(pointer++); base = -16; length = 2; break; case TYPE_S16: if (*((short __FAR__ *)pointer) < 0) { ++minus; value = -*((short __FAR__ *)pointer); } else { case TYPE_U16: value = *((unsigned short __FAR__ *)pointer); } pointer = (unsigned char __FAR__ *) (((short __FAR__ *)pointer) + 1); base = 10; length = 5; break; case TYPE_X16: value = *((unsigned short __FAR__ *)pointer); pointer = (unsigned char __FAR__ *) (((unsigned short __FAR__ *)pointer) + 1); base = -16; length = 4; break; case TYPE_S32: if (*((long __FAR__ *)pointer) < 0) { ++minus; value = -*((long __FAR__ *)pointer); } else { case TYPE_U32: value = *((unsigned long __FAR__ *)pointer); } pointer = (unsigned char __FAR__ *) (((unsigned long __FAR__ *)pointer) + 1); base = 10; length = 10; break; case TYPE_X32: value = *((unsigned long __FAR__ *)pointer); pointer = (unsigned char __FAR__ *) (((unsigned long __FAR__ *)pointer) + 1); base = -16; length = 8; break; } if (first) { DEBUG_PUTS ("{"); first = 0; column = DEBUG_SCREEN_WIDTH; } else { DEBUG_PUTS (","); ++column; } if ((column + length + minus + 1) >= DEBUG_SCREEN_WIDTH) { DEBUG_PUTS ("\r\n "); column = 4; } else { DEBUG_PUTS (" "); ++column; } if (minus) { DEBUG_PUTS ("-"); ++column; } DEBUG_NUMBER (value, base, length); column += length; } if (first == 0) { if ((column + 2) >= DEBUG_SCREEN_WIDTH) { DEBUG_PUTS ("\r\n"); } else { DEBUG_PUTS (" "); } DEBUG_PUTS ("}"); } } # endif # define DEBUG_ALLOCATE_STRING(Name,String) static unsigned char Name[]=String # define DEBUG_add(Type,Tag,Buffer,Size) \ In_DebugEvent->type = (Type); \ In_DebugEvent->tag = (Tag); \ if ((In_DebugEvent->size = (Size)) != 0) { \ osdBcopy((void __FAR__ *)(Buffer), \ (void __FAR__ *)In_DebugEvent->buffer,(unsigned)(Size)); \ In_DebugEvent = (DebugEvent_S *)(((unsigned long *)In_DebugEvent) \ + 1 + ((sizeof(long) + (Size) - sizeof(short) - 1)/sizeof(long))); \ } else { \ In_DebugEvent = (DebugEvent_S *)(((unsigned long *)In_DebugEvent)+1);\ } # define DEBUG_ADD(Type,Tag,Buffer,Size) \ for (;;) { \ if ((((unsigned long *)In_DebugEvent) < DebugEvent) \ || (&DebugEvent[sizeof(DebugEvent)/sizeof(DebugEvent[0])] \ <= ((unsigned long *)In_DebugEvent))) { \ In_DebugEvent = (DebugEvent_S *)DebugEvent; \ } \ if (&DebugEvent[sizeof(DebugEvent)/sizeof(DebugEvent[0])] \ >= (((Size) != 0) \ ? (((unsigned long *)In_DebugEvent) + 1 + ((sizeof(long) + (Size) \ - sizeof(short) - 1) / sizeof(long))) \ : (((unsigned long *)In_DebugEvent) + 1))) { \ break; \ } \ DEBUG_add(TYPE_NULL,TAG_NULL,0,0); \ } \ DEBUG_add(Type,Tag,Buffer,Size) /* * This macro deals with ensuring that the size of the transfer is * limited to the maximum size that can be stored on a Debug Event. It * creates many unreachable code complaints due to the possibility of Size * being a constant (but not necessarily a pre-processor time constant :-( ). # define DEBUG_ADD(Type,Tag,Buffer,Size) \ if (Size > DebugEventMaxSize) { \ unsigned size; \ unsigned char *cp; \ for (size = Size, cp = Buffer; \ size > (DebugEventMaxSize-3); \ cp += (DebugEventMaxSize-3), size -= (DebugEventMaxSize-3)) { \ DEBUG_Add(Type,Tag,cp,(DebugEventMaxSize-3)); \ } \ if (size > 0) { \ DEBUG_Add(Type,Tag,cp,size); \ } \ } else { \ DEBUG_Add(Type,Tag,Buffer,Size); \ } */ # define DEBUG_TAG(Tag) DEBUG_ADD(TYPE_NULL,Tag,0,0); \ DEBUG_FUNCTION(Tag) # define DEBUG_IN(Type,Buffer,Size) DEBUG_ADD(Type,TAG_IN,Buffer,Size) # define DEBUG_OUT(Type,Buffer,Size) DEBUG_ADD(Type,TAG_OUT,Buffer,Size) # define DEBUG_IN_S8(Val) { \ char val = (char)(Val); \ DEBUG_IN(TYPE_S8,&val,1); \ if (val < 0) { \ DEBUG_PUTS("-"); \ val = -val; \ } \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS(","); \ } # define DEBUG_IN_U8(Val) { \ unsigned char val = (unsigned char)(Val); \ DEBUG_IN(TYPE_U8,&val,1); \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS(","); \ } # define DEBUG_IN_X8(Val) { \ unsigned char val = (unsigned char)(Val); \ DEBUG_IN(TYPE_X8,&val,1); \ DEBUG_NUMBER(val,16,0); \ DEBUG_PUTS(","); \ } # define DEBUG_IN_S16(Val) { \ short val = (short)(Val); \ DEBUG_IN(TYPE_S16,&val,1); \ if (val < 0) { \ DEBUG_PUTS("-"); \ val = -val; \ } \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS(","); \ } # define DEBUG_IN_U16(Val) { \ unsigned short val = (unsigned short)(Val); \ DEBUG_IN(TYPE_U16,&val,1); \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS(","); \ } # define DEBUG_IN_X16(Val) { \ unsigned short val = (unsigned short)(Val); \ DEBUG_IN(TYPE_X16,&val,1); \ DEBUG_NUMBER(val,16,0); \ DEBUG_PUTS(","); \ } # define DEBUG_IN_S32(Val) { \ long val = (long)(Val); \ DEBUG_IN(TYPE_S32,&val,1); \ if (val < 0) { \ DEBUG_PUTS("-"); \ val = -val; \ } \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS(","); \ } # define DEBUG_IN_U32(Val) { \ unsigned long val = (unsigned long)(Val); \ DEBUG_IN(TYPE_U32,&val,1); \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS(","); \ } # define DEBUG_IN_X32(Val) { \ unsigned long val = (unsigned long)(Val); \ DEBUG_IN(TYPE_X32,&val,1); \ DEBUG_NUMBER(val,16,0); \ DEBUG_PUTS(","); \ } # define DEBUG_IN_ARRAY_S8(Buffer,Size) DEBUG_IN(TYPE_S8,Buffer,(Size)); \ DEBUG_ARRAY(Buffer,TYPE_S8,(Size)); \ DEBUG_PUTS(","); # define DEBUG_IN_ARRAY_U8(Buffer,Size) DEBUG_IN(TYPE_U8,Buffer,(Size)); \ DEBUG_ARRAY(Buffer,TYPE_U8,(Size)); \ DEBUG_PUTS(","); # define DEBUG_IN_ARRAY_X8(Buffer,Size) DEBUG_IN(TYPE_X8,Buffer,(Size)); \ DEBUG_ARRAY(Buffer,TYPE_X8,(Size)); \ DEBUG_PUTS(","); # define DEBUG_IN_ARRAY_S16(Buffer,Size) DEBUG_IN(TYPE_S16,Buffer,(Size)*2); \ DEBUG_ARRAY(Buffer,TYPE_S16,(Size));\ DEBUG_PUTS(","); # define DEBUG_IN_ARRAY_U16(Buffer,Size) DEBUG_IN(TYPE_U16,Buffer,(Size)*2); \ DEBUG_ARRAY(Buffer,TYPE_U16,(Size));\ DEBUG_PUTS(","); # define DEBUG_IN_ARRAY_X16(Buffer,Size) DEBUG_IN(TYPE_X16,Buffer,(Size)*2); \ DEBUG_ARRAY(Buffer,TYPE_X16,(Size));\ DEBUG_PUTS(","); # define DEBUG_IN_ARRAY_S32(Buffer,Size) DEBUG_IN(TYPE_S32,Buffer,(Size)*4); \ DEBUG_ARRAY(Buffer,TYPE_S32,(Size));\ DEBUG_PUTS(","); # define DEBUG_IN_ARRAY_U32(Buffer,Size) DEBUG_IN(TYPE_U32,Buffer,(Size)*4); \ DEBUG_ARRAY(Buffer,TYPE_U32,(Size));\ DEBUG_PUTS(","); # define DEBUG_IN_ARRAY_X32(Buffer,Size) DEBUG_IN(TYPE_X32,Buffer,(Size)*4); \ DEBUG_ARRAY(Buffer,TYPE_X32,(Size));\ DEBUG_PUTS(","); # define DEBUG_IN_STRUCT(Struct) \ DEBUG_IN(TYPE_STRUCT,Struct,sizeof(*(Struct))); \ DEBUG_ARRAY(Struct,TYPE_X8,sizeof(*(Struct))); \ DEBUG_PUTS(",") # define DEBUG_IN_STRING(String) \ DEBUG_IN(TYPE_STRING,String,DEBUG_strlen(String)); \ DEBUG_PUTS(String); \ DEBUG_PUTS(",") # define DEBUG_OUT_S8(Val) { \ char val = (char)(Val); \ DEBUG_OUT(TYPE_S8,&val,1); \ DEBUG_PUTS("\r\n"); \ if (val < 0) { \ DEBUG_PUTS("-"); \ val = -val; \ } \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS("="); \ } # define DEBUG_OUT_U8(Val) { \ unsigned char val = (unsigned char)(Val); \ DEBUG_OUT(TYPE_U8,&val,1); \ DEBUG_PUTS("\r\n"); \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS("="); \ } # define DEBUG_OUT_X8(Val) { \ unsigned char val = (unsigned char)(Val); \ DEBUG_OUT(TYPE_X8,&val,1); \ DEBUG_PUTS("\r\n"); \ DEBUG_NUMBER(val,16,0); \ DEBUG_PUTS("="); \ } # define DEBUG_OUT_S16(Val) { \ short val = (short)(Val); \ DEBUG_OUT(TYPE_S16,&val,1); \ DEBUG_PUTS("\r\n"); \ if (val < 0) { \ DEBUG_PUTS("-"); \ val = -val; \ } \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS("="); \ } # define DEBUG_OUT_U16(Val) { \ unsigned short val = (unsigned short)(Val); \ DEBUG_OUT(TYPE_U16,&val,1); \ DEBUG_PUTS("\r\n"); \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS("="); \ } # define DEBUG_OUT_X16(Val) { \ unsigned short val = (unsigned short)(Val); \ DEBUG_OUT(TYPE_X16,&val,1); \ DEBUG_PUTS("\r\n"); \ DEBUG_NUMBER(val,16,0); \ DEBUG_PUTS("="); \ } # define DEBUG_OUT_S32(Val) { \ long val = (long)(Val); \ DEBUG_OUT(TYPE_S32,&val,1); \ DEBUG_PUTS("\r\n"); \ if (val < 0) { \ DEBUG_PUTS("-"); \ val = -val; \ } \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS("="); \ } # define DEBUG_OUT_U32(Val) { \ unsigned long val = (unsigned long)(Val); \ DEBUG_OUT(TYPE_U32,&val,1); \ DEBUG_PUTS("\r\n"); \ DEBUG_NUMBER(val,10,0); \ DEBUG_PUTS("="); \ } # define DEBUG_OUT_X32(Val) { \ unsigned long val = (unsigned long)(Val); \ DEBUG_OUT(TYPE_X32,&val,1); \ DEBUG_PUTS("\r\n"); \ DEBUG_NUMBER(val,16,0); \ DEBUG_PUTS("="); \ } # define DEBUG_OUT_ARRAY_S8(Buffer,Size) DEBUG_OUT(TYPE_S8,Buffer,(Size)); \ DEBUG_PUTS("\r\n"); \ DEBUG_ARRAY(Buffer,TYPE_S8,(Size));\ DEBUG_PUTS("=") # define DEBUG_OUT_ARRAY_U8(Buffer,Size) DEBUG_OUT(TYPE_U8,Buffer,(Size)); \ DEBUG_PUTS("\r\n"); \ DEBUG_ARRAY(Buffer,TYPE_U8,(Size));\ DEBUG_PUTS("=") # define DEBUG_OUT_ARRAY_X8(Buffer,Size) DEBUG_OUT(TYPE_X8,Buffer,(Size)); \ DEBUG_PUTS("\r\n"); \ DEBUG_ARRAY(Buffer,TYPE_X8,(Size));\ DEBUG_PUTS("=") # define DEBUG_OUT_ARRAY_S16(Buffer,Size) DEBUG_OUT(TYPE_S16,Buffer,(Size)*2);\ DEBUG_PUTS("\r\n"); \ DEBUG_ARRAY(Buffer,TYPE_S16,(Size));\ DEBUG_PUTS("=") # define DEBUG_OUT_ARRAY_U16(Buffer,Size) DEBUG_OUT(TYPE_U16,Buffer,(Size)*2);\ DEBUG_PUTS("\r\n"); \ DEBUG_ARRAY(Buffer,TYPE_U16,(Size));\ DEBUG_PUTS("=") # define DEBUG_OUT_ARRAY_X16(Buffer,Size) DEBUG_OUT(TYPE_X16,Buffer,(Size)*2);\ DEBUG_PUTS("\r\n"); \ DEBUG_ARRAY(Buffer,TYPE_X16,(Size));\ DEBUG_PUTS("=") # define DEBUG_OUT_ARRAY_S32(Buffer,Size) DEBUG_OUT(TYPE_S32,Buffer,(Size)*4);\ DEBUG_ARRAY(Buffer,TYPE_S32,(Size));\ DEBUG_PUTS("=") # define DEBUG_OUT_ARRAY_U32(Buffer,Size) DEBUG_OUT(TYPE_U32,Buffer,(Size)*4);\ DEBUG_PUTS("\r\n"); \ DEBUG_ARRAY(Buffer,TYPE_U32,(Size));\ DEBUG_PUTS("=") # define DEBUG_OUT_ARRAY_X32(Buffer,Size) DEBUG_OUT(TYPE_X32,Buffer,(Size)*4);\ DEBUG_PUTS("\r\n"); \ DEBUG_ARRAY(Buffer,TYPE_X32,(Size));\ DEBUG_PUTS("=") # define DEBUG_OUT_STRUCT(Struct) \ DEBUG_OUT(TYPE_STRUCT,Struct,sizeof(*(Struct))); \ DEBUG_PUTS("\r\n"); \ DEBUG_ARRAY(Buffer,TYPE_X8,sizeof(*(Struct))); \ DEBUG_PUTS("=") # define DEBUG_OUT_STRING(String) \ DEBUG_OUT(TYPE_STRING,String,DEBUG_strlen(String)); \ DEBUG_PUTS("\r\n"); \ DEBUG_PUTS(String); \ DEBUG_PUTS("=") #else /* !DEBUG || !DEBUG_PUTS || !DEBUG_NUMBER && !DEBUG_FUNCTION */ # define DEBUG_ALLOCATE_STRING(Name,String) # define DEBUG_TAG(Tag) # define DEBUG_IN(Type,Buffer,Size) # define DEBUG_OUT(Type,Buffer,Size) # define DEBUG_IN_S8(Val) # define DEBUG_IN_U8(Val) # define DEBUG_IN_X8(Val) # define DEBUG_IN_S16(Val) # define DEBUG_IN_U16(Val) # define DEBUG_IN_X16(Val) # define DEBUG_IN_S32(Val) # define DEBUG_IN_U32(Val) # define DEBUG_IN_X32(Val) # define DEBUG_IN_ARRAY_S8(Buffer,Size) # define DEBUG_IN_ARRAY_U8(Buffer,Size) # define DEBUG_IN_ARRAY_X8(Buffer,Size) # define DEBUG_IN_ARRAY_S16(Buffer,Size) # define DEBUG_IN_ARRAY_U16(Buffer,Size) # define DEBUG_IN_ARRAY_X16(Buffer,Size) # define DEBUG_IN_ARRAY_S32(Buffer,Size) # define DEBUG_IN_ARRAY_U32(Buffer,Size) # define DEBUG_IN_ARRAY_X32(Buffer,Size) # define DEBUG_IN_STRUCT(Struct) # define DEBUG_IN_STRING(String) # define DEBUG_OUT_S8(Val) # define DEBUG_OUT_U8(Val) # define DEBUG_OUT_X8(Val) # define DEBUG_OUT_S16(Val) # define DEBUG_OUT_U16(Val) # define DEBUG_OUT_X16(Val) # define DEBUG_OUT_S32(Val) # define DEBUG_OUT_U32(Val) # define DEBUG_OUT_X32(Val) # define DEBUG_OUT_ARRAY_S8(Buffer,Size) # define DEBUG_OUT_ARRAY_U8(Buffer,Size) # define DEBUG_OUT_ARRAY_X8(Buffer,Size) # define DEBUG_OUT_ARRAY_S16(Buffer,Size) # define DEBUG_OUT_ARRAY_U16(Buffer,Size) # define DEBUG_OUT_ARRAY_X16(Buffer,Size) # define DEBUG_OUT_ARRAY_S32(Buffer,Size) # define DEBUG_OUT_ARRAY_U32(Buffer,Size) # define DEBUG_OUT_ARRAY_X32(Buffer,Size) # define DEBUG_OUT_STRUCT(Struct) # define DEBUG_OUT_STRING(String) #endif /* !DEBUG || !DEBUG_PUTS || !DEBUG_NUMBER && !DEBUG_FUNCTION */ raidutils-0.0.6.orig/raideng/driver.cpp0000664000175000000620000011347210044153333017754 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - DRIVER.CPP //*************************************************************************** // //Description: // // This file contains function definitions for the dptDriver_C //class. // //Author: Doug Anderson //Date: 4/8/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" #ifdef _DPT_WIN_NT #include extern "C" { void LogEvent(CHAR *); extern uLONG osdBadInterpretFW; }; #endif //#define _DUMP_EATA_CP #ifdef _DUMP_EATA_CP #include ofstream odebug("engdebug.txt", ios::trunc); void DumpCommand(engCCB_C *ccb_P); void DumpRtnCommand(engCCB_C *ccb_P, DPT_RTN_T retVal); #endif #if !defined _DPT_UNIX && !defined _DPT_NETWARE && !defined _DPT_DOS extern "C" { uLONG osdTargetBusy(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); void osdTargetCheck(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); void osdResetBus(uLONG HbaNum); }; #else uLONG osdTargetBusy(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); void osdTargetCheck(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); void osdResetBus(uLONG HbaNum); #endif // _DPT_UNIX //Function - dptDriver_C::passCCB() - start //=========================================================================== // //Description: // // This function passes the CCB to the OS dependent layer for output //to an HBA. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDriver_C::passCCB(engCCB_C *ccb_P) { DPT_RTN_T retVal = MSG_RTN_FAILED; // If this is a RAID command from a logical device... if ( ccb_P->isRAIDcmd() && (ccb_P->isLog() || ccb_P->isMgr()) ) // Set the SW RAID bits ccb_P->setSW(); #ifdef ENABLE_SCSI_TRACE cout << "CMD=" << hex << setw(2) << (uSHORT) ccb_P->eataCP.scsiCDB[0] << ", "; cout << "To ==> "; if ((ccb_P->hba_P->getPCIaddr()>=0x1000) && (ccb_P->hba_P->busType & HBA_BUS_PCI)) cout << hex << setw(8) << ccb_P->hba_P->getPCIaddr(); else if (ccb_P->hba_P->getEISAaddr()>=0x1000) cout << hex << setw(4) << ccb_P->hba_P->getEISAaddr(); else cout << hex << setw(4) << ccb_P->hba_P->getISAaddr(); cout << " - ("; // SNI: Fixed SCSI channel bits - only bit 7-5 are valid cout << hex << (uSHORT)(ccb_P->eataCP.devAddr >> 5) << ','; cout << hex << (uSHORT)(ccb_P->eataCP.devAddr & 0x1f) << ','; cout << hex << (uSHORT)(ccb_P->eataCP.message[0] & 0x7) << "), "; if (ccb_P->eataCP.flags & CP_DATA_IN) cout << " -Din"; else cout << " "; if (ccb_P->eataCP.flags & CP_DATA_OUT) cout << " -Dout"; else cout << " "; if (ccb_P->eataCP.flags & CP_INTERPRET) cout << " -Interpret"; else cout << " "; if (ccb_P->eataCP.physical & 0x1) cout << " -Physical"; else cout << " "; if (ccb_P->eataCP.nestedFW & 0x1) cout << " -NFW"; else cout << " "; #endif // if its a multi initiator command we need to reset the ccb a little if(ccb_P->isMultiInitiatorCmd()) { ccb_P->clrInterpret(); ccb_P->setPhysical(); } // if its an interpreted mode select then strip the mode header of any value if ((ccb_P->eataCP.scsiCDB[0] == 0x55) && (ccb_P->eataCP.flags & CP_INTERPRET)) { memset(ccb_P->dataBuff_P, 0, modeHeader_S::size()); } // if its a synch cache with a DPT bit set strip the physical bit if (ccb_P->eataCP.scsiCDB[0] == 0x35 && ccb_P->eataCP.scsiCDB[9] == 0x80) ccb_P->eataCP.physical = 0; // If this is not an event logger command... if (!ccb_P->isLoggerCmd()) { #ifdef _DUMP_EATA_CP // DEBUG ONLY DumpCommand(ccb_P); #endif // Send the CCB to hardware retVal = osdSendCCB(myConn_P()->getIOmethod(),ccb_P); #ifdef _DUMP_EATA_CP // DEBUG ONLY DumpRtnCommand(ccb_P, retVal); #endif } else if (ccb_P->eataCP.scsiCDB[1] & 0x01) // Send the Read log command //dz retVal = osdLoggerCmd(MSG_LOG_READ,ccb_P,myConn_P()->getIOmethod(), //dz ccb_P->logOffset,ccb_P->ctlrNum); // Send the Read log command retVal = osdLoggerCmd((DPT_MSG_T)MSG_LOG_READ,(void*)ccb_P,NULL,(uSHORT)myConn_P()->getIOmethod(), (uLONG)ccb_P->logOffset,(uLONG)ccb_P->ctlrNum); else // Send the Clear log command //dz retVal = osdLoggerCmd(MSG_LOG_CLEAR,ccb_P,myConn_P()->getIOmethod(), //dz ccb_P->logOffset,ccb_P->ctlrNum); // Send the Clear log command retVal = osdLoggerCmd((DPT_MSG_T)MSG_LOG_CLEAR,(void*)ccb_P,NULL,(uSHORT)myConn_P()->getIOmethod(), (uLONG)ccb_P->logOffset,(uLONG) ccb_P->ctlrNum); #ifdef ENABLE_SCSI_TRACE if ((retVal==MSG_RTN_COMPLETED) && ccb_P->ok()) cout << " OK "; else cout << " ***"; cout << endl; #endif return (retVal); } //dptDriver_C::passCCB() - end //Function - dptDriver_C::handleMessage() - start //=========================================================================== // //Description: // // This function processes messages for a SCSI driver. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDriver_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Scan system hardware for all physical and logical objects case MSG_IO_SCAN_SYSTEM: retVal = scanSystem(); break; // Scan system hardware for all HBA objects case MSG_IO_SCAN_HBAS: retVal = scanSystem(3); break; // Scan system hardware for all physical objects case MSG_IO_SCAN_PHYSICALS: retVal = scanSystem(1); break; // Scan system hardware for all logical objects case MSG_IO_SCAN_LOGICALS: retVal = scanSystem(2); break; // Enable the current configuration in hardware case MSG_RAID_HW_ENABLE: retVal = raidHwEnable(); break; // get the count of MSG_RAID_HW_ENABLE case MSG_GET_NUM_HW_ENABLES: { retVal = MSG_RTN_DATA_OVERFLOW; // get the count uLONG numSets = osdGetEnableCount(); // swap it osdSwap4(&numSets); // see if it fits if (fromEng_P->insert(numSets)) retVal = MSG_RTN_COMPLETED; } break; // Delete all objects case MSG_DELETE_ALL: delAllObjects(); retVal = MSG_RTN_COMPLETED; break; // Event Logger Messages - Data input to the logger or no data xfr case MSG_LOG_REGISTER: // Indicate that the logger exists case MSG_LOG_UNREGISTER: // Indicate that the logger does not exist case MSG_LOG_LOAD: // Bring the logger online case MSG_LOG_UNLOAD: // Remove the logger case MSG_LOG_START: // Start loggin events case MSG_LOG_STOP: // Stop loggin events case MSG_LOG_SET_STATUS: // Set the event log filter case MSG_LOG_SAVE_PARMS: // Save logger parameters // messages to control the broadcaster case MSG_ID_BROADCASTERS: // id broadcast modules ot broadcasters inside the modules case MSG_ID_ALL_BROADCASTERS: // id all broadcasting devices case MSG_GET_BROADCASTER_INFO: // get broadcaster setup case MSG_SET_BROADCASTER_INFO: // set broadcaster setup case MSG_LOAD_BROADCAST_MODULE: // load a module on the fly case MSG_DELETE_BROADCASTER: // delete an individual broadcaster case MSG_UNLOAD_BROADCAST_MODULE:// unload a module on the fly case MSG_CREATE_BROADCASTER: // create a new broadcaster // Messages for the stats logger case MSG_STATS_LOG_REGISTER: // stats logger is registering case MSG_STATS_LOG_UNREGISTER: // stats logger is unregistering case MSG_GET_BROADCASTER_SIG: // messages for the alert manager case MSG_ALMS_DELETE: // tell the alms to delete a resource case MSG_ALMS_LINK: // tell the alms to link to resources together case MSG_ALMS_UNLINK: // tell the alms to break the link between two resources case MSG_ALMS_ID_ALERTS: // id the alms alerts case MSG_ALMS_ID_EVENT_FOLDER: // id event folders case MSG_ALMS_ID_SERVER_LOCATIONS: // id server locations case MSG_ALMS_ID_MOVEABLE_RESOURCES: // id moveable resources case MSG_ALMS_ID_MOVEABLE_RESOURCE_FOLDER: // id moveable resource folders case MSG_ALMS_ACTIVATE: // tell the alms to perform final checking and activate an alert case MSG_ALMS_ID_USERS: // id users case MSG_ALMS_ID_EVENTS: // id events case MSG_ALMS_ID_SERVERS: // id servers case MSG_ALMS_ID_ALERT_SCHEDULE: // id broadcast schedules case MSG_ALMS_GET_INFO: // get info on a resource case MSG_ALMS_SET_INFO: // set the info of a resource case MSG_ALMS_CREATE: // create a resource // transition phase //dz retVal = osdLoggerCmd(message,toEng_P,0,0,0); retVal = osdLoggerCmd(message,(void*)toEng_P,(dptData_S*)fromEng_P,0,0,0); break; // Event Logger Messages - Data output from the logger case MSG_LOG_GET_SIG: // Get the logger's DPT signature case MSG_LOG_GET_STATUS: // Get the logger status // transition phase //dz retVal = osdLoggerCmd(message,fromEng_P,0,0,0); retVal = osdLoggerCmd(message,(void*)toEng_P,(dptData_S*)fromEng_P,0,0,0); break; // Delete all emulated drives from the system case MSG_DEL_ALL_EMULATION: retVal = delAllEmulation(); break; // Call base class message handler default: retVal = dptRAIDdrvr_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return(retVal); } //dptSCSIdrvr_C::handleMessage() - end //Function - dptDriver_C::raidHwEnable() - start //=========================================================================== //Description: // This function is the message handler for MSG_RAID_HW_ENABLE. //--------------------------------------------------------------------------- DPT_RTN_T dptDriver_C::raidHwEnable() { DPT_RTN_T retVal = MSG_RTN_COMPLETED; // Set the OS visible flags appropriately myConn_P()->setPrevOsVisibles(); setOsVisibles(); // Prepare deleted devices to go offline lsuOffline(); // Prepare newly hidden devices to go offline myConn_P()->lsuOffline(); // Enable the current configuration retVal = enableConfig(); // Zap parition tables if (myConn_P()->zapPartitions()==MSG_RTN_FAILED) retVal = MSG_RTN_FAILED; // osdTargetCheck() loop dptDevice_C *dev_P = (dptDevice_C *) logList.reset(); while (dev_P!=NULL) { // If a new OS visible device... if (dev_P->isOsVisible() && !dev_P->isPrevOsVisible()) { // Perform OS specific initialization (partition is created under Solaris) osdTargetCheck((uLONG)dev_P->myHBA_P()->getDrvrNum(), (uLONG)dev_P->getChan(), (uLONG)dev_P->getID(), (uLONG)dev_P->getLUN()); } // Get the next logical device dev_P = (dptDevice_C *) logList.next(); } // Reset all buses on cluster mode enabled HBAs that had logical configuration changes dptHBA_C *hbaIt_P = (dptHBA_C *) phyList.reset(); while (hbaIt_P != NULL) { if (hbaIt_P->isClusterMode() && hbaIt_P->isBusResetDesired()) { osdResetBus(hbaIt_P->drvrRefNum); } hbaIt_P->clrBusResetDesired(); hbaIt_P = (dptHBA_C *) phyList.next(); } // Increment the enable count osdIncrementEnableCount(); return (retVal); } //dptDriver_C::raidHwEnable() - end //Function - dptDriver_C::scanSystem() - start //=========================================================================== //Description: // This function scans the system hardware for all SCSI objects in //the system. //--------------------------------------------------------------------------- DPT_RTN_T dptDriver_C::scanSystem(uSHORT searchType) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; // If not a logical device search only... if (searchType!=2) { // Delete the current configuration delAllObjects(); // Find all physical objects in the system if (!scanPhysicals(searchType)) { if (retVal == MSG_RTN_COMPLETED) { retVal = MSG_RTN_FAILED | ERR_SCAN_PHYSICALS; } } // Initialize all physical objects found if (!scanInit(1)) { if (retVal == MSG_RTN_COMPLETED) { retVal = MSG_RTN_FAILED | ERR_INIT_PHYSICALS; } } } // If not a physical device only or HBA only search... if ((searchType!=1) && (searchType!=3)) { // Find all logical devices in the system if (!scanLogicals()) { if (retVal == MSG_RTN_COMPLETED) { retVal = MSG_RTN_FAILED | ERR_SCAN_LOGICALS; } } // Initialize all logical objects found if (!scanInit(2)) { if (retVal == MSG_RTN_COMPLETED) { retVal = MSG_RTN_FAILED | ERR_INIT_LOGICALS; } } // Check for valid partition tables findLSUpartitions(); // Attempt to reserve space at the end of every non-removeable // disk for use by DPT myConn_P()->reserveEndOfDisks(); // Set the magic number of all unarrayed physical DASD devices dptHBA_C *hbaIt_P = (dptHBA_C *) phyList.reset(); while (hbaIt_P != NULL) { hbaIt_P->setPhyMagicNums(); hbaIt_P = (dptHBA_C *) phyList.next(); } // Flag the OS visible devices setOsVisibles(); // Initialize the device busy checking code osdTargetBusy(0, 0, 0, 0); } return (retVal); } //dptDriver_C::scanSystem() - end //Function - dptDriver_C::findMyPhysicals() - start //=========================================================================== // //Description: // // This function finds all of the SCSI HBAs visible to the driver. // //Parameters: // //Return Value: // // 1 = OK // 0 = Failure // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptDriver_C::findMyPhysicals() { uSHORT numCtlrs,index; dptCoreList_C tempList; dptHBA_C *hbaIt_P; drvrHBAinfo_S *hbaInfo_P; oldDrvrHBAinfo_S *oldInfo_P; eataRdConfig_S *rdCfg_P = NULL; uSHORT retVal = 0; DEBUG_BEGIN(8, dptDriver_C::findMyPhysicals()); // Allocate a buffer for the OSD layer's HBA list uCHAR *buff_P = new uCHAR[2048]; // Get the EATA read config. info engCCB_C *ccb_P = getCCB(); if ((buff_P != NULL) && (ccb_P != NULL)) { hbaInfo_P = (drvrHBAinfo_S *) buff_P; oldInfo_P = (oldDrvrHBAinfo_S *) buff_P; // Get the HBA description list if (osdGetCtlrs(myConn_P()->getIOmethod(),&numCtlrs,hbaInfo_P) == MSG_RTN_COMPLETED) { // Indicate a successful scan retVal = 1; // Prevent overflow if (numCtlrs>16) numCtlrs = 16; // Create objects for each controller found for (index=0;indexstatus.flags |= FLG_STAT_REAL; // If the new format... if ((*((uSHORT *) buff_P) == sizeof(drvrHBAinfo_S)-2) || (*((uSHORT *) buff_P) == 0)) { hbaIt_P->drvrRefNum = hbaInfo_P->drvrHBAnum; hbaIt_P->ioAddr.pci = hbaInfo_P->baseAddr; // If an I2O HBA... if (hbaInfo_P->hbaFlags & FLG_OSD_I2O) // Set the I2O indicator flag hbaIt_P->hbaFlags2 |= FLG_HBA_I2O; // If in flash command mode... if (hbaInfo_P->blinkState == 0x69) { hbaIt_P->status.main = SMAIN_FLASH_MODE; hbaIt_P->status.sub = SSUB_FLASH_INIT; hbaIt_P->status.display = DSPLY_STAT_WARNING; } // If any other blink LED code... else if (hbaInfo_P->blinkState) { hbaIt_P->status.main = SMAIN_BLINK_LED; hbaIt_P->status.sub = (uCHAR) hbaInfo_P->blinkState; hbaIt_P->status.display = DSPLY_STAT_FAILED; } hbaIt_P->busNum = hbaInfo_P->pciBusNum; hbaIt_P->devFnNum = hbaInfo_P->pciDeviceNum; } else { hbaIt_P->drvrRefNum = oldInfo_P->ctlrNum; hbaIt_P->ioAddr.pci = oldInfo_P->baseAddr; // If the controller is in a blink LED state... if (oldInfo_P->idPAL.u16[0]==0xbbbb) { // If in flash command mode or production test mode... if ((oldInfo_P->idPAL.u8[3] == 0x69) || (oldInfo_P->idPAL.u8[3] == 0x6a)) { hbaIt_P->status.main = SMAIN_FLASH_MODE; hbaIt_P->status.sub = SSUB_FLASH_INIT; hbaIt_P->status.display = DSPLY_STAT_WARNING; // Indicate that the HBA has flash memory hbaIt_P->flags |= FLG_HBA_FLASH_MEM; } // If in any other blink LED mode... else { hbaIt_P->status.main = SMAIN_BLINK_LED; hbaIt_P->status.sub = oldInfo_P->idPAL.u8[3]; hbaIt_P->status.display = DSPLY_STAT_FAILED; } } } // If not in blink LED or flash mode... if (!hbaIt_P->isBlinkLED()) { // Determine if the flash commands are supported... ccb_P->reInit(); ccb_P->flashCmd(FLASH_CMD_STATUS); ccb_P->setInterpret(); ccb_P->ctlrNum = hbaIt_P->drvrRefNum; ccb_P->eataCP.devAddr = hbaIt_P->getID(); if (passCCB(ccb_P) == MSG_RTN_COMPLETED) { if (ccb_P->ok()) { // Indicate that the HBA has flash memory hbaIt_P->flags |= FLG_HBA_FLASH_MEM; dptFlashStatus_S *stat_P = (dptFlashStatus_S *) ccb_P->defData; stat_P->scsiSwap(); hbaIt_P->fwType = stat_P->getFWtype(); if (stat_P->getFlags1() & FLASH_FLG_FLASH_MODE) { hbaIt_P->status.main = SMAIN_FLASH_MODE; hbaIt_P->status.sub = SSUB_FLASH_INIT; hbaIt_P->status.display = DSPLY_STAT_WARNING; } } } ccb_P->reInit(); // Get the standard inquiry information ccb_P->inquiry(); ccb_P->setInterpret(); ccb_P->ctlrNum = hbaIt_P->drvrRefNum; ccb_P->eataCP.devAddr = hbaIt_P->getID(); if (passCCB(ccb_P) == MSG_RTN_COMPLETED) { if (ccb_P->ok()) { // Initialize the HBA using the inquiry data hbaIt_P->inquiryInit((sdInquiry_S *)ccb_P->defData); #ifdef _DPT_WIN_NT // Check for F/W with the "interpret command" // scatter/gather bug if ((memcmp(hbaIt_P->descr.revision,"07BQ",4) < 0) || ((memcmp(hbaIt_P->descr.revision,"07C1",4) >= 0) && (memcmp(hbaIt_P->descr.revision,"07C8",4) <= 0))) { uLONG hbaBitFlag = 1L << hbaIt_P->drvrRefNum; if (!(osdBadInterpretFW & hbaBitFlag)) { osdBadInterpretFW |= hbaBitFlag; char logBuff[256]; sprintf(logBuff,"DPT %s has downgraded firmware(%c%c.%c%c). Please contact DPT technical support for a firmware upgrade. In USA Phone: (407) 830-5522", hbaIt_P->descr.productID,hbaIt_P->descr.revision[0],hbaIt_P->descr.revision[1], hbaIt_P->descr.revision[2],hbaIt_P->descr.revision[3]); LogEvent(logBuff); } // Fake up a blink LED state hbaIt_P->status.main = SMAIN_BLINK_LED; hbaIt_P->status.sub = 0x40; hbaIt_P->status.display = DSPLY_STAT_FAILED; } #endif } } } rdCfg_P = NULL; // If not in blink LED or flash mode... if (!hbaIt_P->isBlinkLED() && !hbaIt_P->isFlashMode()) { ccb_P->reInit(); // Get the EATA Read Config. data ccb_P->inquiry(0xc1); ccb_P->setInterpret(); ccb_P->ctlrNum = hbaIt_P->drvrRefNum; ccb_P->eataCP.devAddr = hbaIt_P->getID(); if (passCCB(ccb_P) == MSG_RTN_COMPLETED) { if (ccb_P->ok()) { rdCfg_P = (eataRdConfig_S *) ccb_P->dataBuff_P; rdCfg_P->scsiSwap(); rdCfg_P->andLength(0xff); } } } // If valid read config. info if (rdCfg_P != NULL) { // Optimization uCHAR flag1 = rdCfg_P->getFlag1(); uCHAR flag2 = rdCfg_P->getFlag2(); DEBUG(8, PRT_DADDR(hbaIt_P) << "HBA " << hbaIt_P->drvrRefNum << \ " rd cfg ok -" << hex << " flags[1-4]: 0x" << (int) flag1 << \ " 0x" << (int) flag2 << " 0x" << (int) rdCfg_P->getFlag3() << \ " 0x" << (int) rdCfg_P->getFlag4()); DEBUG(8, "len=" << (int) rdCfg_P->getLength() << " rdCfg sz=" \ << sizeof(eataRdConfig_S) << " maxID=" << \ (int) rdCfg_P->getMaxChanID() << " maxLUN=" << \ (int) rdCfg_P->getMaxLun() << " IDs=(" << hex << \ (int) rdCfg_P->getScsiIDs()[0] << "," << \ (int) rdCfg_P->getScsiIDs()[1] << "," << \ (int) rdCfg_P->getScsiIDs()[2] << "," << \ (int) rdCfg_P->getScsiIDs()[3] << ")" << \ " rNum=" << (int) rdCfg_P->getRaidNum()); // If a primary HBA... if (!(flag2 & RDCFG_PRIORITY)) { hbaIt_P->setPrimary(); } // Set the controller's SCSI ID if (flag1 & RDCFG_HBA_ADDR) hbaIt_P->addr.id = rdCfg_P->getScsiIDs()[3]; // Set the DRQ # hbaIt_P->drqNum = 0xffff; if (flag1 & RDCFG_DRQ_VALID) { // Set the DRQ number switch (flag2 & RDCFG_DRQ_NUM) { case 0x40: hbaIt_P->drqNum = 7; break; case 0x80: hbaIt_P->drqNum = 6; break; case 0xc0: hbaIt_P->drqNum = 5; break; } } // Set the IRQ # hbaIt_P->irqNum = flag2 & RDCFG_IRQ_NUM; if (flag2 & RDCFG_IRQ_TRIG) hbaIt_P->irqNum |= 0x0100; // Set the various HBA flags if (flag1 & RDCFG_OVERLAP) hbaIt_P->flags |= FLG_HBA_OVERLAP; if (flag1 & RDCFG_TGT_MODE) hbaIt_P->flags |= FLG_HBA_TGT_MODE; if (flag1 & RDCFG_DMA) hbaIt_P->flags |= FLG_HBA_DMA; if (rdCfg_P->getLength() >= 0x20) { uCHAR flag4 = rdCfg_P->getFlag4(); // Set more HBA flags if (flag4 & RDCFG_SCAM) hbaIt_P->hbaFlags2 |= FLG_HBA_SCAM; // Set the bus type if (flag4 & RDCFG_EISA_BUS) hbaIt_P->busType = HBA_BUS_EISA; else if (flag4 & RDCFG_PCI_BUS) hbaIt_P->busType = HBA_BUS_PCI; else hbaIt_P->busType = HBA_BUS_ISA; } else if (hbaIt_P->ioAddr.pci >= 0x1000) hbaIt_P->busType = HBA_BUS_EISA; else hbaIt_P->busType = HBA_BUS_ISA; // If an ISA board... if (hbaIt_P->busType == HBA_BUS_ISA) // Move the I/O address into the ISA addr field hbaIt_P->ioAddr.pci <<= 16; if (rdCfg_P->getLength() >= 0x22) { // Set this HBA's RAID ID number if ((rdCfg_P->getRaidNum() >= 20) && (rdCfg_P->getRaidNum() <= 31)) { // Set the HBA's RAID ID number hbaIt_P->raidSWid = rdCfg_P->getRaidNum(); // Indicate that the RAID ID number is used uLONG bitToSet = 1; bitToSet <<= hbaIt_P->raidSWid; usedRAIDids |= bitToSet; } } #ifndef SNI_MIPS // On mips EISA controller does not respond to ISA address if ((hbaIt_P->busType == HBA_BUS_EISA) && !(rdCfg_P->getFlag3() & RDCFG_NO_ISA)) { if (hbaIt_P->isPrimary()) hbaIt_P->ioAddr.std.isa = 0x1f0; else hbaIt_P->ioAddr.std.isa = 0x170; } #endif } // end if (rdCfg_P != NULL) // Add the HBA to the physical device list enterPhy(hbaIt_P); } // end if (hbaIt_P!=NULL) } // end for (index) } } // end if (buff_P!=NULL) if (buff_P != NULL) // Delete the HBA description buffer delete[] buff_P; if (ccb_P != NULL) // Free the CCB ccb_P->clrInUse(); return (retVal); } //dptDriver_C::findMyPhysicals() - end //Function - dptDriver_C::setOsVisibles() - start //=========================================================================== //Description: // This function flags all devices in the driver's logical device //list as OS visible. //--------------------------------------------------------------------------- void dptDriver_C::setOsVisibles() { dptDevice_C *dev_P = (dptDevice_C *) logList.reset(); while (dev_P!=NULL) { // Perform OS specific initialization dev_P->setOsVisible(); // Get the next logical device dev_P = (dptDevice_C *) logList.next(); } } //dptDriver_C::setOsVisibles() - end //Function - dptDriver_C::initHBAs() - start //=========================================================================== // //Description: // // This function initializes all HBAs. HBA initialization is seperated //from device initialization so that the capabilities of the HBA are //known prior to scanning for sub-objects. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDriver_C::initHBAs() { #ifdef ENABLE_SCSI_TRACE cout << "Initializing HBAs..." << endl; #endif dptObject_C *obj_P = (dptObject_C *) phyList.reset(); while (obj_P!=NULL) { // Initialize the HBA obj_P->realInit(); // Get the next HBA obj_P = (dptObject_C *) phyList.next(); } // Assign RAID ID numbers to the HBA's that don't have one assignRAIDids(); } //dptDriver_C::initHBAs() - end //Function - dptDriver_C::assignRAIDids() - start //=========================================================================== // //Description: // // This function assigns a unique RAID ID to each HBA in the system. // //--------------------------------------------------------------------------- void dptDriver_C::assignRAIDids() { uLONG bitToCheck; uCHAR idNum; engCCB_C *ccb_P = getCCB(); if (ccb_P != NULL) { dptHBA_C *hbaIt_P = (dptHBA_C *) phyList.reset(); while (hbaIt_P != NULL) { //-------------------------------- // Assign the selectable RAID ID # //-------------------------------- if (!hbaIt_P->raidSWid && !hbaIt_P->isBlinkLED()) { // Find the first available address independent HBA ID # bitToCheck = 0x00100000L; for (idNum = 20;idNum <= 31;idNum++) { if (!(usedRAIDids & bitToCheck)) break; else bitToCheck <<= 1; } // Issue the multi-function command ccb_P->reInit(); ccb_P->mfCmd(0x09,idNum); ccb_P->setInterpret(); ccb_P->ctlrNum = hbaIt_P->drvrRefNum; if (passCCB(ccb_P) == MSG_RTN_COMPLETED) { if (ccb_P->ok()) { hbaIt_P->raidSWid = idNum; // Indicate that the HBA ID # is used bitToCheck = 1; bitToCheck <<= idNum; usedRAIDids |= bitToCheck; } } } //----------------------------------- // Assign the slot specific RAID ID # //----------------------------------- if (hbaIt_P->busType == HBA_BUS_EISA) { // If there is a valid EISA address... if (hbaIt_P->ioAddr.std.eisa!=0) // Use the EISA slot # hbaIt_P->raidSlotID = (uCHAR) hbaIt_P->getEISAslot(); } else if (hbaIt_P->busType == HBA_BUS_ISA) { switch (hbaIt_P->ioAddr.std.isa) { case 0x1f0: hbaIt_P->raidSlotID = 0x10; break; case 0x170: hbaIt_P->raidSlotID = 0x11; break; case 0x330: hbaIt_P->raidSlotID = 0x12; break; default: hbaIt_P->raidSlotID = 0x13; break; } } hbaIt_P = (dptHBA_C *) phyList.next(); } // while() // Free the CCB ccb_P->clrInUse(); } } //dptDriver_C::assignRAIDids() - end //Function - dptDriver_C::findMyLogicals() - start //=========================================================================== // //Description: // // This function finds all driver level logical devices in the system. // //Parameters: // //Return Value: // // 1 = OK // 0 = Failure // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptDriver_C::findMyLogicals() { dptHBA_C *hbaIt_P; engCCB_C *ccb_P; hbaIt_P = (dptHBA_C *) phyList.reset(); // For all HBAs... while (hbaIt_P!=NULL) { // If the HBA supports RAID... if (hbaIt_P->isRAIDcapable()) { // Get a CCB ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to do a log sense ccb_P->logSense(0x36); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); // Target the HBA - SW logical ccb_P->target(hbaIt_P->getAddr(),hbaIt_P,CCB_ORIG_LOG); // Send the CCB to hardware if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // Create SCSI devices for the logical addresses returned newLP36Devices(ccb_P,hbaIt_P); } // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) } // end if (isRAIDcapable()) // Get the next HBA hbaIt_P = (dptHBA_C *) phyList.next(); } // end while (hbaIt_P!=NULL) // Return success return (1); } //dptSCSIdriver_C::findMyLogicals() - end //Function - dptDriver_C::findComponent() - start //=========================================================================== // //Description: // // This function finds a component device with the specified SCSI //address. The HBA field of the SCSI address is assumed to be set to //the HBA's index #. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptDevice_C * dptDriver_C::findComponent(dptAddr_S inAddr,uSHORT method,uLONG inMagicNum, dptCoreList_C *list_P) { dptHBA_C *hbaIt_P = NULL; dptDevice_C *comp_P = NULL; // If a magic number was specified... if (inMagicNum) { // list_P should only be valid for 5th Gen. controllers to limit the component search to // the HBA's logical list. if (list_P) { // Find the component in the HBA's logical list comp_P = (dptDevice_C *) ::findMagicObject(*list_P, inMagicNum, 1); } else { // Find the component on any HBA comp_P = (dptDevice_C *) myConn_P()->findMagicObject(inMagicNum); } // If the object was found... if (comp_P) { // Use the object's HBA hbaIt_P = comp_P->myHBA_P(); } } // If we haven't found the HBA yet... if (hbaIt_P == NULL) { hbaIt_P = (dptHBA_C *) phyList.reset(); while (hbaIt_P!=NULL) { // If the HBA's RAID ID equals the component's RAID ID if ((method==0) && ((hbaIt_P->getSWid()==inAddr.hba) || (hbaIt_P->getSlotID()==inAddr.hba))) break; // If the HBA # equals the components HBA # else if ((method==1) && (hbaIt_P->getHBA()==inAddr.hba)) break; else // Get the next HBA hbaIt_P = (dptHBA_C *) phyList.next(); } } // If an HBA was not found... if (hbaIt_P == NULL) { // Create an absent HBA hbaIt_P = (dptHBA_C *) newObject(DPT_SCSI_HBA); if (hbaIt_P!=NULL) { // Get the HBA's base address from the index number hbaIt_P->setBaseFromRAIDid(inAddr.hba); // Set the HBA's status to missing hbaIt_P->status.display = DSPLY_STAT_MISSING; // Add the absent HBA to the physical device list if (enterPhy(hbaIt_P) != MSG_RTN_COMPLETED) hbaIt_P = NULL; } } // If we haven't already found the desired component (via magic #)... else if (comp_P == NULL) { // Get the HBA's sequence # inAddr.hba = hbaIt_P->getHBA(); // Attempt to find the component device comp_P = (dptDevice_C *) findObjectAt(hbaIt_P->logList,inAddr); } // If an HBA exists but no component exists... if ((comp_P==NULL) && (hbaIt_P!=NULL)) { // Create an absent device comp_P = (dptDevice_C *) newObject(DPT_SCSI_DASD); if (comp_P!=NULL) { // Get the HBA's sequence # inAddr.hba = hbaIt_P->getHBA(); // Set the absent device's SCSI address comp_P->addr = inAddr; // Set the component's status to missing comp_P->status.display = DSPLY_STAT_MISSING; // Add the component to the HBA's logical device list hbaIt_P->enterLog(comp_P); } } return (comp_P); } //dptDriver_C::findComponent() - end //Function - dptDriver_C::setPAPinfo() - start //=========================================================================== // //Description: // // If a device is specified, this function sets the physical array //page status for that device. If no device is specified, the status //of all physical devices attached to this manager are updated. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDriver_C::setPAPinfo(dptDevice_C *dev_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; dptHBA_C *hbaIt_P; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { retVal = MSG_RTN_IGNORED; if (dev_P!=NULL) { hbaIt_P = dev_P->myHBA_P(); // Send SW level RAID cmd to the specified device's HBA ccb_P->target(hbaIt_P->getAddr(),hbaIt_P,CCB_ORIG_MGR); if (getPAP(ccb_P)==MSG_RTN_COMPLETED) // Set the specified device's PAP status retVal = dev_P->setPAPstatus(ccb_P); } else { hbaIt_P = (dptHBA_C *) phyList.reset(); while (hbaIt_P!=NULL) { // If the HBA is real && supports RAID... if (hbaIt_P->isReal() && hbaIt_P->isRAIDcapable()) { retVal = MSG_RTN_COMPLETED; // Target the HBA ccb_P->target(hbaIt_P->getAddr(),hbaIt_P,CCB_ORIG_MGR); // If the physical array page was retrieved... if (getPAP(ccb_P)==MSG_RTN_COMPLETED) // Set the HBA's logical devices' PAP status hbaIt_P->setLogPAP(ccb_P); } hbaIt_P = (dptHBA_C *) phyList.next(); } } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptDriver_C::setPAPinfo() - end //Function - dptDriver_C::delAllEmulation() - start //=========================================================================== // //Description: // // This function deletes all emulation drives from the system. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptDriver_C::delAllEmulation() { DPT_RTN_T retVal = MSG_RTN_COMPLETED; DPT_RTN_T tempStatus; // For all HBAs... dptHBA_C *hbaIt_P = (dptHBA_C *) phyList.reset(); while (hbaIt_P!=NULL) { // Delete emulated drives tempStatus = hbaIt_P->delEmulation(); if (retVal == MSG_RTN_COMPLETED) retVal = tempStatus; // Get the next HBA hbaIt_P = (dptHBA_C *) phyList.next(); } return (retVal); } //dptDriver_C::delAllEmulation() - end //Function - dptDriver_C::findLSUpartitions() - start //=========================================================================== // //Description: // // This function checks all LSUs for a valid partition table. If a //valid partition is found, the last block used by a partition is //recorded. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDriver_C::findLSUpartitions() { dptDevice_C *dev_P = (dptDevice_C *) logList.reset(); while (dev_P!=NULL) { // Check for a valid partition table dev_P->checkForPartition(); // Get the next LSU dev_P = (dptDevice_C *) logList.next(); } } //dptDriver_C::findLSUpartitions() - end #ifdef _DUMP_EATA_CP //Function - DumpCommand() - start //=========================================================================== // //Description: // // This function dumps relevant information from the EATA CP to a file. // //--------------------------------------------------------------------------- void DumpCommand(engCCB_C *ccb_P) { int i; odebug.fill('0'); odebug << "Target="; if (ccb_P->hba_P) odebug << setw(2) << (uSHORT)(ccb_P->hba_P->getDrvrNum()); else odebug << "??"; odebug << '-'; odebug << hex << setw(2) << (uSHORT)(ccb_P->eataCP.devAddr >> 5) << ','; odebug << hex << setw(2) << (uSHORT)(ccb_P->eataCP.devAddr & 0x1f) << ','; odebug << hex << setw(2) << (uSHORT)(ccb_P->eataCP.message[0] & 0x7) << " "; odebug.fill(' '); if (ccb_P->eataCP.flags & CP_DATA_IN) odebug << " -Din"; else odebug << " "; if (ccb_P->eataCP.flags & CP_DATA_OUT) odebug << " -Dout"; else odebug << " "; if (ccb_P->eataCP.flags & CP_INTERPRET) odebug << " -Int"; else odebug << " "; if (ccb_P->eataCP.physical & 0x1) odebug << " -Phy"; else odebug << " "; if (ccb_P->eataCP.nestedFW & 0x1) odebug << " -NFW"; else odebug << " "; odebug.fill('0'); odebug << " CDB: "; for (i=0; i<12; i++) odebug << hex << setw(2) << (uSHORT)ccb_P->eataCP.scsiCDB[i] << ' '; odebug << endl; if (ccb_P->eataCP.flags & CP_DATA_OUT) { odebug << " outdata: "; for (i=0; i<28; i++) { odebug << hex << setw(2) << (uSHORT)ccb_P->dataBuff_P[i]; if ((i & 0x03) == 0x03) { odebug << " "; } } odebug << endl; } } //DumpCommand() - end //Function - DumpRtnCommand() - start //=========================================================================== // //Description: // // This function dumps the results of an EATA CP. // //--------------------------------------------------------------------------- void DumpRtnCommand(engCCB_C *ccb_P, DPT_RTN_T retVal) { int i; odebug.fill('0'); if (ccb_P->eataCP.flags & CP_DATA_IN) { odebug << " indata: "; for (i=0; i<28; i++) { odebug << hex << setw(2) << (uSHORT)ccb_P->dataBuff_P[i]; if ((i & 0x03) == 0x03) { odebug << " "; } } odebug << endl; } odebug << " retVal=0x" << hex << setw(8) << retVal << " ctlrStatus=0x" << hex << setw(2) << (uSHORT) ccb_P->ctlrStatus << " scsiStatus=0x" << hex << setw(2) << (uSHORT) ccb_P->scsiStatus << endl; if (ccb_P->scsiStatus == 0x02) { odebug << " sensekey=0x" << hex << setw(2) << (uSHORT) ccb_P->defReqSense[2]; odebug << " asc=0x" << hex << setw(2) << (uSHORT) ccb_P->defReqSense[12]; odebug << " ascq=0x" << hex << setw(2) << (uSHORT) ccb_P->defReqSense[13]; odebug << " sense[15, 16, 17]= " << hex << setw(2) << (uSHORT)ccb_P->defReqSense[15] << " " << setw(2) << (uSHORT)ccb_P->defReqSense[16] << " " << setw(2) << (uSHORT)ccb_P->defReqSense[17]; odebug << endl; } odebug << endl; } //DumpCommand() - end #endif raidutils-0.0.6.orig/raideng/driver.hpp0000664000175000000620000001600310044153312017746 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DRIVER_HPP #define __DRIVER_HPP //File - DRIVER.HPP //*************************************************************************** // //Description: // // This file contains the class definitions for all DPT driver classes. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Class - dptSCSIdrvr_C::- start //=========================================================================== // //Description: // // This class defines a SCSI driver manager. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptSCSIdrvr_C : public dptManager_C { protected: // Virtual Functions.................................. // Called prior to entering a device in the physical device list // - Can be used to keep a sorted list virtual DPT_RTN_T preEnterPhy(dptCoreObj_C *); // Called prior to adding an object to the physical object list // - Adds the HBA in priority level order virtual uSHORT preAddPhy(dptCoreObj_C *obj_P); // Called after a device has been added to the physical device // list. Can be used to update object flags... virtual void postAddPhy(dptCoreObj_C *); // Performs post delete operations // (Called prior to the object actually being deleted from memory) virtual void postDelete(dptCoreObj_C *); // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); // Determine if the specified artificial object type is supported virtual uSHORT isValidAbsentObj(uSHORT); // Message Handlers................................... // Returns this driver's DPT signature DPT_RTN_T rtnDrvrSig(dptBuffer_S *); // Returns system information DPT_RTN_T rtnSysInfo(dptBuffer_S *); // Set the system configuration DPT_RTN_T setSysConfig(dptBuffer_S *,uSHORT=0); public: // Constructor/Destructor............................. dptSCSIdrvr_C(); // Other Functions.................................... }; //dptSCSIdrvr_C - end //Class - dptRAIDdrvr_C - start //=========================================================================== // //Description: // // This class defines a RAID driver. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptRAIDdrvr_C : public dptSCSIdrvr_C { // Other Functions.................................... // Sets up default RAID definitions void setDefRAID(); protected: // Data............................................... // Bits indicate which HBA RAID ID numbers have been used uLONG usedRAIDids; // Virtual Functions.................................. // Called prior to entering a device in the logical device list // - Sets the logical device's HBA pointer virtual DPT_RTN_T preEnterLog(dptCoreDev_C *); // Get the next available address for the specified RAID device virtual void getRAIDaddr(dptRAIDdev_C *); // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); public: // Constructor/Destructor............................. dptRAIDdrvr_C(); // Virtual Functions.................................. // Determines if this manager is capable of configuring RAID devices virtual uSHORT isRAIDcapable() { return (1); } }; //dptRAIDdrvr_C - end //Class - dptDriver_C - start //=========================================================================== // //Description: // // This class is the highest level DPT driver class. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptDriver_C : public dptRAIDdrvr_C { // Virtual Functions.................................. // Set device physical array page (PAP) information virtual DPT_RTN_T setPAPinfo(dptDevice_C *dev_P=NULL); protected: // Virtual Functions.................................. // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); // Finds this manager's physical objects virtual uSHORT findMyPhysicals(); // Finds this manager's logical objects virtual uSHORT findMyLogicals(); // Return the logical array page used virtual uSHORT getLAPpage() { return (LAP_DPT2); } // Finds a component device virtual dptDevice_C * findComponent(dptAddr_S,uSHORT=0,uLONG=0, dptCoreList_C *list_P=NULL); // Initializes all HBAs virtual void initHBAs(); // Message Handlers................................... // Save the current configuration to hardware DPT_RTN_T raidHwEnable(); // Scans system hardware to find all SCSI objects in the system DPT_RTN_T scanSystem(uSHORT=0); // Delete all emulated drives from the system DPT_RTN_T delAllEmulation(); // Other Functions.................................... // Check all LSUs for a valid partition table void findLSUpartitions(); // Assign RAID ID numbers to all HBA's that don't already have one void assignRAIDids(); // Flag all the driver's logical devices as OS visible void setOsVisibles(); public: // Adjust a CCB as necessary and pass it on to the next manager virtual DPT_RTN_T passCCB(engCCB_C *); }; //dptDriver_C - end #endif raidutils-0.0.6.orig/raideng/drv_busy.cpp0000664000175000000620000002450110044153333020310 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * UNIX based drive busy checking routine. * * 1999/02/11 salyzyn@dpt.com * Initial creation */ #include "stdio.h" #include "drv_busy.hpp" #include "string.h" #include "stdlib.h" #if (defined(_DPT_WIN_NT)) int DPTDriveBusy::drvBusy(int hba, int bus, int target, int lun) { return (0); } #else // _DPT_WIN_NT int DPTDriveBusy::newDeviceList (DPTDeviceList ** List, char * name) { char * Buffer; char * Head = Buffer = Strdup(name); char * Path; DPTDeviceList * Link = *List; DPTDeviceList * New = (DPTDeviceList *)NULL; DPTDeviceList * Next; int RetVal = 0; FILE * fp; /* Parse out major, minor and links */ static char ls[] = "ls -ld %s 2>/dev/null | sed -n '" "s#.* \\([0-9][0-9]*\\),[ ]*\\([0-9][0-9]*\\).*#\\1 \\2#p\n" "s#^d.*#d#p\n" "s#^l.* \\([^ ]*/\\)[^/ ]*/[^/ ]*/[^/ ]*/[^/ ]* -> \\.\\./\\.\\./\\.\\./\\([^ ][^ ]*\\)$# \\1\\2#p\n" "s#^l.* \\([^ ]*/\\)[^/ ]*/[^/ ]*/[^/ ]* -> \\.\\./\\.\\./\\([^ ][^ ]*\\)$#l\\1\\2#p\n" "s#^l.* \\([^ ]*/\\)[^/ ]*/[^/ ]* -> \\.\\./\\([^ ][^ ]*\\)$#l\\1\\2#p\n" "s#^l.* \\([^ ]*/\\)[^/ ]* -> \\([^/ ][^ ]*\\)$#l\\1\\2#p\n" "s#^l.* -> \\([^ ][^ ]*\\)$#l\\1#p'"; static char eol[] = " \t\r\n"; Link = *List; while (((Path = strtok (Head, eol)) != NULL) && (Path[0] != '\0')) { Head = (char *)NULL; if ((Next = (DPTDeviceList *)new char[sizeof(DPTDeviceList) + strlen(Path)]) != (DPTDeviceList *)NULL) { Next->Next = Link; Next->Link = (DPTDeviceList *)NULL; Next->Major = -1; Next->Minor = -1; (void)strcpy (Next->Name, Path); if (New) { New->Link = Next; } else { *List = Next; } New = Next; } else { RetVal = -1; } } delete [] Buffer; /* Find any links, or device information, and extend them */ if (New) /* Any new entries to check? */ for (Link = *List; Link != (DPTDeviceList *)NULL; Link = Link->Link) { Buffer = new char[sizeof(ls) + strlen(Link->Name) - 1]; sprintf (Buffer, ls, Link->Name); fp = SafePopenRead (Buffer); delete [] Buffer; Buffer = new char[512]; while (fgets(Buffer, 512, fp)) { switch (Buffer[0]) { case 'd': /* Mark it as the mount point */ Link->Major = -2; Link->Minor = -2; break; case 'l': /* It's a link to a device */ if ((Next = (DPTDeviceList *)new char[sizeof(DPTDeviceList) + strlen(Buffer + 1)]) != (DPTDeviceList *)NULL) { Next->Next = Link->Next; Next->Link = Link->Link; Next->Major = -1; Next->Minor = -1; (void)strcpy (Next->Name, strtok (Buffer + 1, eol)); Link->Link = Next; } else { RetVal = -1; } break; default: /* It's the mount device */ if ((Path = strtok(Buffer, eol)) != (char *)NULL) { Link->Major = atoi(Path); if ((Path = strtok ((char *)NULL, eol)) != (char *)NULL) { Link->Minor = atoi(Path); } } break; } } delete [] Buffer; SafePclose (fp); } return (RetVal); } void DPTDriveBusy::deleteDeviceList (DPTDeviceList * List) { if (List != (DPTDeviceList *)NULL) { DPTDeviceList * Link; do { if ((Link = List->Link) == (DPTDeviceList *)NULL) { Link = List->Next; } delete [] ((char *) List); } while ((List = Link) != (DPTDeviceList *)NULL); } } static char *TargetStringDirs[] = { "", "/dev/dsk/", "/dev/rdsk/", "/dev/", "/dev/r", (char *)NULL }; static char *TargetStringSuffixes[] = { "", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "a", "b", "c", "d", "e", "f", "g", "h", (char *)NULL }; static char *TargetPathDirs[] = { "", "/devices/", "/proc/", (char *)NULL }; static char *TargetPathSuffixes[] = { "", ":a", ":b", ":c", ":d", ":e", ":f", ":g", ":h", (char *)NULL }; int DPTDriveBusy::drvBusy(int hba, int bus, int target, int lun) { char * Targets[2]; char ** Dirs[sizeof(Targets)/sizeof(Targets[0])]; char ** Suffixes[sizeof(Targets)/sizeof(Targets[0])]; int SuffixIndex; DPTDeviceList * Mounts = (DPTDeviceList *)NULL; int RetVal = -1; /* Initialize the local structures */ Targets[0] = getTargetString(hba, bus, target, lun); Dirs[0] = TargetStringDirs; Suffixes[0] = TargetStringSuffixes; Targets[1] = getTargetPath(hba, bus, target, lun); Dirs[1] = TargetPathDirs; Suffixes[1] = TargetPathSuffixes; for (SuffixIndex = 0;;) { while (Targets[0] == (char *)NULL) { int Index, NoneZero = 0; for (Index = sizeof(Targets)/sizeof(Targets[0]); Index; --Index) { if ((Targets[Index-2] = Targets[Index-1]) != (char *)NULL) { ++NoneZero; } Targets[Index-1] = (char *)NULL; Dirs[Index-2] = Dirs[Index-1]; Suffixes[Index-2] = Suffixes[Index-1]; } if (NoneZero == 0) { break; } } if (Targets[0] == (char *)NULL) { break; } /* Check if the Dirs/Targets entry exists */ { char * name = new char[strlen(Dirs[0][0]) + strlen(Targets[0]) + strlen(Suffixes[0][SuffixIndex]) + 1]; if (name == (char *)NULL) { RetVal = -2; break; } (void)strcat(strcat(strcpy(name, Dirs[0][0]), Targets[0]), Suffixes[0][SuffixIndex]); switch(PathExists(name)) { case PathExists_Exists: case PathExists_Read: case PathExists_Open: /* Check if the Dirs/Target entry is mounted */ if (Mounts == (DPTDeviceList *)NULL) { FILE * fp = SafePopenRead("mount | sed -n '" "s/^\\([^ ][^ ]*\\)[ ][ ]*on[ ][ ]*\\([^ ][^ ]*\\).*/\\1 \\2/p'"); char * Buffer = new char[512]; while (fgets (Buffer, 512, fp)) { if (newDeviceList (&Mounts, Buffer)) { RetVal = -2; } } SafePclose(fp); if (RetVal == -1) { RetVal = 0; } # if (defined(DEBUG) && (DEBUG > 0)) if (Mounts != (DPTDeviceList *)NULL) { DPTDeviceList * List = Mounts; DPTDeviceList * Link; printf ("Mount list:\n"); do { printf ("%s", List->Name); if ((List->Major == -2) && (List->Minor == -2)) { printf ("/"); } else if ((List->Major != -1) || (List->Minor != -1)) { printf ("(%d,%d)", List->Major, List->Minor); } if ((Link = List->Link) == (DPTDeviceList *)NULL) { printf ("\n"); Link = List->Next; } else { printf (", "); } } while ((List = Link) != (DPTDeviceList *)NULL); } # endif } /* We have an initialized mount database, search! */ { DPTDeviceList * Link; DPTDeviceList * Names = (DPTDeviceList *)NULL; newDeviceList (&Names, name); for (Link = Mounts; Link != (DPTDeviceList *)NULL; ) { DPTDeviceList * Next; DPTDeviceList *Name; for (Name = Names; (Name = Name->Link) != (DPTDeviceList *)NULL; ) { /* Same name, or same device */ if ((strcmp (Name->Name, Link->Name) == 0) || ((Name->Major == Link->Major) && (Name->Minor == Link->Minor))) { break; } } if (Name != (DPTDeviceList *)NULL) { RetVal = 1; break; } if ((Next = Link->Link) == (DPTDeviceList *)NULL) { Next = Link->Next; } Link = Next; } deleteDeviceList (Names); } break; case PathExists_Busy: RetVal = 1; /* It's busy even before we hit the ground */ case PathExists_None: break; } delete [] name; } if ((RetVal != -1) && (RetVal != 0)) { break; } /* Try next */ if (Suffixes[0][++SuffixIndex] == (char *)NULL) { SuffixIndex = 0; if ((++(Dirs[0]))[0] == (char *)NULL) { delete [] Targets[0]; Targets[0] = (char *)NULL; } } } /* Free up resources */ { int Index; for (Index = 0; Index < (sizeof(Targets)/sizeof(Targets[0])); ++Index) { if (Targets[Index] != (char *)NULL) { delete [] Targets[Index]; } } } deleteDeviceList (Mounts); return (RetVal); } #endif /* `C' interface routine */ extern "C" { int drv_busy(int hba, int bus, int target, int lun) { if (hba == -1) { DPTControllerMap::Reset(); return (0); } DPTDriveBusy * obj = new DPTDriveBusy(); int retVal = obj->drvBusy(hba, bus, target, lun); delete obj; return (retVal); } #if (defined(DEBUG)) main (int argc, char ** argv) { int hba, bus, target, lun; hba = bus = target = lun = 0; if (argc > 1) { hba = atoi(argv[1]); } if (argc > 2) { bus = atoi(argv[2]); } if (argc > 3) { target = atoi(argv[3]); } if (argc > 4) { lun = atoi(argv[4]); } printf ("d%db%dt%dd%d: ", hba, bus, target, lun); switch (drv_busy (hba, bus, target, lun)) { case 0: printf ("not busy\n"); break; case 1: printf ("busy\n"); break; case -1: printf ("not found\n"); break; case -2: printf ("allocation error\n"); break; default: printf ("Error\n"); } } #endif } #if (defined(DEBUG)) # if (DEBUG <= 1) # undef DEBUG # endif # include "ctlr_map.cpp" #endif raidutils-0.0.6.orig/raideng/eata2i2o.c0000664000175000000620000055774510044153331017544 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* DPT EATA packet to I2O packet conversion utility. * * Author: Mark Salyzyn */ #include "eata2i2o.h" #include "i2oexec.h" #include "i2oadptr.h" #include "dptsig.h" #if (defined(DEBUG)) # ifdef MSDOS # define DEBUGGER() int3() void int3(void); # else # define DEBUGGER() # endif #else # define DEBUGGER() #endif #if (!defined(_DPT_DOS) && !defined(__BORLANDC__)) # define FLASH_VERIFY #endif #if (!defined(__NEAR__)) # if (defined(__BORLANDC__)) # define __NEAR__ near # else # define __NEAR__ # endif #endif /* * The following must (unless otherwise denoted) have defined for * the following modules: * * osdStartI2OCp() macro, or, * int _osdStartI2OCp __P(( * IN Controller_t controller, * IN OUT OutGoing_t packet, * IN OUT Callback_t callback)); * * Optionally osdClockTick(), osdCLOCKTICK, * * osdBcopyIn(src_phys,dest,count) and osdBcopyOut(src,dest_phys,count) * macros. osdBcopyIn and osdBcopyOut will be defined locally * utilizing osdVirt definition. * * osdBzero(dest,count) macro * osdBcopy(src,dest,count) macro * osdPhys(address) macro * * Optionally osdEata4 can be defined to override the default of * osdLocal4 respectively to handle EATA packets sent to us that * are in local format. * #define osdEata4(x) (*(unsigned long __FAR__ *)(x)) * * Optionally osdEataPack and osdEataUnpack can be defined to deal * with any requirement to handle Virtual addresses that are in * a differing format in the Eata packet than in the local * system. ie: * #define osdEataPack(x) (((((unsigned long)(x))>>12)&0x000FFFF0L) \ * + ((unsigned long)(((unsigned short)(x))&0xF))) * could be used to take a virtual address and put it into the * eata packet format. And * #define osdEataUnpack(x) (((((unsigned long)(x))<<12)&0xFFFF0000L) \ * + ((unsigned long)(unsigned short)(x))) * could take the address stored in the eata packet and generate * the local virtual address (Segment:Offset). Otherwise, these * are simply passthrough if not defined. * * Optionally osdEataVirt and osdEataPhys can be defined to deal * with conversion of Eata addresses from it's format (Physical * or Virtual) to Virtual and Physical respectively. By default * osdEataVirt is defined as osdVirt, and osdEataPhys is * passthrough as it is assumed that the eata packet will be in * a physical form. osdVirtEata is also defined along the same * lines ... Beware of side effects from osdEataVirt and * friends! * * Optionally getIrqNum can be defined to point to a local * efficient means of acquiring the IRQ Number. If not defined, * we will create our own version that gets it from the Hardware * Log Page 1 value (which is only correct after FW revision * 2036 or later). * * Optionally pushInterrupt(), popInterrupt(), disableInterrupt(), * enableInterrupt() semaphore macros or functions. * * Optionally define NUM_CALLBACK to set the callback placeholders * as statically placed rather than dynamically allocated * members. * * Optionally define NUM_CONTROLLERS to set the LCT cache * statically to some limit (Default to one if not defined) or * to no limit and dynamically allocated if set to -1. * * Optionally define NUM_DEVICES to the maximum number of devices * for each controller. Defaults to -1 if NUM_CONTROLLERS is -1, * and to 4*16 if NUM_CONTROLLERS is undefined or set to some * limit. * * Optionally define osdAlloc(size) macro to point to memory * allocation mechanism. osdFree(member,size) macro may be * defined for completeness but is not currently used by these * utilities (as we have not placed a requirement to perform * any `new' or `delete' functionality into the eata2i2o * converter). This definition also expands the capability of * the Flash conversion to allow buffering of incoming flash * messages to coalesce them into 64KB writes to the adapter * (required since the fifth generation controllers erase and * write in up to 64KB blocks). */ /* * Default macros if not overridden. One possible override in an * environment incapable of dealing with an osdVirt conversion: * * #include "copy.h" * #define osdBcopyOut(src,dest_phys,count) \ * osdCopyOut(dest_phys,src,count) * #define osdBcopyIn(src_phys,dest,count) \ * osdCopyIn(dest,src_phys,count) */ /* osdVirt and osdPhys need to be defined to allow compile */ #if (!defined(osdVirt)) # define osdVirt(x) ((void __FAR__ *)(x)) # define _DPT_EataVirtual #endif #if (!defined(osdPhys)) # define osdPhys(x) ((unsigned long)(x)) # define _DPT_EataVirtual #endif #if (!defined(_DPT_EataVirtual)) # if (!defined(osdBcopyOut)) # define osdBcopyOut(src,dest_phys,count) \ osdBcopy(src,(void __FAR__ *)osdVirt(dest_phys),count) # endif # if (!defined(osdBcopyIn)) # define osdBcopyIn(src_phys,dest,count) \ osdBcopy((void __FAR__ *)osdVirt(src_phys),dest,count) # endif #endif #if (!defined(osdEata4)) # define osdEata4(x) osdLocal4(x) #endif /* Odds are it is using the SmartROM definition */ #if (defined(_DPT_EataPacked)) # if (!defined(osdEataPack)) # define osdEataPack(x) (((((unsigned long)(x))>>12)&0x000FFFF0L) \ + ((unsigned long)(((unsigned short)(x))&0xF))) # endif # if (!defined(osdEataUnpack)) # define osdEataUnpack(x) (((((unsigned long)(x))<<12)&0xFFFF0000L) \ + ((unsigned long)(unsigned short)(x))) # endif #else # if (!defined(osdEataPack)) # define osdEataPack(x) ((unsigned long)(x)) # endif # if (!defined(osdEataUnpack)) # define osdEataUnpack(x) ((unsigned long)(x)) # endif #endif #if ((defined(_DPT_EataVirtual) || defined(_DPT_32_BIT)) && !defined(_DPT_EataPhysical)) # if (!defined(osdEataVirt)) # define osdEataVirt(x) ((void __FAR__ *)(x)) # undef _DPT_EataVirtual # undef _DPT_EataPhysical # define _DPT_EataVirtual # endif # if (!defined(osdEataPhys)) # define osdEataPhys(x) osdPhys(x) # undef _DPT_EataVirtual # undef _DPT_EataPhysical # define _DPT_EataVirtual # endif # if (!defined(osdVirtEata)) # define osdVirtEata(x) ((unsigned long)(x)) # undef _DPT_EataVirtual # undef _DPT_EataPhysical # define _DPT_EataVirtual # endif #else /* !_DPT_EataVirtual && !_DPT_32_BIT && _DPT_EataPhysical */ # if (!defined(osdEataVirt)) # define osdEataVirt(x) osdVirt(x) # undef _DPT_EataVirtual # undef _DPT_EataPhysical # define _DPT_EataPhysical # endif # if (!defined(osdEataPhys)) # define osdEataPhys(x) ((unsigned long)(x)) # undef _DPT_EataVirtual # undef _DPT_EataPhysical # define _DPT_EataPhysical # endif # if (!defined(osdVirtEata)) # define osdVirtEata(x) osdPhys(x) # undef _DPT_EataVirtual # undef _DPT_EataPhysical # define _DPT_EataPhysical # endif #endif /* !_DPT_EataVirtual && !_DPT_32_BIT && _DPT_EataPhysical */ #if (!defined(_DPT_EataVirtual)) # if (!defined(osdBcopyOut)) # define osdBcopyOut(src,dest_phys,count) \ osdBcopy(src,(void __FAR__ *)osdVirt(dest_phys),count) # endif # if (!defined(osdBcopyIn)) # define osdBcopyIn(src_phys,dest,count) \ osdBcopy((void __FAR__ *)osdVirt(src_phys),dest,count) # endif #endif #if (defined(_DPT_32_BIT)) # define defAlignLong(structure,name) unsigned char name[sizeof(structure)] # define getAlignLong(structure,name) ((structure *)name) #else /* * Automatic variables defined on the stack need this to ensure * that they are on long boundaries. */ # define defAlignLong(structure,name) \ unsigned char name[sizeof(structure)+(sizeof(long)-1)] # define getAlignLong(structure,name) ((structure *) \ ((((unsigned long)name)+(sizeof(long)-1L))&~(sizeof(long)-1L))) #endif #if (defined(_DPT_UNIXWARE)) # define _DPT_32_BIT_ALLOC #endif /* * Local Function prototypes. */ /* * The following two callback routines are run in the context of * an I2O callback initiated by the osdStartI2OCp function. */ STATIC void __FAR__ DPTI_synchronousCallback( IN Controller_t controller, IN I2O_SINGLE_REPLY_MESSAGE_FRAME __FAR__ * status) { UNREFERENCED_PARAMETER(controller); /* * Update the referenced DetailedStatus Code, place a -2L into the * detailed status code response if the status code says success, * but there is some form of request error detected. */ *((unsigned short __FAR__ *)( I2O_SINGLE_REPLY_MESSAGE_FRAME_getTransactionContext(status))) = (((I2O_SINGLE_REPLY_MESSAGE_FRAME_getDetailedStatusCode(status) == I2O_SCSI_HBA_DSC_SUCCESS) && (I2O_SINGLE_REPLY_MESSAGE_FRAME_getReqStatus(status) != I2O_REPLY_STATUS_SUCCESS)) ? ((unsigned short)-2) : I2O_SINGLE_REPLY_MESSAGE_FRAME_getDetailedStatusCode(status)); } STATIC void __FAR__ DPTI_eataSynchronousCallback( IN Controller_t controller, IN eataSP_S __FAR__ * status) { UNREFERENCED_PARAMETER(controller); /* * Update the referenced Status Code. */ *((unsigned short __FAR__ *)eataSP_getVCPaddr(status)) = ((eataSP_getCtlrStatus(status) << 8) | eataSP_getScsiStatus(status)); } /* * Debugger Handling */ #if (defined(DEBUG)) # define DEBUG_FUNCTION(tag) DPTI_debugTag(tag) STATIC INLINE void __NEAR__ DPTI_debugTag __P((IN unsigned char tag)); #endif # include "dptdebug.h" #if (defined(DEBUG)) /* Local definitions */ # define TAG_IN_DPTI_startEataCp 3 # define TAG_OUT_DPTI_startEataCp 4 # define TAG_IN_DPTI_eataToSpoof 5 # define TAG_OUT_DPTI_eataToSpoof 6 # define TAG_IN_DPTI_eataToI2O 7 # define TAG_OUT_DPTI_eataToI2O 8 # define TAG_IN_DPTI_acquireLct 9 # define TAG_OUT_DPTI_acquireLct 10 # define TAG_IN_DPTI_getParams 11 # define TAG_OUT_DPTI_getParams 12 # define TAG_IN_DPTI_preloadTable 13 # define TAG_OUT_DPTI_preloadTable 14 # define TAG_IN_DPTI_refresh 15 # define TAG_OUT_DPTI_refresh 16 # define TAG_IN_DPTI_rescan 17 # define TAG_OUT_DPTI_rescan 18 # define TAG_IN_DPTI_getDevice 19 # define TAG_OUT_DPTI_getDevice 20 # define TAG_IN_DPTI_getTID 21 # define TAG_OUT_DPTI_getTID 22 # define TAG_IN_osdStartI2OCp 23 # define TAG_OUT_osdStartI2OCp 24 # define TAG_IN_DPTI_resetBus 25 # define TAG_OUT_DPTI_resetBus 26 STATIC INLINE void __NEAR__ DPTI_debugTag(IN unsigned char tag) { if ((tag==TAG_IN_DPTI_startEataCp) || (tag==TAG_OUT_DPTI_startEataCp)) { DEBUG_PUTS("DPTI_startEataCp"); } else if ((tag==TAG_IN_DPTI_eataToSpoof) || (tag==TAG_OUT_DPTI_eataToSpoof)) { DEBUG_PUTS("DPTI_eataToSpoof"); } else if ((tag==TAG_IN_DPTI_eataToI2O) || (tag==TAG_OUT_DPTI_eataToI2O)) { DEBUG_PUTS("DPTI_eataToI2O"); } else if ((tag==TAG_IN_DPTI_acquireLct) || (tag==TAG_OUT_DPTI_acquireLct)) { DEBUG_PUTS("DPTI_acquireLct"); } else if ((tag==TAG_IN_DPTI_getParams) || (tag==TAG_OUT_DPTI_getParams)) { DEBUG_PUTS("DPTI_getParams"); } else if ((tag==TAG_IN_DPTI_preloadTable) || (tag==TAG_OUT_DPTI_preloadTable)) { DEBUG_PUTS("DPTI_preloadTable"); } else if ((tag==TAG_IN_DPTI_refresh) || (tag==TAG_OUT_DPTI_refresh)) { DEBUG_PUTS("DPTI_refresh"); } else if ((tag==TAG_IN_DPTI_rescan) || (tag==TAG_OUT_DPTI_rescan)) { DEBUG_PUTS("DPTI_rescan"); } else if ((tag==TAG_IN_DPTI_getDevice) || (tag==TAG_OUT_DPTI_getDevice)) { DEBUG_PUTS("DPTI_getDevice"); } else if ((tag==TAG_IN_DPTI_getTID) || (tag==TAG_OUT_DPTI_getTID)) { DEBUG_PUTS("DPTI_getTID"); } else if ((tag==TAG_IN_osdStartI2OCp)||(tag==TAG_OUT_osdStartI2OCp)) { DEBUG_PUTS("osdStartI2OCp"); } else { DEBUG_PUTS("?"); } if ((tag&1) != 0) { DEBUG_PUTS("("); } else { DEBUG_PUTS("\r\n"); } } #endif /* DEBUG */ /* * Clock Tick functions, if not defined, will default to the DOS * environment, unless __UNIX__ is defined. */ #if (!defined(osdClockTick) && !defined(osdCLOCKTICK)) # if (defined(__UNIX__) || defined(WIN32) || defined(_DPT_NETWARE)) # include # define osdClockTick() ((unsigned long)time((time_t *)NULL)) # define osdCLOCKTICK 1 # elif (defined(__BORLANDC__)) # define osdClockTick() (((unsigned long __FAR__ *)0x0000046CL)[0]) # define osdCLOCKTICK 18 # endif #endif /* * This entry is used to send a blocking, but with a timeout, * I2O message. */ #if defined __GNUC__ PUBLIC INLINE int DPTI_sendMessage __P(( IN Controller_t controller, IN PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE Message)) #else PUBLIC INLINE int DPTI_sendMessage ( IN Controller_t controller, IN PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE Message) #endif { volatile unsigned short DetailedStatus; int retval; DEBUGGER(); DetailedStatus = (unsigned short)-1; I2O_PRIVATE_MESSAGE_FRAME_setTransactionContext( &Message->PrivateMessageFrame, ((unsigned long)(&DetailedStatus))); DEBUG_TAG(TAG_IN_osdStartI2OCp); DEBUG_IN_X32(controller); DEBUG_IN_STRUCT(Message); DEBUG_IN_X32(DPTI_synchronousCallback); retval = osdStartI2OCp (controller, (OutGoing_t)Message, (Callback_t)DPTI_synchronousCallback); DEBUG_OUT_S32(retval); DEBUG_TAG(TAG_OUT_osdStartI2OCp); if (retval >= 0) { # if (defined(osdClockTick) && defined(osdCLOCKTICK)) /* 10 second timeout */ unsigned long Counter = osdClockTick() + (osdCLOCKTICK * 10L); pushInterrupts (); enableInterrupts (); while ((DetailedStatus == (unsigned short)-1) && (Counter > osdClockTick())) { continue; } popInterrupts (); # else /* * We no longer receive a timeout function as a direct result * of not completely defining osdClockTick() and osdCLOCKTICK * externally. */ while (DetailedStatus == (unsigned short)-1) { continue; } # endif return (DetailedStatus); } return (-1); } /* * The list of callback elements used as placeholders for the * original caller's information. */ STATIC struct convertCallback { #if (!defined(NUM_CALLBACK)) struct convertCallback * next; #endif Callback_t callback; unsigned long VCPaddr; eataSP_S __FAR__ * status; sdRequestSense_S __FAR__ * sense; unsigned short senseLength; } #if (defined(NUM_CALLBACK)) DPTI_convertCallbackList[NUM_CALLBACK]; #else * DPTI_convertCallbackList; #endif /* * Callback routine that converts an I2O reply packet into an * EATA status packet. Arrangements are make to deal with the * convertCallback structure to be the virtual pointer. */ STATIC void __FAR__ DPTI_convertCallback ( IN Controller_t controller, IN I2O_SINGLE_REPLY_MESSAGE_FRAME __FAR__ * status, IN OUT sdRequestSense_S __FAR__ * sense) { struct convertCallback __FAR__ * placeHolder; OUT eataSP_S Status; OUT sdRequestSense_S __FAR__ * SenseP; unsigned short s; placeHolder = (struct convertCallback __FAR__ *) I2O_SINGLE_REPLY_MESSAGE_FRAME_getTransactionContext(status); osdBzero ((void *)&Status, sizeof(Status)); eataSP_setVCPaddr (&Status, placeHolder->VCPaddr); SenseP = (sdRequestSense_S *)NULL; s = HERR_NO_ERROR; switch (I2O_SINGLE_REPLY_MESSAGE_FRAME_getDetailedStatusCode(status) & I2O_SCSI_HBA_DSC_MASK) { case I2O_SCSI_HBA_DSC_SUCCESS: s = HERR_NO_ERROR; break; case I2O_SCSI_HBA_DSC_REQUEST_ABORTED: s = HERR_ABORTED; break; case I2O_SCSI_HBA_DSC_UNABLE_TO_ABORT: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_COMPLETE_WITH_ERROR: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_ADAPTER_BUSY: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_REQUEST_INVALID: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_PATH_INVALID: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_DEVICE_NOT_PRESENT: s = HERR_SEL_TIMEOUT; break; case I2O_SCSI_HBA_DSC_UNABLE_TO_TERMINATE: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_SELECTION_TIMEOUT: s = HERR_SEL_TIMEOUT; break; case I2O_SCSI_HBA_DSC_COMMAND_TIMEOUT: s = HERR_CMD_TIMEOUT; break; case I2O_SCSI_HBA_DSC_MR_MESSAGE_RECEIVED: s = HERR_MSG_REJECT; break; case I2O_SCSI_HBA_DSC_SCSI_BUS_RESET: s = HERR_SCSI_RESET; break; case I2O_SCSI_HBA_DSC_PARITY_ERROR_FAILURE:s = HERR_BUS_PARITY; break; case I2O_SCSI_HBA_DSC_AUTOSENSE_FAILED: s = HERR_AUTO_SENSE; break; case I2O_SCSI_HBA_DSC_NO_ADAPTER: s = HERR_HBA_POST; break; case I2O_SCSI_HBA_DSC_DATA_OVERRUN: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_UNEXPECTED_BUS_FREE: s = HERR_BUS_FREE; break; case I2O_SCSI_HBA_DSC_SEQUENCE_FAILURE: s = HERR_BUS_PHASE; break; case I2O_SCSI_HBA_DSC_REQUEST_LENGTH_ERROR:s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_PROVIDE_FAILURE: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_BDR_MESSAGE_SENT: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_REQUEST_TERMINATED: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_IDE_MESSAGE_SENT: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_RESOURCE_UNAVAILABLE:s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_UNACKNOWLEDGED_EVENT:s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_MESSAGE_RECEIVED: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_INVALID_CDB: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_LUN_INVALID: s = HERR_SEL_TIMEOUT; break; case I2O_SCSI_HBA_DSC_SCSI_TID_INVALID: s = HERR_SEL_TIMEOUT; break; case I2O_SCSI_HBA_DSC_FUNCTION_UNAVAILABLE:s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_NO_NEXUS: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_SCSI_IID_INVALID: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_CDB_RECEIVED: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_LUN_ALREADY_ENABLED: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_BUS_BUSY: s = (unsigned short)-1;break; case I2O_SCSI_HBA_DSC_QUEUE_FROZEN: s = (unsigned short)-1;break; default: s = (unsigned short)-1;break; } if (s == HERR_NO_ERROR) switch(I2O_SINGLE_REPLY_MESSAGE_FRAME_getReqStatus(status)) { case I2O_REPLY_STATUS_ABORT_NO_DATA_TRANSFER: case I2O_REPLY_STATUS_ABORT_PARTIAL_TRANSFER: case I2O_REPLY_STATUS_PROCESS_ABORT_DIRTY: case I2O_REPLY_STATUS_PROCESS_ABORT_NO_DATA_TRANSFER: case I2O_REPLY_STATUS_PROCESS_ABORT_PARTIAL_TRANSFER: case I2O_REPLY_STATUS_ABORT_DIRTY: s = HERR_ABORTED; break; case I2O_REPLY_STATUS_ERROR_DIRTY: case I2O_REPLY_STATUS_ERROR_NO_DATA_TRANSFER: case I2O_REPLY_STATUS_ERROR_PARTIAL_TRANSFER: case I2O_REPLY_STATUS_TRANSACTION_ERROR: case I2O_REPLY_STATUS_PROGRESS_REPORT: default: s = (unsigned short)-1; case I2O_REPLY_STATUS_SUCCESS: break; } eataSP_setCtlrStatus(&Status, s | SP_EOC); eataSP_setScsiStatus(&Status, I2O_SINGLE_REPLY_MESSAGE_FRAME_getDetailedStatusCode(status) & I2O_SCSI_DEVICE_DSC_MASK); s = 0; if ((I2O_SINGLE_REPLY_MESSAGE_FRAME_getDetailedStatusCode(status) & I2O_SCSI_DEVICE_DSC_MASK) == I2O_SCSI_DSC_CHECK_CONDITION) { SenseP = (sdRequestSense_S __FAR__ *)( ((I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME __FAR__ *)status)->SenseData); s = (unsigned short)(((I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME __FAR__ *) status)->AutoSenseTransferCount); } else if (sense != (sdRequestSense_S __FAR__ *)NULL) { SenseP = sense; s = placeHolder->senseLength; } # if (defined(I2O_SCB_FLAG_SENSE_DATA_IN_BUFFER) && defined(SENSE_DATA_IN_BUFFER_SUPPORTED)) else { SenseP = (sdRequestSense_S __FAR__ *)placeHolder->sense; s = placeHolder->senseLength; } # endif if (placeHolder->status != (eataSP_S __FAR__ *)NULL) { osdBcopy ((void __FAR__ *)&Status, (void __FAR__ *)(placeHolder->status), sizeof(eataSP_S)); } /* * We need to copy the sense data if we have a unique copy of it * handy that differs from the real one presented in the in-coming * eata packet. */ if ((SenseP != (sdRequestSense_S __FAR__ *)NULL) && (placeHolder->sense != (sdRequestSense_S __FAR__ *)NULL) && (placeHolder->sense != SenseP) && (s != 0)) { if (s > placeHolder->senseLength) { s = placeHolder->senseLength; } osdBcopy ((void __FAR__ *)SenseP, (void __FAR__ *)(placeHolder->sense), s); } (*(placeHolder->callback)) (controller, &Status, SenseP); /* * Free up the placeholder. */ # if (defined(NUM_CALLBACK)) placeHolder->VCPaddr = 0L; # else pushInterrupts (); disableInterrupts (); placeHolder->next = DPTI_convertCallbackList; DPTI_convertCallbackList = placeHolder; popInterrupts (); # endif } /* * Determine the Synchronous Response address from the context of * the message, whether it be an I2O or an EATA context. This routine * is called by the osdStartI2OCp routine to determine if the command * can be optimized for synchronous operation. If this routine returns * a non-NULL value, it must be assumed that the call *will* be * translated to a synchronous command placing it's result into the * referenced address, as we will be releasing any callback or * placeholder resources. */ #if defined __GNUC__ PUBLIC INLINE unsigned short __FAR__ * DPTI_statusSynchronousAddress __P (( IN OutGoing_t Message)) #else PUBLIC INLINE unsigned short __FAR__ * DPTI_statusSynchronousAddress ( IN OutGoing_t Message) #endif { unsigned long callback; /* * Now to enter into `casting' hell! * First, find out where the callback routine is. This may be * osdStartI2OCp specific! */ # if (defined(osdGetCallback)) callback = (unsigned long)osdGetCallback(Message); # else callback = *((unsigned long __FAR__ *)( &(((I2O_MESSAGE_FRAME __FAR__ *)Message)->InitiatorContext))); # endif /* * Is it a synchronous I2O command issued by DPTI_sendMessage? */ if (callback == (unsigned long)DPTI_synchronousCallback) { return ((unsigned short __FAR__ *) I2O_PRIVATE_MESSAGE_FRAME_getTransactionContext( (I2O_PRIVATE_MESSAGE_FRAME __FAR__ *)Message)); } /* * Is it a synchronous EATA command issued by DPTI_startEataCp with a * NULL callback routine? */ if (callback == (unsigned long)DPTI_convertCallback) { struct convertCallback __FAR__ * placeHolder; placeHolder = (struct convertCallback __FAR__ *) I2O_PRIVATE_MESSAGE_FRAME_getTransactionContext( (I2O_PRIVATE_MESSAGE_FRAME __FAR__ *)Message); callback = (unsigned long)placeHolder->callback; if (callback == (unsigned long)DPTI_eataSynchronousCallback) { OUT unsigned short __FAR__ * retVal; retVal = (unsigned short __FAR__ *)(placeHolder->VCPaddr); /* * Free up the resources associated with this call */ # if (defined(NUM_CALLBACK)) placeHolder->VCPaddr = 0L; # else pushInterrupts (); disableInterrupts (); placeHolder->next = DPTI_convertCallbackList; DPTI_convertCallbackList = placeHolder; popInterrupts (); # endif return (retVal); } } /* * We did not find one, so return a NULL address to indicate this command * is asynchronous. */ return ((unsigned short __FAR__ *)NULL); } /* * Definitions of the Device Structure. */ #ifndef I2O_BSA # define I2O_BSA 0x20 #endif #ifndef NUM_CONTROLLERS # define NUM_CONTROLLERS 1 #endif #ifndef NUM_DEVICES # if (NUM_CONTROLLERS <= 0) # define NUM_DEVICES -1 # else # define NUM_DEVICES (4*16) # endif #endif /* * This combination of union and structure maintains the device * information for a specific adapter(s) and optimizes the space required * to do so. */ /* * The master structure which tags the controller on to the device list */ #if (NUM_DEVICES <= 0) # define MAX_TID 1 # define MAX_HRT 8 # define MAX_LCT 1 #else # define MAX_TID (NUM_DEVICES*2) /* Double to include children */ # define MAX_HRT 8 # define MAX_LCT (NUM_DEVICES*2+6) /* Include bus and executives */ #endif typedef struct { I2O_HRT header; char data[sizeof(I2O_HRT_ENTRY) * (MAX_HRT - 1)]; } DPTI_HRT; typedef struct { # if (NUM_DEVICES <= 0) unsigned short size; /* Size of this allocation */ # endif Controller_t controller; /* Contrller reference object */ unsigned short numDevices; /* Number of devices in cache below */ unsigned char maxBus:3; /* Number of buses supported */ unsigned char valid:1; /* Data is currently considered valid */ unsigned char changed:1; /* Configuration change may Occur */ unsigned char flashMode:1; /* Adapter is currently in flash mode */ unsigned char enableRescan:1; /* A rescan followed by only: */ /* SC_INQUIRY, SC_READ_CAPACITY, */ unsigned char MIPS:1; /* Flash on different boundaries */ unsigned char maxLun; /* Number of luns supported */ unsigned char raidNum; /* SC_TEST_READY or SC_REQ_SENSE */ unsigned char adapterID[MAX_HRT];/* Adapter's SCSI Target ID */ # if (defined(osdClockTick) && defined(osdCLOCKTICK)) unsigned long lastScan; /* Cause rescan if old */ # endif union { /* Device cache (LCT shares with TID_t*/ struct { TID_t data[MAX_TID]; /* Currently 5 byte entry (see below) */ #define TidTable devices.tid.data # if (NUM_DEVICES > 0) DPTI_HRT hrt; /* At end of TID_t data */ #define HrtTable devices.tid.hrt.header # endif } tid; struct { I2O_LCT header; /* Must be larger (Wow, 32 bytes) */ #define LctTable devices.lct.header /* than TID_t (Ok, 5 bytes) */ I2O_LCT_ENTRY data[MAX_LCT]; /* structure in eata2i2o.h */ } lct; } devices; } DPTI_Devices_S; #define DPTI_check(current, controller) \ if (current->controller != controller) { \ DEBUG_TAG(TAG_IN_DPTI_refresh); \ DEBUG_IN_X32(controller); \ current->valid = 0; \ current->controller = controller; \ DEBUG_TAG(TAG_OUT_DPTI_refresh); \ } #if (NUM_DEVICES <= 0) # if (NUM_CONTROLLERS == 1) STATIC DPTI_Devices_S * DPTI_devices; STATIC INLINE DPTI_Devices_S ** __NEAR__ _DPTI_current (IN Controller_t controller) { if (DPTI_devices == (DPTI_Devices_S *)NULL) { DPTI_devices = (DPTI_Devices_S *)osdAlloc(sizeof(DPTI_Devices_S)); osdBzero ((void *)DPTI_devices, sizeof(DPTI_Devices_S)); DPTI_devices->size = sizeof(DPTI_Devices_S); DPTI_devices->controller = controller; } return (&DPTI_devices); } # define DPTI_current(controller) (*_DPTI_current(controller)) # define DPTI_current_UNREFERENCED_PARAMETER(controller) # elif (NUM_CONTROLLERS <= 0) # else STATIC DPTI_Devices_S *DPTI_devices[NUM_CONTROLLERS]; STATIC INLINE DPTI_Devices_S ** __NEAR__ _DPTI_current (IN Controller_t controller) {DPTI_Devices_S ** current = DPTI_devices; static DPTI_Devices_S ** lastCurrentStolen; /* * Scan the entire current list of controllers to find a match. */ do {if ((*current) && ((*current)->controller == controller) && ((*current)->valid)) { lastCurrentStolen = current; return (current); } } while (++current < &DPTI_devices[NUM_CONTROLLERS]); /* * Second chance for one that matches that is not valid */ current = DPTI_devices; do {if ((*current) && ((*current)->controller == controller)) { lastCurrentStolen = current; return (current); } } while (++current < &DPTI_devices[NUM_CONTROLLERS]); /* * Third chance for one that is currently marked invalid */ current = DPTI_devices; do {if ((*current) && ((*current)->valid == 0)) { lastCurrentStolen = current; return (current); } } while (++current < &DPTI_devices[NUM_CONTROLLERS]); /* * Fourth chance for one that is not allocated yet. */ current = DPTI_devices; do {if ((*current) == (DPTI_Devices_S *)NULL) { if (((*current) = (DPTI_Devices_S *)osdAlloc(sizeof(DPTI_Devices_S))) == (DPTI_Devices_S *)NULL) { break; } osdBzero ((void *)(*current), sizeof(DPTI_Devices_S)); (*current)->size = sizeof(DPTI_Devices_S); (*current)->controller = controller; lastCurrentStolen = current; return (current); } } while (++current < &DPTI_devices[NUM_CONTROLLERS]); /* * Fifth chance by hook or by crook */ if ((lastCurrentStolen < DPTI_devices) || (&DPTI_devices[NUM_CONTROLLERS] <= lastCurrentStolen)) { lastCurrentStolen = DPTI_devices; } ++lastCurrentStolen; if ((lastCurrentStolen < DPTI_devices) || (&DPTI_devices[NUM_CONTROLLERS] <= lastCurrentStolen)) { lastCurrentStolen = DPTI_devices; } /* * Must already be allocated, so lets just present it. */ return (lastCurrentStolen); } # define DPTI_current(controller) (*_DPTI_current(controller)) # define DPTI_current_UNREFERENCED_PARAMETER(controller) # endif #else /* NUM_DEVICES > 0 */ # if (NUM_CONTROLLERS == 1) STATIC DPTI_Devices_S DPTI_devices; /* * The following will cause unreferenced argument complaints * in DPTI_refresh */ # define DPTI_current(controller) (&DPTI_devices) # define DPTI_current_UNREFERENCED_PARAMETER(controller) \ UNREFERENCED_PARAMETER(controller) # elif (NUM_CONTROLLERS <= 0) STATIC DPTI_Devices_S **DPTI_devices; STATIC unsigned DPTI_numDevices; # else STATIC DPTI_Devices_S DPTI_devices[NUM_CONTROLLERS]; STATIC INLINE DPTI_Devices_S * __NEAR__ DPTI_current (IN Controller_t controller) {DPTI_Devices_S * current = DPTI_devices; static DPTI_Devices_S * lastCurrentStolen; /* * Scan the entire current list of controllers to find a match. */ do {if ((current->controller == controller) && (current->valid)) { lastCurrentStolen = current; return (current); } } while (++current < &DPTI_devices[NUM_CONTROLLERS]); /* * Second chance for one that matches that is not valid */ current = DPTI_devices; do {if (current->controller == controller) { lastCurrentStolen = current; return (current); } } while (++current < &DPTI_devices[NUM_CONTROLLERS]); /* * Third chance for one that is currently marked invalid */ current = DPTI_devices; do {if (current->valid == 0) { lastCurrentStolen = current; return (current); } } while (++current < &DPTI_devices[NUM_CONTROLLERS]); /* * Fourth chance by hook or by crook */ if ((lastCurrentStolen < DPTI_devices) || (&DPTI_devices[NUM_CONTROLLERS] <= lastCurrentStolen)) { lastCurrentStolen = DPTI_devices; } ++lastCurrentStolen; if ((lastCurrentStolen < DPTI_devices) || (&DPTI_devices[NUM_CONTROLLERS] <= lastCurrentStolen)) { lastCurrentStolen = DPTI_devices; } return (lastCurrentStolen); } # define DPTI_current_UNREFERENCED_PARAMETER(controller) # endif #endif #define SG(SGL,Index,Flags,Buffer,Size) \ I2O_FLAGS_COUNT_setCount(&((SGL)->u.Simple[Index].FlagsCount), Size);\ I2O_FLAGS_COUNT_setFlags(&((SGL)->u.Simple[Index].FlagsCount), \ I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT | I2O_SGL_FLAGS_END_OF_BUFFER\ | Flags); \ I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress(&((SGL)->u.Simple[Index]),\ osdPhys((void __FAR__ *)(Buffer))) STATIC INLINE I2O_MESSAGE_FRAME * __NEAR__ DPTI_fillMessage (unsigned char * Message, unsigned short size) { I2O_MESSAGE_FRAME * Message_Ptr; Message_Ptr = (I2O_MESSAGE_FRAME *)getAlignLong(I2O_UTIL_NOP_MESSAGE, Message); osdBzero ((void *)Message_Ptr, size); I2O_MESSAGE_FRAME_setVersionOffset(Message_Ptr, I2O_VERSION_11); I2O_MESSAGE_FRAME_setMessageSize(Message_Ptr, (size + sizeof(U32) - 1) / sizeof(U32)); I2O_MESSAGE_FRAME_setInitiatorAddress (Message_Ptr, 1); return (Message_Ptr); } /* DPTI_fillMessage */ #if (!defined(getIrqNum)) # define getIrqNum(controller) DPTI_getIrqNum(controller) /* * Log Page 33 (Hardware configuration page), subpage 1 offset 5 * contains the IRQ in firmware revisions past 2036. Previous versions * have a value of zero in the field, which is an `acceptable' response * for don't know ... */ STATIC unsigned char __NEAR__ DPTI_getIrqNum( IN Controller_t controller) { struct LogPage { PRIVATE_SCSI_SCB_EXECUTE_MESSAGE Message; char Buffer[255]; }; defAlignLong(struct LogPage, Message); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE * Message_Ptr; UNREFERENCED_PARAMETER(((struct LogPage *)Message)->Message); UNREFERENCED_PARAMETER(((struct LogPage *)Message)->Buffer); Message_Ptr = (PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *)DPTI_fillMessage( Message, sizeof(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE) - sizeof(I2O_SG_ELEMENT) + sizeof(I2O_SGE_SIMPLE_ELEMENT)); I2O_MESSAGE_FRAME_setVersionOffset( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, (I2O_VERSION_11 + (((sizeof(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE) - sizeof(I2O_SG_ELEMENT)) / sizeof(U32)) << 4))); I2O_MESSAGE_FRAME_setFunction( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, I2O_PRIVATE_MESSAGE); I2O_PRIVATE_MESSAGE_FRAME_setXFunctionCode ( &Message_Ptr->PrivateMessageFrame, I2O_SCSI_SCB_EXEC); I2O_PRIVATE_MESSAGE_FRAME_setOrganizationID( &Message_Ptr->PrivateMessageFrame, DPT_ORGANIZATION_ID); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setInterpret(Message_Ptr, 1); # if 0 /* DPTI_fillMessage looks after these */ I2O_MESSAGE_FRAME_setTargetAddress( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, 0); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setTID(Message_Ptr, 0); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setPhysical(Message_Ptr, 0); # endif /* * CDB Length */ PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setCDBLength(Message_Ptr, 10); /* * Create CDB */ Message_Ptr->CDB[0] = SC_LOG_SENSE; Message_Ptr->CDB[2] = 0x33; Message_Ptr->CDB[8] = sizeof(((struct LogPage *)Message_Ptr)->Buffer); /* * Set length of transfer */ PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setByteCount (Message_Ptr, sizeof(((struct LogPage *)Message_Ptr)->Buffer)); /* * the data directions */ PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags (Message_Ptr, I2O_SCB_FLAG_XFER_FROM_DEVICE | I2O_SCB_FLAG_ENABLE_DISCONNECT | I2O_SCB_FLAG_SIMPLE_QUEUE_TAG); SG(&Message_Ptr->SGL, 0, I2O_SGL_FLAGS_LAST_ELEMENT, ((struct LogPage *)Message_Ptr)->Buffer, sizeof(((struct LogPage *)Message_Ptr)->Buffer)); if (DPTI_sendMessage (controller, Message_Ptr) == 0) { unsigned char * cp = (unsigned char*) ((struct LogPage *)Message_Ptr)->Buffer; unsigned char length; if ((cp[0] != 0x33) || (cp[2] != 0)) { /* Validity Check */ return (0); /* A default value ... */ } length = cp[3]; cp += 4; /* Increment to page sub code */ while (length) { if (cp[0] != 0) { /* Validity Check */ break; } if ((cp[1] == 1) && (cp[3] >= 2)) { return (cp[5]); /* Page 33, Subpage 1, offset 5 is IRQ */ } if (length < (cp[3] + 4)) { /* Validity Check */ length = 0; } else { length -= cp[3] + 4; } /* Increment pointer to next page */ cp += cp[3] + 4; } } return (0); /* A default value */ } #endif /* !getIrqNum */ /* * Acquire the LCT information and interpret it into the Device * structures we use internally. */ STATIC INLINE int __NEAR__ DPTI_acquireLct (IN Controller_t controller) { unsigned short Counter; unsigned short MaxEntry; defAlignLong(I2O_EXEC_LCT_NOTIFY_MESSAGE,Message); I2O_EXEC_LCT_NOTIFY_MESSAGE * Message_Ptr; OUT DPTI_Devices_S * current; DEBUGGER(); DEBUG_TAG(TAG_IN_DPTI_acquireLct); DEBUG_IN_X32(controller); Message_Ptr = (I2O_EXEC_LCT_NOTIFY_MESSAGE *)DPTI_fillMessage(Message, sizeof(I2O_EXEC_LCT_NOTIFY_MESSAGE) - sizeof(I2O_SG_ELEMENT) + sizeof(I2O_SGE_SIMPLE_ELEMENT)); I2O_MESSAGE_FRAME_setVersionOffset(&Message_Ptr->StdMessageFrame, (I2O_VERSION_11 + (((sizeof(I2O_EXEC_LCT_NOTIFY_MESSAGE) - sizeof(I2O_SG_ELEMENT)) / sizeof(U32)) << 4))); I2O_MESSAGE_FRAME_setFunction(&Message_Ptr->StdMessageFrame, I2O_EXEC_LCT_NOTIFY); I2O_EXEC_LCT_NOTIFY_MESSAGE_setClassIdentifier(Message_Ptr, I2O_CLASS_MATCH_ANYCLASS); # if (NUM_DEVICES <= 0) /* * Call the LCT table to determine the number of device entries * to reserve space for. */ { I2O_LCT Table; /* * Set up the buffers as scatter gather elements. */ SG(&Message_Ptr->SGL, 0, I2O_SGL_FLAGS_LAST_ELEMENT, &Table, sizeof(I2O_LCT) - sizeof(I2O_LCT_ENTRY)); I2O_LCT_setTableSize(&Table, (sizeof(I2O_LCT) - sizeof(I2O_LCT_ENTRY)) >> 2); (void)DPTI_sendMessage(controller, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr); /* * Determine the size of the LCT table. */ MaxEntry = (unsigned short)(((I2O_LCT_getTableSize((&Table)) << 2) - (sizeof(I2O_LCT)-sizeof(I2O_LCT_ENTRY))) / sizeof(I2O_LCT_ENTRY)); current = DPTI_current(controller); if (current->size < (sizeof(DPTI_Devices_S) + ((MaxEntry - 1)*sizeof(I2O_LCT_ENTRY)))) { DPTI_Devices_S * newCurrent; newCurrent = (DPTI_Devices_S *)osdAlloc(sizeof(DPTI_Devices_S) + ((MaxEntry - 1)*sizeof(I2O_LCT_ENTRY))); osdBcopy ((void __FAR__ *)current, (void __FAR__ *)newCurrent, current->size); newCurrent->size = sizeof(DPTI_Devices_S) + ((MaxEntry - 1)*sizeof(I2O_LCT_ENTRY)); /* newCurrent->LctTable = Table; */ /* * Find `current' and replace it with our new copy. */ DPTI_current(current->controller) = newCurrent; osdFree ((void *)current, current->size); current = newCurrent; } } # endif /* * Set up the buffers as scatter gather elements. */ # if (NUM_DEVICES <= 0) SG(&Message_Ptr->SGL, 0, I2O_SGL_FLAGS_LAST_ELEMENT, &(current->LctTable), sizeof(I2O_LCT) + (MaxEntry-1)*sizeof(I2O_LCT_ENTRY)); # else current = DPTI_current(controller); SG(&Message_Ptr->SGL, 0, I2O_SGL_FLAGS_LAST_ELEMENT, &(current->LctTable), sizeof(I2O_LCT) + (MAX_LCT-1)*sizeof(I2O_LCT_ENTRY)); # endif current->numDevices = 0; if (DPTI_sendMessage(controller, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr) != 0) { { DEBUG_ALLOCATE_STRING(fail_string,"Bad"); DEBUG_OUT_STRING(fail_string); } DEBUG_TAG(TAG_OUT_DPTI_acquireLct); return (-1); } # if (NUM_DEVICES > 0) /* * To deal with an incredibly large Table Size */ if (I2O_LCT_getTableSize(&(current->LctTable)) > ((sizeof(I2O_LCT) + (MAX_LCT-1)*sizeof(I2O_LCT_ENTRY)) >> 2)) { I2O_LCT_setTableSize(&(current->LctTable), ((sizeof(I2O_LCT) + (MAX_LCT-1)*sizeof(I2O_LCT_ENTRY)) >> 2)); } MaxEntry = (unsigned short)( ((I2O_LCT_getTableSize(&(current->LctTable)) << 2) - (sizeof(I2O_LCT)-sizeof(I2O_LCT_ENTRY))) / sizeof(I2O_LCT_ENTRY)); /* * Really to deal with an incredibly small (illegal) TableSize, * I know I'm checking for above maximum ... */ if (MaxEntry > MAX_LCT) { MaxEntry = 0; } # endif /* * Start the device table (TID and Controller) */ if (MaxEntry != 0) for (Counter = 0; # if (NUM_DEVICES > 0) (current->numDevices < (NUM_DEVICES * 2)) && # endif (Counter < MaxEntry); ++Counter) { TID_t * Device = &(current->TidTable[current->numDevices]); I2O_LCT_ENTRY * entry = &(current->LctTable.LCTEntry[Counter]); /* * Initialize the structure. */ /* * A good idea at the time, but unfortunately if LUN0 * segment is set to a size of 0, we no longer can access the * array head. Dogs and Cats sleeping with eachother. */ /* if(I2O_LCT_ENTRY_getBiosInfo(entry) == 0x7F) continue; */ # if (defined(_DPT_STRICT_ALIGN) || !defined(Device_size)) osdBzero ((void *)Device, sizeof(TID_t)); # elif (Device_size == 5) ((unsigned char *)Device)[4] = (unsigned char)( ((unsigned long *)Device)[0] = 0L); # else osdBzero ((void *)Device, sizeof(TID_t)); # endif /* * Ignore entries that are: * I2O_CLASS_EXECUTIVE * I2O_CLASS_DDM * Owned by another entry. * Unknown Class. */ switch (I2O_CLASS_ID_getClass(&(entry->ClassID))) { case I2O_CLASS_SCSI_PERIPHERAL: case I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL: Device_setPhys(Device,1); case I2O_CLASS_RANDOM_BLOCK_STORAGE: break; case I2O_CLASS_BUS_ADAPTER_PORT: case I2O_CLASS_FIBRE_CHANNEL_PORT: Device_setAdapter(Device,1); break; default: /* * Don't report this device in our structures. */ continue; } /* * Temorarily hold on to the parent TIDs for * acquisition purposes. */ Device_setUserTID(Device,I2O_LCT_ENTRY_getUserTID(entry)); /* Our TID and Controller references */ Device_setTID(Device,I2O_LCT_ENTRY_getLocalTID(entry)); ++(current->numDevices); } /* * Discover if this TID is listed as the owner of more than * one other device in the list, or if it is a Block Device that * owns another block device! */ { TID_t * Device = current->TidTable; for (Counter = current->numDevices; Counter != 0; ++Device, --Counter) { TID_t * SubDevice; unsigned short SubCounter; if (Device_isBus(Device) || Device_isPhys(Device)) { continue; /* Adapters and SCSI devices can not be RAID */ } for (SubDevice = current->TidTable, MaxEntry = 0, SubCounter = current->numDevices; SubCounter != 0; ++SubDevice, --SubCounter) { if (!Device_isBus(SubDevice) && (Device_getUserTID(SubDevice) == Device_getTID(Device)) && ((++MaxEntry > 1) || !Device_isPhys(SubDevice))) { Device_setRAID(Device,1); break; } } /* * If a device has *no* children, and is a block device, * then this implies it may be a sensor ghost of an array. * For instance, it could be a LUN placeholder for a segmented * array (where the LUN0 device is the actual array). */ if (MaxEntry == 0) { Device_setRAID(Device,1); } } } { DEBUG_ALLOCATE_STRING(ok_string,"Ok"); DEBUG_OUT_STRING(ok_string); } DEBUG_TAG(TAG_OUT_DPTI_acquireLct); return (0); } /* DPTI_acquireLct */ /* * Perform a getparams command for a single requested group. */ #if defined __GNUC__ PUBLIC INLINE int DPTI_getParams __P(( IN Controller_t controller, IN unsigned short TID, IN int Group, IN OUT PI2O_PARAM_RESULTS_LIST_HEADER Header, IN unsigned int HeaderSize)) #else PUBLIC INLINE int DPTI_getParams( IN Controller_t controller, IN unsigned short TID, IN int Group, IN OUT PI2O_PARAM_RESULTS_LIST_HEADER Header, IN unsigned int HeaderSize) #endif { struct ParamOperations { I2O_PARAM_OPERATIONS_LIST_HEADER Header; I2O_PARAM_OPERATION_ALL_TEMPLATE Template[1]; }; defAlignLong(struct ParamOperations,Operations); struct ParamOperations * Operations_Ptr; struct ParamGetMessage { I2O_UTIL_PARAMS_GET_MESSAGE M; unsigned char fill[sizeof(I2O_SGE_SIMPLE_ELEMENT)*2 - sizeof(I2O_SG_ELEMENT)]; }; defAlignLong(struct ParamGetMessage,Message); I2O_UTIL_PARAMS_GET_MESSAGE * Message_Ptr; UNREFERENCED_PARAMETER(((struct ParamGetMessage *)Message)->M); UNREFERENCED_PARAMETER(((struct ParamGetMessage *)Message)->fill); DEBUGGER(); DEBUG_TAG(TAG_IN_DPTI_getParams); DEBUG_IN_X32(controller); DEBUG_IN_X16(TID); DEBUG_IN_X16(Group); DEBUG_IN_X32(Header); DEBUG_IN_U16(HeaderSize); osdBzero ((void *)Operations, sizeof(Operations)); Operations_Ptr = getAlignLong(struct ParamOperations, Operations); I2O_PARAM_OPERATIONS_LIST_HEADER_setOperationCount( &Operations_Ptr->Header, 1); I2O_PARAM_OPERATION_ALL_TEMPLATE_setOperation( &Operations_Ptr->Template[0], I2O_PARAMS_OPERATION_FIELD_GET); I2O_PARAM_OPERATION_ALL_TEMPLATE_setFieldCount( &Operations_Ptr->Template[0], 0xFFFF); I2O_PARAM_OPERATION_ALL_TEMPLATE_setGroupNumber( &Operations_Ptr->Template[0], Group); osdBzero ((void *)Header, HeaderSize); Message_Ptr = (PI2O_UTIL_PARAMS_GET_MESSAGE)DPTI_fillMessage(Message, sizeof(struct ParamGetMessage)); I2O_MESSAGE_FRAME_setVersionOffset(&Message_Ptr->StdMessageFrame, I2O_VERSION_11 + (((sizeof(I2O_UTIL_PARAMS_GET_MESSAGE) - sizeof(I2O_SG_ELEMENT)) / sizeof(U32)) << 4)); I2O_MESSAGE_FRAME_setTargetAddress (&Message_Ptr->StdMessageFrame, TID); I2O_MESSAGE_FRAME_setFunction (&Message_Ptr->StdMessageFrame, I2O_UTIL_PARAMS_GET); /* * Set up the buffers as scatter gather elements. */ SG(&Message_Ptr->SGL, 0, I2O_SGL_FLAGS_DIR, (unsigned char *)Operations_Ptr, sizeof(struct ParamOperations)); SG(&Message_Ptr->SGL, 1, I2O_SGL_FLAGS_LAST_ELEMENT, (unsigned char *)Header, HeaderSize); if ((DPTI_sendMessage(controller, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr) == 0) /* Not using access macro since we are checking if the value is zero */ && (Header->ResultCount)) { { DEBUG_ALLOCATE_STRING(ok_string,"Ok"); DEBUG_OUT_STRING(ok_string); DEBUG_TAG(TAG_OUT_DPTI_getParams); } return (0); } { DEBUG_ALLOCATE_STRING(fail_string,"Bad"); DEBUG_OUT_STRING(fail_string); DEBUG_TAG(TAG_OUT_DPTI_getParams); } return (-1); } /* * Loop through the devices and acquire the Device Type, Lun and Target * Identifier information. */ STATIC INLINE void __NEAR__ DPTI_acquireTargetInfo (IN Controller_t controller) { TID_t * Device; unsigned short Index; OUT DPTI_Devices_S * current = DPTI_current(controller); DEBUGGER(); /* * Acquire the HRT information and interpret it into the Device * structures we use internally. This phase is used to determine the Bus * numbers for the Adapter devices. */ current->maxBus = current->maxLun = 0; { defAlignLong(I2O_EXEC_HRT_GET_MESSAGE,Message); I2O_EXEC_HRT_GET_MESSAGE * Message_Ptr; I2O_HRT * hrt; # if (NUM_DEVICES <= 0) hrt = (I2O_HRT *)(((unsigned char *)current) + current->size - sizeof(DPTI_HRT)); # else hrt = &(current->HrtTable); # endif osdBzero ((void *)hrt, sizeof(I2O_HRT) + (MAX_HRT-1)*sizeof(I2O_HRT_ENTRY)); Message_Ptr = (I2O_EXEC_HRT_GET_MESSAGE *)DPTI_fillMessage(Message, sizeof(I2O_EXEC_HRT_GET_MESSAGE) - sizeof(I2O_SG_ELEMENT) + sizeof(I2O_SGE_SIMPLE_ELEMENT)); I2O_MESSAGE_FRAME_setVersionOffset(&Message_Ptr->StdMessageFrame, (I2O_VERSION_11 + (((sizeof(I2O_EXEC_HRT_GET_MESSAGE) - sizeof(I2O_SG_ELEMENT)) / sizeof(U32)) << 4))); I2O_MESSAGE_FRAME_setFunction (&Message_Ptr->StdMessageFrame, I2O_EXEC_HRT_GET); /* * Set up the buffers as scatter gather elements. */ SG(&Message_Ptr->SGL, 0, I2O_SGL_FLAGS_LAST_ELEMENT, hrt, sizeof(I2O_HRT) + (MAX_HRT-1)*sizeof(I2O_HRT_ENTRY)); if (DPTI_sendMessage(controller, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr) == 0) { unsigned short NumberOfEntries; PI2O_HRT_ENTRY Entry; NumberOfEntries = I2O_HRT_getNumberEntries(hrt); Entry = hrt->HRTEntry; while (NumberOfEntries != 0) { for (Index = current->numDevices, Device = ¤t->TidTable[0]; Index != 0; ++Device, --Index) { if (Device_getTID(Device) == (I2O_HRT_ENTRY_getAdapterID(Entry) & 0xFFF)) { Device_setBus(Device, I2O_HRT_ENTRY_getAdapterID(Entry) >> 16); if (Device_getBus(Device) > current->maxBus) { current->maxBus = (unsigned char)Device_getBus(Device); } if (Device_getLun(Device) > current->maxLun) { current->maxLun = (unsigned char)Device_getLun(Device); } } } ++Entry; --NumberOfEntries; } } } current->raidNum = 0x14; /* Good enough of a default */ for (Index = current->numDevices, Device = ¤t->TidTable[0]; Index != 0; ++Device, --Index) { if (Device_isBus(Device)) { /* SCSI PORT */ struct { I2O_PARAM_RESULTS_LIST_HEADER Header; I2O_PARAM_READ_OPERATION_RESULT Read; I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR Info; } Buffer; Device_setTarget(Device,127); Device_setLun(Device,0); if (DPTI_getParams (controller, Device_getTID(Device), I2O_HBA_SCSI_CONTROLLER_INFO_GROUP_NO, &Buffer.Header, sizeof(Buffer)) == 0) { Device_setTarget(Device, I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getInitiatorID( &Buffer.Info)); } current->adapterID[Device_getBus(Device)] = (unsigned char)(Device_getTarget(Device)); } else { struct { I2O_PARAM_RESULTS_LIST_HEADER Header; I2O_PARAM_READ_OPERATION_RESULT Read; I2O_DPT_DEVICE_INFO_SCALAR Info; } Buffer; Device_setBus(Device,7); Device_setTarget(Device,127); Device_setLun(Device,255); if (DPTI_getParams (controller, Device_getTID(Device), I2O_DPT_DEVICE_INFO_GROUP_NO, &Buffer.Header, sizeof(Buffer)) == 0) { Device_setBus(Device, I2O_DPT_DEVICE_INFO_SCALAR_getBus(&Buffer.Info)); Device_setTarget(Device, I2O_DPT_DEVICE_INFO_SCALAR_getIdentifier(&Buffer.Info)); Device_setLun(Device, I2O_DPT_DEVICE_INFO_SCALAR_getLunInfo(&Buffer.Info)); if (Device_getBus(Device) > current->maxBus) { current->maxBus = (unsigned char)Device_getBus(Device); } if (Device_getLun(Device) > current->maxLun) { current->maxLun = (unsigned char)Device_getLun(Device); } } } } { struct Inquiry { PRIVATE_SCSI_SCB_EXECUTE_MESSAGE Message; char Buffer[48]; }; defAlignLong(struct Inquiry, Message); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE * Message_Ptr; UNREFERENCED_PARAMETER(((struct Inquiry *)Message)->Message); UNREFERENCED_PARAMETER(((struct Inquiry *)Message)->Buffer); Message_Ptr = (PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *)DPTI_fillMessage( Message, sizeof(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE) - sizeof(I2O_SG_ELEMENT) + sizeof(I2O_SGE_SIMPLE_ELEMENT)); I2O_MESSAGE_FRAME_setVersionOffset( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, (I2O_VERSION_11 + (((sizeof(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE) - sizeof(I2O_SG_ELEMENT)) / sizeof(U32)) << 4))); I2O_MESSAGE_FRAME_setFunction( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, I2O_PRIVATE_MESSAGE); I2O_PRIVATE_MESSAGE_FRAME_setXFunctionCode ( &Message_Ptr->PrivateMessageFrame, I2O_SCSI_SCB_EXEC); I2O_PRIVATE_MESSAGE_FRAME_setOrganizationID( &Message_Ptr->PrivateMessageFrame, DPT_ORGANIZATION_ID); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setInterpret(Message_Ptr, 1); /* * CDB Length */ PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setCDBLength(Message_Ptr, 6); /* * Create CDB */ Message_Ptr->CDB[0] = SC_INQUIRY; Message_Ptr->CDB[4] = sizeof(((struct Inquiry *)Message_Ptr)->Buffer); /* * Set length of transfer */ PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setByteCount (Message_Ptr, sizeof(((struct Inquiry *)Message_Ptr)->Buffer)); /* * the data directions */ PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags (Message_Ptr, I2O_SCB_FLAG_XFER_FROM_DEVICE | I2O_SCB_FLAG_ENABLE_DISCONNECT | I2O_SCB_FLAG_SIMPLE_QUEUE_TAG); SG(&Message_Ptr->SGL, 0, I2O_SGL_FLAGS_LAST_ELEMENT, ((struct Inquiry *)Message_Ptr)->Buffer, sizeof(((struct Inquiry *)Message_Ptr)->Buffer)); current->MIPS = ((DPTI_sendMessage (controller, Message_Ptr) == 0) && ((*((unsigned long *)(sdInquiry_getProductID( ((struct Inquiry *)Message_Ptr)->Buffer) + 2)) == ('3' + ('9' * 256L) + ('6' * 65536L) + ('6' * 16777216L))) || (*((unsigned long *)(sdInquiry_getProductID( ((struct Inquiry *)Message_Ptr)->Buffer))) == ('2' + ('0' * 256L) + ('0' * 65536L) + ('0' * 16777216L))) || (*((unsigned long *)(sdInquiry_getProductID( ((struct Inquiry *)Message_Ptr)->Buffer))) == ('2' + ('0' * 256L) + ('0' * 65536L) + ('5' * 16777216L))) || (*((unsigned long *)(sdInquiry_getProductID( ((struct Inquiry *)Message_Ptr)->Buffer))) == ('2' + ('0' * 256L) + ('1' * 65536L) + ('0' * 16777216L))) || (*((unsigned long *)(sdInquiry_getProductID( ((struct Inquiry *)Message_Ptr)->Buffer))) == ('2' + ('0' * 256L) + ('1' * 65536L) + ('5' * 16777216L))))); } } /* * The following command reads the LCT and HRT tables and fills in the * TidTable. Note, that in some cases the `current' pointer is altered by * the activity of this routine. */ STATIC INLINE DPTI_Devices_S * __NEAR__ DPTI_preloadTable(IN Controller_t controller) { DPTI_Devices_S * current; DEBUGGER(); DEBUG_TAG(TAG_IN_DPTI_preloadTable); DEBUG_IN_X32(controller); if (DPTI_acquireLct (controller) == 0) { DPTI_acquireTargetInfo (controller); } current = DPTI_current(controller); current->controller = controller; current->valid = 1; DEBUG_TAG(TAG_OUT_DPTI_preloadTable); return (current); } #if defined __GNUC__ PUBLIC INLINE void DPTI_refresh __P((IN Controller_t controller)) #else PUBLIC INLINE void DPTI_refresh(IN Controller_t controller) #endif { DPTI_current_UNREFERENCED_PARAMETER(controller); DEBUG_TAG(TAG_IN_DPTI_refresh); DEBUG_IN_X32(controller); DPTI_current(controller)->valid = 0; DEBUG_TAG(TAG_OUT_DPTI_refresh); } /* * The following command causes the HBA to rescan for devices. */ #if defined __GNUC__ PUBLIC INLINE void DPTI_rescan __P((IN Controller_t controller)) #else PUBLIC INLINE void DPTI_rescan(IN Controller_t controller) #endif { defAlignLong(I2O_HBA_BUS_SCAN_MESSAGE,Message); I2O_HBA_BUS_SCAN_MESSAGE * Message_Ptr; TID_t * Device; unsigned short NumberOfDevices; DPTI_Devices_S * current; DEBUGGER(); DEBUG_TAG(TAG_IN_DPTI_rescan); DEBUG_IN_X32(controller); Message_Ptr = (I2O_HBA_BUS_SCAN_MESSAGE *)DPTI_fillMessage(Message, sizeof(I2O_HBA_BUS_SCAN_MESSAGE)); I2O_MESSAGE_FRAME_setFunction(&Message_Ptr->StdMessageFrame, I2O_HBA_BUS_SCAN); current = DPTI_current(controller); /* * The rescan is on a per-bus basis, so we will issue this to all the * known buses. */ for (Device = current->TidTable, NumberOfDevices = current->numDevices; NumberOfDevices != 0; ++Device, --NumberOfDevices) { if (Device_isBus(Device)) { I2O_MESSAGE_FRAME_setTargetAddress(&Message_Ptr->StdMessageFrame, Device_getTID(Device)); (void)DPTI_sendMessage(controller, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr); } } # if (defined(osdClockTick) && defined(osdCLOCKTICK)) current->lastScan = osdClockTick() + 10L * osdCLOCKTICK; /* * Scan through all other `adapters' and reset their timers if less * than a minute old. This prevents a cascade scan effect that * results in multiple controller situations. */ { # if (NUM_CONTROLLERS <= 0) DPTI_Devices_S ** devices = DPTI_devices; do {if ((*devices) && ((*devices)->valid) && ((current->lastScan - (*devices)->lastScan) < (osdCLOCKTICK * 60L))) { (*devices)->lastScan = current->lastScan; } } while (++devices < &DPTI_devices[DPTI_numDevices]); # elif (NUM_CONTROLLERS > 1) # if (NUM_DEVICES <= 0) DPTI_Devices_S ** devices = DPTI_devices; do {if ((*devices) && ((*devices)->valid) && ((current->lastScan - (*devices)->lastScan) < (osdCLOCKTICK * 60L))) { (*devices)->lastScan = current->lastScan; } } while (++devices < &DPTI_devices[NUM_CONTROLLERS]); # else /* NUM_DEVICES > 0 */ DPTI_Devices_S * devices = DPTI_devices; do {if (devices->valid && ((current->lastScan - devices->lastScan) < (osdCLOCKTICK * 60L))) { devices->lastScan = current->lastScan; } } while (++devices < &DPTI_devices[NUM_CONTROLLERS]); # endif /* NUM_DEVICES > 0 */ # endif /* NUM_CONTROLLERS > 1 */ } # endif /* osdClockTick && osdCLOCKTICK */ /* * A rescan will return with a sum of the errors, including SCSI * timeouts and such, so will always have an error! We will cause the * re-read of the LCT table despite these errors. */ DEBUG_TAG(TAG_IN_DPTI_refresh); DEBUG_IN_X32(controller); current->enableRescan = 0; current->valid = 0; DEBUG_TAG(TAG_OUT_DPTI_refresh); DEBUG_TAG(TAG_OUT_DPTI_rescan); } /* * The following command causes the HBA to rescan for devices after a * bus reset. */ #if defined __GNUC__ PUBLIC INLINE void DPTI_resetBus __P((IN Controller_t controller)) #else PUBLIC INLINE void DPTI_resetBus(IN Controller_t controller) #endif { defAlignLong(I2O_HBA_BUS_RESET_MESSAGE,Message); I2O_HBA_BUS_RESET_MESSAGE * Message_Ptr; TID_t * Device; unsigned short NumberOfDevices; DPTI_Devices_S * current; DEBUGGER(); DEBUG_TAG(TAG_IN_DPTI_resetBus); DEBUG_IN_X32(controller); Message_Ptr = (I2O_HBA_BUS_RESET_MESSAGE *)DPTI_fillMessage(Message, sizeof(I2O_HBA_BUS_RESET_MESSAGE)); I2O_MESSAGE_FRAME_setFunction(&Message_Ptr->StdMessageFrame, I2O_HBA_BUS_RESET); current = DPTI_current(controller); /* * The rescan is on a per-bus basis, so we will issue this to all the * known buses. */ for (Device = current->TidTable, NumberOfDevices = current->numDevices; NumberOfDevices != 0; ++Device, --NumberOfDevices) { if (Device_isBus(Device)) { I2O_MESSAGE_FRAME_setTargetAddress(&Message_Ptr->StdMessageFrame, Device_getTID(Device)); (void)DPTI_sendMessage(controller, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr); } } # if (defined(osdClockTick) && defined(osdCLOCKTICK)) current->lastScan = osdClockTick() + 10L * osdCLOCKTICK; /* * Scan through all other `adapters' and reset their timers if less * than a minute old. This prevents a cascade scan effect that * results in multiple controller situations. */ { # if (NUM_CONTROLLERS <= 0) DPTI_Devices_S ** devices = DPTI_devices; do {if ((*devices) && ((*devices)->valid) && ((current->lastScan - (*devices)->lastScan) < (osdCLOCKTICK * 60L))) { (*devices)->lastScan = current->lastScan; } } while (++devices < &DPTI_devices[DPTI_numDevices]); # elif (NUM_CONTROLLERS > 1) # if (NUM_DEVICES <= 0) DPTI_Devices_S ** devices = DPTI_devices; do {if ((*devices) && ((*devices)->valid) && ((current->lastScan - (*devices)->lastScan) < (osdCLOCKTICK * 60L))) { (*devices)->lastScan = current->lastScan; } } while (++devices < &DPTI_devices[NUM_CONTROLLERS]); # else /* NUM_DEVICES > 0 */ DPTI_Devices_S * devices = DPTI_devices; do {if (devices->valid && ((current->lastScan - devices->lastScan) < (osdCLOCKTICK * 60L))) { devices->lastScan = current->lastScan; } } while (++devices < &DPTI_devices[NUM_CONTROLLERS]); # endif /* NUM_DEVICES > 0 */ # endif /* NUM_CONTROLLERS > 1 */ } # endif /* osdClockTick && osdCLOCKTICK */ /* * A rescan will return with a sum of the errors, including SCSI * timeouts and such, so will always have an error! We will cause the * re-read of the LCT table despite these errors. */ DEBUG_TAG(TAG_IN_DPTI_refresh); DEBUG_IN_X32(controller); current->enableRescan = 0; current->valid = 0; DEBUG_TAG(TAG_OUT_DPTI_refresh); DEBUG_TAG(TAG_OUT_DPTI_resetBus); } /* * Find the matching TID. Keep in mind that we will attempt to show * multilevel arrays as a software array manipulation. */ #if defined __GNUC__ PUBLIC INLINE TID_t * DPTI_getDeviceAddr __P (( IN Controller_t controller, IN unsigned char Bus, IN unsigned char Target, IN unsigned char Lun, IN unsigned char FW, IN unsigned char Phys)) #else PUBLIC INLINE TID_t * DPTI_getDeviceAddr ( IN Controller_t controller, IN unsigned char Bus, IN unsigned char Target, IN unsigned char Lun, IN unsigned char FW, IN unsigned char Phys) #endif { OUT TID_t * Device; DPTI_Devices_S * current; unsigned short NumberOfDevices; unsigned char Pass; DEBUG_TAG(TAG_IN_DPTI_getDevice); DEBUG_IN_X32(controller); DEBUG_IN_U8(Bus); DEBUG_IN_U8(Target); DEBUG_IN_U8(Lun); DEBUG_IN_U8(FW); DEBUG_IN_U8(Phys); current = DPTI_current(controller); DPTI_check (current, controller); if (current->valid == 0) { current = DPTI_preloadTable(controller); } /* * Pass 0 picks up devices that strictly meet the requirements: * If Physical and a SCSI or Fibre device, * or not Physical and head of an Array * and FW and owned (!FFF) * or not FW and not owned (FFF) * This will pick up each level of an array, or the bottom * physical devices as requested. * Pass 1 picks up devices that strictly meet the requirements: * If Physical and a SCSI or Fibre device, * or not Physical and head of an Array * and FW and owned (!001 and !FFF) * or not FW and not owned (001 or FFF) * This will pick up each level of an array, or the bottom * physical devices as requested. * Pass 2 picks up devices that loosely meet the requirements: * If Physical and not the head of an Array, * or not Physical and head of an Array * and FW and owned (!FFF) * or not FW and not owned (FFF) * This will pick up each level of an array, or the bottom * physical devices as requested. * Pass 3 picks up devices that loosely meet the requirements: * If Physical and not the head of an Array, * or not Physical and head of an Array * and FW and owned (!001 and !FFF) * or not FW and not owned (001 or FFF) * This will pick up each level of an array, or the bottom * physical devices as requested. * Pass 4 allows us to select ignoring the FW bit (finds a `top level' * array, even though a midlevel array is the only one present) * Pass 5 picks up devices that could possibly be added with this: * If not a head of an Array and at the top of the list and * not owned (!FFF). * This will pick up the non-arrayed devices as a match then. * Pass 6 picks up devices that could possibly be added with this: * If not a head of an Array and at the top of the list and * not owned (!001 and !FFF). * This will pick up the non-arrayed devices as a match then. * Pass 7 will pick up *any* drive that matches the target address. * * Note: Dropped Pass 7 because Array are being picked up when Physical * targets are being requested and vice versa. * * Could probably be clearer if written as 6 separate loops ... */ for (Pass = 0; Pass < 6; ++Pass) { for (Device = current->TidTable, NumberOfDevices = current->numDevices; NumberOfDevices != 0; ++Device, --NumberOfDevices) { if ((Device_getBus(Device) == Bus) && (Device_getTarget(Device) == Target) && (Device_getLun(Device) == Lun) && ((Phys && ((Pass < 2) ? !Device_isRAID(Device) : Device_isPhys(Device))) || (!Phys && Device_isRAID(Device) && ((Pass == 4) || (FW == ((Device_getUserTID(Device) != 0xFFF) && ((Device_getUserTID(Device) != 0x001) || (Pass == 0) || (Pass == 2)))))) || (((Pass == 5) || (Pass == 6)) && !Device_isRAID(Device) && ((Device_getUserTID(Device) == 0xFFF) || ((Device_getUserTID(Device) == 0x001) && (Pass == 6)))) || (Pass == 7)) && !Device_isBus(Device)) { DEBUG_OUT_X32(Device); DEBUG_TAG(TAG_OUT_DPTI_getDevice); return (Device); } } } { DEBUG_ALLOCATE_STRING(fail_string,"Bad"); DEBUG_OUT_STRING(fail_string); DEBUG_TAG(TAG_OUT_DPTI_getDevice); } return ((TID_t *)NULL); } #if defined __GNUC__ PUBLIC INLINE TID_t * DPTI_getDeviceTID __P(( IN Controller_t controller, IN unsigned short TID)) #else PUBLIC INLINE TID_t * DPTI_getDeviceTID ( IN Controller_t controller, IN unsigned short TID) #endif { OUT TID_t * Device; DPTI_Devices_S * current; unsigned short NumberOfDevices; current = DPTI_current(controller); DPTI_check (current, controller); if (current->valid == 0) { current = DPTI_preloadTable(controller); } for (Device = current->TidTable, NumberOfDevices = current->numDevices; NumberOfDevices != 0; ++Device, --NumberOfDevices) { if (Device_getTID(Device) == TID) { DEBUG_OUT_X32(Device); DEBUG_TAG(TAG_OUT_DPTI_getDevice); return (Device); } } { DEBUG_ALLOCATE_STRING(fail_string,"Bad"); DEBUG_OUT_STRING(fail_string); DEBUG_TAG(TAG_OUT_DPTI_getDevice); } return ((TID_t *)NULL); } /* * Find the matching TID. Keep in mind that we will attempt to show * multilevel arrays as a software array manipulation. */ #if defined __GNUC__ PUBLIC INLINE unsigned short DPTI_getTID __P(( IN Controller_t controller, IN unsigned char Bus, IN unsigned char Target, IN unsigned char Lun, IN unsigned char FW, IN unsigned char Phys, IN unsigned char Interpret)) #else PUBLIC INLINE unsigned short DPTI_getTID ( IN Controller_t controller, IN unsigned char Bus, IN unsigned char Target, IN unsigned char Lun, IN unsigned char FW, IN unsigned char Phys, IN unsigned char Interpret) #endif { OUT TID_t * Device; DEBUGGER(); DEBUG_TAG(TAG_IN_DPTI_getTID); DEBUG_IN_X32(controller); DEBUG_IN_U8(Bus); DEBUG_IN_U8(Target); DEBUG_IN_U8(Lun); DEBUG_IN_U8(FW); DEBUG_IN_U8(Phys); DEBUG_IN_U8(Interpret); if ((Device = DPTI_getDeviceAddr(controller, Bus, Target, Lun, FW, Phys)) != (TID_t *)NULL) { DEBUG_OUT_X16(Device_getTID(Device)); DEBUG_TAG(TAG_OUT_DPTI_getTID); return (Device_getTID(Device)); } /* * Is there a deterministic algorithm we can fall back on? */ if (Interpret) { DEBUG_ALLOCATE_STRING(interpret_string,"Interpret"); DEBUG_OUT_STRING(interpret_string); DEBUG_TAG(TAG_OUT_DPTI_getTID); return (0); } { DEBUG_ALLOCATE_STRING(fail_string,"Bad"); DEBUG_OUT_STRING(fail_string); } DEBUG_TAG(TAG_OUT_DPTI_getTID); return ((unsigned short)-1); } /* * Convert an EATA packet into an I2O packet; There is a possibility * that a rescan will be issued when asking for the TID for the specified * bus target and lun, as a result the `current' pointer in the caller's * context may not be valid anymore. */ STATIC int __NEAR__ DPTI_eataToI2O( IN Controller_t Controller, IN eataCP_S __FAR__ * eata_P, OUT PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE i2o_P) { DEBUGGER(); DEBUG_TAG(TAG_IN_DPTI_eataToI2O); DEBUG_IN_X32(Controller); DEBUG_IN_STRUCT(eata_P); DEBUG_IN_X32(i2o_P); /* * We assume that the I2O packet has been cleared to all 0's */ { unsigned short TID ; unsigned char FW = eataCP_getNestedFW(eata_P); unsigned char Phys = eataCP_getPhysical(eata_P); unsigned char Interpret = eataCP_getFlags(eata_P) & CP_INTERPRET; /* Hack to get extended target information through */ unsigned char Target = ((char __FAR__ *)eata_P)[2]; /* Hack to get extended lun information through */ unsigned char Lun = ((char __FAR__ *)eata_P)[3]; /* * Extended target support in the EATA packet: */ if ((Target & 31) != eataCP_getTarget(eata_P)) { Target = eataCP_getTarget(eata_P); } /* * Extended lun support in the EATA packet: */ if ((Lun & 7) != eataCP_getLun(eata_P)) { Lun = eataCP_getLun(eata_P); } /* * Check the command issued to determine if it is an array * mode command. Scope up the array chain if it is. The array * Mode Pages are: * Command Page Code * BuildLogArrayMagicPage 0x30 * ExpandArrayPage 0x39 * BuildLogArrayPage 0x3B * BuildNamePage, ProcessNamePage 0x3C */ if (Interpret) { unsigned char ScopeUp = 0; switch (scModeSense_getOpCode(eataCP_getCDB(eata_P))) { case SC_MODE_SELECT: case SC_MODE_SELECT0: { char __FAR__ * Header; if (eataCP_getFlags(eata_P) & CP_SG_ADDR) { unsigned long unPacked; unPacked = osdEata4(eataCP_getSgAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); Header = (char __FAR__ *)osdEataVirt(unPacked); unPacked = osdEata4( eataSG_getAddrPtr((eataSG_S __FAR__ *)Header)); unPacked = osdEataUnpack(unPacked); Header = (char __FAR__ *)osdEataVirt(unPacked); } else { unsigned long unPacked; unPacked = osdEata4(eataCP_getDataAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); Header = (char __FAR__ *)osdEataVirt(unPacked); } /* * Find the page code we are sending. */ if (scModeSense_getOpCode(eataCP_getCDB(eata_P)) == SC_MODE_SELECT) { /* Block descriptor size */ Header += osdLocal2(Header + 6); /* modeHeader size */ Header += sizeof(modeHeader_S); } else { /* Block descriptor size */ Header += Header[3]; /* modeHeader size */ Header += sizeof(modeHeader6_S); } /* * Snoop on the data to see if it's page code are the * sensitive ones: */ switch (0x3F & Header[0]) { case 0x30: case 0x39: case 0x3B: case 0x3C: ++ScopeUp; } } /* FALLTHRU just in case it is in the SCSI command */ case SC_MODE_SENSE: case SC_MODE_SENSE0: switch (scModeSense_getPageCode(eataCP_getCDB(eata_P))&0x3F) { case 0x30: case 0x39: case 0x3B: case 0x3C: ++ScopeUp; } break; } if (ScopeUp) { FW = Phys; Phys = 0; } } if ((TID = DPTI_getTID(Controller, (unsigned char)eataCP_getBus(eata_P), Target, Lun, FW, Phys, Interpret) ) == (unsigned short)-1) { { DEBUG_ALLOCATE_STRING(fail_string,"Bad"); DEBUG_OUT_STRING(fail_string); DEBUG_TAG(TAG_OUT_DPTI_eataToI2O); } return (-1); } I2O_MESSAGE_FRAME_setTargetAddress( &i2o_P->PrivateMessageFrame.StdMessageFrame, TID); I2O_PRIVATE_MESSAGE_FRAME_setOrganizationID( &i2o_P->PrivateMessageFrame, DPT_ORGANIZATION_ID); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setTID(i2o_P, TID); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setInterpret(i2o_P, ((eataCP_getFlags(eata_P) & CP_INTERPRET) != 0)); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setPhysical(i2o_P, (eataCP_getPhysical(eata_P) != 0)); } /* * compute the length of the CDB */ { U8 cdbLen; switch(eataCP_getCDB(eata_P)[0] & 0xE0) { case 0x00: cdbLen = 6; break; case 0x20: case 0x40: cdbLen = 10; break; default: # if (I2O_SCSI_CDB_LENGTH < 12) cdbLen = I2O_SCSI_CDB_LENGTH; break; # endif case 0xA0: cdbLen = 12; break; } /* * copy the cdb over */ osdBcopy((void __FAR__ *)eataCP_getCDB(eata_P), i2o_P->CDB, cdbLen); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setCDBLength(i2o_P, cdbLen); } /* * get the length of the data to send/get */ PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setByteCount (i2o_P, (eataCP_getFlags(eata_P) & (CP_DATA_IN|CP_DATA_OUT)) ? osdEata4(eataCP_getDataLengthPtr(eata_P)) : 0); /* Not using access macro since we are checking if the value is zero */ if (i2o_P->ByteCount == 0) { eataCP_andFlags(eata_P, ~(CP_DATA_IN|CP_DATA_OUT)); } /* * the data directions */ { unsigned short SCBFlags = 0; if (eataCP_getFlags(eata_P) & CP_DATA_IN) { /* * from (data in) */ SCBFlags = I2O_SCB_FLAG_XFER_FROM_DEVICE; } else if (eataCP_getFlags(eata_P) & CP_DATA_OUT) { /* * to (data out) */ SCBFlags = I2O_SCB_FLAG_XFER_TO_DEVICE; } /* * set up the flags for the command */ SCBFlags |= I2O_SCB_FLAG_ENABLE_DISCONNECT | I2O_SCB_FLAG_SIMPLE_QUEUE_TAG; if (eataCP_getFlags(eata_P) & CP_REQ_SENSE) { /* * A policy decision was made to ensure that the sense * data referenced in the eata packet is updated. */ # if (defined(I2O_SCB_FLAG_SENSE_DATA_IN_BUFFER) && defined(SENSE_DATA_IN_BUFFER_SUPPORTED)) SCBFlags |= I2O_SCB_FLAG_SENSE_DATA_IN_BUFFER; # else SCBFlags |= I2O_SCB_FLAG_SENSE_DATA_IN_MESSAGE; # endif } else { SCBFlags &= ~I2O_SCB_FLAG_AUTOSENSE_MASK; } PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags (i2o_P, SCBFlags); } /* * start of the i2o goofyness */ I2O_MESSAGE_FRAME_setVersionOffset ( &i2o_P->PrivateMessageFrame.StdMessageFrame, I2O_VERSION_11 | /* * where the scatter gather list starts */ (((sizeof(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE) - sizeof(I2O_SG_ELEMENT)) / sizeof(U32)) << 4)); /* * the size of ourself */ I2O_MESSAGE_FRAME_setMessageSize ( &i2o_P->PrivateMessageFrame.StdMessageFrame, ((sizeof(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE) - sizeof(I2O_SG_ELEMENT)) / sizeof(U32))); /* * the function we are performing */ I2O_MESSAGE_FRAME_setFunction(&i2o_P->PrivateMessageFrame.StdMessageFrame, I2O_PRIVATE_MESSAGE); I2O_PRIVATE_MESSAGE_FRAME_setXFunctionCode (&i2o_P->PrivateMessageFrame, I2O_SCSI_SCB_EXEC); /* * I2O_MESSAGE_FRAME_setInitiatorContext ( * &i2o_P->PrivateMessageFrame.StdMessageFrame, 0); */ { PI2O_SGE_SIMPLE_ELEMENT SE; unsigned char Flags = I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT; unsigned long unPacked; if (eataCP_getFlags(eata_P) & CP_DATA_OUT) { Flags |= I2O_SGL_FLAGS_DIR; } SE = i2o_P->SGL.u.Simple; if (eataCP_getFlags(eata_P) & CP_SG_ADDR) { eataSG_S __FAR__ * SG; unsigned long Count; unPacked = osdEata4(eataCP_getSgAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); SG = (eataSG_S __FAR__ *)osdEataVirt(unPacked); Count = (osdEata4(eataCP_getSgLengthPtr(eata_P)) # if (eataSG_size == 8) >> 3 # else / eataSG_size # endif ); while (Count) { I2O_FLAGS_COUNT_setCount(&SE->FlagsCount, osdEata4(eataSG_getLengthPtr(SG))); unPacked = osdEata4(eataSG_getAddrPtr(SG)); unPacked = osdEataUnpack(unPacked); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress(SE, osdEataPhys(unPacked)); ++SG; if (--Count == 0) { Flags |= I2O_SGL_FLAGS_END_OF_BUFFER; if ((eataCP_getFlags(eata_P) & CP_REQ_SENSE) == 0) { Flags |= I2O_SGL_FLAGS_LAST_ELEMENT; } } I2O_FLAGS_COUNT_setFlags(&SE->FlagsCount, Flags); ++SE; I2O_MESSAGE_FRAME_setMessageSize ( &i2o_P->PrivateMessageFrame.StdMessageFrame, I2O_MESSAGE_FRAME_getMessageSize ( &i2o_P->PrivateMessageFrame.StdMessageFrame) + (sizeof(I2O_SGE_SIMPLE_ELEMENT) >> 2)); } } else if (eataCP_getFlags(eata_P) & (CP_DATA_IN|CP_DATA_OUT)) { /* * Set up a single simple scatter gather element */ I2O_FLAGS_COUNT_setCount(&SE->FlagsCount, (eataCP_getFlags(eata_P) & (CP_DATA_IN|CP_DATA_OUT)) ? osdEata4(eataCP_getDataLengthPtr(eata_P)) : 0); Flags |= I2O_SGL_FLAGS_END_OF_BUFFER; if ((eataCP_getFlags(eata_P) & CP_REQ_SENSE) == 0) { Flags |= I2O_SGL_FLAGS_LAST_ELEMENT; } I2O_FLAGS_COUNT_setFlags(&SE->FlagsCount, Flags); unPacked = osdEata4(eataCP_getDataAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress(SE, osdEataPhys(unPacked)); ++SE; I2O_MESSAGE_FRAME_setMessageSize ( &i2o_P->PrivateMessageFrame.StdMessageFrame, I2O_MESSAGE_FRAME_getMessageSize ( &i2o_P->PrivateMessageFrame.StdMessageFrame) + (sizeof(I2O_SGE_SIMPLE_ELEMENT) >> 2)); } if (eataCP_getFlags(eata_P) & CP_REQ_SENSE) { I2O_FLAGS_COUNT_setCount(&SE->FlagsCount, eataCP_getReqSenseLen(eata_P)); I2O_FLAGS_COUNT_setFlags(&SE->FlagsCount, I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT | I2O_SGL_FLAGS_LAST_ELEMENT | I2O_SGL_FLAGS_END_OF_BUFFER); unPacked = osdEata4(eataCP_getReqSenseAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress(SE, osdEataPhys(unPacked)); I2O_MESSAGE_FRAME_setMessageSize ( &i2o_P->PrivateMessageFrame.StdMessageFrame, I2O_MESSAGE_FRAME_getMessageSize ( &i2o_P->PrivateMessageFrame.StdMessageFrame) + (sizeof(I2O_SGE_SIMPLE_ELEMENT) >> 2)); } } { DEBUG_ALLOCATE_STRING(ok_string,"Ok"); DEBUG_OUT_STRING(ok_string); DEBUG_TAG(TAG_OUT_DPTI_eataToI2O); } return (0); } #if (!defined(STATIC)) # define STATIC static #endif STATIC unsigned char DPTI_SpoofedInquiry[] = { I2O_SCSI_DEVICE_TYPE_PROCESSOR, 0, 2, /* ANSI 2 */ 2, /* SCSI II */ sdInquiry_size - 5, 0, 0, MISC_SYNC_XFR | MISC_CMD_QUEUE | MISC_BUS_WIDTH_32 | MISC_BUS_WIDTH_16, 'D', 'P', 'T', ' ', ' ', ' ', ' ', ' ', 'P', 'M', '1', '5', '5', '4', 'U', 'W', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '3', '1', '0', '6' }; STATIC unsigned char DPTI_SpoofedRdConfig[] = { I2O_SCSI_DEVICE_TYPE_PROCESSOR, 0, 0, 0x22, 'E', 'A', 'T', 'A', 0x10, RDCFG_OVERLAP|RDCFG_DMA|RDCFG_HBA_ADDR, 0, 0, 0, 0, 0, 7, 0, 0, 0, sizeof(eataCP_S), 0, 0, 0, sizeof(eataSP_S), 0, 64, 0, 0, 0, 64, RDCFG_IRQ_TRIG|11, 11, 0, 0x0F, 0x7, RDCFG_PCI_BUS|1, 0x14 }; /* * Construct an unsigned long character constant. Had to be done * in this manner because the MicroSoft compiler has troubles with * the character string '??'!!! */ #ifdef _DPT_BIG_ENDIAN # define short_character_constant(w,x) \ ((x) + (((unsigned short)(w)) << 8)) # define long_character_constant(w,x,y,z) \ ((unsigned long)((z) + (((unsigned short)(y)) << 8)) \ + ((unsigned long)((x) + (((unsigned short)(w)) << 8)) << 16L)) #else # define short_character_constant(w,x) \ ((w) + (((unsigned short)(x)) << 8)) # define long_character_constant(w,x,y,z) \ ((unsigned long)((w) + (((unsigned short)(x)) << 8)) \ + ((unsigned long)((y) + (((unsigned short)(z)) << 8)) << 16L)) #endif /* * Perform the flash command with no limit checking. */ STATIC int DPTI_CommandFlash( IN Controller_t controller, IN unsigned short flashCommand, IN unsigned char region, IN unsigned long offset, IN unsigned long SGA1, IN unsigned long SGL1, IN unsigned long SGA2, IN unsigned short SGL2, IN unsigned long SGA3, IN unsigned short SGL3, IN unsigned long SGA4, IN unsigned short SGL4) { struct FlashRegionMessage { PRIVATE_FLASH_REGION_MESSAGE M; unsigned char fill[(4 * sizeof(I2O_SGE_SIMPLE_ELEMENT)) - sizeof(I2O_SG_ELEMENT)]; }; defAlignLong(struct FlashRegionMessage,Message); PRIVATE_FLASH_REGION_MESSAGE * Message_Ptr; unsigned char Flags = I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT; UNREFERENCED_PARAMETER(((struct FlashRegionMessage *)Message)->M); UNREFERENCED_PARAMETER(((struct FlashRegionMessage *)Message)->fill); /* * Read the flash and place the image into the * appropriate (requested in image header) memory. */ Message_Ptr = (PRIVATE_FLASH_REGION_MESSAGE *)DPTI_fillMessage(Message, sizeof(PRIVATE_FLASH_REGION_MESSAGE) - sizeof(I2O_SG_ELEMENT) + sizeof(I2O_SGE_SIMPLE_ELEMENT)); I2O_MESSAGE_FRAME_setVersionOffset ( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, I2O_VERSION_11 | (((sizeof(PRIVATE_FLASH_REGION_MESSAGE) - sizeof(I2O_SG_ELEMENT)) / sizeof(U32)) << 4)); I2O_PRIVATE_MESSAGE_FRAME_setOrganizationID ( &Message_Ptr->PrivateMessageFrame, DPT_ORGANIZATION_ID); I2O_MESSAGE_FRAME_setFunction ( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, I2O_PRIVATE_MESSAGE); PRIVATE_FLASH_REGION_MESSAGE_setFlashRegion (Message_Ptr, region); PRIVATE_FLASH_REGION_MESSAGE_setRegionOffset (Message_Ptr, offset); I2O_PRIVATE_MESSAGE_FRAME_setXFunctionCode ( &Message_Ptr->PrivateMessageFrame, flashCommand); if (flashCommand == PRIVATE_FLASH_REGION_WRITE) { Flags = I2O_SGL_FLAGS_DIR | I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT; } # if (defined(_DPT_32_BIT_ALLOC)) /* Coalesce Scatter Gather if possible */ while (SGL2 && ((SGA1 + SGL1) == SGA2)) { SGL1 += SGL2; SGA2 = SGA3; SGA3 = SGA4; SGA4 = 0; SGL2 = SGL3; SGL3 = SGL4; SGL4 = 0; } # endif PRIVATE_FLASH_REGION_MESSAGE_setByteCount (Message_Ptr, SGL1 + SGL2 + SGL3 + SGL4); if (PRIVATE_FLASH_REGION_MESSAGE_getByteCount (Message_Ptr) == 0) { I2O_MESSAGE_FRAME_setVersionOffset ( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, I2O_VERSION_11); } I2O_FLAGS_COUNT_setCount(&Message_Ptr->SGL.u.Simple[0].FlagsCount, SGL1); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress (&Message_Ptr->SGL.u.Simple[0], SGA1); if (SGL2) { I2O_FLAGS_COUNT_setFlags(&Message_Ptr->SGL.u.Simple[0].FlagsCount, Flags); I2O_MESSAGE_FRAME_setMessageSize ( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, I2O_MESSAGE_FRAME_getMessageSize ( &Message_Ptr->PrivateMessageFrame.StdMessageFrame) + sizeof(I2O_SGE_SIMPLE_ELEMENT) / sizeof(U32)); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress ( &Message_Ptr->SGL.u.Simple[1], SGA2); I2O_FLAGS_COUNT_setCount(&Message_Ptr->SGL.u.Simple[1].FlagsCount, SGL2); if (SGL3) { I2O_FLAGS_COUNT_setFlags(&Message_Ptr->SGL.u.Simple[1].FlagsCount, Flags); I2O_MESSAGE_FRAME_setMessageSize ( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, I2O_MESSAGE_FRAME_getMessageSize ( &Message_Ptr->PrivateMessageFrame.StdMessageFrame) + sizeof(I2O_SGE_SIMPLE_ELEMENT) / sizeof(U32)); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress ( &Message_Ptr->SGL.u.Simple[2], SGA3); I2O_FLAGS_COUNT_setCount(&Message_Ptr->SGL.u.Simple[2].FlagsCount, SGL3); if (SGL4) { I2O_FLAGS_COUNT_setFlags( &Message_Ptr->SGL.u.Simple[2].FlagsCount, Flags); I2O_MESSAGE_FRAME_setMessageSize ( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, I2O_MESSAGE_FRAME_getMessageSize ( &Message_Ptr->PrivateMessageFrame.StdMessageFrame) + sizeof(I2O_SGE_SIMPLE_ELEMENT) / sizeof(U32)); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress ( &Message_Ptr->SGL.u.Simple[3], SGA4); I2O_FLAGS_COUNT_setCount( &Message_Ptr->SGL.u.Simple[3].FlagsCount, SGL4); I2O_FLAGS_COUNT_setFlags( &Message_Ptr->SGL.u.Simple[3].FlagsCount, Flags | I2O_SGL_FLAGS_END_OF_BUFFER | I2O_SGL_FLAGS_LAST_ELEMENT); } else { I2O_FLAGS_COUNT_setFlags( &Message_Ptr->SGL.u.Simple[2].FlagsCount, Flags | I2O_SGL_FLAGS_END_OF_BUFFER | I2O_SGL_FLAGS_LAST_ELEMENT); } } else { I2O_FLAGS_COUNT_setFlags(&Message_Ptr->SGL.u.Simple[1].FlagsCount, Flags | I2O_SGL_FLAGS_END_OF_BUFFER | I2O_SGL_FLAGS_LAST_ELEMENT); } } else { I2O_FLAGS_COUNT_setFlags(&Message_Ptr->SGL.u.Simple[0].FlagsCount, Flags | I2O_SGL_FLAGS_END_OF_BUFFER | I2O_SGL_FLAGS_LAST_ELEMENT); } return (DPTI_sendMessage(controller, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr)); } /* * Acquire the flash region sizes from the specified adapter. */ STATIC void DPTI_FlashRegionSizes( IN Controller_t controller, OUT unsigned long * sizeRegion) { defAlignLong(PRIVATE_FLASH_REGION_MESSAGE,Message); PRIVATE_FLASH_REGION_MESSAGE * Message_Ptr; sizeRegion[0] = 770048; /* Default 768KB - 16KB */ sizeRegion[1] = 262144; /* Default 256KB */ sizeRegion[2] = 8192; /* Default 8192 */ sizeRegion[3] = 8192; /* Default 8192 */ Message_Ptr = (PRIVATE_FLASH_REGION_MESSAGE *)DPTI_fillMessage(Message, sizeof(PRIVATE_FLASH_REGION_MESSAGE) - sizeof(I2O_SG_ELEMENT) + sizeof(I2O_SGE_SIMPLE_ELEMENT)); I2O_MESSAGE_FRAME_setVersionOffset ( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, I2O_VERSION_11 | (((sizeof(PRIVATE_FLASH_REGION_MESSAGE) - sizeof(I2O_SG_ELEMENT)) / sizeof(U32)) << 4)); I2O_PRIVATE_MESSAGE_FRAME_setOrganizationID ( &Message_Ptr->PrivateMessageFrame, DPT_ORGANIZATION_ID); I2O_MESSAGE_FRAME_setFunction ( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, I2O_PRIVATE_MESSAGE); I2O_PRIVATE_MESSAGE_FRAME_setXFunctionCode ( &Message_Ptr->PrivateMessageFrame, PRIVATE_FLASH_REGION_SIZE); do { SG (&Message_Ptr->SGL, 0, I2O_SGL_FLAGS_LAST_ELEMENT, &sizeRegion[ PRIVATE_FLASH_REGION_MESSAGE_getFlashRegion(Message_Ptr)], sizeof(sizeRegion[0])); (void)DPTI_sendMessage(controller, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr); # if (defined(_DPT_BIG_ENDIAN)) sizeRegion[ PRIVATE_FLASH_REGION_MESSAGE_getFlashRegion(Message_Ptr)] = osdSLocal4(&sizeRegion[ PRIVATE_FLASH_REGION_MESSAGE_getFlashRegion(Message_Ptr)]); # endif PRIVATE_FLASH_REGION_MESSAGE_setFlashRegion (Message_Ptr, PRIVATE_FLASH_REGION_MESSAGE_getFlashRegion(Message_Ptr) + 1); } while (PRIVATE_FLASH_REGION_MESSAGE_getFlashRegion(Message_Ptr) < 4); } #if (defined(SPOOF_FLASH_BOOT_BLOCK)) /* * Controller Inquiry Page 0 can be used to determine the product. */ #define PM2554 0x05 #define PM2564 0x06 #define PM25XX 0x07 #define PM3754 0x08 #define PM3757 0x09 #define PM2865 0x0A #define PM3865 0x0B #define PM3966 0x0C STATIC unsigned char __NEAR__ DPTI_getType( IN Controller_t controller) { struct Inquiry { PRIVATE_SCSI_SCB_EXECUTE_MESSAGE Message; char Buffer[48]; }; defAlignLong(struct Inquiry, Message); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE * Message_Ptr; UNREFERENCED_PARAMETER(((struct Inquiry *)Message)->Message); UNREFERENCED_PARAMETER(((struct Inquiry *)Message)->Buffer); Message_Ptr = (PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *)DPTI_fillMessage( Message, sizeof(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE) - sizeof(I2O_SG_ELEMENT) + sizeof(I2O_SGE_SIMPLE_ELEMENT)); I2O_MESSAGE_FRAME_setVersionOffset( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, (I2O_VERSION_11 + (((sizeof(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE) - sizeof(I2O_SG_ELEMENT)) / sizeof(U32)) << 4))); I2O_MESSAGE_FRAME_setFunction( &Message_Ptr->PrivateMessageFrame.StdMessageFrame, I2O_PRIVATE_MESSAGE); I2O_PRIVATE_MESSAGE_FRAME_setXFunctionCode ( &Message_Ptr->PrivateMessageFrame, I2O_SCSI_SCB_EXEC); I2O_PRIVATE_MESSAGE_FRAME_setOrganizationID( &Message_Ptr->PrivateMessageFrame, DPT_ORGANIZATION_ID); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setInterpret(Message_Ptr, 1); /* * CDB Length */ PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setCDBLength(Message_Ptr, 6); /* * Create CDB */ Message_Ptr->CDB[0] = SC_INQUIRY; Message_Ptr->CDB[4] = sizeof(((struct Inquiry *)Message_Ptr)->Buffer); /* * Set length of transfer */ PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setByteCount (Message_Ptr, sizeof(((struct Inquiry *)Message_Ptr)->Buffer)); /* * the data directions */ PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags (Message_Ptr, I2O_SCB_FLAG_XFER_FROM_DEVICE | I2O_SCB_FLAG_ENABLE_DISCONNECT | I2O_SCB_FLAG_SIMPLE_QUEUE_TAG); SG(&Message_Ptr->SGL, 0, I2O_SGL_FLAGS_LAST_ELEMENT, ((struct Inquiry *)Message_Ptr)->Buffer, sizeof(((struct Inquiry *)Message_Ptr)->Buffer)); if (DPTI_sendMessage (controller, Message_Ptr) == 0) switch ( *((unsigned long *)(sdInquiry_getProductID( ((struct Inquiry *)Message_Ptr)->Buffer) + 2))) { case '3' + ('7' * 256L) + ('5' * 65536L) + ('4' * 16777216L): case '3' + ('7' * 256L) + ('5' * 65536L) + ('5' * 16777216L): case '3' + ('7' * 256L) + ('5' * 65536L) + ('X' * 16777216L): return (PM3754); case '3' + ('7' * 256L) + ('5' * 65536L) + ('7' * 16777216L): /* We need to differentiate Type 1 and Type 2 3757s */ case '3' + ('7' * 256L) + ('6' * 65536L) + ('7' * 16777216L): return (PM3757); case '3' + ('8' * 256L) + ('6' * 65536L) + ('5' * 16777216L): return (PM3865); case '3' + ('9' * 256L) + ('6' * 65536L) + ('6' * 16777216L): return (PM3966); case '2' + ('8' * 256L) + ('6' * 65536L) + ('5' * 16777216L): return (PM2865); case '1' + ('5' * 256L) + ('5' * 65536L) + ('4' * 16777216L): case '2' + ('5' * 256L) + ('5' * 65536L) + ('4' * 16777216L): case '2' + ('6' * 256L) + ('5' * 65536L) + ('4' * 16777216L): return (PM2554); case '1' + ('5' * 256L) + ('6' * 65536L) + ('4' * 16777216L): case '2' + ('5' * 256L) + ('6' * 65536L) + ('4' * 16777216L): case '2' + ('6' * 256L) + ('6' * 65536L) + ('4' * 16777216L): return (PM2564); case '2' + ('5' * 256L) + ('X' * 65536L) + ('X' * 16777216L): return (PM25XX); } return (0); /* A default value */ } /* * The various adapter boot blocks are available here in a compressed form * so we need to support the decompressor. We need to minimize the memory * needs of the decompressor, so there is no intermediate buffering of * data. */ static unsigned char * DPTI_inputBuffer; static unsigned char * DPTI_window; static unsigned char DPTI_indexBitCount; static unsigned char DPTI_lengthBitCount; #define WINDOW_SIZE (1 << DPTI_indexBitCount) #define BREAK_EVEN ((1 + DPTI_indexBitCount + DPTI_lengthBitCount) / 9) #define END_OF_STREAM 0 /* * Initialize the decompressor */ STATIC void __NEAR__ DPTI_resetDecompress( IN int index, IN int length, IN unsigned char * buffer) { if (DPTI_window) { free (DPTI_window); DPTI_window = (unsigned char *)NULL; } DPTI_indexBitCount = index; DPTI_lengthBitCount = length; DPTI_inputBuffer = buffer; } /* DPTI_resetDecompress */ /* * Sequential LZW rotating dictionary decompressor. */ STATIC int __NEAR__ DPTI_decompress(void) { static unsigned char windowBit; static unsigned char * windowPtr; static unsigned long Input; static unsigned char InputSize; static unsigned short input; static short length; short i, size = WINDOW_SIZE; if (DPTI_window == (unsigned char *)NULL) { windowPtr = DPTI_window = (unsigned char *)malloc (size); windowBit = InputSize = (unsigned char)(length = (short)(Input = 0)); } if (length == 0) for (;;) { /* * If input size is zero, `Input' state doesn't matter, we still * need input */ if (InputSize > ((Input & 1) ? 8 : DPTI_indexBitCount)) { if (Input & 1) { /* Single Byte */ Input >>= 1; --InputSize; if (++windowPtr >= (DPTI_window + size)) { windowPtr = DPTI_window; } /* get value */ i = *windowPtr = Input & 0xFF; /* acknowledge receipt of data bits */ Input >>= 8; InputSize -= 8; /* return value */ return (i); } /* Look here for END_OF_STREAM */ if ((input = ((1 << DPTI_indexBitCount) - 1) & (Input >> 1)) == END_OF_STREAM) { /* Retain this state (don't suck next bits in) */ free(DPTI_window); DPTI_window = NULL; return (-1); } if (InputSize > (DPTI_indexBitCount + DPTI_lengthBitCount)) { /* input has the index */ Input >>= DPTI_indexBitCount + 1; /* pick up the length */ length = (Input & ((1 << DPTI_lengthBitCount) - 1)) + BREAK_EVEN + 1; /* Acknowledge receipt of data bits */ Input >>= DPTI_lengthBitCount; InputSize -= DPTI_indexBitCount + DPTI_lengthBitCount + 1; break; /* Get first character from dictionary */ } } /* Get the next character in the compressed stream */ Input |= ((unsigned long)(*(DPTI_inputBuffer++))) << InputSize; InputSize += 8; } /* receive data from the dictionary */ --length; if (++windowPtr >= (DPTI_window + size)) { windowPtr = DPTI_window; } i = input; /* hold on to the previous value */ if (++input >= size) { input = 0; } return (*windowPtr = DPTI_window[i]); } /* DPTI_decompress */ /* Directory of Firmware Images */ /* From 25543107.IMA */ #define PM2554_OFFSET 0L /* From 25643107.IMA */ #define PM2564_OFFSET 16384L /* From 37543107.IMA */ #define PM3754_OFFSET 32768L /* From 37573107.IMA */ #define PM3757_OFFSET 49152L /* From 28653107.IMA */ #define PM2865_OFFSET 65536L /* From 38653107.IMA */ #define PM3865_OFFSET 81920L /* From 39663107.IMA */ #define PM3966_OFFSET 98304L /* One big compressed image of concatonated boot blocks */ #define DPTI_SpoofedBootIndexBitCount 14 #define DPTI_SpoofedBootLengthBitCount 6 STATIC unsigned char DPTI_SpoofedBoot[1] = { 0 }; /* DPTI_SpoofedBoot[1] */ #endif /* SPOOF_FLASH_BOOT_BLOCK */ /* * Split the request amoungst the regions */ unsigned short DPTI_BootFlags; #if defined __GNUC__ PUBLIC unsigned long DPTI_BootBlockSize __P(()) #else PUBLIC unsigned long DPTI_BootBlockSize() #endif { unsigned long DPTI_BootBlockSize = 16384L; /* Default Firmware boot block */ switch (DPTI_BootFlags & (FW_DNLDSIZE16|FW_DNLDSIZE32|FW_DNLDSIZE64|FW_DNLDSIZE_NONE)) { case FW_DNLDSIZE_NONE: DPTI_BootBlockSize = 0; break; case FW_DNLDSIZE64: DPTI_BootBlockSize <<= 1; /* FALLTHRU */ case FW_DNLDSIZE32: DPTI_BootBlockSize <<= 1; /* FALLTHRU */ default: break; } return (DPTI_BootBlockSize); } STATIC int DPTI_FlashCommand( IN Controller_t controller, IN unsigned short flashCommand, IN unsigned long offset, IN unsigned long SGA1, IN unsigned long SGL1, IN unsigned long SGA2, IN unsigned short SGL2, IN unsigned long SGA3, IN unsigned short SGL3, IN unsigned long SGA4, IN unsigned short SGL4) { unsigned long RegionLimits[5]; unsigned char region; int retVal = ~I2O_HBA_DSC_SUCCESS; region = (unsigned char)(RegionLimits[0] = 0L); DPTI_FlashRegionSizes(controller, RegionLimits + 1); do { unsigned long SGA[4]; unsigned long SGL[4]; unsigned long Offset = offset; unsigned long Length; # if (defined(FLASH_VERIFY)) unsigned short Index; unsigned short retry; # else unsigned char Index; # endif Index = (unsigned char)(Length = 0L); /* * Initialize the scatter gather. */ SGA[0] = SGA1; SGA[1] = SGA2; SGA[2] = SGA3; SGA[3] = SGA4; SGL[0] = SGL1; SGL[1] = SGL2; SGL[2] = SGL3; SGL[3] = SGL4; /* * Need Aggregate length to determine if only the boot block. */ do { if (SGL[Index] == 0) { break; } Length += SGL[Index]; } while (++Index < 4); /* * Flash commands skip boot block on first region. */ if (DPTI_BootFlags & FW_DNLDR_BTM) { if (region == 0) { RegionLimits[0] = DPTI_BootBlockSize(); /* Special case, fake a success if only Boot Block region */ if ((Offset + Length) <= RegionLimits[0]) { retVal = I2O_HBA_DSC_SUCCESS; } } } else { if (region == 1) { /* Boot block too */ RegionLimits[0] = RegionLimits[1]; /* Temporary */ RegionLimits[1] += DPTI_BootBlockSize(); /* Special case, fake a success if only Boot Block region */ if ((RegionLimits[0] <= Offset) && ((Offset + Length) <= RegionLimits[1])) { retVal = I2O_HBA_DSC_SUCCESS; } /* commented here for `completeness', no side effects (yet) */ /* RegionLimits[0] = 0L; */ } } Index = (unsigned char)(Length = 0L); RegionLimits[region + 1] += RegionLimits[region]; /* * Shift the scatter gather until we have one that could reside * in this RegionLimit. */ while (SGL[0] && ((SGL[0] + Offset) <= RegionLimits[region])) { Offset += SGL[0]; if ((SGL[0] = SGL[1]) == 0L) { return (I2O_HBA_DSC_SUCCESS); } SGA[0] = SGA[1]; SGL[1] = SGL[2]; SGA[1] = SGA[2]; SGL[2] = SGL[3]; SGL[3] = 0L; } if (SGL[0] == 0L) { # if (defined(SPOOF_FLASH_BOOT_BLOCK)) goto SpoofFlashBootBlock; # else continue; # endif } if (Offset < RegionLimits[region]) { SGL[0] -= RegionLimits[region] - Offset; SGA[0] += RegionLimits[region] - Offset; Offset = RegionLimits[region]; } do { if (SGL[Index] == 0) { break; } if ((Offset+Length) >= RegionLimits[region+1]) { SGL[Index] = 0L; } else if ((SGL[Index]+Offset+Length) > RegionLimits[region+1]) { SGL[Index] = RegionLimits[region+1] - Offset - Length; } Length += SGL[Index]; } while (++Index < 4); if (SGL[0] == 0L) { # if (defined(SPOOF_FLASH_BOOT_BLOCK)) goto SpoofFlashBootBlock; # else continue; # endif } # if (defined(FLASH_VERIFY)) /* Retry command once if it should fail (or verify incorrectly) */ for (retVal = -1, retry = 2; retry && (retVal != I2O_HBA_DSC_SUCCESS); --retry) { unsigned long LocalOffset = Offset - RegionLimits[region]; if ((retVal = DPTI_CommandFlash(controller, flashCommand, region, LocalOffset, SGA[0], SGL[0], SGA[1], (unsigned short)SGL[1], SGA[2], (unsigned short)SGL[2], SGA[3], (unsigned short)SGL[3])) != I2O_HBA_DSC_SUCCESS) { continue; } /* Verify that the write command worked appropriately */ if (flashCommand == PRIVATE_FLASH_REGION_WRITE) { char * buffer, * flash; unsigned short TestLength; if ((buffer = (char *)osdAlloc (512)) == (char *)NULL) { break; /* Can not verify, don't record error */ } if ((flash = (char *)osdAlloc (512)) == (char *)NULL) { osdFree (buffer, 512); break; /* Can not verify, don't record error */ } for (Index = 0; Index == 0; LocalOffset += TestLength) { unsigned long SGOffset = LocalOffset - Offset + RegionLimits[region]; char * bp, * fp; for ( ; SGOffset >= SGL[Index]; ) { SGOffset -= SGL[Index]; if (++Index > (sizeof(SGL)/sizeof(SGL[0]))) { break; } } if (Index == (sizeof(SGL)/sizeof(SGL[0]))) { Index = 0; /* Verify completed */ break; /* Done */ } if ((TestLength = 512) > (SGL[Index] - SGOffset)) { TestLength = (unsigned short) (SGL[Index] - SGOffset); } if ((retVal = DPTI_CommandFlash(controller, PRIVATE_FLASH_REGION_READ, region, LocalOffset, osdPhys(buffer), 512, 0L, 0, 0L, 0, 0L, 0)) != I2O_HBA_DSC_SUCCESS) { ++Index; /* Failed to verify */ break; /* Failed to read */ } osdBcopyIn(SGA[Index] + SGOffset, flash, TestLength); for (bp = buffer, fp = flash, Index = TestLength; Index && (*bp == *fp); ++bp, ++fp, --Index); } /* Free up resources */ osdFree (buffer, 512); osdFree (flash, 512); /* Record the verify error */ if (Index) { if (retVal == I2O_HBA_DSC_SUCCESS) { retVal = I2O_HBA_DSC_COMPLETE_WITH_ERROR; } } } } # else /* FLASH_VERIFY */ if ((retVal = DPTI_CommandFlash(controller, flashCommand, region, Offset - RegionLimits[region], SGA[0], SGL[0], SGA[1], (unsigned short)SGL[1], SGA[2], (unsigned short)SGL[2], SGA[3], (unsigned short)SGL[3])) != I2O_HBA_DSC_SUCCESS) { break; } # endif /* !FLASH_VERIFY */ /* Ask the Firmware if the flashed data passes checksum */ if ((flashCommand == PRIVATE_FLASH_REGION_WRITE) && (region == 0) /* Last block of the flash */ && ((RegionLimits[1] - 65536L) <= Offset) && (retVal == I2O_HBA_DSC_SUCCESS)) { if (((retVal = DPTI_CommandFlash(controller, PRIVATE_FLASH_REGION_CRC, region, 0L, 0L, 0L, 0L, 0, 0L, 0, 0L, 0)) != I2O_HBA_DSC_SUCCESS) && (retVal != I2O_DETAIL_STATUS_UNSUPPORTED_FUNCTION)) { break; } retVal = I2O_HBA_DSC_SUCCESS; } # if (defined(SPOOF_FLASH_BOOT_BLOCK)) SpoofFlashBootBlock: /* Is the request overlapping the Boot Block arena? */ if ((flashCommand == PRIVATE_FLASH_REGION_READ) && (region == 0) && ((DPTI_BootFlags & FW_DNLDR_BTM) ? (RegionLimits[0] <= offset) : (offset < (RegionLimits[1] + DPTI_BootBlockSize()))) && (RegionLimits[1] < (offset + SGL1 + SGL2 + SGL3 + SGL4))) { /* * Initialize the scatter gather. */ Offset = offset; SGA[0] = SGA1; SGA[1] = SGA2; SGA[2] = SGA3; SGA[3] = SGA4; SGL[0] = SGL1; SGL[1] = SGL2; SGL[2] = SGL3; SGL[3] = SGL4; /* * Shift the scatter gather until we have one that could * reside in this Boot Block region. */ while (SGL[0] && ((SGL[0] + Offset) <= RegionLimits[1])) { Offset += SGL[0]; SGL[0] = SGL[1]; SGA[0] = SGA[1]; SGL[1] = SGL[2]; SGA[1] = SGA[2]; SGL[2] = SGL[3]; SGL[3] = 0L; } if (SGL[0] != 0L) { if (Offset < RegionLimits[1]) { SGL[0] -= RegionLimits[1] - Offset; SGA[0] += RegionLimits[1] - Offset; Offset = RegionLimits[1]; } Index = (unsigned char)(Length = 0L); do { if (SGL[Index] == 0) { break; } if (DPTI_BootFlags & FW_DNLDR_BTM) { if ((Offset+Length) >= RegionLimits[1]) { SGL[Index] = 0L; } else if ((SGL[Index]+Offset+Length) > RegionLimits[1]) { SGL[Index] = RegionLimits[1] - Offset - Length; } } else { if ((Offset+Length) >= (RegionLimits[1]+DPTI_BootBlockSize())) { SGL[Index] = 0L; } else if ((SGL[Index]+Offset+Length) > (RegionLimits[1]+DPTI_BootBlockSize())) { SGL[Index] = RegionLimits[1] + DPTI_BootBlockSize() - Offset - Length; } } Length += SGL[Index]; } while (++Index < 4); } if (SGL[0] != 0L) { Offset -= RegionLimits[1]; DPTI_resetDecompress( DPTI_SpoofedBootIndexBitCount, DPTI_SpoofedBootLengthBitCount, DPTI_SpoofedBoot); switch (DPTI_getType (controller)) { case PM2554: case PM25XX: # if (PM2554_OFFSET != 0) Offset += PM2554_OFFSET; # endif break; case PM2564: Offset += PM2564_OFFSET; break; case PM2865: Offset += PM2865_OFFSET; break; case PM3754: Offset += PM3754_OFFSET; break; case PM3757: Offset += PM3757_OFFSET; break; case PM3865: Offset += PM3865_OFFSET; break; case PM3966: Offset += PM3966_OFFSET; break; } while (Offset) { (void)DPTI_decompress(); --Offset; } while (SGL[0]) { int c; char buffer[4]; Index = (unsigned char)( # if (defined(_DPT_STRICT_ALIGN)) buffer[0] = buffer[1] = buffer[2] = buffer[3] # else *((unsigned long *)buffer) # endif = 0); while ((Index < 4) && ((c = DPTI_decompress()) != -1)) { buffer[Index++] = c; } if (Index) { Length = sizeof(buffer); if (SGL[0] < sizeof(buffer)) { Length = SGL[0]; } osdBcopyOut ((void __FAR__ *)buffer, SGA[0], Length); SGA[0] += Length; if ((SGL[0] -= Length) == 0) { SGL[0] = SGL[1]; SGA[0] = SGA[1]; SGL[1] = SGL[2]; SGA[1] = SGA[2]; SGL[2] = SGL[3]; SGL[3] = 0L; } } if (c == -1) { break; } } } } # endif } while (++region < 4); return (retVal); } /* DPTI_FlashCommand */ #if (defined(osdAlloc)) /* * Calculate the base offset and length of the current referenced * Flash Region. */ STATIC unsigned long DPTI_getFlashOffset( IN Controller_t controller, IN unsigned long Offset, OUT unsigned char * Segments) { unsigned long sizeRegion[5]; unsigned Index; unsigned short Skew; Skew = (unsigned short)(Index = (unsigned)(sizeRegion[0] = 0L)); DPTI_FlashRegionSizes(controller, sizeRegion + 1); if (DPTI_BootFlags & FW_DNLDR_BTM) { sizeRegion[0] = DPTI_BootBlockSize(); } else { sizeRegion[1] += DPTI_BootBlockSize(); } /* * A realy special case, firmware is 16K,32K,64K,64K,... * on a PM3966 and ASR2005 which use a top loader Flash chip on the * bottom loader MIPS. */ if ((Offset < sizeRegion[1]) && (DPTI_current(controller)->MIPS)) { Skew = 16384; } /* * Loop through the regions, determining the base offset of the segment * and the size of the segment. */ do { unsigned long BaseRegion; unsigned long TopRegion; TopRegion = (sizeRegion[Index+1] += BaseRegion = sizeRegion[Index]); if (Offset < TopRegion) { OUT long flashOffset = BaseRegion + ((Offset - BaseRegion + Skew) & 0xFFFF0000) - Skew; if (BaseRegion > Offset) { if (Segments) { *Segments = (unsigned char)((unsigned short)BaseRegion >> 14) - (unsigned char)((unsigned short)Offset >> 14); } if (flashOffset < 0) { flashOffset = 0; } } else { sizeRegion[0] = 65536L - (unsigned long)Skew; if (flashOffset <= 0L) { flashOffset += (unsigned long)Skew; } else if ((flashOffset - BaseRegion) >= sizeRegion[0]) { /* fixup for all regions beyond the first */ Skew = 0; sizeRegion[0] = 65536L; } if (Segments) { if ((flashOffset + sizeRegion[0]) > TopRegion) { sizeRegion[0] = TopRegion - flashOffset; } *Segments = (unsigned char) (sizeRegion[0] >> 14); } } return (flashOffset); } /* Only Region 0 gets a Skew */ Skew = 0; } while (++Index < 4); if (Segments) { *Segments = 0; } return (sizeRegion[4]); } #endif /* osdAlloc */ /* * There is a possibility the `current' pointer could be affected by * a call to this routine, so make sure that you reissue a refresh of the * current pointer following this call if needed. */ STATIC int DPTI_eataToSpoof( IN Controller_t controller, IN eataCP_S __FAR__ * eata_P, IN OUT Callback_t callback) { OUT unsigned long Length = 0; unsigned char opCode; DPTI_Devices_S * current = DPTI_current(controller); DEBUGGER(); DEBUG_TAG(TAG_IN_DPTI_eataToSpoof); DEBUG_IN_X32(controller); DEBUG_IN_STRUCT(eata_P); DEBUG_IN_X32(callback); /* * Implement CP_SCSI_RESET */ if (eataCP_getFlags(eata_P) & CP_SCSI_RESET) { DPTI_resetBus(controller); /* * Fake the OK completion of the command by performing an EATA * based callback. */ { OUT eataSP_S Status; OUT eataSP_S __FAR__ * statusPointer; statusPointer = &Status; if (*(eataCP_getSpAddrPtr(eata_P)) != 0L) { unsigned long unPacked = osdEata4(eataCP_getSpAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); statusPointer = (eataSP_S __FAR__ *)osdEataVirt(unPacked); } osdBzero ((void *)statusPointer, sizeof(Status)); eataSP_setVCPaddr (statusPointer, eataCP_getVCPaddr(eata_P)); eataSP_setCtlrStatus(statusPointer, SP_EOC); if (callback != (Callback_t)NULL) { (*callback) (controller, (Status_t)statusPointer, (Sense_t)NULL); } } DEBUG_OUT_U32(1); DEBUG_TAG(TAG_OUT_DPTI_eataToSpoof); return (1); } if (current->changed) { DEBUG_TAG(TAG_IN_DPTI_refresh); DEBUG_IN_X32(controller); current->changed = current->valid = 0; DEBUG_TAG(TAG_OUT_DPTI_refresh); } if ((opCode = scInquiry_getOpCode(eataCP_getCDB(eata_P))) == SC_INQUIRY) { unsigned char buffer[255]; /* Must be 108 <= Size <= 255 */ unsigned char pageCode = scInquiry_getPageCode((scInquiry_S __FAR__ *) eataCP_getCDB(eata_P)); unsigned char PhysicalDeviceBaseInquiry = ((pageCode == 0) && ((eataCP_getFlags(eata_P) & CP_INTERPRET) == 0) && ((scInquiry_getLun(eataCP_getCDB(eata_P)) & FLG_SCSI_EVPD) == 0)); unsigned char OriginalLun = (unsigned char)-1; if ((eataCP_getDevAddr(eata_P) & 0x1F) == current->adapterID[ (eataCP_getDevAddr(eata_P) >> 5)]) { PhysicalDeviceBaseInquiry = 0; } /* * An inquiry to the first empty device slot should trigger an * adapter rescan. This could be either the physical or the logical * portion of a scan. This may not be the most reliable way of * detecting a system scan as devices that become missing may * mislead the system above us that they are still connected. It is * recommended that the caller use the DPTI_rescan entry point as * a means of advance warning that a rescan is about to occur. And * in turn, we will reward the user that issues a DPTI_rescan with the * speedup that we will not rescan if there is only intervening * Inquiries, Test Unit Ready, Request Sense and ReadCapacity SCSI * commands (preventing multiple scans). */ if (PhysicalDeviceBaseInquiry # if (!defined(osdClockTick) || !defined(osdCLOCKTICK)) && current->enableRescan # endif ) { unsigned char Found[8][128/8]; DPTI_check (current, controller); if (current->valid == 0) { current = DPTI_preloadTable(controller); } # if (defined(osdClockTick) && defined(osdCLOCKTICK)) if (current->lastScan && (current->lastScan < osdClockTick())) { # if (defined(DEBUG)) if (current->enableRescan == 0) { DEBUG_PUTS("Time enable rescan"); } # endif current->enableRescan = 1; } # endif /* * Find all the devices and set a bit mask of available * devices. */ osdBzero ((void *)Found, sizeof(Found)); { TID_t * Device; unsigned short NumberOfDevices; for (Device = current->TidTable, NumberOfDevices = current->numDevices; NumberOfDevices != 0; ++Device, --NumberOfDevices) { if (Device_isBus(Device) == 0) { Found[(Device_getBus(Device)&7)] [(Device_getTarget(Device)&0x78)>>3] |= 1 << (Device_getTarget(Device) & 7); } } } /* * Find all the controller devices, and set a bit mask too. */ { unsigned char Index = # if (MAX_HRT > 8) 8; # else MAX_HRT; # endif do { --Index; Found[Index][(current->adapterID[Index]&0x78)>>3] |= 1 << (current->adapterID[Index]&7); } while (Index); } /* * Search through the bit mask for the first empty slot */ { unsigned char Bus, Id, Target = ((char __FAR__ *)eata_P)[2]; /* Hack to get complete Target ID */ if ((Target & 31) != eataCP_getTarget(eata_P)) { Target = eataCP_getTarget(eata_P); } for (Bus = 0; Bus < (sizeof(Found)/sizeof(Found[0])); ++Bus) { for (Id = 0; Id < ((sizeof(Found[0])/sizeof(Found[0][0]))<<3); ++Id) { /* Is it the first empty device? */ if ((Found[Bus][Id>>3] & (1 << (Id&7))) == 0) { break; } } if (Id < ((sizeof(Found[0])/sizeof(Found[0][0]))<<3)) { break; } } if ((Bus == (unsigned char)eataCP_getBus(eata_P)) && (Id == Target)) { # if (defined(osdClockTick) && defined(osdCLOCKTICK)) current->lastScan = osdClockTick() + 10L*osdCLOCKTICK; if (current->enableRescan) # endif DPTI_rescan(controller); } } } /* * An Inquiry to a non-existent LUN when another LUN does * exist at that same ID requires us to spoof back the * `non-existent LUN' inquiry. We will first fill out * OriginalLun to be the LUN of an available device, then swap * that into the packet, then spoof the return with 0x7F at the * beginning to signal unavailable LUN after restoring the * original packet's lun. */ if (PhysicalDeviceBaseInquiry) { TID_t * Device; unsigned short NumberOfDevices; unsigned char Target = ((char __FAR__ *)eata_P)[2]; unsigned char Lun = ((char __FAR__ *)eata_P)[3]; /* Hack to get complete Target ID */ if ((Target & 31) != eataCP_getTarget(eata_P)) { Target = eataCP_getTarget(eata_P); } /* Hack to get complete Lun */ if ((Lun & 7) != eataCP_getLun(eata_P)) { Lun = eataCP_getLun(eata_P); } current = DPTI_current(controller); for (Device = current->TidTable, NumberOfDevices = current->numDevices; NumberOfDevices != 0; ++Device, --NumberOfDevices) { if ((Device_isBus(Device) == 0) && (Device_getBus(Device) == eataCP_getBus(eata_P)) && (Device_getTarget(Device) == Target)) { if (Device_getLun(Device) == Lun) { OriginalLun = (unsigned char)-1; break; } OriginalLun = (unsigned char)Device_getLun(Device); } } if (OriginalLun != (unsigned char)-1) { eataCP_setLun(eata_P, OriginalLun); ((char __FAR__ *)eata_P)[3] = OriginalLun; scInquiry_andLun(eataCP_getCDB(eata_P), ~FLG_SCSI_LUN); scInquiry_orLun(eataCP_getCDB(eata_P), OriginalLun << 5); OriginalLun = Lun; } } /* * PreLoad an *actual* inquiry result from the device to * be used to construct the spoofed inquiry result. */ if ((PhysicalDeviceBaseInquiry != 0) || ((eataCP_getFlags(eata_P) & CP_INTERPRET) != 0)) { { struct PrivateScbMessage { PRIVATE_SCSI_SCB_EXECUTE_MESSAGE i2o; unsigned char fill[(sizeof(I2O_SGE_SIMPLE_ELEMENT)*2) - sizeof(I2O_SG_ELEMENT)]; }; defAlignLong(struct PrivateScbMessage,Message); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE * Message_Ptr; unsigned long physAddr, physLength; unsigned long value; unsigned char Flags; UNREFERENCED_PARAMETER(((struct PrivateScbMessage *)Message)->i2o); UNREFERENCED_PARAMETER(((struct PrivateScbMessage *)Message)->fill); /* * Clears outgoing I2O packet. */ Message_Ptr = (PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *) DPTI_fillMessage(Message, sizeof(struct PrivateScbMessage)); /* * Save some basic currently unused characteristics * of the incoming packet. */ physAddr = *eataCP_getDataAddrPtr(eata_P); physLength = *eataCP_getDataLengthPtr(eata_P); Flags = eataCP_getFlags(eata_P); /* * Lets do a `regular' inquiry first */ scInquiry_setPageCode(eataCP_getCDB(eata_P), 0); scInquiry_andLun(eataCP_getCDB(eata_P), ~FLG_SCSI_EVPD); value = (unsigned long)osdVirtEata(buffer); value = osdEataPack(value); *(eataCP_getDataAddrPtr(eata_P)) = osdEata4(&value); value = sizeof(buffer); *(eataCP_getDataLengthPtr(eata_P)) = osdEata4(&value); scInquiry_setAllocLength(eataCP_getCDB(eata_P), sizeof(buffer)); eataCP_andFlags(eata_P, ~CP_SG_ADDR); /* * Convert packet, failure is `acceptable'. */ Length = (DPTI_eataToI2O (controller, eata_P, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr) == 0); /* * Resynch current because DPTI_eataToI2O could * change it */ current = DPTI_current(controller); if (Length) { /* eataToI2O success */ /* * Firmware folks perform this step if we were * talking to the Block Device, but since we * are conversing with the Physical device ... */ int retVal; unsigned char retry = (eataCP_getPhysical(eata_P)) ? 5 : 1; while (((retVal = DPTI_sendMessage (controller, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr)) != I2O_SCSI_HBA_DSC_SUCCESS) && (retVal != I2O_SCSI_HBA_DSC_SELECTION_TIMEOUT) && (--retry > 0)) { continue; } Length = (retVal == I2O_SCSI_HBA_DSC_SUCCESS); if (Length && ((eataCP_getFlags(eata_P) & CP_INTERPRET) != 0)) { unsigned short length = (unsigned short)( sdInquiry_getLength(buffer) + 5); if (length > sizeof(buffer)) { length = sizeof(buffer); } if (length > sizeof(DPTI_SpoofedInquiry)) { length = sizeof(DPTI_SpoofedInquiry); } current->raidNum = sdInquiry_getReserved2(buffer); sdInquiry_setReserved2(buffer, 0); osdBcopy ((void __FAR__ *)buffer, (void __FAR__ *)DPTI_SpoofedInquiry, length); } } /* * Restore my MMmmmminnnnnnndhdhdhdhd */ *(eataCP_getDataAddrPtr(eata_P)) = physAddr; *(eataCP_getDataLengthPtr(eata_P)) = physLength; eataCP_setFlags(eata_P, Flags); physLength = osdEata4(&physLength); /* * This is the largest transfer that Inquiry can support. */ if (physLength > 255) { physLength = 255; } scInquiry_setAllocLength(eataCP_getCDB(eata_P), (unsigned char)physLength); scInquiry_setPageCode(eataCP_getCDB(eata_P), pageCode); if (pageCode) { scInquiry_orLun(eataCP_getCDB(eata_P), FLG_SCSI_EVPD); } } /* LUN does not exist, restore the packet, spoof the response */ if (OriginalLun != (unsigned char)-1) { eataCP_setLun(eata_P, OriginalLun); ((char __FAR__ *)eata_P)[3] = OriginalLun; scInquiry_andLun(eataCP_getCDB(eata_P), ~FLG_SCSI_LUN); scInquiry_orLun(eataCP_getCDB(eata_P), OriginalLun << 5); sdInquiry_setPeripheral(buffer, PERIPH_TYPE | ((PERIPH_QUAL >> 1) & PERIPH_QUAL)); } /* * buffer now contains the `regular' inquiry response, now lets * tailor it for the EATA adapter response. */ switch(pageCode) { case 0x00: if ((eataCP_getFlags(eata_P) & CP_INTERPRET) != 0) { /* * Update any hard coded values to reflect the actual * adapter. */ struct { I2O_PARAM_RESULTS_LIST_HEADER Header; I2O_PARAM_READ_OPERATION_RESULT Read; I2O_UTIL_DDM_IDENTITY_SCALAR Info; } Buffer; if (DPTI_getParams (controller, 0, I2O_UTIL_DDM_IDENTITY_GROUP_NO, &Buffer.Header, sizeof(Buffer))) { /* * Default to 'DPT PM???4UW FW????' */ *((unsigned short *)(Buffer.Info.ModuleName+0)) = short_character_constant('D','P'); *((unsigned long *)(Buffer.Info.ModuleName+2)) = long_character_constant('T',' ','P','M'); *((unsigned long *)(Buffer.Info.ModuleName+6)) = long_character_constant('?','?','?','4'); *((unsigned long *)(Buffer.Info.ModuleName+10)) = long_character_constant('U','W','\0','\0'); *((unsigned short *)(Buffer.Info.ModuleRevLevel+0)) = short_character_constant('?','?'); *((unsigned long *)(Buffer.Info.ModuleRevLevel+2)) = long_character_constant('?','?','\0','\0'); } if (Length == 0) { osdBcopy (Buffer.Info.ModuleName + 4, sdInquiry_getProductID(buffer), 8); osdBcopy (Buffer.Info.ModuleName, sdInquiry_getVendorID(buffer), 4); osdBcopy (Buffer.Info.ModuleRevLevel, sdInquiry_getRevision(buffer), 4); } /* * Some software will use LAP1 if the revision is below * '07C0' ... We will substitute the higher ascii * character of 'O' in place of the '0' on the first * portion of the revision. */ if ((sdInquiry_getRevision(buffer)[0] == '0') && ((sdInquiry_getRevision(buffer)[1] < '7') || ((sdInquiry_getRevision(buffer)[1] == '7') && (sdInquiry_getRevision(buffer)[2] < 'C')))) { sdInquiry_getRevision(buffer)[0] = 'O'; } /* * Limit the length of the transaction. */ if ((Length = (unsigned)osdEata4( eataCP_getDataLengthPtr(eata_P))) > sdInquiry_size) { Length = sdInquiry_size; } } else if (Length != 0) { /* We have the Inquiry response */ unsigned char modeSense[8+6]; /* Hold onto the local response length */ unsigned char length; Length = 0; /* Set non-zero if picked up magic number */ /* * Try to get the Magic Number, but only if necessary. */ length = sdInquiry_getLength(buffer); if (((length >= 40) || (length < 5)) && ((length <= 90) || (length >= (sizeof(buffer)-5)))) { length = 91; } if ((((unsigned long)length + 5 + 12) <= osdEata4(eataCP_getDataLengthPtr(eata_P))) && (length < (unsigned)(sizeof(buffer) - 5 - 12)) /* Bug in I2O FW */ && (eataCP_getPhysical(eata_P))) { defAlignLong(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE,Message); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE * Message_Ptr; eataCP_S eata; unsigned long value; /* * Performed a regular inquiry to the device, * now modify it's results to include the * MAGIC number. */ /* * Now, get the Magic number for the drive. */ osdBcopy ((void __FAR__ *)eata_P, (void __FAR__ *)&eata, eataCP_size); # if (defined(_DPT_STRICT_ALIGN)) osdBzero ((void *)eataCP_getCDB(&eata), 12); # else ((unsigned long *)eataCP_getCDB(&eata))[2] = ((unsigned long *)eataCP_getCDB(&eata))[1] = ((unsigned long *)eataCP_getCDB(&eata))[0] = 0L; # endif /* * Clears outgoing I2O packet. */ Message_Ptr = (PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *) DPTI_fillMessage(Message, sizeof(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE)); /* * Set up outgoing packet. */ value = (unsigned long)osdVirtEata((void __FAR__ *) modeSense); value = osdEataPack(value); *(eataCP_getDataAddrPtr(&eata)) = osdEata4(&value); { unsigned short size; size = (unsigned short)( value = sizeof(modeSense)); # if (defined(_DPT_STRICT_ALIGN)) *((char *)scModeSense_getAllocLengthPtr( eataCP_getCDB(&eata))) = (char)size; *((char *)scModeSense_getAllocLengthPtr( eataCP_getCDB(&eata))) = (char)(size >> 8); # else *(scModeSense_getAllocLengthPtr( eataCP_getCDB(&eata))) = osdLocal2(&size); # endif } *(eataCP_getDataLengthPtr(&eata)) = osdEata4(&value); scModeSense_setOpCode(eataCP_getCDB(&eata), SC_MODE_SENSE); scModeSense_setLun(eataCP_getCDB(&eata), (eataCP_getLun(&eata) << 5) | FLG_MDS_DBD); scModeSense_setPageCode(eataCP_getCDB(&eata), 0x32); eataCP_setFlags(&eata, CP_INTERPRET|CP_DATA_IN); /* * Convert and run MODE_SENSE 32 packet packet */ Length = (DPTI_eataToI2O (controller, &eata, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr) == 0); /* Resynch current, DPTI_eataToI2O changes it */ current = DPTI_current(controller); if (Length) { /* eataToI2O success */ Length = (DPTI_sendMessage (controller, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr) == I2O_SCSI_HBA_DSC_SUCCESS); } } /* * If we did get the MAGIC number, lets incorporate it */ if (Length != 0) { unsigned char * cp; cp = buffer + 5 + length; sdInquiry_setLength(buffer, length + 12); /* * DPTMAGIC */ # if (defined(_DPT_STRICT_ALIGN)) *(cp++) = 'D'; *(cp++) = 'P'; *(cp++) = 'T'; *(cp++) = 'M'; *(cp++) = 'A'; *(cp++) = 'G'; *(cp++) = 'I'; *(cp++) = 'C'; *(cp++) = modeSense[sizeof(modeSense) - sizeof(long)]; *(cp++) = modeSense[sizeof(modeSense) - sizeof(long) + 1]; *(cp++) = modeSense[sizeof(modeSense) - sizeof(long) + 2]; *(cp++) = modeSense[sizeof(modeSense) - sizeof(long) + 3]; # else *((unsigned long *)cp) = long_character_constant('D','P','T','M'); cp += sizeof(unsigned long); *((unsigned long *)cp) = long_character_constant('A','G','I','C'); cp += sizeof(unsigned long); *((unsigned long *)cp) = *((unsigned long *) &modeSense[sizeof(modeSense)-sizeof(long)]); # endif } if ((Length = (unsigned)osdEata4( eataCP_getDataLengthPtr(eata_P))) > sizeof(buffer)) { Length = sizeof(buffer); } } else { /* * If the above Inquiry failed, then lets retry it * for the specific device through `regular' flow. * This saves us from creating additional code * that fakes a command failure back up the chain. */ break; } if (Length < (unsigned long)(sdInquiry_getLength(buffer)+5)) { sdInquiry_setLength(buffer, (unsigned char)(Length - 5)); } { unsigned long unPacked; unPacked = osdEata4(eataCP_getDataAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); # if (defined(_DPT_EataVirtual)) osdBcopy ((void __FAR__ *)buffer, (void __FAR__ *) osdEataVirt(unPacked), (unsigned short)Length); # else osdBcopyOut ((void __FAR__ *)buffer, osdEataPhys(unPacked), (unsigned short)Length); # endif } break; case 0xC1: /* * Update any hard coded values to reflect the actual * adapter. We only get here if it is an Adapter Inquiry. */ osdBzero (buffer, eataRdConfig_size); osdBcopy (DPTI_SpoofedRdConfig, (void __FAR__ *)buffer, sizeof(DPTI_SpoofedRdConfig)); eataRdConfig_orMaxChanID(buffer, current->maxBus << 5); eataRdConfig_setMaxLun(buffer, current->maxLun); eataRdConfig_getScsiIDs(buffer)[3] = current->adapterID[0]; if (current->maxBus > 0) { eataRdConfig_getScsiIDs(buffer)[2] = current->adapterID[1]; } if (current->maxBus > 1) { eataRdConfig_getScsiIDs(buffer)[1] = current->adapterID[2]; } if (current->maxBus > 2) { eataRdConfig_getScsiIDs(buffer)[0] = current->adapterID[3]; } eataRdConfig_setRaidNum(buffer, current->raidNum); eataRdConfig_setIRQ(buffer, getIrqNum(current->controller)); eataRdConfig_andFlag2(buffer, ~0xF); eataRdConfig_orFlag2(buffer, eataRdConfig_getIRQ(buffer) & 0xF); /* * Limit the length of the transaction. */ if ((Length = (unsigned)osdEata4( eataCP_getDataLengthPtr(eata_P))) > eataRdConfig_size) { Length = eataRdConfig_size; } if (Length < eataRdConfig_size) { sdInquiry_setLength(&buffer, (unsigned char)(Length - 5)); } { unsigned long unPacked; unPacked = osdEata4(eataCP_getDataAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); # if (defined(_DPT_EataVirtual)) osdBcopy ((void __FAR__ *)buffer, (void __FAR__ *) osdEataVirt(unPacked), (unsigned short)Length); # else osdBcopyOut ((void __FAR__ *)buffer, osdEataPhys(unPacked), (unsigned short)Length); # endif } break; } } } else if (eataCP_getFlags(eata_P) & CP_INTERPRET) { switch (opCode) { case 0xC1: /* Flash Commands */ { unsigned long Offset; # if (defined(osdAlloc)) static unsigned char __FAR__ * flashBuffers[4]; static unsigned long flashOffset; static unsigned char flashSegments; # endif if (scFlash_getAction(eataCP_getCDB(eata_P)) != FLASH_CMD_STATUS) { # if (defined(DEBUG)) if (current->enableRescan == 0) { DEBUG_PUTS("Flash enable rescan"); } # endif current->enableRescan = 1; /* Reset, cause rescan */ } /* * Flash organization on an I2O card is typically: * Region0 = 768KB - 16KB (BC000) 2554/3754/2564/3757 * = 1488KB - 16KB (170000) 2865 * = 1536KB - 16KB (17C000) 3966 * Region1 = 256KB (40000) 2554/3754/2564/3757 * = 512KB (80000) 2865/3966 * Region2 = 8KB (2000) * Region3 = 8KB (2000) N/A for serial number * A contiguous image of Region0 + 16KB + Region1 + Region2 * will divide up into the three regions, which will flash * separately here. So, we need to first get an idea about the * sizes of the three flash regions, keep in mind that Region0 * is short by 16KB. */ /* * Now perform the commands. */ Offset = osdLocal4(scFlash_getAddressPtr(eataCP_getCDB(eata_P))); Length = osdEata4(eataCP_getDataLengthPtr(eata_P)); switch (scFlash_getAction(eataCP_getCDB(eata_P))) { case FLASH_CMD_FLASH_MODE: case FLASH_CMD_ERASE: current->flashMode = 1; Length = 1; break; case FLASH_CMD_RESTART: case FLASH_CMD_TST_RESTART: current->flashMode = 0; case FLASH_CMD_WRITE_DONE: Length = 1; # if (defined(osdAlloc)) if (flashBuffers[0] == (unsigned char __FAR__ *)NULL) { break; } /* Flush any existing buffers */ if (DPTI_FlashCommand(controller, PRIVATE_FLASH_REGION_WRITE, flashOffset, osdPhys(flashBuffers[0]), (unsigned short)16384, osdPhys(flashBuffers[1]), (unsigned short)((flashSegments > 1) ? (unsigned short)16384 : (unsigned short)0), osdPhys(flashBuffers[2]), (unsigned short)((flashSegments > 2) ? (unsigned short)16384 : (unsigned short)0), osdPhys(flashBuffers[3]), (unsigned short)((flashSegments > 3) ? (unsigned short)16384 : (unsigned short)0)) != I2O_HBA_DSC_SUCCESS) { Length = (unsigned long)-1L; } # if (defined(_DPT_32_BIT_ALLOC)) osdFree(flashBuffers[0], 65536); flashBuffers[3] = flashBuffers[2] = flashBuffers[1] = flashBuffers[0] = (unsigned char __FAR__ *)NULL; # else osdFree(flashBuffers[3], 16384); flashBuffers[3] = (unsigned char __FAR__ *)NULL; osdFree(flashBuffers[2], 16384); flashBuffers[2] = (unsigned char __FAR__ *)NULL; osdFree(flashBuffers[1], 16384); flashBuffers[1] = (unsigned char __FAR__ *)NULL; osdFree(flashBuffers[0], 16384); flashBuffers[0] = (unsigned char __FAR__ *)NULL; # endif # endif break; case FLASH_CMD_WRITE: /* * Since the flash writing must deal with 64KB blocks * of data at a time, we must buffer up the requests here * until we move into `another' region, or until we send * the flash done command. */ # if (defined(osdAlloc)) if (((((unsigned short)DPTI_getFlashOffset(controller, Offset, (unsigned char *)NULL) & 0xFFFF) == 0) || (Offset == 0)) && (Length >= 65536L)) # endif { unsigned long unPacked; unPacked = osdEata4(eataCP_getDataAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); /* This can be done with no buffering */ if (DPTI_FlashCommand(controller, PRIVATE_FLASH_REGION_WRITE, Offset, osdEataPhys(unPacked), Length, 0L, 0, 0L, 0, 0L, 0) != I2O_HBA_DSC_SUCCESS) { Length = (unsigned long)-1L; } break; } # if (defined(osdAlloc)) { unsigned short residual; # if (defined(_DPT_EataVirtual)) unsigned char __FAR__ * Address; # else unsigned long Address; # endif unsigned long newFlashOffset; unsigned char newFlashSegments; /* * Allocate four 16K buffers (to recognize limits in * how osdAlloc may work). */ newFlashOffset = DPTI_getFlashOffset (controller, Offset, &newFlashSegments); if (flashBuffers[0] == (unsigned char __FAR__ *)NULL) { flashOffset = newFlashOffset; flashSegments = newFlashSegments; # if (defined(_DPT_32_BIT_ALLOC)) if ((flashBuffers[0] = (unsigned char __FAR__ *) osdAlloc(65536)) == (unsigned char __FAR__ *)NULL) { Length = (unsigned long)-1L; break; } flashBuffers[3] = ( flashBuffers[2] = ( flashBuffers[1] = flashBuffers[0] + 16384) + 16384) + 16384; # else if (((flashBuffers[0] = (unsigned char __FAR__ *) osdAlloc(16384)) == (unsigned char __FAR__ *)NULL) || ((flashBuffers[1] = (unsigned char __FAR__ *) osdAlloc(16384)) == (unsigned char __FAR__ *)NULL) || ((flashBuffers[2] = (unsigned char __FAR__ *) osdAlloc(16384)) == (unsigned char __FAR__ *)NULL) || ((flashBuffers[3] = (unsigned char __FAR__ *) osdAlloc(16384)) == (unsigned char __FAR__ *)NULL)) { if (flashBuffers[2]) { osdFree(flashBuffers[2], 16384); flashBuffers[2] = (unsigned char __FAR__ *)NULL; } if (flashBuffers[1]) { osdFree(flashBuffers[1], 16384); flashBuffers[1] = (unsigned char __FAR__ *)NULL; } if (flashBuffers[0]) { osdFree(flashBuffers[0], 16384); flashBuffers[0] = (unsigned char __FAR__ *)NULL; } Length = (unsigned long)-1L; break; } # endif /* Fill it with something that makes sense? */ (void)DPTI_FlashCommand(controller, PRIVATE_FLASH_REGION_READ, flashOffset, osdPhys(flashBuffers[0]), (unsigned short)16384, osdPhys(flashBuffers[1]), (unsigned short)16384, osdPhys(flashBuffers[2]), (unsigned short)16384, osdPhys(flashBuffers[3]), (unsigned short)16384); } /* * If the current buffer points to a different 64KB page, * then flush it. */ if (flashOffset != newFlashOffset) { /* Flush the current buffers */ if (DPTI_FlashCommand(controller, PRIVATE_FLASH_REGION_WRITE, flashOffset, osdPhys(flashBuffers[0]), (unsigned short)16384, osdPhys(flashBuffers[1]), (unsigned short)((flashSegments > 1) ? (unsigned short)16384 : (unsigned short)0), osdPhys(flashBuffers[2]), (unsigned short)((flashSegments > 2) ? (unsigned short)16384 : (unsigned short)0), osdPhys(flashBuffers[3]), (unsigned short)((flashSegments > 3) ? (unsigned short)16384 : (unsigned short)0)) != I2O_SCSI_HBA_DSC_SUCCESS) { Length = (unsigned long)-1L; break; } /* Initialize it now */ flashOffset = newFlashOffset; flashSegments = newFlashSegments; (void)DPTI_FlashCommand(controller, PRIVATE_FLASH_REGION_READ, flashOffset, osdPhys(flashBuffers[0]), (unsigned short)16384, osdPhys(flashBuffers[1]), (unsigned short)16384, osdPhys(flashBuffers[2]), (unsigned short)16384, osdPhys(flashBuffers[3]), (unsigned short)16384); } /* * Copy into each segment carefully. */ residual = (unsigned short)Length; { unsigned long unPacked; unPacked = osdEata4(eataCP_getDataAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); Address = # if (defined(_DPT_EataVirtual)) (unsigned char __FAR__ *)osdEataVirt(unPacked); # else osdEataPhys(unPacked); # endif } while (residual) { unsigned short count = residual; unsigned short miniOffset = (unsigned short)Offset - (unsigned short)flashOffset; if ((16384 - (miniOffset & 0x3FFF)) < count) { count = 16384 - (miniOffset & 0x3FFF); } # if (defined(_DPT_EataVirtual)) osdBcopy (Address, (void __FAR__ *)(flashBuffers[ miniOffset >> 14] + (miniOffset & 0x3FFF)), count); # else osdBcopyIn (Address, (void __FAR__ *)(flashBuffers[ miniOffset >> 14] + (miniOffset & 0x3FFF)), count); # endif residual -= count; Offset += count; Address += count; } } break; # endif case FLASH_CMD_READ: /* * We have not flashed the code (yet), but need to trick the * Write with Verify sequence that we have the correct data. */ # if (defined(osdAlloc)) if ((flashBuffers[0] != (unsigned char __FAR__ *)NULL) && (flashOffset == DPTI_getFlashOffset(controller, Offset, (unsigned char *)NULL)) && ((Offset - flashOffset + Length) <= 65536L)) { /* * Copy into each segment carefully. */ unsigned short residual = (unsigned short)Length; # if (defined(_DPT_EataVirtual)) unsigned char __FAR__ * Address; # else unsigned long Address; # endif { unsigned long unPacked; unPacked = osdEata4(eataCP_getDataAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); Address = # if (defined(_DPT_EataVirtual)) (unsigned char __FAR__ *)osdEataVirt(unPacked); # else osdEataPhys(unPacked); # endif } while (residual) { unsigned short count = residual; /* Only concerned about difference on bottom 16 bits */ unsigned short miniOffset = (unsigned short)Offset - (unsigned short)flashOffset; /* * upper 2 bits of 16 bit offset is index into array. * bottom 14 bits is index into buffer. */ if ((16384 - (miniOffset & 0x3FFF)) < count) { count = 16384 - (miniOffset & 0x3FFF); } # if (defined(_DPT_EataVirtual)) osdBcopy ((void __FAR__ *)(flashBuffers[ miniOffset >> 14] + (miniOffset & 0x3FFF)), Address, count); # else osdBcopyOut ((void __FAR__ *)(flashBuffers[ miniOffset >> 14] + (miniOffset & 0x3FFF)), Address, count); # endif residual -= count; Offset += count; Address += count; } break; } # endif { unsigned long unPacked; unPacked = osdEata4(eataCP_getDataAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); if (DPTI_FlashCommand(controller, PRIVATE_FLASH_REGION_READ, Offset, osdEataPhys(unPacked), Length, 0L, 0, 0L, 0, 0L, 0) != I2O_SCSI_HBA_DSC_SUCCESS) { Length = (unsigned long)-1L; } } break; case FLASH_CMD_STATUS: { dptFlashStatus_S status; unsigned short fwType = 2554; /* Pretty hokey .... */ unsigned long sizeRegion[4]; unsigned long size; # if (defined(SPOOF_FLASH_BOOT_BLOCK)) switch (DPTI_getType(controller)) { case PM2564: fwType = 2564; break; case PM3754: fwType = 3754; break; case PM3757: fwType = 3757; break; case PM2865: fwType = 2865; break; case PM3865: fwType = 3865; break; case PM3966: fwType = 3966; break; } # endif DPTI_FlashRegionSizes(controller, sizeRegion); size = sizeRegion[0] += DPTI_BootBlockSize(); /* Boot block too */ osdBzero ((void *)&status, sizeof(status)); dptFlashStatus_setFlags1(&status, FLASH_FLG_FW_CHKSUM | FLASH_FLG_BOOT_CHKSUM); # if (FLASH_FLG_FLASH_MODE == 1) dptFlashStatus_orFlags1(&status,current->flashMode); # else if (current->flashMode) { dptFlashStatus_orFlags1(&status,FLASH_FLG_FLASH_MODE); } # endif dptFlashStatus_setFWtype(&status,osdLocal2(&fwType)); size = osdLocal4(&size); dptFlashStatus_setBurnSize(&status,size); size = sizeRegion[0] + sizeRegion[1] + sizeRegion[2] + sizeRegion[3]; size = osdLocal4(&size); dptFlashStatus_setFlashSize(&status,size); fwType = 8; fwType = osdLocal2(&fwType); dptFlashStatus_setProgramTime(&status,fwType); dptFlashStatus_setEraseTime(&status,fwType); Length = osdEata4(eataCP_getDataLengthPtr(eata_P)); if (Length > sizeof(status)) { Length = sizeof(status); } { unsigned long unPacked; unPacked = osdEata4(eataCP_getDataAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); # if (defined(_DPT_EataVirtual)) osdBcopy ((void __FAR__ *)&status, (void __FAR__ *) osdEataVirt(unPacked), (unsigned short)Length); # else osdBcopyOut ((void __FAR__ *)&status, osdEataPhys(unPacked), (unsigned short)Length); # endif } } break; } } break; case SC_TEST_READY: ++Length; break; case SC_READ_BUFFER: case SC_WRITE_BUFFER: # if (defined(DEBUG)) if (current->enableRescan == 0) { DEBUG_PUTS("RW Buffer enable rescan"); } # endif current->enableRescan = 1; /* Reset, cause rescan */ /* * Blame it on Canada. * Firmware used to blinkLED on this, we now let the command * through. */ /* Length = (unsigned)osdEata4(eataCP_getDataLengthPtr(eata_P)); */ break; case SC_MODE_SELECT: case SC_MODE_SELECT0: { unsigned long unPacked; unPacked = osdEata4(eataCP_getDataAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); if ((getU1(osdEataVirt(unPacked), sizeof(modeHeader_S)) & 0x3F) != 0x2E) { /* In case this resulted in a RAID creation */ DEBUG_ALLOCATE_STRING(create_string,"Array Create"); DEBUG_OUT_STRING(create_string); current->changed = 1; current->enableRescan = 0; /* ignore rescan */ } else { DEBUG_ALLOCATE_STRING(select_string,"Mode Select"); DEBUG_OUT_STRING(select_string); } } DEBUG_TAG(TAG_OUT_DPTI_eataToSpoof); return (-1); case SC_MODE_SENSE: #if 0 if ((scModeSense_getPageCode(eataCP_getCDB(eata_P))&0x3F)!=0x2E) { { DEBUG_ALLOCATE_STRING(sense_string,"Mode Sense"); DEBUG_OUT_STRING(sense_string); } DEBUG_TAG(TAG_OUT_DPTI_eataToSpoof); return(-1); } if (osdLocal2(scModeSense_getAllocLengthPtr(eataCP_getCDB(eata_P))) > 138) { unsigned short length = 138; *(scModeSense_getAllocLengthPtr(eataCP_getCDB(eata_P))) = osdLocal2(&length); DEBUG_ALLOCATE_STRING(limit_string,"NVRAM Limit"); DEBUG_OUT_STRING(limit_string); } else { DEBUG_ALLOCATE_STRING(NVRAM_string,"NVRAM Read"); DEBUG_OUT_STRING(NVRAM_string); } DEBUG_TAG(TAG_OUT_DPTI_eataToSpoof); return (-1); #endif case SC_MODE_SENSE0: #if 0 if ((scModeSense6_getPageCode(eataCP_getCDB(eata_P))&0x3F)!=0x2E) { { DEBUG_ALLOCATE_STRING(sense_string,"Mode Sense"); DEBUG_OUT_STRING(sense_string); } DEBUG_TAG(TAG_OUT_DPTI_eataToSpoof); return(-1); } if (scModeSense6_getAllocLength(eataCP_getCDB(eata_P)) > 134) { scModeSense6_setAllocLength(eataCP_getCDB(eata_P), 134); DEBUG_ALLOCATE_STRING(limit_string,"NVRAM Limit"); DEBUG_OUT_STRING(limit_string); } if (osdEata4(eataCP_getDataLengthPtr(eata_P)) > 134) { unsigned long length = 134; *(eataCP_getDataLengthPtr(eata_P)) = osdEata4(&length); DEBUG_ALLOCATE_STRING(transfer_string,"Limit Transfer"); DEBUG_OUT_STRING(transfer_string); } else { DEBUG_ALLOCATE_STRING(NVRAM_string,"NVRAM Read"); DEBUG_OUT_STRING(NVRAM_string); } DEBUG_TAG(TAG_OUT_DPTI_eataToSpoof); return (-1); #endif case SC_LOG_SENSE: /* Arrays don't change from a sense */ case SC_DPT_MFC: /* Alarm On-Off, Set RAID ID etc. */ break; default: # if (defined(DEBUG)) if (current->enableRescan == 0) { DEBUG_PUTS("Interpret OpCode="); DEBUG_OUT_X16(opCode); DEBUG_PUTS(" enable Rescan"); } # endif current->enableRescan = 1; /* Reset, cause rescan */ break; } } else if (eataCP_getPhysical(eata_P)) { switch (opCode) { case SC_READ_BUFFER: case SC_WRITE_BUFFER: /* * Blame it on Canada. * Firmware used to blinkLED on this, we now let the * command through. */ /* Length = (unsigned)osdEata4(eataCP_getDataLengthPtr(eata_P)); */ /* FALLTHRU */ default: # if (defined(DEBUG)) if (current->enableRescan == 0) { DEBUG_PUTS("Interpret OpCode="); DEBUG_OUT_X16(opCode); DEBUG_PUTS(" enable Rescan"); } # endif current->enableRescan = 1; /* Reset, cause rescan */ /* FALLTHRU */ case SC_TEST_READY: case SC_READ_CAPACITY: case SC_REQ_SENSE: /* case SC_INQUIRY: */ case SC_MODE_SENSE: case SC_MODE_SENSE0: case SC_READ: break; } } else { /* Logical Accesses */ switch (opCode) { default: # if (defined(DEBUG)) if (current->enableRescan == 0) { DEBUG_PUTS("Logical OpCode="); DEBUG_OUT_X16(opCode); DEBUG_PUTS(" enable Rescan"); } # endif current->enableRescan = 1; /* Reset, cause rescan */ case SC_TEST_READY: case SC_READ_CAPACITY: case SC_REQ_SENSE: case SC_READ: /* case SC_INQUIRY: */ break; } } if ((Length == 0) && (current->valid == 0) && (controller == current->controller)) { (void)DPTI_preloadTable(controller); } if (Length == 0) { { DEBUG_ALLOCATE_STRING(passthrough_string,"Passthrough"); DEBUG_OUT_STRING(passthrough_string); } DEBUG_TAG(TAG_OUT_DPTI_eataToSpoof); return (-1); } /* * Fake the OK completion of the command by performing an EATA * based callback. */ { OUT eataSP_S Status; OUT eataSP_S __FAR__ * statusPointer; long length; statusPointer = &Status; if (*(eataCP_getSpAddrPtr(eata_P)) != 0L) { unsigned long unPacked = osdEata4(eataCP_getSpAddrPtr(eata_P)); unPacked = osdEataUnpack(unPacked); statusPointer = (eataSP_S __FAR__ *)osdEataVirt(unPacked); } osdBzero ((void *)statusPointer, sizeof(Status)); eataSP_setVCPaddr (statusPointer, eataCP_getVCPaddr(eata_P)); eataSP_setCtlrStatus(statusPointer, SP_EOC); if (Length == (unsigned long)-1L) { eataSP_setScsiStatus(statusPointer, SERR_CHECK_CONDITION); Length = 1; } if ((length = osdEata4(eataCP_getDataLengthPtr(eata_P))-Length) > 0) { *(eataSP_getResiduePtr(statusPointer)) = osdEata4(&length); } if (callback != (Callback_t)NULL) { (*callback) (controller, (Status_t)statusPointer, (Sense_t)NULL); } } DEBUG_OUT_U32(Length); DEBUG_TAG(TAG_OUT_DPTI_eataToSpoof); return (Length); } /* DPTI_eataToSpoof */ /* * EATA like entry point. Note, current *could* be affected by a call * to this routine, so if called internally, ensure that you reissue the * refresh of the local current pointer if needed. */ #if defined __GNUC__ PUBLIC int DPTI_startEataCp __P (( IN Controller_t controller, IN OUT eataCP_S __FAR__ * packet, IN OUT Callback_t callback)) #else PUBLIC int DPTI_startEataCp ( IN Controller_t controller, IN OUT eataCP_S __FAR__ * packet, IN OUT Callback_t callback) #endif { /* Can *not* handle more than NUM_SG scatter gather elements */ struct PrivateScsiScbMessage { PRIVATE_SCSI_SCB_EXECUTE_MESSAGE i2o; # if (defined(NUM_SG)) # if (NUM_SG > 1) unsigned char fill[sizeof(I2O_SGE_SIMPLE_ELEMENT)*NUM_SG - sizeof(I2O_SG_ELEMENT)]; # endif # else unsigned char fill[sizeof(I2O_SGE_SIMPLE_ELEMENT)*2 - sizeof(I2O_SG_ELEMENT)]; # endif }; defAlignLong(struct PrivateScsiScbMessage, Message); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE * Message_Ptr; struct convertCallback * placeHolder; UNREFERENCED_PARAMETER(((struct PrivateScsiScbMessage *)Message)->i2o); UNREFERENCED_PARAMETER(((struct PrivateScsiScbMessage *)Message)->fill); DEBUGGER(); /* * Record commands issued to us */ DEBUG_TAG(TAG_IN_DPTI_startEataCp); DEBUG_IN_X32(controller); DEBUG_IN_STRUCT(packet); DEBUG_IN_X32(callback); if (DPTI_eataToSpoof (controller, packet, callback) > 0) { { DEBUG_ALLOCATE_STRING(spoof_string,"Spoofed"); DEBUG_OUT_STRING(spoof_string); } DEBUG_TAG(TAG_OUT_DPTI_startEataCp); return (0); } /* * Clears outgoing I2O packet. */ Message_Ptr = (PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *) DPTI_fillMessage(Message, sizeof(struct PrivateScsiScbMessage)); /* * Convert packet from EATA to I2O and let the adapter deal with it. */ if (DPTI_eataToI2O (controller, packet, (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)Message_Ptr) != 0) { eataSP_S Status; eataSP_S __FAR__ * statusPointer; statusPointer = &Status; if (*(eataCP_getSpAddrPtr(packet)) != 0L) { unsigned long unPacked; # if (defined(DEBUG_OUTCALLS)) DEBUG_PUTS("osdVirt("); DEBUG_NUMBER((unsigned long)osdEata4( eataCP_getSpAddrPtr(packet)),16,0); DEBUG_PUTS(")="); # endif unPacked = osdEata4(eataCP_getSpAddrPtr(packet)); unPacked = osdEataUnpack(unPacked); statusPointer = (eataSP_S __FAR__ *)osdEataVirt(unPacked); # if (defined(DEBUG_OUTCALLS)) DEBUG_NUMBER((unsigned long)statusPointer,16,0); DEBUG_PUTS("\r\n"); # endif } # if (defined(DEBUG_OUTCALLS)) DEBUG_PUTS("osdBzero("); DEBUG_NUMBER((unsigned long)statusPointer,16,0); DEBUG_PUTS(","); DEBUG_NUMBER(sizeof(Status),10,0); DEBUG_PUTS(")\r\n"); # endif osdBzero ((void *)statusPointer, sizeof(Status)); eataSP_setVCPaddr (statusPointer, eataCP_getVCPaddr(packet)); eataSP_setCtlrStatus(statusPointer, HERR_SEL_TIMEOUT | SP_EOC); if (callback != (Callback_t)NULL) { # if (defined(DEBUG_OUTCALLS)) DEBUG_PUTS("(*"); DEBUG_NUMBER((unsigned long)callback,16,0); DEBUG_PUTS(")("); DEBUG_NUMBER(controller,16,0); DEBUG_PUTS(","); DEBUG_NUMBER((unsigned long)statusPointer,16,0); DEBUG_PUTS(",0)\r\n"); # endif (*callback) (controller, (Status_t)statusPointer, (Sense_t)NULL); } /* * Timeout */ { DEBUG_ALLOCATE_STRING(timeout_string,"Selection_Timeout"); DEBUG_OUT_STRING(timeout_string); } DEBUG_TAG(TAG_OUT_DPTI_startEataCp); return (I2O_SCSI_HBA_DSC_SELECTION_TIMEOUT); } /* * Allocate a callback placeholder for the commands issued to the * adapter. */ # if (defined(NUM_CALLBACK)) placeHolder = DPTI_convertCallbackList; # if (NUM_CALLBACK > 1) while (placeHolder->VCPaddr) { if (++placeHolder >= &DPTI_convertCallbackList[NUM_CALLBACK]) { DEBUG_ALLOCATE_STRING(failed_string,"Failed"); DEBUG_OUT_STRING(failed_string); DEBUG_TAG(TAG_OUT_DPTI_startEataCp); return (-1); } } # else if (placeHolder->VCPaddr != 0L) { DEBUG_ALLOCATE_STRING(failed_string,"Failed"); DEBUG_OUT_STRING(failed_string); DEBUG_TAG(TAG_OUT_DPTI_startEataCp); return (-1); } # endif if (eataCP_getVCPaddr(packet) == 0L) { eataCP_setVCPaddr(packet, (unsigned long)-1L); } # else pushInterrupts (); disableInterrupts (); if (DPTI_convertCallbackList) { placeHolder = DPTI_convertCallbackList; DPTI_convertCallbackList = placeHolder->next; popInterrupts (); } else { popInterrupts (); placeHolder = osdAlloc(sizeof(struct convertCallback)); } # endif placeHolder->VCPaddr = eataCP_getVCPaddr(packet); placeHolder->callback = callback; placeHolder->status = (eataSP_S __FAR__ *)NULL; placeHolder->sense = (sdRequestSense_S __FAR__ *)NULL; placeHolder->senseLength = 0; if (*(eataCP_getSpAddrPtr(packet)) != 0L) { unsigned long unPacked; unPacked = osdEata4(eataCP_getSpAddrPtr(packet)); unPacked = osdEataUnpack(unPacked); placeHolder->status = (eataSP_S __FAR__ *)osdEataVirt(unPacked); } if ((eataCP_getFlags(packet) & CP_REQ_SENSE) && (eataCP_getReqSenseLen(packet) > 0)) { unsigned long unPacked; unPacked = osdEata4(eataCP_getReqSenseAddrPtr(packet)); unPacked = osdEataUnpack(unPacked); placeHolder->sense = (sdRequestSense_S __FAR__ *)osdEataVirt(unPacked); placeHolder->senseLength = eataCP_getReqSenseLen(packet); } /* * The VCP is embedded as part of the placeHolder, so lets override the * VCP that was placed into TransactionContext by DPTI_eataToI2O for * a call to DPTI_convertCallback. */ I2O_PRIVATE_MESSAGE_FRAME_setTransactionContext( &Message_Ptr->PrivateMessageFrame, (unsigned long)placeHolder); /* * Synchronous operation? */ if (callback == (Callback_t)NULL) { volatile unsigned short Status; int retval; placeHolder->callback = (Callback_t)DPTI_eataSynchronousCallback; placeHolder->VCPaddr = (unsigned long)(void __FAR__ *)&Status; Status = (unsigned short)-1; DEBUG_TAG(TAG_IN_osdStartI2OCp); DEBUG_IN_X32(controller); DEBUG_IN_STRUCT(Message_Ptr); DEBUG_IN_X32(DPTI_convertCallback); retval = osdStartI2OCp (controller, (OutGoing_t)Message_Ptr, (Callback_t)DPTI_convertCallback); DEBUG_OUT_S32(retval); DEBUG_TAG(TAG_OUT_osdStartI2OCp); if (retval >= 0) { while (Status == (unsigned short)-1) { continue; } } else { /* * Free up the placeholder. */ # if (defined(NUM_CALLBACK)) placeHolder->VCPaddr = 0L; # else pushInterrupts (); disableInterrupts (); placeHolder->next = DPTI_convertCallbackList; DPTI_convertCallbackList = placeHolder; popInterrupts (); # endif } /* * Update the VCP so that it reflects the incoming one, just in * case. */ if (*(eataCP_getSpAddrPtr(packet)) != 0L) { unsigned long unPacked; unPacked = osdEata4(eataCP_getSpAddrPtr(packet)); unPacked = osdEataUnpack(unPacked); unPacked = (unsigned long)osdEataVirt(unPacked); eataSP_setVCPaddr((eataSP_S *)unPacked,eataCP_getVCPaddr(packet)); eataSP_setCtlrStatus((eataSP_S *)unPacked, SP_EOC | (Status >> 8)); eataSP_setScsiStatus((eataSP_S *)unPacked, Status); } Status &= 0x7FFF; /* SP_EOC masked out */ DEBUG_OUT_X16(Status); DEBUG_TAG(TAG_OUT_DPTI_startEataCp); return (Status); } /* * Now spiiiiiittttt */ { int retval; DEBUG_TAG(TAG_IN_osdStartI2OCp); DEBUG_IN_X32(controller); DEBUG_IN_STRUCT(Message_Ptr); DEBUG_IN_X32(DPTI_convertCallback); retval = osdStartI2OCp (controller, (OutGoing_t)Message_Ptr, (Callback_t)DPTI_convertCallback); if (retval < 0) { /* * Free up the placeholder. */ # if (defined(NUM_CALLBACK)) placeHolder->VCPaddr = 0L; # else pushInterrupts (); disableInterrupts (); placeHolder->next = DPTI_convertCallbackList; DPTI_convertCallbackList = placeHolder; popInterrupts (); # endif } DEBUG_OUT_S32(retval); DEBUG_TAG(TAG_OUT_osdStartI2OCp); DEBUG_OUT_S32(retval); DEBUG_TAG(TAG_OUT_DPTI_startEataCp); return (retval); } } /* DPTI_startEataCp */ raidutils-0.0.6.orig/raideng/eata2i2o.h0000664000175000000620000001366510044153332017536 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * DPT EATA packet to I2O packet conversion utility. * * Author: Mark Salyzyn */ #if (!defined(__EATA2I2O_H__)) #define __EATA2I2O_H__ #include "dpt_osd.h" #include "dptalign.h" #include "dpt_eata.h" #include "dpt_scsi.h" #include "i2obscsi.h" #include "i2odpt.h" #if (defined(__cplusplus)) extern "C" { #endif /* * This call simulates the eata environment, and through the use of * the STATIC DPTI_convertCallback is capable of supplying an eata status * packet to this callback routine rather than the I2O status packet. */ PUBLIC int DPTI_startEataCp __P(( IN Controller_t controller, IN OUT eataCP_S __FAR__ * packet, IN OUT Callback_t callback)); /* * An internal function that may be useful outside of the converter. */ PUBLIC INLINE unsigned short DPTI_getTID __P(( IN Controller_t Controller, IN unsigned char Bus, IN unsigned char Target, IN unsigned char Lun, IN unsigned char FW, IN unsigned char Phys, IN unsigned char Interpret)); /* * A function to return the current block size given the settings in * the DPTI_BootFlags. */ PUBLIC unsigned long DPTI_BootBlockSize __P((void)); /* * An internal I2O synchronous command function that may be useful * outside of the converter. */ PUBLIC INLINE int DPTI_sendMessage __P(( IN Controller_t controller, IN PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE Message)); PUBLIC INLINE unsigned short __FAR__ * DPTI_statusSynchronousAddress __P(( IN OutGoing_t Message)); PUBLIC INLINE int DPTI_getParams __P(( IN Controller_t controller, IN unsigned short TID, IN int Group, IN OUT PI2O_PARAM_RESULTS_LIST_HEADER Header, IN unsigned int HeaderSize)); PUBLIC INLINE void DPTI_refresh __P(( IN Controller_t controller)); PUBLIC INLINE void DPTI_rescan __P(( IN Controller_t controller)); PUBLIC INLINE void DPTI_resetBus __P(( IN Controller_t controller)); /* * Lots of stuff packed into an itti-bitty living space, it only needs to * be smaller than I2O_LCT_ENTRY to make sense below. RAID, Adapter and SCSI * are mutually exclusive. If we need more information, we may need to start * exploiting this (for instance: RAID, SCSI Adapter, Fibre Adapter, Single * Block Device, SCSI device, Fibre device; currently we do not need to * know if it is a Fibre Device because of the Target value). * * This structure is returned by the DPTI_getDevice functions, and one should * use the structure methods to access the members rather than directly to * allow the structure to change without notice ... */ typedef struct { unsigned short TID:12; unsigned short Bus:3; unsigned short RAID:1; /* Indicates should match as a RAID TID */ unsigned short UserTID:12; unsigned short Adapter:1; /* SCSI or FIBRE port device */ unsigned short SCSI:1; /* Indicates a SCSI or FIBRE device */ unsigned short Lun:8; unsigned short Target:7; } TID_t; #if (defined(__BORLANDC__)) # define Device_size 5 #endif #define Device_getTID(x) ((x)->TID) #define Device_setTID(x,y) ((x)->TID = (unsigned short)(y)) #define Device_getBus(x) ((x)->Bus) #define Device_setBus(x,y) ((x)->Bus = (unsigned char)(y)) #define Device_isRAID(x) ((x)->RAID) #define Device_setRAID(x,y) ((x)->RAID = (unsigned char)(y)) #define Device_getUserTID(x) ((x)->UserTID) #define Device_setUserTID(x,y) ((x)->UserTID = (unsigned short)(y)) #define Device_getLun(x) ((x)->Lun) #define Device_setLun(x,y) ((x)->Lun = (unsigned char)(y)) #define Device_isBus(x) ((x)->Adapter) #define Device_setAdapter(x,y) ((x)->Adapter = (unsigned char)(y)) #define Device_getTarget(x) ((x)->Target) #define Device_setTarget(x,y) ((x)->Target = (unsigned char)(y)) #define Device_isPhys(x) ((x)->SCSI) #define Device_setPhys(x,y) ((x)->SCSI = (unsigned char)(y)) PUBLIC INLINE TID_t * DPTI_getDeviceAddr __P(( IN Controller_t controller, IN unsigned char Bus, IN unsigned char Target, IN unsigned char Lun, IN unsigned char FW, IN unsigned char Phys)); PUBLIC INLINE TID_t * DPTI_getDeviceTID __P(( IN Controller_t controller, IN unsigned short TID)); #if (defined(__cplusplus)) } #endif #endif /* __EATA2I2O_H__ */ raidutils-0.0.6.orig/raideng/eng_ccb.hpp0000664000175000000620000002767710044153311020055 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __ENG_CCB_HPP #define __ENG_CCB_HPP //File - ENG_CCB.HPP //*************************************************************************** // //Description: // // This file contains the class definitions for the DPT CCB classes //used in the DPT engine. // //Author: Doug Anderson //Date: 4/8/93 // //Editors: // //Remarks: // // //*************************************************************************** //Class - engineCCB_C - start //=========================================================================== // //Description: // // This class defines the most basic CCB class used in the DPT //engine. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- // CCB Origins // The CCB comes from a physical device const uSHORT CCB_ORIG_PHY = 0; // The CCB comes from a logical device const uSHORT CCB_ORIG_LOG = 1; // The CCB comes from a manager const uSHORT CCB_ORIG_MGR = 2; // Default buffer sizes const uSHORT DEFAULT_DATA_SIZE = 512; const uSHORT DEFAULT_REQ_SENSE_SIZE = 20; class coreCCB_C : public dptCCB_S { // Data............................................... // An object's origin list (Phys,Log,Mgr) uSHORT originList; // Other Functions.................................... // Sets the physical & interpret bits in the SCSI CDB // void setCtlBits(uCHAR); protected: // Data............................................... // Pointer to the SCSI CDB uCHAR *scsiCDB_P; public: // Data............................................... // Pointer to the CCB's data buffer uCHAR *dataBuff_P; // Size of the data buffer uLONG dataBuffSize; // Pointer to the target HBA dptHBA_C *hba_P; // Event logger offset uLONG logOffset; // The default data buffer uCHAR defData[DEFAULT_DATA_SIZE]; // The default request sense buffer uCHAR defReqSense[DEFAULT_REQ_SENSE_SIZE]; // Constructor/Destructor.................................. coreCCB_C(); // Virtual Functions.................................. // This function performs a 1 time initialization of the CCB void init(); // Re-initialize a CCB after use void reInit(); // Other Functions.................................... // Indicate that the OS specific layer should wait for a command // to finish before returning void setWait() { osdFlags &= ~FLG_CCB_OSD_NO_WAIT; } // Indicate that the OS specific layer should not wait for a command // to finish before returning void clrWait() { osdFlags |= FLG_CCB_OSD_NO_WAIT; } // Indicate that the EATA CP bits are reversed void setReverse() { osdFlags |= FLG_CCB_OSD_REVERSED; } // Indicate that the EATA CP bits are not reversed void clrReverse() { osdFlags &= ~FLG_CCB_OSD_REVERSED; } uSHORT isReversed() { return (osdFlags & FLG_CCB_OSD_REVERSED); } // Mark the CCB as in use void setInUse() { engFlags |= FLG_CCB_ENG_IN_USE; } // Mark the CCB as not in use void clrInUse() { engFlags &= ~FLG_CCB_ENG_IN_USE; } // Determine if the CCB is in use or not uSHORT isInUse() { return (engFlags & FLG_CCB_ENG_IN_USE); } // Sets a flag indicating that this command is a RAID command void setRAIDcmd() { engFlags |= FLG_CCB_ENG_RAID; } // Clear the flag indicating that this command is a RAID command void clrRAIDcmd() { engFlags &= ~FLG_CCB_ENG_RAID; } // Determines if this command is a RAID command uSHORT isRAIDcmd() { return (engFlags & FLG_CCB_ENG_RAID); } // Sets no physical bit indicator void setNoEATAphys() { engFlags |= FLG_CCB_ENG_NO_PHYS; } // Clear the flag indicating that this command is a RAID command void clrNoEATAphys() { engFlags &= ~FLG_CCB_ENG_NO_PHYS; } // Determines if this command is a RAID command uSHORT isNoEATAphys() { return (engFlags & FLG_CCB_ENG_NO_PHYS); } // Sets a flag indicating that this command is a Logger command void setLoggerCmd(uLONG off) { engFlags |= FLG_CCB_ENG_LOGGER; logOffset = off; } // Sets a flag indicating that this command is a Logger command void clrLoggerCmd() { engFlags &= ~FLG_CCB_ENG_LOGGER; logOffset = 0; } // Determines if this command is a Logger command uSHORT isLoggerCmd() { return (engFlags & FLG_CCB_ENG_LOGGER); } // determines if the command is a multi initiator command uCHAR isMultiInitiatorCmd(); // Sets the EATA interpret bit (optionally the SCSI CDB interpret also) void setInterpret(); // it is not an interpret command void clrInterpret(); // Sets the EATA physical bit (optionally the SCSI CDB physical also) void setPhysical(); // Set the EATA bit to send a CDB to a nested HBA RAID drive // (Intercepted by the driver) void setNFW(); // Sets the phys/interpret bits for HBA level RAID operations void setFW() { setInterpret(); setPhysical(); } // Sets the phys/interpret bits for driver level RAID operations void setSW() { setInterpret(); } // Zero the SCSI CDB void clrCDB() { memset(scsiCDB_P,0,12); } // Zero the default data buffer void clrData() { memset(dataBuff_P,0,dataBuffSize); } // Zero the default request sense buffer void clrReqSense() { memset(defReqSense,0,DEFAULT_REQ_SENSE_SIZE); } // Indicate that the CCB comes from a physical device void setPhy() { originList = CCB_ORIG_PHY; } // Indicate that the CCB comes from a logical device void setLog() { originList = CCB_ORIG_LOG; } // Indicate that the CCB comes from a manager void setMgr() { originList = CCB_ORIG_MGR; } // Determine if the CCB comes from a physical device uSHORT isPhy() { return (originList==CCB_ORIG_PHY); } // Determine if the CCB comes from a logical device uSHORT isLog() { return (originList==CCB_ORIG_LOG); } // Determine if the CCB comes from a manager uSHORT isMgr() { return (originList==CCB_ORIG_MGR); } // Set CCB to target the specified object void target(dptObject_C *); // Set CCB to target the specified address void target(dptAddr_S,dptHBA_C *,uSHORT); // Sets the target LUN void setLUN(uCHAR); // Set CCB for data input void input(); // Set CCB for data output void output(); // Set CCB for no data transfer void noData() { eataCP.flags &= ~(CP_DATA_IN | CP_DATA_OUT); } // Set the EATA CP data buffer address and size void setDataBuff(uLONG,uLONG); }; //coreCCB_C - end //Class - scsiCCB_C - start //=========================================================================== // //Description: // // This class adds SCSI commands to the core CCB class. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class scsiCCB_C : public coreCCB_C { protected: // SCSI CDBs.......................................... // Initialize a CCB to do a SCSI read or write command void readWrite(uLONG,uSHORT); public: // Data............................................... // Pointer to a mode page header modeHeader_S *modeHeader_P; // Pointer to a mode page header modeHeader6_S *modeHeader6_P; // Pointer to a mode page parameter header modeParam_S *modeParam_P; // Class to facilitate log sense/select operations dptSCSIlog_C log; // Constructor/Destructor.................................. scsiCCB_C(); // Other Functions.................................... // Determines if a CCB has valid Ctlr & SCSI status uSHORT ok(); // SCSI CDBs.......................................... // Initialize a CCB to do a SCSI Test Unit Ready command void testUnitReady(); // Initialize a CCB to do an allow media removal command void allowMediaRemoval(); // Initialize a CCB to do a Read Capacity command void readCapacity(); // Initialize a CCB to do a SCSI Inquiry command void inquiry(uCHAR=0); // Initialize a CCB to do a SCSI write command void write(uLONG,uSHORT,uSHORT,uLONG); // Initialize a CCB to do a SCSI read command void read(uLONG,uSHORT,uSHORT,uLONG); // Initialize a CCB to do a SCSI low level format command void format(uSHORT,uSHORT=0,uSHORT=0); // Initialize a CCB to do an NCR type pass thru command void ncrPassThru(scsiCCB_C *); // Initialize a CCB to do a DPT multi-function command void mfCmd(uCHAR,uCHAR=0,uCHAR=0); // Initialize a CCB to do an extended DPT multi-function command void extMfCmd(uCHAR,uCHAR=0,uLONG=0,uSHORT=0,uCHAR=0); // Initialize a CCB to do a request sense command void reqSense(uCHAR=0xff); // Initialize a CCB to do a SCSI Mode Sense command void modeSense(uCHAR,uCHAR=0,uSHORT=0,uSHORT=0x200); // Initialize a CCB to do a 6 byte SCSI Mode Sense command void modeSense6(uCHAR,uCHAR=0,uCHAR=0,uSHORT=0xff); // Initialize a CCB to do a SCSI Mode Select command void modeSelect(uCHAR,uSHORT,uCHAR=0x83); // Initialize a CCB to do a 6 byte SCSI Mode Select command void modeSelect6(uCHAR,uSHORT,uCHAR=0x83); // Initialize a CCB to do a SCSI Log Sense command void logSense(uCHAR,uCHAR=0,uSHORT=0,uSHORT=0,uCHAR=0); // Initialize a CCB to perform a flash command void flashCmd(uCHAR,uLONG=0,uLONG=0,uLONG=0); // Initialize a CCB to do a SCSI Log Select command // void logSelect(uSHORT,uCHAR=0x01); // Intialize the data buffer for log sense/select opertions uCHAR * initLogSense() { return (log.initSense(dataBuff_P,1)); } // Initialize a CCB to perform a SCSI reserve command void reserve(); // Initialize a CCB to perform a SCSI release command void release(); // Initialize a CCB to read the controller's drive size table void readDriveSizeTable(); // Initialize a CCB to write the controller's drive size table void writeDriveSizeTable(uLONG tableSize); }; //scsiCCB_C - end //Class - engCCB_C - start //=========================================================================== // //Description: // // This class is the highest level CCB class used in the DPT engine. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class engCCB_C : public scsiCCB_C { protected: public: }; //engCCB_C - end #endif raidutils-0.0.6.orig/raideng/eng_sig.c0000664000175000000620000001411110044153311017516 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - ENG_SIG.CPP //*************************************************************************** // //Description: // // This file contains the engine's DPT signature. // //Author: Bob Pasteur //Date: 01/03/95 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include #include /* Definitions - Defines & Constants ---------------------------------------*/ #define MAJOR_VERSION 3 #define MINOR_VERSION '3' #define REVISION '1' #define MONTH 8 #define DAY 12 #define YEAR 2002 - 1980 /* Year - 1980 */ //Variables - Static -------------------------------------------------------- dpt_sig_S engineSig = { 'd','P','t','S','i','G', SIG_VERSION, #if defined (_DPT_AIX) PROC_POWERPC, /* processor family */ PROC_PPC601 | PROC_PPC603 | PROC_PPC604, #elif (defined (_DPT_SOLARIS) && defined (sparc)) PROC_ULTRASPARC, 0, #else PROC_INTEL, PROC_386 | PROC_486 | PROC_PENTIUM, #endif // aix FT_ENGINE, 0, //#if (defined (_DPT_SOLARIS) && defined (sparc)) #if defined (_DPT_SUN_BRANDING) OEM_SUN, #else OEM_DPT, #endif // operating system #if defined (_DPT_MSDOS) sigLONGLittleEndian(OS_DOS), #elif defined (_DPT_WIN_3X) sigLONGLittleEndian(OS_WINDOWS), #elif defined (_DPT_WIN_NT) sigLONGLittleEndian(OS_WINDOWS_NT), #elif defined (_DPT_OS2) sigLONGLittleEndian(OS_OS22x), #elif defined (_DPT_SCO) sigLONGLittleEndian(OS_SCO_UNIX), #elif defined (_DPT_UNIXWARE) sigLONGLittleEndian(OS_UNIXWARE), #elif defined (SNI_MIPS) sigLONGLittleEndian(OS_SINIX_N), #elif defined (_DPT_MACINTOSH) sigLONGLittleEndian(OS_MAC_OS), #elif defined (_DPT_AIX) sigLONGLittleEndian(OS_AIX_UNIX), #elif defined (_DPT_SOLARIS) sigLONGLittleEndian(OS_SOLARIS), #elif defined (_DPT_LINUX) sigLONGLittleEndian(OS_LINUX), #elif defined (_DPT_BSDI) sigLONGLittleEndian(OS_BSDI_UNIX), #elif defined (_DPT_FREE_BSD) sigLONGLittleEndian(OS_FREE_BSD), #else #error You must define for this OS #endif sigWORDLittleEndian(0), /* dsCapabilities */ sigWORDLittleEndian(DEV_ALL), /* dsDeviceSupp */ #if defined (_DPT_AIX) || defined (_DPT_BSDI) || defined (_DPT_FREE_BSD) sigWORDLittleEndian(ADF_ALL), #elif (defined (_DPT_SOLARIS) && defined (sparc)) sigWORDLittleEndian(ADF_ALL_SC5), #else sigWORDLittleEndian(ADF_2012A | ADF_PLUS_ISA | ADF_PLUS_EISA), #endif // aix sigWORDLittleEndian(0), /* dsApplication */ 0, MAJOR_VERSION, MINOR_VERSION, REVISION, MONTH, DAY, YEAR, #if defined ( _DPT_BSDI ) # ifndef _DPT_LEGACY "Adaptec BSDi SCSI Engine" # else "DPT BSDi SCSI Engine" # endif #elif defined ( _DPT_LINUX ) # ifndef _DPT_LEGACY "Adaptec LINUX SCSI Engine" # else "DPT LINUX SCSI Engine" # endif #elif defined ( _DPT_FREE_BSD ) # ifndef _DPT_LEGACY "Adaptec FreeBSD SCSI Engine" # else "DPT FreeBSD SCSI Engine" # endif #elif defined ( _DPT_SCO ) # ifndef _DPT_LEGACY "Adaptec SCO SCSI Engine" # else "DPT SCO SCSI Engine" # endif #elif defined ( _DPT_SOLARIS ) # ifdef _DPT_SUN_BRANDING "SUN SOLARIS SCSI Engine" # else "Adaptec SOLARIS SCSI Engine" # endif #elif defined ( _DPT_UNIXWARE ) # ifndef _DPT_LEGACY "Adaptec UNIXWARE SCSI Engine" # else "DPT UNIXWARE SCSI Engine" # endif #elif defined ( _DPT_AIX ) # ifndef _DPT_LEGACY "Adaptec AIX SCSI Engine" # else "DPT AIX SCSI Engine" # endif #elif defined (_DPT_MSDOS) # ifndef _DPT_LEGACY "Adaptec MS DOS SCSI Engine" # else "DPT MS DOS SCSI Engine" # endif #elif defined (_DPT_WIN_3X) # ifndef _DPT_LEGACY "Adaptec Windows SCSI Engine" # else "DPT Windows SCSI Engine" # endif #elif defined (_DPT_WIN_NT) # ifndef _DPT_LEGACY "Adaptec WIN32 SCSI Engine" # else "DPT WIN32 SCSI Engine" # endif #elif defined (_DPT_OS2) # ifndef _DPT_LEGACY "Adaptec OS/2 SCSI Engine" # else "DPT OS/2 SCSI Engine" # endif #else #error Define this for your OS #endif }; raidutils-0.0.6.orig/raideng/eng_std.cpp0000664000175000000620000002255210044153311020076 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - ENG_STD.CPP //*************************************************************************** // //Description: // // This file contains function definitions for functions, structures, //and classes that are used globally throughout the DPT engine files. // //Author: Doug Anderson //Date: 3/10/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" #include "eng_std.h" //Function - dptAddr_S::dptAddr_S() - start //=========================================================================== // //Description: // // This function is the constructor for the dptAddr_S structure. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptAddr_S::dptAddr_S() { // Initialize the SCSI address hba = 0xff; chan = 0xff; id = 0xff; lun = 0xff; } //dptAddr_S::dptAddr_S() - end //Function - dptAddr_S::getLong() - start //=========================================================================== // //Description: // // This function returns the SCSI address as an unsigned long //integer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptAddr_S::getLong() { access_U retVal; // Initialize the long word #ifdef _DPT_BIG_ENDIAN retVal.u8[3] = lun; retVal.u8[2] = id; retVal.u8[1] = chan; retVal.u8[0] = hba; #else retVal.u8[0] = lun; retVal.u8[1] = id; retVal.u8[2] = chan; retVal.u8[3] = hba; #endif return (retVal.u32); } //dptAddr_S::getLong() - end //Function - dptCapacity_S::dptCapacity_S() - start //=========================================================================== // //Description: // // This function is the constructor for the dptCapacity_S structure. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptCapacity_S::dptCapacity_S() { // Initialize the capacity blockSize = 0; maxLBA = 0; maxPhysLBA = 0; } //dptCapacity_S::dptCapacity_S() - end //Function - dptDescr_S::dptDescr_S() - start //=========================================================================== // //Description: // // This function is the constructor for the dptDescr_S structure. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptDescr_S::dptDescr_S() { // Initialize the description data version = 0; inqFlag1 = 0; inqFlag2 = 0; unUsed = 0; vendorID[0] = 0; productID[0] = 0; revision[0] = 0; vendorExtra[0] = 0; } //dptDescr_S::dptDescr_S() - end //---------- Portability Additions ----------- #ifdef DPT_PORTABLE uSHORT dptDescr_S::netInsert(dptBuffer_S *buffer) { buffer->netInsert(version); buffer->netInsert(inqFlag1); buffer->netInsert(inqFlag2); buffer->netInsert(unUsed); buffer->netInsert(vendorID, sizeof(vendorID)); buffer->netInsert(productID, sizeof(productID)); buffer->netInsert(revision, sizeof(revision)); return buffer->netInsert(vendorExtra, sizeof(vendorExtra)); } uSHORT dptDescr_S::netExtract(dptBuffer_S *buffer) { buffer->netExtract(&version); buffer->netExtract(&inqFlag1); buffer->netExtract(&inqFlag2); buffer->netExtract(&unUsed); buffer->netExtract(&vendorID, sizeof(vendorID)); buffer->netExtract(&productID, sizeof(productID)); buffer->netExtract(&revision, sizeof(revision)); return buffer->netExtract(&vendorExtra, sizeof(vendorExtra)); } #endif // DPT_PORTABLE //-------------------------------------------- //Function - dptDescr_S::terminate() - start //=========================================================================== // //Description: // // This function is NULL terminates all ASCII strings in the //dptDescr_S structure. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDescr_S::terminate() { // NULL terminate all ASCII strings vendorID[8] = 0; productID[16] = 0; revision[4] = 0; vendorExtra[20] = 0; } //dptDescr_S::terminate() - end //Function - dptDescr_S::toUpper() - start //=========================================================================== // //Description: // // This function converts the description strings to all upper case. //dptDescr_S structure. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDescr_S::toUpper() { // Convert all strings to upper case upperCase((uCHAR *)vendorID); upperCase((uCHAR *)productID); upperCase((uCHAR *)revision); upperCase((uCHAR *)vendorExtra); } //dptDescr_S::toUpper() - end //Function - dptStatus_S::dptStatus_S() - start //=========================================================================== // //Description: // // This function is the constructor for the dptStatus_S class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptStatus_S::dptStatus_S() { display = 0; flags = 0; main = 0; sub = 0; } //dptStatus_S::dptStatus_S() - end //Function - dptStatus_S::getLong() - start //=========================================================================== // //Description: // // This function returns the SCSI address as an unsigned long //integer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptStatus_S::getLong() { access_U retVal; // Initialize the long word #ifdef _DPT_BIG_ENDIAN retVal.u8[3] = sub; retVal.u8[2] = main; retVal.u8[1] = flags; retVal.u8[0] = display; #else retVal.u8[0] = sub; retVal.u8[1] = main; retVal.u8[2] = flags; retVal.u8[3] = display; #endif return (retVal.u32); } //dptStatus_S::getLong() - end //Function - dptEmuParam_S::dptEmuParam_S() - start //=========================================================================== // //Description: // // This function is the constructor for the dptEmuParam_S class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptEmuParam_S::dptEmuParam_S() { cylinders = 0; heads = 0; sectors = 0; driveType = 0; } //dptEmuParam_S::dptEmuParam_S() - end //Function - reverseBytes() - start //=========================================================================== // //Description: // // These functions reverse the byte ordering of the input buffer. //After calling this function the MSB & LSB will be swapped... // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- void reverseBytes(void *inBuff_P,uSHORT buffSize) { uCHAR *b_P1 = (uCHAR *) inBuff_P; // Point to start of buffer uCHAR *b_P2 = b_P1 + buffSize-1; // Point to end of buffer uCHAR temp; for (uSHORT i=0;i<((buffSize+1)>>1);i++) { temp = *b_P1; *b_P1++ = *b_P2; *b_P2-- = temp; } } //reverseBytes() - end raidutils-0.0.6.orig/raideng/eng_unix.cpp0000664000175000000620000007347710044153310020302 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* File - ENG_UNIX.C */ /*****************************************************************************/ /* */ /*Description: */ /* This Module Contains Those Functions That Get Linked Into The */ /* Unix DPT Engine To Make It An Executable Program. */ /* */ /* */ /*Author: Bob Pasteur */ /*Date: */ /* */ /*Editors: */ /* */ /*Remarks: */ /* */ /*Modification History - Not implemented until going to version 1.D7 */ /* */ /* M0000 - 2/18/95 Bob Pasteur */ /* - Added more verbose print statements */ /* M0001 - 3/01/95 Bob Pasteur */ /* - Added UnixWare Support */ /* M0002 - 10/27/95 Bob Pasteur */ /* - Added a date/time value to the verbose print statements : Unmarked */ /* M0003 - 01/16/97 Bob Pasteur */ /* - Added support for DGUX */ /* */ /*****************************************************************************/ /*Include Files -------------------------------------------------------------*/ #ifndef SNI_MIPS #ifdef __cplusplus extern "C" { #endif #endif // SNI_MIPS #include #include #include #include #include #include #include #include #include #include #include #include #if (defined(__FreeBSD__)) # define _DPT_FREE_BSD #endif #if (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) # include #else # include #endif #include #include #include #include #include #include #include #include #include #include "lockunix.h" } /* extern C */ #include extern "C" { /* Definitions - Defines & Constants ---------------------------------------*/ /* Definitions - Structure & Typedef ---------------------------------------*/ /* Variables - External ----------------------------------------------------*/ extern uLONG LoggerID; /* Variables - Global ------------------------------------------------------*/ DPT_TAG_T EngineTag; uCHAR *fromEng_P = NULL; uCHAR *toEng_P = NULL; int MsqID; MsgHdr HdrBuff; int NoKill = 0; #ifdef _SINIX_ADDON int DemoMode = 0; int ExitEngine = 0; int AutoBuild = 0; int Signature = 0; int DebugToFile = 0; ofstream est("/tmp/dpteng_dbg.log"); #endif int DebugEngMsg = 0; int EngineMessageTimeout = 0; int Verbose = 0; int EataHex = 0; int EataInfo = 0; int NumOpenClients = 0; uLONG P_ID; struct msqid_ds CtlBuf; static char TimeString[80]; /* Command Line Parameters Structure */ struct { char *text; int len; int num; } option[] = { {"?", 1, 1 }, {"HELP", 4, 2 }, {"VERBOSE", 7, 3 }, {"EATAHEX", 7, 4 }, {"EATAINFO", 8, 5 }, {"NOKILL", 6, 6 }, #ifdef _SINIX_ADDON {"DEMO", 4, 7 }, {"STOP", 4, 8 }, {"MSG", 3, 9 }, {"SIG", 3, 10 }, {"FDEBUG", 6, 11 }, #endif { NULL, 0, 0 } }; // // For FindPath routine // extern "C" { int Argc; char **Argv; } /* Prototypes - function ---------------------------------------------------*/ int ProcessTurnAroundMessage(MsgHdr *HdrBuff_P); void ProgramUnload(void); void AlarmHandler(void); uSHORT ParseCommandLine(int argc,char *argv[]); void DisplayHelp(void); // this is used to ignore the first signal sent to the engine when a shutdown command occurs void DptSignalIgnore(int); /* Prototypes - external function ------------------------------------------*/ extern void FormatTimeString(char *String,uLONG Time); #ifdef _SINIX_ADDON extern void SNI_set_compile_date(dpt_sig_S *); extern dpt_sig_S engineSig; #endif /***************************** Main Entry Point *****************************/ main(int argc, char *argv[]) { int Rtnval; int Done; struct sigaction sig; DPT_RTN_T i; // // Set up our argument pointers for others to use // Argc = argc; Argv = argv; # if (defined(_DPT_SOLARIS) || defined(_DPT_ROOTONLY)) // Only root or sys are allowed to run dptutil. if ( ( getuid () != 0 ) && ( geteuid () != 0 ) && ( getuid () != 3 ) && ( geteuid () != 3 ) && ( getgid () != 0 ) && ( getegid () != 0 ) && ( getgid () != 3 ) && ( getegid () != 3 ) ) { printf ("You must be root to run this utility\n"); return (0); } # endif /* Parse The Command Line Parameters, And If An Error Exit */ if(ParseCommandLine(argc,argv)) { exit(ExitBadParameter); } #ifdef _SINIX_ADDON DEBUG_SETOUTPUT(est); if (DebugToFile) { DEBUG_BEGIN(5, "DPT Engine"); DEBUG_SETLEVEL(DebugToFile); } else DEBUG_OFF; SNI_set_compile_date(&engineSig); if (Signature) { printf("%s: V.%d.%c%c %.2d.%.2d.%d\n", engineSig.dsDescription, engineSig.dsVersion, engineSig.dsRevision, engineSig.dsSubRevision, engineSig.dsDay, engineSig.dsMonth, 1980 + engineSig.dsYear); exit(ExitGoodStatus); } #else DEBUG_SETOUTPUT(cerr); DEBUG_OFF; #endif /* Check To See If There Is Already An Engine Out There */ if (MkLock(NULL) == 1) { #ifndef _SINIX_ADDON if(Verbose) #endif printf( "\nThere Appears To Be Another Copy Of dpteng Already Running!\n"); exit(ExitDuplicateEngine); } /* If The Engine Cannot Be Opened, Print A Message And Exit */ i = DPT_StartEngine(); if(i != MSG_RTN_COMPLETED) { if(Verbose) { printf("\nStarting the Engine: "); if (i == ERR_OSD_OPEN_ENGINE) printf("Open HBA(s) "); else if (i == ERR_SEMAPHORE_ALLOC) printf("Alloc Semaphore "); else if (i == ERR_CONN_LIST_ALLOC) printf("Alloc Connection List "); else printf(" With Unknown Error %x", i); printf("Failed\n"); } RmLock(NULL); exit(ExitEngOpenFail); } /* Initialize The Signaling */ memset((void *)&sig,0,sizeof(sig)); #if defined ( _DPT_SCO ) || defined ( _DPT_AIX ) || defined( _DPT_BSDI ) || defined(_DPT_FREE_BSD ) || defined(_DPT_LINUX) sig.sa_handler = (void (*)(int))AlarmHandler; #elif defined ( _DPT_SOLARIS ) sig.sa_handler = (void (*)(int))AlarmHandler; /* M0001 - Added UnixWare Support */ #elif defined ( _DPT_UNIXWARE ) sig.sa_handler = (void (*)(int))AlarmHandler; /* M0001 - Added UnixWare DGUX */ #elif defined ( _DPT_DGUX ) sig.sa_handler = (void (*)_PROTO_ARGS((int)))AlarmHandler; #elif defined ( SNI_MIPS ) sig.sa_handler = (void (*)())AlarmHandler; #else #error Define this for your OS #endif #ifdef NEW_LOGGER #if defined(_DPT_SCO) || defined(_DPT_BSDI) || defined(_DPT_FREE_BSD) || defined(_DPT_LINUX) || defined (_DPT_SOLARIS) // ignore sighup, sigterm will come later after a few seconds signal(SIGHUP, (void (*) (int)) DptSignalIgnore); signal(SIGTERM, (void (*) (int)) DptSignalIgnore); signal(SIGCHLD, (void (*) (int)) DptSignalIgnore); #else #error Define me. These are shutdown signals to ignore so the SOC logger // can write its final heartbeat on a shutdown #endif #endif //#ifdef NEW_LOGGER /* If The Signaling Could Not Be Set Up, Print An Error And Exit */ if(sigaction(SIGALRM,&sig,0) == -1) { if(Verbose) printf("\nSignaling Could Not Be Set Up\n"); RmLock(NULL); exit(ExitSignalFail); } /* if no debug mode selected, start engine as daemon (like inetd) */ /* i.e. fork son proc and create new session id. - michiz */ if (!Verbose && !EataHex && !EataInfo && !DebugEngMsg) { int i; if ((i = fork()) != 0) { ChLock(NULL, i); exit(0); } setsid(); } #ifdef _SINIX_ADDON /* New option -stop to kill a hanged up engine */ if (ExitEngine) { int i; struct msqid_ds CtlBuf; MsqID = msgget(DPT_EngineKey, MSG_ALLRD | MSG_ALLWR); if(MsqID != -1) { msgctl(MsqID, IPC_STAT, &CtlBuf); // Stop engine only, if no dptmgr still running if ( CtlBuf.msg_lspid && CtlBuf.msg_lrpid && (getpgid(CtlBuf.msg_lspid) != -1) && (getpgid(CtlBuf.msg_lrpid) != -1)) printf("You must stop dptmgr first\n"); else { i = MessageDPTEngine(DPT_EngineKey, MsqID, ENGMSG_CLOSE, 2,1); if (i) msgctl(MsqID, IPC_RMID, &CtlBuf); if(Verbose) printf("dpteng successfully stopped\n"); } } RmLock(NULL); exit(ExitGoodStatus); } #endif /* Check To See If There Is Already An Engine Out There */ MsqID = CheckForEngine(DPT_EngineKey,1,2); if(MsqID != -1) { #ifndef _SINIX_ADDON if(Verbose) #endif printf( "\nThere Appears To Be Another Copy Of dpteng Already Running!\n"); RmLock(NULL); exit(ExitDuplicateEngine); } /* Get The Process ID To Use As The Unique Caller ID */ P_ID = getpid(); /* Try To Create The Unique Message Que Of This ID */ MsqID = msgget(DPT_EngineKey,IPC_CREAT | IPC_EXCL | MSG_ALLRD | MSG_ALLWR); /* If We Could Not Allocate The Message Que, Print A Message And Exit */ if(MsqID == -1) { if(Verbose) printf("\nThe Message Queue Could Not Be Allocated\n"); RmLock(NULL); exit(ExitMsqAllocFail); } /* Set Up The Function To Call When The Program Terminates Normally */ atexit(ProgramUnload); /* Loop Forever Waiting For A Header Message To Come In. Once A Header */ /* Message Is Received, We Will Attach To The Shared Memory Segment */ /* That Is Passed In The Header. This Memory Is The In And Out Buffers */ Done = 0; if(Verbose) printf("\ndpteng Is Ready.\n"); while(1) { // // At the top of the loop, we will pull off and process all turnaround messages on the queue since // they don't have to be sent down to the engine // while(Rtnval = msgrcv(MsqID,(struct msgbuf *)&HdrBuff, MsgDataSize, DPT_TurnAroundKey,IPC_NOWAIT) != -1) { Done = ProcessTurnAroundMessage(&HdrBuff); } // // If Done is set, there are no more clients, so let's // check for any messages in the queue before we exit. It // is possible that someone is trying to load and we don't // want to pull the rug out from under him // if(Done) { Rtnval = msgrcv(MsqID,(struct msgbuf *)&HdrBuff, MsgDataSize, -DPT_EngineKey,IPC_NOWAIT); // // If the call failed, were OUT-O-HERE // if(Rtnval == -1) { if(Verbose) { printf("\n : No Clients, Engine Unloads"); } break; } // // There was a message on the queue so continue processing // Done = 0; } // // Done is not set, so wait for a message to come in // else { while(Rtnval = msgrcv(MsqID,(struct msgbuf *)&HdrBuff, MsgDataSize, -DPT_EngineKey,0) == -1) { /* If The Message Failed, And The Reason Was Not An Interrupt, Exit */ if(errno != EINTR) break; } } /* If The Message Received OK Go Process It */ if(Rtnval == 0) { // // Check to make sure this guy is still out there before processing the message // if not, throw away the message // if(kill(HdrBuff.callerID,0) != 0) { if(Verbose) { printf("\n : Message received for PID %d : no process found, discarding", HdrBuff.callerID); } continue; } /* If This Is A Turnarround Message, Process it */ if((HdrBuff.engineTag == HdrBuff.callerID)&& (HdrBuff.engineTag == HdrBuff.targetTag)) { Done = ProcessTurnAroundMessage(&HdrBuff); continue; } /* Attach To The Shared Memory */ toEng_P = (uCHAR *)shmat((int)HdrBuff.BufferID,0,0); /* Make Sure That We Could Attach */ if((int)toEng_P != -1) { fromEng_P = toEng_P + HdrBuff.FromEngBuffOffset; /* M0000 : New Verbose Statements */ if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nEngine Calls : %s DPT_CallEngine",TimeString); printf( "\n EngTag = %x, Event = %x, Target = %x", HdrBuff.engineTag,HdrBuff.engEvent,HdrBuff.targetTag); printf( "\n Offset = %x fromEng_P = %x toEng_P = %x", HdrBuff.FromEngBuffOffset, fromEng_P, toEng_P); /*#else "\n EngTag = %x, Event = %x, Target = %x", HdrBuff.engineTag,HdrBuff.engEvent,HdrBuff.targetTag); #endif */ fflush(stdout); } /* All Went Well With The Receive, So Call The Engine */ HdrBuff.result = DPT_Engine( HdrBuff.engineTag, HdrBuff.engEvent, HdrBuff.targetTag, fromEng_P,toEng_P, HdrBuff.timeOut); // // Detach from the memory segment // shmdt((char *)toEng_P); // // Check to make sure this guy is still out there before returning the message // if not, throw away the message // if(kill(HdrBuff.callerID,0) != 0) { if(Verbose) { printf("\n : Returning message for PID %d : no process found, discarding", HdrBuff.callerID); } continue; } /* Set Up The Proper Message Type In The Buffer Headers */ HdrBuff.MsgID = HdrBuff.callerID; HdrBuff.callerID = DPT_EngineKey; Rtnval = msgsnd(MsqID,(struct msgbuf *)&HdrBuff,MsgDataSize,0); /* If We Had An Error Sending, Print A Message And Exit */ if(Rtnval == -1) { if(Verbose) { FormatTimeString(TimeString,time(0)); printf( "\n%s Error Sending A Message In The Engine : %d\n", TimeString,errno); fflush(stdout); } RmLock(NULL); exit(ExitMsgSendFail); } } /* else printf("\nError Trying To Attach To The Memory"); */ } /* If We Had An Error Receiving, Print A Message And Exit */ else { if(Verbose) { FormatTimeString(TimeString,time(0)); printf( "\n%s Error Receiving A Message In The Engine : %d\n", TimeString,errno); fflush(stdout); } RmLock(NULL); exit(ExitMsgReceiveFail); } } } //main(int argc, char *argv[]) /*-------------------------------------------------------------------------*/ /* Function ProcessTurnAroundMessage */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* HdrBuff_P : Pointer to a received message header buffer */ /* */ /* This Function */ /* */ /* Return */ /*-------------------------------------------------------------------------*/ int ProcessTurnAroundMessage(MsgHdr *HdrBuff_P) { int Done = 0; int Rtnval; switch(HdrBuff_P->engEvent) { // // For An Open, Bump the Number Of Clients // case ENGMSG_OPEN : if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nEngine Calls : %s DPT_OpenEngine", TimeString); fflush(stdout); } ++NumOpenClients; break; // // For a close, Decrement The Number Of Clients, And If This Was The // Last Client And The No Kill Is Not Set, Set Up To Exit // case ENGMSG_CLOSE : if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nEngine Calls : %s DPT_CloseEngine", TimeString); fflush(stdout); } if(NumOpenClients > 0) { --NumOpenClients; } if(NumOpenClients <= 0) { if(!NoKill) { Done = 1; } } break; // // For An Echo, All That Is Needed Is The Return Message // case ENGMSG_ECHO : if(Verbose) { FormatTimeString(TimeString,time(0)); printf( "\nEngine Calls : %s Engine Echo Message", TimeString); fflush(stdout); } break; } //switch(HdrBuff_P->engEvent) // // Make sure this guy is still out there before putting the message back on the queue // if(kill(HdrBuff_P->callerID,0) == 0) { // // Set Up And Return The Message // HdrBuff_P->MsgID = HdrBuff_P->callerID; HdrBuff_P->callerID = P_ID; Rtnval = msgsnd(MsqID,(struct msgbuf *)HdrBuff_P,MsgDataSize,0); // // If We Had An Error Sending, Print A Message And Exit // if(Rtnval == -1) { if(Verbose) { FormatTimeString(TimeString,time(0)); printf( "\n%s Error Sending A Message In The Engine : %d\n", TimeString,errno); fflush(stdout); } RmLock(NULL); exit(ExitMsgSendFail); } } //if(kill(HdrBuff_P->callerID,0) == 0) else { if(Verbose) { printf("\n : Returning message for PID %d : no process found, discarding", HdrBuff_P->callerID); } } return(Done); } //int ProcessTurnAroundMessage(MsgHdr *HdrBuff_P) /*-------------------------------------------------------------------------*/ /* Function ProgramUnload */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed To This Function */ /* */ /* This Function Is Called On Normal Program Termination. It Makes A Close */ /* Call To The Engine And Frees Up The Message Queue That Was Allocated */ /* */ /* Return None */ /*-------------------------------------------------------------------------*/ void ProgramUnload(void) { /* On The Way Out, Close The Engine, Free Up The Message Que And Buffers */ DPT_StopEngine(); if(MsqID != -1) msgctl(MsqID,IPC_RMID,&CtlBuf); } /*-------------------------------------------------------------------------*/ /* Function AlarmHandler */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed To This Function */ /* */ /* This Function Is Called When The Alarm Signal Goes Off. Currently It */ /* Does Nothing */ /* */ /* Return None */ /*-------------------------------------------------------------------------*/ void AlarmHandler(void) { EngineMessageTimeout = 1; } /*-------------------------------------------------------------------------*/ /* Function ParseCommandLine */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* argc : Standard "C" Number Of Arguments Passed Into Main */ /* argv : Standard "C" Argument List Passed into Main */ /* */ /* This Function Parses The Passed In Command Line And Sets Up The System */ /* Default Values */ /* */ /* Return : 0 For All Is Well, 1 For Exit Program */ /*-------------------------------------------------------------------------*/ uSHORT ParseCommandLine(int argc,char *argv[]) { uINT i,j,Invalid; char pram[80]; uSHORT Rtnval; /* Parse The Command Line Options */ Rtnval = 0; Invalid = 0; /* Loop Through All Parameters Passed In */ for(i = 1; i < argc; ++i) { if(Rtnval) break; /* Pull Out The Parameter And Convert It To Upper Case */ strcpy(pram,argv[i]); strupr(pram); /* Loop Through Our List To See If It Is In There */ for(j = 0; option[j].text != NULL; ++j) { if(strncmp(pram + 1, option[j].text, option[j].len) == 0) { /* We Found It, So Take The Appropriate Action */ switch(option[j].num) { /* ?,HELP : Display The Help Menu */ case 1: case 2: DisplayHelp(); Rtnval = 1; break; /* VERBOSE : Turn On The Verbose Option */ case 3: Verbose = 1; break; /* EATAHEX : Turn On The EATA Packet Hex Print Option */ case 4: EataHex = 1; break; /* EATAINFO : Turn On The EATA InfoPrint Option */ case 5: EataInfo = 1; break; /* NOKILL : Turn On The No Kill Feature */ case 6: NoKill = 1; break; #ifdef _SINIX_ADDON /* DEMO : Do not open Adaptor for demo mode */ case 7: DemoMode = 1; break; /* STOP : Halt idling engines via shmem */ case 8: ExitEngine = 1; break; /* MSG : Debug Engine message calls */ case 9: DebugEngMsg = 1; break; /* SIG : Print Signature and Exit */ case 10: Signature = 1; break; /* FDEBUG : Print Debug Output to File */ case 11: i++; DebugToFile = atoi(argv[i]); if (DebugToFile <= 0) Invalid++; break; #endif } break; } } /* Bad Option, So Print Error, Display The Help Screen And Exit */ if((option[j].text == NULL)||(Invalid)) { printf("\nError : Invalid Parameter %s : Program Terminated!!\n\n", argv[i]); DisplayHelp(); Rtnval = 1; } } return(Rtnval); } /*-------------------------------------------------------------------------*/ /* Function DisplayHelp */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed Into This Function */ /* */ /* This Function Displays The Help Options */ /* */ /* Return : NONE */ /*-------------------------------------------------------------------------*/ #ifdef _SINIX_ADDON void DisplayHelp(void) { printf("Usage: engine [-options]\n"); printf( " options:\n"); printf( " -verbose : Display All Connection And Message Information\n"); printf( " -eatahex : Display Hex Dump Of EATA Packet\n"); printf( " -eatainfo : Display EATA Packet Info\n"); printf( " -nokill : Engine Will Not Unload When Not In Use\n"); printf( " -demo : Engine Will Run in Demo Mode\n"); printf( " -stop : Engine Will Stop Another That Is Not Yet Terminated\n"); printf( " -msg : Display Engine Message Calls\n"); printf( " -sig : Display Engine Signature and Exit\n"); printf( " -fdebug : Internal Debug to '/tmp/dpteng_dbg.log' : 1..10\n"); printf(" -help or ? : Display Help Screen\n"); } #else void DisplayHelp(void) { printf("The Pramaters For This Program Are :\n"); printf( " /VERBOSE : Display All Connection And Message Information\n"); printf( " /EATAHEX : Display Hex Dump Of EATA Packet\n"); printf( " /EATAINFO : Display EATA Packet Info\n"); printf( " /NOKILL : Engine Will Not Unload When Not In Use\n"); printf(" /HELP or /? : Display Help Screen\n"); } #endif // SINIX_ADDON #ifndef SNI_MIPS #ifdef __cplusplus } /* extern C */ #endif #endif // SNI_MIPS /*-------------------------------------------------------------------------*/ /* Function DptSignalIgnore */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed Into This Function */ /* */ /* This Function is used to ignore the first shutdown signal */ /* */ /* Return : NONE */ /*-------------------------------------------------------------------------*/ void DptSignalIgnore(int nothing) { /* if (LoggerID) { if (Verbose) printf("Engine ignoring signal: %d\n", nothing); sleep(5); } else { RmLock(NULL); exit(ExitGoodStatus); } */ nothing = nothing; } raidutils-0.0.6.orig/raideng/engfile1.cpp0000664000175000000620000000647310044153312020152 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - ENGFILE1.CPP //*************************************************************************** // //Description: // // This file contains the function defintions for the fundamental //DPT classes. // //Author: Doug Anderson //Date: 9/23/92 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files //Function - Definitions ---------------------------------------------------- // List files #include "englists.cpp" // lists that can delete engine objects // Functions used globally throughout the engine #include "gbl_fns.cpp" // Core engine files #include "core.cpp" // dptCore_C definitions #include "core_con.cpp" // dptConnection_C definitions #include "core_obj.cpp" // dptObject_C definitions #include "core_dev.cpp" // dptDevice_C definitions #include "core_mgr.cpp" // dptMgr_C definitions // SCSI address range class #include "addr_rng.cpp" // dptAddrRange_C definitions // SCSI engine files #include "scsi_con.cpp" // dptSCSIcon_C definitions #include "scsi_obj.cpp" // dptSCSIobj_C definitions #include "scsi_dev.cpp" // dptSCSIdev_C definitions #include "scsi_mgr.cpp" // dptSCSImgr_C definitions #include "scsi_bcd.cpp" // dptSCSIbcd_C definitions #include "scsi_hba.cpp" // dptSCSIhba_C definitions #include "scsidrvr.cpp" // dptSCSIdrvr_C definitions // RAID classes #include "raid.cpp" // Miscellaneous RAID classes #include "raid_dev.cpp" // dptRAIDdev_C definitions #include "raid_mgr.cpp" // dptRAIDmgr_C definitions #include "raid_bcd.cpp" // dptRAIDbcd_C definitions #include "raid_hba.cpp" // dptRAIDhba_C definitions #include "raiddrvr.cpp" // dptRAIDdrvr_C definitions raidutils-0.0.6.orig/raideng/engfile2.cpp0000664000175000000620000000440210044153312020141 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - ENGFILE2.CPP //*************************************************************************** // //Description: // // This file contains the function defintions for the fundamental //DPT classes. // //Author: Doug Anderson //Date: 9/23/92 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files //Function - Definitions ---------------------------------------------------- #include "connect.cpp" // dptConnection_C definitions #include "object.cpp" // dptObject_C definitions #include "device.cpp" // dptDevice_C definitions raidutils-0.0.6.orig/raideng/engfile3.cpp0000664000175000000620000000524010044153312020143 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - ENGFILE3.CPP //*************************************************************************** // //Description: // // This file contains the function defintions for the fundamental //DPT classes. // //Author: Doug Anderson //Date: 9/23/92 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files //Function - Definitions ---------------------------------------------------- #include "manager.cpp" // dptMgr_C definitions #include "hba.cpp" // dptHBA_C definitions #include "driver.cpp" // dptDriver_C definitions // DPT I/O Classes #include "eng_std.cpp" // Miscellaneous engine classes #include "scsi_log.cpp" // dptSCSIlog_C definitions #include "hba_log.cpp" // dptHBAlog_C definitions #include "stat_log.cpp" // dptHBAstatLog_C & dptDevStatLog_C defs #include "core_ccb.cpp" // coreCCB_C definitions #include "scsi_ccb.cpp" // scsiCCB_C definitions raidutils-0.0.6.orig/raideng/engine.cpp0000664000175000000620000005666010044153311017727 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - ENGINE.CPP //*************************************************************************** // //Description: // // This file contains function definitions for the dptEngine_C class. // //Author: Doug Anderson //Date: 4/7/93 // //Editors: // //Remarks: // // //*************************************************************************** // Include Files --------------------------------------------------------- #include "allfiles.hpp" #ifdef _SINIX_ADDON #include #include "msg_str.hpp" extern int DebugEngMsg; #else #ifdef DEBUG_NW #include #include "msg_str.hpp" #include extern int DPT_EngineScreenID; #else #ifdef _DPT_NETWARE #include #endif #endif #endif // _SINIX_ADDON // enables saving packets to file for // use with RTS (engine test) extern "C" { # ifndef TRUE # define TRUE 1 # define FALSE 0 # endif int EngineTest = FALSE; } #ifdef _DPT_NETWARE #include #endif #ifdef _DPT_WIN_NT #include #endif #ifdef _DPT_OS2 extern "C" { SEMAPHORE_T engineDone, engineControl; } #endif // Functions Prototypes -------------------------------------------------- DPT_RTN_T connect(dptBuffer_S *,dptBuffer_S *); DPT_RTN_T disconnect(DPT_TAG_T); DPT_RTN_T rtnEngSig(dptBuffer_S *); DPT_RTN_T initEngine(); #ifdef _DPT_NETWARE extern int DPT_EngineTGID; #endif // External Variables ---------------------------------------------------- // The engine's DPT signature structure extern dpt_sig_S engineSig; extern "C" dpt_sig_S const *engineSig_P = &engineSig; // Process Global Varaibles ---------------------------------------------- // Timeout waiting for mutually exclusive access to the connection list uLONG connSemTimeout = 30*1000; // Semaphore to allow mutually exclusive access to the connection list SEMAPHORE_T connSemaphore = 0; // Pointer to the connection list (Dynamically allocated) dptCoreList_C *connList_P = NULL; // Non-zero indicates that this process can access the engine uLONG processInitOK = 0; // Call osdOpenEngine() for every process that attaches to the engine #if defined (_DPT_WIN_NT) || defined (_DPT_OS2) // Non-zero indicates that osdOpenEngine() has been successfully called uLONG osdInitOK = 0; #endif //************************************************************************ // Shared Data // // The following data should be shared by all processes that connect // to the DPT engine. //------------------------------------------------------------------------ #if defined (_DPT_WIN_NT) #if !defined(_M_ALPHA) #pragma data_seg(".sdata") #endif #elif defined ( _DPT_OS2) #pragma data_seg(GlobData) #endif // Number of engine connections uLONG connectionCount = 0; // Number of processes attached to the engine (if available) uLONG processCntr = 0; #if !defined (_DPT_WIN_NT) && !defined (_DPT_OS2) // Non-zero indicates that osdOpenEngine() has been successfully called uLONG osdInitOK = 0; #endif #if defined (_DPT_WIN_NT) #pragma data_seg() #elif defined ( _DPT_OS2) #pragma data_seg() #endif //************************************************************************ //Function - connect() - start //=========================================================================== // //Description: // // This function establishes a connection to the DPT engine. // //Parameters: // //Return Value: // // Connection tag to communicate with the engine. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. If the return value is not MSG_RTN_COMPLETED, then no connection // has been established. // //--------------------------------------------------------------------------- DPT_RTN_T connect(dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P) { DPT_RTN_T retVal; dptConnection_C *conn_P; uSHORT ioMethod; // Get the desired I/O method if (!toEng_P->extract(&ioMethod,sizeof(uSHORT))) ioMethod = DPT_IO_NONE; // If no I/O has been requested... if (ioMethod==DPT_IO_NONE) // Create a new connection conn_P = new dptConnection_C; // If the requested I/O method is OK... else { // Determine if the I/O method is valid retVal = osdIOrequest(ioMethod); if (retVal != MSG_RTN_COMPLETED) return (retVal); else // Create a new connection conn_P = new dptConnection_C; } // Indicate a memory allocation error retVal = MSG_RTN_FAILED | ERR_MEM_ALLOC; // If a connection object was created if (conn_P!=NULL) { // Set the connection's I/O method conn_P->ioMethod = ioMethod; // Attempt to create manager zero if (conn_P->createMgrZero()) { retVal = MSG_RTN_DATA_OVERFLOW; // Return the engine compatability word fromEng_P->insert(DPT_ENGINE_COMPATIBILITY); // Return the connection's tag as the access key if (fromEng_P->insert(conn_P->tag())) { retVal = MSG_RTN_FAILED | ERR_SEMAPHORE_TIMEOUT; // Attempt to gain exclusive access to the connection list if (osdRequestSemaphore(connSemaphore,connSemTimeout) == 0) { retVal = MSG_RTN_FAILED | ERR_MEM_ALLOC; // Add the new connection to the end of the connection list if (connList_P->addEnd(conn_P)) { // Indicate success retVal = MSG_RTN_COMPLETED; connectionCount++; // Return the connection & process counts for info purposes fromEng_P->insert(connectionCount); fromEng_P->insert(processCntr); } // Release exclusive access to the connection list osdReleaseSemaphore(connSemaphore); } } } if (retVal!=MSG_RTN_COMPLETED) // Delete the connection if the access tag is not returned delete (conn_P); else if (ioMethod != DPT_IO_NONE) // Acknowledge the connection osdConnected(ioMethod); } // end if (conn_P!=NULL) return (retVal); } //connect() - end //Function - disconnect() - start //=========================================================================== // //Description: // // This function disconnects the specified connection tag from the //DPT engine. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T disconnect(DPT_TAG_T connTag) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_SEMAPHORE_TIMEOUT; // Attempt to gain exlusive access to the connection list if (osdRequestSemaphore(connSemaphore,connSemTimeout) == 0) { retVal = MSG_RTN_FAILED | ERR_INVALID_CONN_TAG; // Get a pointer to the specified connection dptCoreCon_C *conn_P = (dptCoreCon_C *) connList_P->getObject(connTag); // If a connection was found... if (conn_P != NULL) { // Destroy the specified connection and remove it from the list connList_P->del(conn_P); connectionCount--; // Indicate success retVal = MSG_RTN_COMPLETED; } // Release exclusive access to the connection list osdReleaseSemaphore(connSemaphore); } return(retVal); } //disconnect() - end //Function - rtnEngSig() - start //=========================================================================== // //Description: // // This function returns the engine's DPT signature structure. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T rtnEngSig(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; // Return the engine's signature structure if (fromEng_P->insert(&engineSig,sizeof(dpt_sig_S))) retVal = MSG_RTN_COMPLETED; return (retVal); } //rtnEngSig() - end //Function - initEngine() - start //=========================================================================== // //Description: // // This function performs engine initialization for each process //that attaches to the engine. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T initEngine() { DPT_RTN_T retVal = MSG_RTN_COMPLETED; // If this process's resources have not been allocated... if (!processInitOK) { // If the OS dependent layer has not been initialized... if (!osdInitOK) { // Perform operating system dependent initialization retVal = osdOpenEngine(); // If successful if (retVal == MSG_RTN_COMPLETED) // Indicate a successful engine initialization osdInitOK = 1; // If no error code was returned... else if (retVal == MSG_RTN_FAILED) // Indicate a generic osdOpenEngine() failure retVal = MSG_RTN_FAILED | ERR_OSD_OPEN_ENGINE; } // If the engine OS dependent layer has been initialized... if (osdInitOK) { // If the connection list semaphore has not been created... if (connSemaphore == 0) // Allocate the connection list semaphore connSemaphore = osdCreateSemaphore(); // connSemaphore = CreateMutex(sa_P,FALSE,"DPTEngineMutex"); // If the connection list semaphore was created... if (connSemaphore == 0) retVal = MSG_RTN_FAILED | ERR_SEMAPHORE_ALLOC; else { // If a connection list has not been allocated... if (connList_P == NULL) // Allocate the new connection list connList_P = new dptCoreList_C; // If there is no connection list if (connList_P == NULL) retVal = MSG_RTN_FAILED | ERR_CONN_LIST_ALLOC; else processInitOK = 1; } } } return (retVal); } //initEngine() - end //************************************************************************ // No name mangling //------------------------------------------------------------------------ extern "C" { //Function - DPT_StartEngine() - start //=========================================================================== // //Description: // // This function performs DPT engine initialization. This function //should be called one time to initialize the DPT engine. If this function //returns a failure, the engine should fail to load. // // 1. In a typical DLL environment, this function should be placed in // the DLL start up code that is called when the DLL is loaded. // 2. Under UNIX, the engine main() function should call this function. // 3. If using the ERGO DOS extender, this function should be exported // and called from the application's DPT_OpenEngine() function. // 4. If creating a real mode DOS application, this function should // be called inside the application's DPT_OpenEngine() function. // //Parameters: // //Return Value: // // MSG_RTN_COMPLETED - Success - The engine entry point function may // be called. // else - Failure - Calling the engine entry point function // will result in an error. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- #ifdef _DPT_ERGO DPT_RTN_T DPT_EXPORT DPT_StartEngine(void) #else DPT_RTN_T DPT_StartEngine(void) #endif { #ifdef _DPT_NETWARE // Set the thread ID to the engine's thread int curTGID = SetThreadGroupID(DPT_EngineTGID); #endif // Increment the process counter processCntr++; DPT_RTN_T retVal = initEngine(); #ifdef _DPT_NETWARE // Restore the caller's thread ID SetThreadGroupID(curTGID); #endif return (retVal); } //DPT_StartEngine() - end #ifdef SCAN_DEBUG #include #endif //Function - DPT_Engine() - start //=========================================================================== // //Description: // // This function processes a DPT engine message. If the //DPT engine. If the message is not intercepted by the engine, it is //passed on to a specific system configuration manager. // //Parameters: // // connTag // - The unique # associated with a particular connection // message // - The message command // targetTag // - The tag of the engine object the message is targeted for // fromEngVoid_P // - Pointer to a buffer to which the engine may write data // toEngVoid_P // - Pointer to a buffer from which the engine may read data // timeout // - Message timeout value (in milliseconds) // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. The two data buffers (fromEngVoid_P,toEngVoid_P) must have // at least enough space allocated for a dptBuffer_S header. // //--------------------------------------------------------------------------- DPT_RTN_T DPT_EXPORT DPT_Engine(DPT_TAG_T connTag, DPT_MSG_T message, DPT_TAG_T targetTag, void *fromEngVoid_P, void *toEngVoid_P, uLONG timeout ) { DPT_RTN_T retVal; dptConnection_C *conn_P = NULL; // engine testing vars FILE *pFile; #ifndef UINT # define UINT unsigned int #endif uSHORT BufSize; #ifdef _SINIX_ADDON char *msg_P = NULL; #else #ifdef DEBUG_NW char *msg_P = NULL; int curScreenID = 0; #endif #endif // _SINIX_ADDON #ifdef _DPT_NETWARE // Set the thread ID to the engine's thread int curTGID = SetThreadGroupID(DPT_EngineTGID); #endif #ifdef SCAN_DEBUG if (message == MSG_IO_SCAN_SYSTEM) { #ifdef __UNIX__ FILE *out = fopen("/tmp/scan.txt", "a+"); #elif defined _DPT_NETWARE FILE *out = fopen("sys:system\\scan.txt"); #else FILE *out = fopen("c:\\scan.txt", "a+"); #endif switch(message) { case MSG_IO_SCAN_SYSTEM: fprintf(out, "MSG_IO_SCAN_SYSTEM, connection: %ld\n", connTag); break; case MSG_IO_SCAN_PHYSICALS: fprintf(out, "MSG_IO_SCAN_PHYSICALS, connection: %ld\n", connTag); break; case MSG_IO_SCAN_LOGICALS: fprintf(out, "MSG_IO_SCAN_LOGICALS, connection: %ld\n", connTag); break; } fclose(out); } #endif // Engine testing code - turn global testing flag on/off switch( message ) { case MSG_ENGINE_TEST_ON: EngineTest = TRUE; return MSG_RTN_COMPLETED; case MSG_ENGINE_TEST_OFF: EngineTest = FALSE; return MSG_RTN_COMPLETED; } // If an initialization error... if (!processInitOK) { // retVal = MSG_RTN_FAILED | ERR_ENGINE_INIT; // Retry the engine initialization retVal = initEngine(); if(retVal != MSG_RTN_COMPLETED) { #ifdef _DPT_NETWARE // Restore the caller's thread ID SetThreadGroupID(curTGID); #endif return retVal; } } // If a NULL I/O buffer was specified... if ((fromEngVoid_P==NULL) || (toEngVoid_P==NULL)) retVal = MSG_RTN_FAILED | ERR_NULL_IO_BUFFER; else { #ifdef _DPT_OS2 ULONG notInControl = 1, nothing; // open the semaphores to the engine control and the event sem // that signals when someone is done with the engine if (DosOpenMutexSem("\\sem32\\engctl.sem", &engineControl)) return(MSG_RTN_FAILED); if (DosOpenEventSem("\\sem32\\engdne.sem", &engineDone)) return(MSG_RTN_FAILED); // while someone does not have the engine control sem while(notInControl) { // wait for someone in the engine do be done DosWaitEventSem(engineDone, 5000); // race for the control sem notInControl = osdRequestSemaphore(engineControl, 0); } // reset the event sem so everyone else goes back to sleep DosResetEventSem(engineDone, ¬hing); #endif // Cast the data buffers as DPT I/O buffers dptBuffer_S *fromEng_P = (dptBuffer_S *) fromEngVoid_P; dptBuffer_S *toEng_P = (dptBuffer_S *) toEngVoid_P; // Prepare the output buffer for new data fromEng_P->reset(); // Prepare the input buffer for reading toEng_P->replay(); // Attempt to gain exclusive access to the connection list if (osdRequestSemaphore(connSemaphore,connSemTimeout) == 0) { // Get a pointer to the specified connection object conn_P = (dptConnection_C *) connList_P->getObject(connTag); // Release exclusive access to the connection list osdReleaseSemaphore(connSemaphore); } // Engine testing code if( EngineTest ) { BufSize = (uSHORT)( toEng_P->writeIndex - toEng_P->readIndex ); pFile = fopen( "Last.pkt", "wb" ); // Create the file & write the engine input packet to it if( pFile != NULL ) { fputc( 0x01, pFile ); fwrite( &BufSize, 1, sizeof( BufSize ), pFile ); fwrite( toEng_P->data, 1, BufSize, pFile ); fclose( pFile ); } }// END - Engine testing code #ifdef _SINIX_ADDON if (DebugEngMsg) { if (message < MAX_MESSAGE_NUM) msg_P = engMessageArray[message]; if (msg_P != NULL) printf("\nMSG_%-17s",msg_P); else printf("\nMSG_%lxh",message); printf(" Tag=%.2d BytesTo=%.3d",targetTag,toEng_P->writeIndex); fflush(stdout); } #else #ifdef DEBUG_NW curScreenID = GetCurrentScreen(); SetCurrentScreen(DPT_EngineScreenID); if (message < MAX_MESSAGE_NUM) msg_P = engMessageArray[message]; if (msg_P != NULL) printf("\nMSG_%s",msg_P); else printf("\nMSG_%lxh",message); printf(", TgtTag=%lxh, ToEng=%lxh",targetTag,toEng_P->writeIndex); #endif //debug #endif //_SINIX_ADDON // Handle the message switch (message) { // Special events intercepted by the engine........... // Make a new connection to the engine case MSG_CONNECT: retVal = connect(fromEng_P,toEng_P); break; // Disconnect from the engine case MSG_DISCONNECT: retVal = disconnect(connTag); break; // Return the engine's DPT signature structure case MSG_GET_ENGINE_SIG: retVal = rtnEngSig(fromEng_P); break; // Return the engine compatability indicator case MSG_GET_COMPATABILITY: retVal = MSG_RTN_DATA_OVERFLOW; if (fromEng_P->insert(DPT_ENGINE_COMPATIBILITY)) retVal = MSG_RTN_COMPLETED; break; // Event targeted for a specific configuration........ default: // Indicate that access to the connection list was not obtained retVal = MSG_RTN_FAILED | ERR_SEMAPHORE_TIMEOUT; // If a valid connection was found... if (conn_P!=NULL) { // Pass the event on to the appropriate connection retVal = conn_P->handleMessage(message,targetTag,fromEng_P,toEng_P,timeout); } else { // Indicate that an invalid connection tag was specified retVal = MSG_RTN_FAILED | ERR_INVALID_CONN_TAG; } break; } // end switch #ifdef _SINIX_ADDON if (DebugEngMsg) { printf(" BytesFrom=%.3d ",fromEng_P->writeIndex); if (!targetTag) printf("Global Tag "); else if ((fromEng_P->writeIndex >= 18) && fromEng_P->data[12] && \ (fromEng_P->data[13] < 4) && (fromEng_P->data[14] < 16)) { printf("%s ", fromEng_P->data[17]==1 ? "Phy" : "Log"); printf("(%d,%d,%d,%d)", fromEng_P->data[12], fromEng_P->data[13], fromEng_P->data[14], fromEng_P->data[15]); } else printf(" "); if (retVal==0) printf(" ok"); else printf(" err=%.4x", retVal & ~MSG_RTN_FAILED); fflush(stdout); } #else #ifdef DEBUG_NW printf(", Rtn=%lxh, FromEng=%lxh",retVal,fromEng_P->writeIndex); SetCurrentScreen(curScreenID); #endif #endif /* _SINIX_ADDON */ if( EngineTest ) { // write the packet being returned to the calling app pFile = fopen( "Last.pkt", "ab+" ); BufSize = (uSHORT)( fromEng_P->writeIndex - fromEng_P->readIndex ); if( pFile != NULL ) { fputc( 0x04, pFile ); fwrite( &BufSize, 1, sizeof( BufSize ), pFile ); fwrite( fromEng_P->data, 1, BufSize, pFile ); fclose( pFile ); } } } // end if (buffers!=NULL) #ifdef _DPT_NETWARE // Restore the caller's thread ID SetThreadGroupID(curTGID); #endif #ifdef _DPT_OS2 // we are done with the engine DosPostEventSem(engineDone); DosCloseEventSem(engineDone); // release control to it and leave DosReleaseMutexSem(engineControl); DosCloseMutexSem(engineControl); #endif return(retVal); } //DPT_Engine() - end //Function - DPT_StopEngine() - start //=========================================================================== // //Description: // // This function performs DPT engine shut down operations. This //function should be called one time to clean-up engine data structures. // // 1. In a typical DLL environment, this function should be placed in // the DLL shut down code that is called when the DLL is unloaded. // 2. Under UNIX, the engine main() function should call this function. // 3. If using the ERGO DOS extender, this function should be exported // and called from the application's DPT_CloseEngine() function. // 4. If creating a real mode DOS application, this function should // be called inside the application's DPT_CloseEngine() function. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- #ifdef _DPT_ERGO DPT_RTN_T DPT_EXPORT DPT_StopEngine(void) #else DPT_RTN_T DPT_StopEngine(void) #endif { DPT_RTN_T retVal = MSG_RTN_COMPLETED; #ifdef _DPT_NETWARE // Set the thread ID to the engine's thread int curTGID = SetThreadGroupID(DPT_EngineTGID); #endif // For safety, don't let it fall below zero if (processCntr != 0) // Decrement the attached process counter processCntr--; // Indicate that the engine is not properly initialized processInitOK = 0; // If a connection list exists. if (connList_P != NULL) { // Delete all connections connList_P->kill(); // Delete the connection list delete (connList_P); // Indicate that no connection list exists connList_P = NULL; } // If a connection list semaphore was created... if (connSemaphore != 0) { // Destroy the connection list semaphore if (osdDestroySemaphore(connSemaphore) == 0) // Indicate that no connection list semaphore exists connSemaphore = 0; } if (processCntr == 0) retVal = osdCloseEngine(); if (retVal == MSG_RTN_COMPLETED) { if (connSemaphore != 0) retVal = MSG_RTN_FAILED | ERR_DESTROY_SEMAPHORE; } #ifdef _DPT_NETWARE // Restore the caller's thread ID SetThreadGroupID(curTGID); #endif return (retVal); } //DPT_StopEngine() - end }; // end - extern "C" raidutils-0.0.6.orig/raideng/englists.cpp0000664000175000000620000001350010044153312020275 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - ENGLISTS.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the DPT engine //list classes. // //Author: Doug Anderson //Date: 1/22/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files #include "englists.hpp" #include "core.hpp" #include "raid.h" #include "eng_ccb.hpp" #include "eng_std.h" //Definitions - Defines & Constants ----------------------------------------- //Definitions - Structure & Typedef ----------------------------------------- //Variables - External ------------------------------------------------------ //Variables - Global -------------------------------------------------------- //Variables - Static -------------------------------------------------------- //Prototypes - function ----------------------------------------------------- //Function - dptCoreList_C::getObject() - start //=========================================================================== // //Description: // // This operator returns a pointer to an object with the specified tag. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void * dptCoreList_C::getObject(DPT_TAG_T tgtTag) { uSHORT done = 0; dptCore_C *obj_P; // Start the search from the head element obj_P = (dptCore_C *) reset(); while ( (obj_P!=NULL) && (!done) ) { if (obj_P->tag()==tgtTag) done = 1; else obj_P = (dptCore_C *) next(); } return(cur()); } //dptCoreList_C::getObject() - end //Function - del() - start //=========================================================================== // //Description: // // This function deletes the object pointed to by the thisEl_P //pointer and removes the associated element from the list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- //Function - del(void *) - start //=========================================================================== // //Description: // // This function deletes the specified object and removes the //associated element from the list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- //Function - kill() - start //=========================================================================== // //Description: // // This function deletes all objects in the list and their //associated list elements. After calling this routine the //list contains no elements. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- //=========================================================================== #ifdef DEL_TYPE #undef DEL_TYPE #endif #define DEL_TYPE raidDef_S void * dptRAIDdefList_C :: del() { #include "del1.cpp" } void * dptRAIDdefList_C :: del(void *obj_P) { #include "del2.cpp" } void dptRAIDdefList_C :: kill() { #include "kill.cpp" } //=========================================================================== #ifdef DEL_TYPE #undef DEL_TYPE #endif #define DEL_TYPE dptCore_C void * dptCoreDelList_C :: del() { #include "del1.cpp" } void * dptCoreDelList_C :: del(void *obj_P) { #include "del2.cpp" } void dptCoreDelList_C :: kill() { #include "kill.cpp" } //=========================================================================== #ifdef DEL_TYPE #undef DEL_TYPE #endif #define DEL_TYPE engCCB_C void * dptCCBlist_C :: del() { #include "del1.cpp" } void * dptCCBlist_C :: del(void *obj_P) { #include "del2.cpp" } void dptCCBlist_C :: kill() { #include "kill.cpp" } //=========================================================================== raidutils-0.0.6.orig/raideng/englists.hpp0000664000175000000620000000563610044153333020320 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __ENGLISTS_HPP #define __ENGLISTS_HPP //File - ENGLISTS.HPP //*************************************************************************** // //Description: // // This file contains the class definition for the DPT engine list //classes. // //Author: Doug Anderson //Date: 6/29/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "ptrarray.hpp" #include "eng_osd.h" class dptCoreDelList_C : public ptrArrayList_C { #include "del_list.hpp" }; class dptRAIDdefList_C : public ptrArrayList_C { #include "del_list.hpp" }; class dptCCBlist_C : public ptrArrayList_C { #include "del_list.hpp" }; class dptIntList_C : public ptrArrayList_C { #include "del_list.hpp" }; //Class - dptCoreList_C - start //=========================================================================== // //Description: // // This class holds a list of core DPT engine objects and provides //read only access to the dptList_C class. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptCoreList_C : public dptCoreDelList_C { // Friends............................................ public: // Returns a pointer to an object with the specified tag void * getObject(uLONG); }; //dptCoreList_C - end #endif raidutils-0.0.6.orig/raideng/gbl_fns.cpp0000664000175000000620000004255010044153311020065 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - GBL_FNS.CPP //*************************************************************************** // //Description: // // This file contains definitions for the stand alone functions //that are used globally throughout the DPT engine. // //Author: Doug Anderson //Date: 5/10/94 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files #include "gbl_fns.hpp" //Function - positionSCSI() - start //=========================================================================== // //Description: // // This function positions the specified list's current position //pointer to point to the first object with a higher SCSI address than //the specified SCSI address. // //Parameters: // //Return Value: // // 1 = The specified address unique to the list // 0 = The specified address is not unique to the list // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function can be called by pre-add-to-list functions to // create a list of SCSI objects sorted in SCSI address order. // //--------------------------------------------------------------------------- uSHORT positionSCSI(dptCoreList_C &list,dptAddr_S inAddr) { uSHORT unique = 1; uSHORT done = 0; dptSCSIobj_C *obj_P = (dptSCSIobj_C *) list.reset(); while ((obj_P!=NULL) && !done) { // Update the object's HBA number obj_P->updateHBAnum(); // If the SCSI addr matches this object's addr... if (inAddr == obj_P->getAddr()) unique = 0; // If the SCSI addr is less than this object's addr... if (inAddr < obj_P->getAddr()) // Done traversing the list done = 1; else // Get the next object obj_P = (dptSCSIobj_C *) list.next(); } // Return the unique status of the return (unique); } //positionSCSI() - end //Function - isUniqueAddr() - start //=========================================================================== // //Description: // // This function determines if the specified SCSI address exists //within the specified list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT isUniqueAddr(dptCoreList_C &list,dptAddr_S inAddr,uCHAR mask) { uCHAR addrMatch; uSHORT unique = 1; dptSCSIobj_C *obj_P = (dptSCSIobj_C *) list.reset(); while ((obj_P!=NULL) && (unique)) { addrMatch = 0; // Update the object's HBA # obj_P->updateHBAnum(); if (obj_P->getHBA()==inAddr.hba) addrMatch |= 0x08; if (obj_P->getChan()==inAddr.chan) addrMatch |= 0x04; if (obj_P->getID()==inAddr.id) addrMatch |= 0x02; if (obj_P->getLUN()==inAddr.lun) addrMatch |= 0x01; if ((addrMatch&mask)==mask) unique = 0; // Get the next element obj_P = (dptSCSIobj_C *) list.next(); } return (unique); } //isUniqueAddr() - end //Function - rtnIDfromList() - start //=========================================================================== // //Description: // // This function prepares to traverse a list and return the ID //structures of all object's of the specified type. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T rtnIDfromList(dptCoreList_C &list,dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P,uSHORT action ) { DPT_RTN_T retVal; uSHORT objType = DPT_ANY_OBJECT; uSHORT allExcept = 0; uSHORT raidType = 0xffff; // If an object type was specified... if (toEng_P->extract(objType)) { // If the exception bit is set... if (objType & DPT_EXCEPT) { // Clear the exception bit in the object type objType &= ~DPT_EXCEPT; if (objType==DPT_ANY_MANAGER) objType = DPT_ANY_DEVICE; else if (objType==DPT_ANY_DEVICE) objType = DPT_ANY_MANAGER; else if (objType==DPT_ANY_OBJECT) objType = 0xffff; else allExcept = 1; } } if (!toEng_P->extract(raidType)) raidType = 0xffff; // Return the ID structure of all objects of the specified type retVal = rtnFromList(list,fromEng_P,objType,action,allExcept,raidType); return (retVal); } //rtnIDfromList() - end //Function - rtnFromList() - start //=========================================================================== // //Description: // // This function traverses the specified list returning the DPT ID //structure for the specified object type. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T rtnFromList(dptCoreList_C &list,dptBuffer_S *&fromEng_P, uSHORT objType,uSHORT action,uSHORT allExcept, uSHORT raidType ) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; dptSCSImgr_C *mgr_P; dptRAIDdev_C *raid_P; dptSCSIobj_C *obj_P = (dptSCSIobj_C *) list.reset(); while (obj_P!=NULL) { // If a standard object type... if (objType<0x1000) { if (allExcept) { // If this object is not the specified type... if (obj_P->getObjType()!=objType) retVal = obj_P->returnID(fromEng_P); } // If this object is the specified type... else if (obj_P->getObjType()==objType) retVal = obj_P->returnID(fromEng_P); } if (obj_P->isManager()) { // Cast the object as a manager mgr_P = (dptSCSImgr_C *) obj_P; if ((objType==DPT_ANY_MANAGER) || (objType==DPT_ANY_OBJECT)) // Return the manager's ID retVal = obj_P->returnID(fromEng_P); // If the sub-manager's logical list should be traversed... if (action==OPT_TRAVERSE_LOG) { retVal = rtnFromList(mgr_P->logList,fromEng_P,objType, action,allExcept,raidType); } // If the sub-manager's physical list should be traversed... if (action==OPT_TRAVERSE_PHY) { mgr_P = (dptSCSImgr_C *) obj_P; retVal = rtnFromList(mgr_P->phyList,fromEng_P,objType, action,allExcept,raidType); } } else { if ((objType==DPT_ANY_DEVICE) || (objType==DPT_ANY_OBJECT)) // Return the device's ID retVal = obj_P->returnID(fromEng_P); // Cast the object as a RAID device raid_P = (dptRAIDdev_C *) obj_P; if (objType==DPT_RAID_TYPE) { if (allExcept) { // If the device is not the specified RAID type... if (raid_P->getRAIDtype()!=raidType) retVal = obj_P->returnID(fromEng_P); } // If the device is the specified RAID type... else if (raid_P->getRAIDtype()==raidType) retVal = obj_P->returnID(fromEng_P); } // If the component list should be traversed... if (action==OPT_TRAVERSE_COMP) retVal = rtnFromList(raid_P->compList,fromEng_P,objType, action,allExcept,raidType); } // end else if (isDevice()) // Get the next object in the list obj_P = (dptSCSIobj_C *) list.next(); } return (retVal); } //rtnFromList() - end //Function - findSubString() - start //=========================================================================== // //Description: // // This function attempts to find the subStr within the searchStr. //The maximum size of each string is determined by the smaller of the //specified input limit or the first invalid ASCII character found. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // Search Type: // ------------ // 0 = subStr must match searchStr exactly // - All trailing spaces are ignored // 1 = Match subStr to 1st characters of searchStr // - Ignore any trailing characters in the searchStr // 2 = Find subStr anywhere in the searchStr // (sub-string search) // //--------------------------------------------------------------------------- uSHORT findSubString(uCHAR *subStr,uCHAR *searchStr, uSHORT subLimit,uSHORT searchLimit, uCHAR searchType ) { uSHORT found = 0; uSHORT firstCh,restOfCh,firstLimit; // Determine the maximum size of the search string subLimit = strSize(subStr,subLimit); // Determine the maximum size of the search string searchLimit = strSize(searchStr,searchLimit); if ( (subLimit<=searchLimit) && (searchLimit>0) && (subLimit>0) ) { if (searchType==2) // Search for the sub-string anywhere in the search string firstLimit = searchLimit-subLimit+1; else // Search for the sub-string at the front of the search string firstLimit = 1; // Look for the sub string in the search string for (firstCh=0;firstCh126)) valid = 0; else { if (str_P[limit]==' ') trailBlanks++; else trailBlanks = 0; limit++; } } limit -= trailBlanks; return (limit); } //strSize() - end //Function - upCh() - start //=========================================================================== // //Description: // // This function returns the uppercase character of the specified //input character. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR upCh(uCHAR inChar) { if ((inChar>=97) && (inChar<=122)) inChar -= 32; return (inChar); } //upCh() - end //--------------------------------------------------------------------------- char upCh(char inChar) { if ((inChar>=97) && (inChar<=122)) inChar -= 32; return (inChar); } //upCh() - end //Function - upperCase() - start //=========================================================================== // //Description: // // This function converts the specified string to uppercase. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void upperCase(uCHAR *b_P) { uSHORT i = 0; while ((b_P[i]>=32) && (b_P[i]<=126)) { b_P[i] = upCh(b_P[i]); i++; } } //upperCase() - end //Function - findDASD() - start //=========================================================================== // //Description: // // This function searches the specified list for a non-removeable //DASD device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT findDASD(dptCoreList_C &list) { uSHORT found = 0; // Check all sub-manager's logical device lists dptObject_C *obj_P = (dptObject_C *) list.reset(); while ((obj_P!=NULL) && !found) { if (obj_P->isManager()) found = findDASD(((dptManager_C *)obj_P)->logList); // If a non-removeable DASD device is present... else if ((((dptDevice_C *)obj_P)->getObjType()==DPT_SCSI_DASD) && !((dptDevice_C *)obj_P)->isRemoveable() ) found = 1; obj_P = (dptObject_C *) list.next(); } // end while (obj_P!=NULL) return (found); } //findDASD() - end //Function - findObjectAt() - start //=========================================================================== // //Description: // // This function searches for a device visible in the specified list //or a sub-manager's logical device list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptObject_C * findObjectAt(dptCoreList_C &list,dptAddr_S inAddr) { dptObject_C *retObj_P = NULL; dptObject_C *obj_P = (dptObject_C *) list.reset(); while ((obj_P!=NULL) && (retObj_P==NULL)) { // Update the object's HBA # obj_P->updateHBAnum(); // If the object is a manager... if (obj_P->isManager()) { // Attempt to find a logical device retObj_P = findObjectAt(((dptManager_C *)obj_P)->logList,inAddr); // If a device was not found... if (retObj_P==NULL) // If the manager's HBA/Channel/ID match return the manager if ( (obj_P->getHBA()==inAddr.hba) && (obj_P->getChan()==inAddr.chan) && (obj_P->getID()==inAddr.id) ) retObj_P = obj_P; } // If the device's address matches exactly else if (obj_P->getAddr()==inAddr) retObj_P = obj_P; // Get the next physical device obj_P = (dptObject_C *) list.next(); } // Return a pointer to the device found return (retObj_P); } //findObjectAt() - end //Function - findMagicObject() - start //=========================================================================== // //Description: // This function searches the specified list for a device with //the specified magic number. // //--------------------------------------------------------------------------- dptDevice_C * findMagicObject(dptCoreList_C &list,uLONG inMagicNum,uINT noMgrLog) { dptDevice_C *dev_P = NULL; dptObject_C *obj_P = (dptObject_C *) list.reset(); while (obj_P) { // Only check magic #s of device objects (no managers) if (obj_P->isDevice()) { dev_P = (dptDevice_C *) obj_P; // If the device's magic # matches the specified magic # if (dev_P->getMagicNum() == inMagicNum) break; dev_P = NULL; } // If we want to traverse the manager's logical device list else if (!noMgrLog) { dptManager_C *mgr_P = (dptManager_C *) obj_P; // Check the manager's logical device list dev_P = findMagicObject(mgr_P->logList,inMagicNum); if (dev_P) break; } // Try the next object obj_P = (dptObject_C *) list.next(); } return (dev_P); } //findMagicObject() - end //Function - findDeviceFromTag() - start //=========================================================================== //Description: // This function searches the specified list for a device with //the specified tag. This function will search also search all //manager logical lists unless "noMgrLog" is set. //--------------------------------------------------------------------------- dptDevice_C * findDeviceFromTag(dptCoreList_C &list,DPT_TAG_T inTag,uINT noMgrLog) { dptDevice_C *dev_P = NULL; // Search the list for the object with the specified tag... dptObject_C *obj_P = (dptObject_C *) list.getObject(inTag); if (obj_P != NULL) { if (obj_P->isDevice()) dev_P = (dptDevice_C *) obj_P; } // If not found & all manager logical lists should be searched as well... else if ((obj_P == NULL) && !noMgrLog) { dptManager_C *mgr_P = NULL; obj_P = (dptObject_C *) list.reset(); while (obj_P != NULL) { if (obj_P->isManager()) { mgr_P = (dptManager_C *) obj_P; obj_P = (dptObject_C *) mgr_P->logList.getObject(inTag); if (obj_P != NULL) { dev_P = (dptDevice_C *) obj_P; break; } } obj_P = (dptObject_C *) list.next(); } } return (dev_P); } //findDeviceFromTag() - end raidutils-0.0.6.orig/raideng/gbl_fns.hpp0000664000175000000620000000627310044153333020100 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __GBL_FNS_HPP #define __GBL_FNS_HPP //File - GBL_FNS.HPP //*************************************************************************** // //Description: // // This file contains prototypes of stand alone functions that are //used globally throughout the DPT engine. // //Author: Doug Anderson //Date: 5/10/94 // //Editors: // //Remarks: // // //*************************************************************************** //============== // Include Files //============== #include "eng_std.hpp" //================================= // Constants used in function calls //================================= // 1=Traverse sub-managers' physical object lists const uSHORT OPT_TRAVERSE_PHY = 0x0010; // 1=Traverse sub-managers' logical device lists const uSHORT OPT_TRAVERSE_LOG = 0x0011; // 1=Traverse RAID device component list const uSHORT OPT_TRAVERSE_COMP = 0x0012; //==================== // Function Prototypes //==================== uSHORT positionSCSI(dptCoreList_C &,dptAddr_S); uSHORT isUniqueAddr(dptCoreList_C &,dptAddr_S,uCHAR); DPT_RTN_T rtnIDfromList(dptCoreList_C &,dptBuffer_S *,dptBuffer_S *,uSHORT); DPT_RTN_T rtnFromList(dptCoreList_C &,dptBuffer_S *&, uSHORT,uSHORT,uSHORT,uSHORT); uSHORT findSubString(uCHAR *,uCHAR *,uSHORT=0xffff,uSHORT=0xffff,uCHAR=1); uSHORT strSize(uCHAR *&,uSHORT=0xffff); uCHAR upCh(uCHAR inChar); char upCh(char inChar); uSHORT findDASD(dptCoreList_C &); void upperCase(uCHAR *); dptObject_C * findObjectAt(dptCoreList_C &,dptAddr_S); dptDevice_C * findMagicObject(dptCoreList_C &list,uLONG,uINT=0); dptDevice_C * findDeviceFromTag(dptCoreList_C &list,DPT_TAG_T,uINT=0); #endif raidutils-0.0.6.orig/raideng/hba.cpp0000664000175000000620000033662110044153332017215 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - HBA.CPP //*************************************************************************** // //Description: // // This file contains function definitions for the dptHBA_C class. // //Author: Doug Anderson //Date: 4/8/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" // All engine include files #include "i2omsg.h" #include "i2obscsi.h" #include "i2odpt.h" #ifdef _DPT_ERGO extern "C" { #ifndef _DPT_SOLARIS void _Cdecl sleep( unsigned __seconds ); #endif } #endif #ifdef _DPT_UNIX #include // sleep() #endif #include //TODO: remove #include extern "C" { #ifdef _DPT_NETWARE //Watcom 9.5 compiler doesn't do the right thing here and the linker can't resolve //the symbol if it has an extern in front of it unsigned short DPTI_BootFlags; #else extern unsigned short DPTI_BootFlags; #endif }; #if !defined _DPT_UNIX && !defined _DPT_NETWARE && !defined _DPT_DOS extern "C" { DPT_RTN_T DPT_EXPORT osdSendMessage(uLONG, PI2O_MESSAGE_FRAME, PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME); uLONG osdTargetBusy(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); DPT_RTN_T osdRescan(uLONG HbaNum, uLONG Operation); } #else DPT_RTN_T DPT_EXPORT osdSendMessage(uLONG, PI2O_MESSAGE_FRAME, PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME); uLONG osdTargetBusy(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); DPT_RTN_T osdRescan(uLONG HbaNum, uLONG Operation); #endif // _DPT_UNIX //Function - dptHBA_C::passCCB() - start //=========================================================================== // //Description: // // This function makes adjustments to the CCB and then passes //the send CCB request up the attachment chain. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::passCCB(engCCB_C *ccb_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_BLINK_LED_IO; // If the HBA is not in blink LED mode... if (!isBlinkLED()) { // Set the nested FW drive bit ccb_P->setNFW(); // If the command came from a physical device... if (ccb_P->isPhy() && !ccb_P->isNoEATAphys()) // Set physical bit ccb_P->setPhysical(); // If the command came from an HBA logical device... else if (ccb_P->isRAIDcmd()) // Set the firmware level bits ccb_P->setFW(); else if (ccb_P->isMgr()) // Set the interpret bit ccb_P->setInterpret(); // Always physical origin to the next level ccb_P->setPhy(); // Send the CCB to the next level in the attachment chain retVal = myMgr_P()->passCCB(ccb_P); } return (retVal); } //dptHBA_C::passCCB() - end //Function - dptHBA_C::findMyPhysicals() - start //=========================================================================== // //Description: // // This function finds all physical SCSI devices attached to this HBA. // //--------------------------------------------------------------------------- uSHORT dptHBA_C::findMyPhysicals() { uSHORT retVal = 0; uSHORT foundDev,skipToNextID; engCCB_C *ccb_P; sdInquiry_S *inq_P; dptDevice_C *newDev_P; uCHAR qualifier; uCHAR devType; dptSCSIbcd_C *bcd_P = NULL; dptSCSIbcd_C *newBCD_P = NULL; dptDevice_C *prevDev_P = NULL; // If flash command mode or blink LED mode... if (isFlashMode() || isBlinkLED()) return (1); // Get a CCB ccb_P = getCCB(); if (ccb_P!=NULL) { // Indicate a successful scan retVal = 1; // For all supported SCSI channels, ids, & luns for (phyRange.reset();!phyRange.maxedOut();phyRange.incBottomUp()) { skipToNextID = 0; // If a new SCSI ID... if (phyRange.cur().lun==0) { // If there was an object at the last SCSI ID if (prevDev_P!=NULL) // Enter it into the physical device list enterPhy(prevDev_P); // There is no bridge controller bcd_P = NULL; // There is no previous object at this SCSI ID prevDev_P = NULL; } foundDev = 0; ccb_P->reInit(); // Initialize the CCB for a SCSI Inquiry command ccb_P->inquiry(); // Target the CCB for the specified SCSI address ccb_P->target(phyRange.cur(),this,CCB_ORIG_PHY); // Send the CCB to H/W DPT_RTN_T rtnStatus = launchCCB(ccb_P); // If an I/O error occurred... if (rtnStatus == (MSG_RTN_FAILED | ERR_SCSI_IO)) { // If a check condition... if (ccb_P->scsiStatus == 2) { uCHAR *reqSense_P = NULL; // If auto-request sense is active... if (ccb_P->eataCP.flags & CP_REQ_SENSE) reqSense_P = ccb_P->defReqSense; else { ccb_P->reInit(); ccb_P->reqSense(); // Target the CCB for the specified SCSI address ccb_P->target(phyRange.cur(),this,CCB_ORIG_PHY); if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) reqSense_P = ccb_P->dataBuff_P; } if (reqSense_P != NULL) { // If sense key == Not Ready if (((reqSense_P[2] & 0x0f) == 0x02) && (reqSense_P[12] == 0x04)) { // If format in progress or DPT format clearing phase if ((reqSense_P[13] == 0x04) || (reqSense_P[13] == 0x84)) { foundDev = 2; devType = DPT_SCSI_DASD; } } } } // If a selection timeout... else if (ccb_P->ctlrStatus == 1) // Give other tasks a chance to run osdSwitchThreads(); //------------------------------------------------------- // Note: By going to the next SCSI ID here, if a drive is // formatting, no further LUNs will be searched. This // will cause the engine not to see devices attached to // a bridge controller if a lower LUN is formatting. //------------------------------------------------------- // Go to the next SCSI ID skipToNextID = 1; } // If the Inquiry was successful... else if (rtnStatus == MSG_RTN_COMPLETED) { // Cast the default data buffer as SCSI Inquiry data inq_P = (sdInquiry_S *) ccb_P->defData; // Get the peripheral qualifier qualifier = (inq_P->getPeripheral() & 0xe0) >> 5; // If LUN not supported... *** Always check all luns *** //if (qualifier==0x3) // skipToNextID = 1; // If a device is connected at this ID... //else if ((qualifier==0x00) || (qualifier==0x02)) { if ((qualifier==0x00) || (qualifier==0x02)) { // Get the peripheral device type devType = (inq_P->getPeripheral() & 0x1f); foundDev = 1; #if 0 // Most scanners (including HP) return a peripheral // device type of 3 (Processor) instead of scanner // If the unit responds to a Get Window (25h) command, // we will assume that it is a scanner // NOTE: Get Window (25h) is not mandatory for scanner // devices. It is used here because the only scanner // specific SCSI command which are mandatory are SCAN // and Set Window, both of which have major side effects. if(devType == 3) { ccb_P->reInit(); // A readCapacity is the same opcode as Get Window // Have to use this function because we don't have // access to the dptCDB_S from here ccb_P->readCapacity(); // Data In ccb_P->input(); // Set the physical bit ccb_P->setPhysical(); // Target the CCB for the specified SCSI address ccb_P->target(phyRange.cur(),this,CCB_ORIG_PHY); if(launchCCB(ccb_P) == MSG_RTN_COMPLETED) devType = 6; } #endif // Don't look for LUNs on scanners // Some (i.e. Mustek MFS-12000SP) respond to all // LUNs with qualifier == 0 if(devType == 6) skipToNextID = 1; if (bcd_P == NULL) { // If the device is attached to an NCR type RAID // bridge controller... if (isRAIDbcd()) // Create an NCR type RAID bridge controller newBCD_P = (dptSCSIbcd_C *) newObject(DPT_RAID_BCD); // If the device is at a non-zero lun else if (phyRange.cur().lun!=0) // Create a standard bridge controller newBCD_P = (dptSCSIbcd_C *) newObject(DPT_SCSI_BCD); } } // If LUN is supported, but no device at this ID else if ((qualifier==0x01) && (bcd_P==NULL)) { // If the device is attached to an NCR type RAID // bridge controller... if (isRAIDbcd()) // Create an NCR type RAID bridge controller newBCD_P = (dptSCSIbcd_C *) newObject(DPT_RAID_BCD); else // Create a standard bridge controller newBCD_P = (dptSCSIbcd_C *) newObject(DPT_SCSI_BCD); } // If a bridge controller has just been created... if (newBCD_P!=NULL) { bcd_P = newBCD_P; newBCD_P = NULL; // Indicate that this manager is real bcd_P->status.flags |= FLG_STAT_REAL; // Set the manager's address bcd_P->addr = phyRange.cur(); // Add the manager to the physical device list enterPhy(bcd_P); // If there was a previous device at this SCSI ID... if (prevDev_P!=NULL) { // Add to the BCD bcd_P->enterFromHBA(prevDev_P); prevDev_P = NULL; } } } // end if (rtnStatus == MSG_RTN_COMPLETED) // If a device was found... if (foundDev) { // Create a new SCSI device newDev_P = (dptDevice_C *) newObject(devType); if (newDev_P!=NULL) { // Indicate that this is a real device newDev_P->status.flags |= FLG_STAT_REAL; // Set the new device's SCSI address newDev_P->addr = phyRange.cur(); // If there is an active bridge controller... if (bcd_P!=NULL) // Add the new device to the BCD bcd_P->enterFromHBA(newDev_P); else { // Set a previous object pointer so the device // can be added to a bridge ctlr or when the scan // moves to the next SCSI ID prevDev_P = newDev_P; } // end if (bcd_P==NULL) } // end if (newDev_P!=NULL) } // end if (foundDev) if (skipToNextID) phyRange.nextID(); } // end for (phyRange) // If there was an object at the last SCSI ID if (prevDev_P!=NULL) // Enter it into the physical device list enterPhy(prevDev_P); // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) return (retVal); } //dptHBA_C::findMyPhysicals() - end //Function - dptHBA_C::findMyLogicals() - start //=========================================================================== // //Description: // // This function finds all FW logical devices associated with this HBA. // //Return Value: // // 1 = OK // 0 = Failure // //--------------------------------------------------------------------------- uSHORT dptHBA_C::findMyLogicals() { uSHORT retVal = 1; // If flash command mode or blink LED mode... if (isFlashMode() || isBlinkLED()) return (retVal); // If the HBA supports RAID... if (isRAIDcapable()) { retVal = 0; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { retVal = 1; // Initialize the CCB to do a log sense ccb_P->logSense(0x36); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); // Target the controller ccb_P->target(addr,this,CCB_ORIG_LOG); if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // Create logical devices for the SCSI addresses returned newLP36Devices(ccb_P,this); } // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) } // end if (isRAIDcapable()) // Check for emulated drives checkForEmul(); return (retVal); } //dptHBA_C::findMyLogicals() - end //Function - dptHBA_C::isRAIDbcd() - start //=========================================================================== // //Description: // // This routine checks to see if a device is attached to a hardware //array. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function is intended for use in the findPhysObjects() function. // //--------------------------------------------------------------------------- uSHORT dptHBA_C::isRAIDbcd() { uSHORT retVal = 0; hwaHWdata_S *bcdData_P; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the EATA CP....................... // Initialize the CCB for a SCSI Inquiry command ccb_P->inquiry(0xc0); // Target the CCB for the specified SCSI address ccb_P->target(phyRange.cur(),this,CCB_ORIG_PHY); if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // Cast the return data pointer bcdData_P = (hwaHWdata_S *) ccb_P->defData; // Check for the hardware array info signature if (memcmp(bcdData_P->getPageID(),"HWRE",4)==0 ) retVal = 1; } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::isRAIDbcd() - end //Function - dptHBA_C::findComponent() - start //=========================================================================== // //Description: // // This function finds a component device with the specified SCSI //address. The HBA field of the SCSI address is assumed to be set to //the HBA's index #. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptDevice_C * dptHBA_C::findComponent(dptAddr_S inAddr,uSHORT,uLONG inMagicNum, dptCoreList_C *) { dptObject_C *obj_P = NULL; dptDevice_C *comp_P = NULL; dptSCSIbcd_C *bcd_P = NULL; // Assume the component is attached to this HBA inAddr.hba = getHBA(); // If a magic # was specified... if (inMagicNum) // Search for a device with a matching magic # obj_P = findMagicObject(phyList,inMagicNum); else // Search for a device with a matching SCSI address obj_P = findObjectAt(phyList,inAddr); // If an object was found... if (obj_P!=NULL) { // If a manager was found... if (obj_P->isManager()) bcd_P = (dptSCSIbcd_C *) obj_P; // If a device was found... else comp_P = (dptDevice_C *) obj_P; } // If no device was found... if (comp_P==NULL) { // Create an absent device comp_P = (dptDevice_C *) newObject(DPT_SCSI_DASD); if (comp_P!=NULL) { // Set the device's SCSI address comp_P->addr = inAddr; // Set the devices status to missing comp_P->status.display = DSPLY_STAT_MISSING; // If the device belongs on a bridge controller & // no bridge exists... if ((bcd_P==NULL) && (inAddr.lun!=0)) { // Create a new bridge controller bcd_P = (dptSCSIbcd_C *) newObject(DPT_SCSI_BCD); if (bcd_P!=NULL) { // Set the device's SCSI address bcd_P->addr = inAddr; // Set the devices status to missing bcd_P->status.display = DSPLY_STAT_MISSING; // Add the manager to the HBA's physical list if (!enterPhy(bcd_P)) bcd_P = NULL; } } // end if (inAddr.lun!=0) if (bcd_P!=NULL) // Add the component to the sub-manager's logical list bcd_P->enterFromHBA(comp_P); else // Add the component to the HBA's physical list // if this call fails object will be deleted. if (enterPhy(comp_P)) comp_P = NULL; } // end if (comp_P!=NULL) } // end if (comp_P!=NULL) return (comp_P); } //dptHBA_C::findComponent() - end //Function - dptHBA_C::realInit() - start //=========================================================================== // //Description: // // This function initializes a real HBA. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptHBA_C::realInit() { // Get the hardware information getHWinfo(); // Get the info contained in NV RAM getNVinfo(); // Check for RAID response to RAID command checkForRAID(); // Get the event log control word getEventCtl(); // Read the drive size table // (If not supported pointer will remain NULL) readDriveSizeTable(); /* DEBUG code if (driveSizeTable_P != NULL) { dptBuffer_S *buff_P = dptBuffer_S::newBuffer(512); uLONG temp = 1; buff_P->insert(temp); temp = 3; buff_P->insert(temp); temp = 0x10000; buff_P->insert(temp); temp = 0x20000; buff_P->insert(temp); temp = 0x40000; buff_P->insert(temp); setArrayDriveSizeTable(buff_P); buff_P->reset(); buff_P->clear(); getArrayDriveSizeTable(buff_P); dptBuffer_S::delBuffer(buff_P); } */ /* DEBUG code // Fake a drive size table driveSizeTable_S *ds_P = (driveSizeTable_S *) new UCHAR[8+(2*4)]; ds_P->setMaxEntries(1); ds_P->setNumEntries(1); ds_P->setEntry(0, 0x40000); useDriveSizeTable(ds_P); delete[] ((uCHAR *) ds_P); */ } //dptHBA_C::realInit() - end //Function - dptHBA_C::getHWinfo() - start //=========================================================================== // //Description: // // This function determines what hardware the HBA has. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptHBA_C::getHWinfo() { DEBUG_BEGIN(5, dptHBA_C::getHWinfo()); // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to do a log sense page 0x33 // Limit data buffer to 0xff bytes ccb_P->logSense(0x33,0,0xff); // Target this HBA ccb_P->target(this); // Send the CCB to hardware if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { uSHORT tempUShort = 0; raidDef_S *def_P; // Clear all flags except those specified below hbaFlags2 &= FLG_HBA_SCAM | FLG_HBA_I2O; ccb_P->initLogSense(); while (ccb_P->log.isValidParam()) { switch (ccb_P->log.code()) { // Check for a RAID Key Card & Cache Module case 1: if (ccb_P->log.data_P()[0] & LGS_KEYCARD) modules |= FLG_MOD_DM401X; if (ccb_P->log.data_P()[0] & LGS_CACHEMODULE) modules |= FLG_MOD_CM401X; // Check for DEC storage sub-system H/W on HBA if (ccb_P->log.data_P()[0] & 0x20) hbaFlags2 |= FLG_HBA_SUBSYS_HW; // NV RAM is present on the HBA if (ccb_P->log.data_P()[0] & 0x40) hbaFlags2 |= FLG_HBA_NVRAM; // Auto-termination of narrow SCSI bus supported if (ccb_P->log.data_P()[0] & 0x80) hbaFlags2 |= FLG_HBA_AUTO_TERM; if (ccb_P->log.length() >= 2) { irqNum &= ~0xff; irqNum |= ccb_P->log.data_P()[1]; } break; // Get the firmware battery flags and memory parity error flag case 2: fwFlags = ccb_P->log.data_P()[0]; break; // Get the total controller memory case 4: totalMem = getU4(ccb_P->log.data_P(),0); reverseBytes(totalMem); break; // Get the total controller memory case 6: if(isI2O()) { if (ccb_P->log.data_P()[1] & 0x01) { raidSupport &= ~FLG_RAID_0; } if (ccb_P->log.data_P()[1] & 0x02) { raidSupport &= ~FLG_RAID_1; } if (ccb_P->log.data_P()[1] & 0x04) { raidSupport &= ~FLG_RAID_5; } if (ccb_P->log.data_P()[1] & 0x08) { hbaFlags2 |= FLG_HBA_PREDICTIVE; } } break; // Get the Host to HBA bus information case 7: if (ccb_P->log.data_P()[0] & 0x40) busType = HBA_BUS_PCI; switch (ccb_P->log.data_P()[0] & 0x3f) { case 1: memcpy(busSpeed,"3.3",4); break; case 2: memcpy(busSpeed,"4.0",4); break; case 3: memcpy(busSpeed,"4.4",4); break; case 4: memcpy(busSpeed,"5.0",4); break; case 5: memcpy(busSpeed,"5.7",4); break; case 6: memcpy(busSpeed,"6.7",4); break; case 7: memcpy(busSpeed,"8.0",4); break; case 8: memcpy(busSpeed," 10",4); break; case 0x10: memcpy(busSpeed," 33",4); break; case 0x11: memcpy(busSpeed," 66",4); break; case 0x12: memcpy(busSpeed,"132",4); break; case 0x13: memcpy(busSpeed,"264",4); break; } hostBusInfo = ccb_P->log.data_P()[1]; break; // Get the SCSI bus capabilities case 8: switch (ccb_P->log.data_P()[0] & 0x0f) { case 0: scsiBusSpeed = 5; break; case 1: scsiBusSpeed = 10; break; case 2: scsiBusSpeed = 20; break; } if (ccb_P->log.data_P()[0] & 0x80) { flags |= FLG_HBA_DIFFERENTIAL; chanInfo[0].flags |= FLG_CHAN_DIFFERENTIAL; } if (ccb_P->log.data_P()[0] & 0x40) { flags |= FLG_HBA_WIDE_16; chanInfo[0].flags |= FLG_CHAN_WIDE_16; scsiBusSpeed <<= 1; } if (ccb_P->log.data_P()[0] & 0x20) { flags |= FLG_HBA_EXTERNAL; chanInfo[0].flags |= FLG_CHAN_EXTERNAL; scsiBusSpeed >>= 1; } if (ccb_P->log.data_P()[0] & 0x10) { hbaFlags2 |= FLG_HBA_ULTRA; chanInfo[0].flags |= FLG_CHAN_ULTRA; } chanInfo[0].scsiBusSpeed = scsiBusSpeed; break; // Get the attached modules case 9: if (!(ccb_P->log.data_P()[0] & 0x80)) flags |= FLG_HBA_CHIPSET; modules |= ((uSHORT)ccb_P->log.data_P()[0]) << 9; // If a new cache module was detected if (modules & (FLG_MOD_CM4000 | FLG_MOD_CMI)) // There can't be an old cache module modules &= ~FLG_MOD_CM401X; // If a new RAID module was detected if (modules & (FLG_MOD_DM4000 | FLG_MOD_DMI)) // There can't be an old RAID module modules &= ~FLG_MOD_DM401X; cpuType = ccb_P->log.data_P()[1]; cpuSpeed = ccb_P->log.data_P()[2]; if (ccb_P->log.data_P()[3] & 0x80) flags |= FLG_HBA_SMARTROM; if (ccb_P->log.data_P()[3] & 0x40) status.flags |= FLG_STAT_ALARM_ON; if (ccb_P->log.data_P()[3] & 0x01) modules |= FLG_MOD_SX1; if (ccb_P->log.data_P()[3] & 0x02) modules |= FLG_MOD_SX2; if (ccb_P->log.data_P()[3] & 0x04) modules |= FLG_MOD_BBU; if (ccb_P->log.data_P()[3] & 0x10) { modules |= FLG_MOD_RC4040; modules &= ~(FLG_MOD_CM401X | FLG_MOD_CM4000 | FLG_MOD_DM401X | FLG_MOD_DM4000); } if (ccb_P->log.data_P()[3] & 0x20) { modules |= FLG_MOD_RC4041; modules &= ~(FLG_MOD_CM401X | FLG_MOD_CM4000 | FLG_MOD_DM401X | FLG_MOD_DM4000); } if (ccb_P->log.data_P()[3] & 0x08) hbaFlags2 |= FLG_HBA_SC4; break; // Get the attached memory modules/SIMMs case 10: memBank[0] = ccb_P->log.data_P()[0]; extMemBank[0] = ccb_P->log.data_P()[0] & 0x7f; if (memBank[0]!=0) { modules |= FLG_MOD_MEM_BANK0; } memBank[1] = ccb_P->log.data_P()[1]; extMemBank[1] = ccb_P->log.data_P()[1] & 0x7f; if (memBank[1]!=0) { modules |= FLG_MOD_MEM_BANK1; } memBank[2] = ccb_P->log.data_P()[2]; extMemBank[2] = ccb_P->log.data_P()[2] & 0x7f; if (memBank[2]!=0) { modules |= FLG_MOD_MEM_BANK2; } memBank[3] = ccb_P->log.data_P()[3]; extMemBank[3] = ccb_P->log.data_P()[3] & 0x7f; if (memBank[3]!=0) { modules |= FLG_MOD_MEM_BANK3; } if (ccb_P->log.length() >= 0x0c) { tempUShort = getU2(ccb_P->log.data_P(), 4); #ifndef _DPT_BIG_ENDIAN reverseBytes(tempUShort); #endif if (tempUShort) { modules |= FLG_MOD_MEM_BANK0; extMemBank[0] = tempUShort; } tempUShort = getU2(ccb_P->log.data_P(), 6); #ifndef _DPT_BIG_ENDIAN reverseBytes(tempUShort); #endif if (tempUShort) { modules |= FLG_MOD_MEM_BANK1; extMemBank[1] = tempUShort; } tempUShort = getU2(ccb_P->log.data_P(), 8); #ifndef _DPT_BIG_ENDIAN reverseBytes(tempUShort); #endif if (tempUShort) { modules |= FLG_MOD_MEM_BANK2; extMemBank[2] = tempUShort; } tempUShort = getU2(ccb_P->log.data_P(), 10); #ifndef _DPT_BIG_ENDIAN reverseBytes(tempUShort); #endif if (tempUShort) { modules |= FLG_MOD_MEM_BANK3; extMemBank[3] = tempUShort; } } break; // Get the FW type case 11: fwType = *(uSHORT *)(ccb_P->log.data_P()+2); reverseBytes(fwType); // If downloadable FW is supported... if (ccb_P->log.data_P()[0] & 0x0001) // Set the downloadable FW support flag flags |= FLG_HBA_DOWNLOAD_FW; if (ccb_P->log.data_P()[0] & 0x0002) // Indicate that 528 byte block size ECC is supported flags |= FLG_HBA_ECC_ENABLED; if (ccb_P->log.data_P()[0] & 0x0004) // Indicate that F/W supports the "Interpret Format" cmd hbaFlags2 |= FLG_HBA_INTERPRET_FMT; if (ccb_P->log.data_P()[0] & 0x0008) // Indicate that F/W and the board support ECC flags |= FLG_HBA_ECC_SUPPORTED; if (ccb_P->log.data_P()[0] & 0x0010) // Indicate that F/W based diagnostics are supported hbaFlags2 |= FLG_HBA_DIAGNOSTICS; if (ccb_P->log.data_P()[0] & 0x0080) // Indicate that SMART emulation is support hbaFlags2 |= FLG_HBA_SMART_EMULATION; // Indicate array expansion capability if (ccb_P->log.data_P()[1] & 0x01) hbaFlags2 |= FLG_HBA_EXPAND_ARRAY; // does the hba support tuneable drive spinups? if (ccb_P->log.data_P()[1] & 0x02) hbaFlags2 |= FLG_HBA_VAR_SPIN_UP; // Firmware supports // 1. The second version of log page 0x36 // 2. The second version of the physical array page // 3. Fibre SCSI ID packing // (using the upper 2 channel bits as extended ID bits // if 2 or fewer SCSI buses) if (ccb_P->log.data_P()[1] & 0x04) hbaFlags2 |= FLG_HBA_I2O_VER2; if (ccb_P->log.data_P()[1] & 0x10) hbaFlags2 |= FLG_HBA_NO_ALARM; if (ccb_P->log.data_P()[1] & 0x20) { raidFlags |= FLG_SEG_64; } if (ccb_P->log.data_P()[1] & 0x40) { raidFlags |= FLG_SEG_SUPPORTED; } // Check for temperature thresholds if (ccb_P->log.length() > 4) if (ccb_P->log.data_P()[4] && ccb_P->log.data_P()[5]) hbaFlags2 |= FLG_HBA_TEMP_PROBE; break; // SmartRAID signals case 12: hbaFlags2 |= (uSHORT) ccb_P->log.data_P()[0]; // Make the invalid subsystem status flag a valid flag hbaFlags2 ^= FLG_HBA_SUBSYS_VALID; break; // Per channel info (including SmartRAID signals) case 13: updateChannelInfo(&(ccb_P->log)); break; case 14: maxArrays = (uSHORT) ccb_P->log.data_P()[0]; def_P = getRAIDtdef(0); if (def_P != NULL) def_P->maxDrives = (uSHORT) ccb_P->log.data_P()[1]; def_P = getRAIDtdef(3); if (def_P != NULL) def_P->maxDrives = (uSHORT) ccb_P->log.data_P()[2]; def_P = getRAIDtdef(5); if (def_P != NULL) { def_P->maxDrives = (uSHORT) ccb_P->log.data_P()[2]; } // Get the default rebuild frequency (if supported by firmware) if (ccb_P->log.data_P()[7] != 0) { rbldFrequency = ccb_P->log.data_P()[7]; } maxRaidComponents = (uSHORT) ccb_P->log.data_P()[2]; if (ccb_P->log.length() >= 0x18) { maxMajorStripe = getU2(ccb_P->log.data_P(), 22); #ifndef _DPT_BIG_ENDIAN reverseBytes(maxMajorStripe); #endif } if (ccb_P->log.length() >= 0x1e) { maxRaidDiskEntries = getU2(ccb_P->log.data_P(), 24); maxRaidMemEntries = getU2(ccb_P->log.data_P(), 26); #ifndef _DPT_BIG_ENDIAN reverseBytes(maxRaidDiskEntries); reverseBytes(maxRaidMemEntries); #endif } // max # arrays of a certain type DEBUG(5, "HBA " << PRT_ADDR << "maxArrays=" << (int)ccb_P->log.data_P()[0] << \ " maxRaid0=" << (int)ccb_P->log.data_P()[1] << \ " maxRaid5=" << (int)ccb_P->log.data_P()[2]); break; // Background task exclusion period case 15: excludeStart = ccb_P->log.data_P()[0]; excludeEnd = ccb_P->log.data_P()[1]; // exclusion period stuff DEBUG(5, "HBA " << PRT_ADDR << "excludeStart=" << \ (int)excludeStart << " excludeEnd=" << (int)excludeEnd); break; } // end switch() // Get the next log parameter ccb_P->log.next(); } // end while() } // end if (launchCCB()==MSG_RTN_COMPLETED) // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) } //dptHBA_C::getHWinfo() - end //Function - dptHBA_C::getNVinfo() - start //=========================================================================== //Description: // This function reads NV information and sets HBA info accordingly. //--------------------------------------------------------------------------- void dptHBA_C::getNVinfo() { engCCB_C *ccb_P = getCCB(); if (ccb_P != NULL) { // Attempt to read the contents of the NV RAM ccb_P->modeSense(0x2e); ccb_P->target(this); if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) { // If manual JBOD... if (ccb_P->modeParam_P->getData()[0x31] & 0x01) { hbaFlags2 |= FLG_HBA_MANUAL_JBOD_ACTIVE; } // If wolfpack cluster mode... if (ccb_P->modeParam_P->getData()[0x30] & 0x08) { hbaFlags2 |= FLG_HBA_CLUSTER_MODE; } } // Free the CCB ccb_P->clrInUse(); } } //dptHBA_C::getNVinfo() - end //Function - dptHBA_C::updateChannelInfo() - start //=========================================================================== // //Description: // // This function updates the specified SCSI channel info. // //--------------------------------------------------------------------------- void dptHBA_C::updateChannelInfo(dptSCSIlog_C *log) { // Get the length of the log parameter uCHAR length = log->length(); uCHAR *data_P = log->data_P(); uSHORT chanIndex = (uSHORT) (*data_P & 0x7); if (chanIndex < MAX_NUM_CHANS) { if (chanIndex > phyRange.getMaxChan()) phyRange.setMaxChan((uCHAR)chanIndex); // Set the channels flags chanInfo[chanIndex].flags = *(data_P+1); // If there is another byte of flags, get it if(length > 2) chanInfo[chanIndex].flags += (*(data_P+2) << 8); // If the channel info has SCAM info, get it if(length > 4) { chanInfo[chanIndex].scamIdMap = *(data_P+4) << 8; chanInfo[chanIndex].scamIdMap += *(data_P+5); } // Make the invalid subsystem status flag a valid flag chanInfo[chanIndex].flags ^= FLG_CHAN_SUBSYS_VALID; // If ultra 80 if (chanInfo[chanIndex].flags & FLG_CHAN_ULTRA_80) // Set the bus speed chanInfo[chanIndex].scsiBusSpeed = 80; // If ultra else if (chanInfo[chanIndex].flags & FLG_CHAN_ULTRA_40) // Set the bus speed chanInfo[chanIndex].scsiBusSpeed = 40; // If ultra 40 else if (chanInfo[chanIndex].flags & FLG_CHAN_ULTRA) // Set the bus speed chanInfo[chanIndex].scsiBusSpeed = 20; else // Initialize the SCSI bus speed chanInfo[chanIndex].scsiBusSpeed = 10; // If 16 bit wide SCSI... if (chanInfo[chanIndex].flags & FLG_CHAN_WIDE_16) { // Double the SCSI bus speed chanInfo[chanIndex].scsiBusSpeed <<= 1; // Set the maximum SCSI ID for this channel phyRange.setMaxId((uCHAR)chanIndex, 15); } // If limited due to an external SCSI cable... if (chanInfo[chanIndex].flags & FLG_CHAN_EXTERNAL) // Halve the bus speed chanInfo[chanIndex].scsiBusSpeed >>= 1; if (chanInfo[chanIndex].flags & FLG_CHAN_FIBRE) { // Set the maximum SCSI ID for this channel phyRange.setMaxId((uCHAR)chanIndex, 127); chanInfo[chanIndex].scsiBusSpeed = 100; } if (chanIndex == 0) scsiBusSpeed = chanInfo[chanIndex].scsiBusSpeed; // get the SCSI ID of the HBA for this channel engCCB_C *ccb_P = getCCB(); if(ccb_P) { ccb_P->target(this); // Get the firmware information page (vital product data page 0xc1 has the read config in it) ccb_P->inquiry(0xc1); if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { if (ccb_P->ok()) { // pull out the hba SCSI id for this channel eataRdConfig_S *rdCfg_P = (eataRdConfig_S *) ccb_P->defData; chanInfo[chanIndex].hbaID = rdCfg_P->getScsiIDs()[3-chanIndex]; } } // Free the CCB ccb_P->clrInUse(); } } } //dptHBA_C::updateChannelInfo() - end //Function - dptHBA_C::checkForRAID() - start //=========================================================================== // //Description: // // This function checks to see if the HBA responds to RAID commands. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptHBA_C::checkForRAID() { // Clear the FW RAID support flag flags &= ~FLG_HBA_RAID_FW; // If a RAID module && a cache module or an I2O HBA... if ((isRAIDmodule() && is512kCache()) || isI2O()) { engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { if (isI2O()) // Set the FW RAID support flag flags |= FLG_HBA_RAID_FW; else { // Initialize the CCB to get the physical array page ccb_P->modeSense(0x2a); // Target this HBA ccb_P->target(this); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); // Send the CCB to hardware if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // Insure the proper mode page was returned if ((ccb_P->modeParam_P->getPageCode() & 0x3f)==0x2a) // Set the FW RAID support flag flags |= FLG_HBA_RAID_FW; } } // If firmware version 7.C1 or higher... if ((memcmp(descr.revision,"07C0",4) > 0) || isI2O()) // Use the new logical array page (mode page 0x30) lapPage = LAP_DPT2; // if this is the special SNI version of FW use LAP 1 else if (memcmp(descr.revision, "0UX2", 4) == 0) lapPage = LAP_DPT1; // its <= 7c0 use lap1 else lapPage = LAP_DPT1; // Re-initialize the CCB ccb_P->reInit(); // Initialize the CCB to perform a SCSI inquiry ccb_P->inquiry(0xc0); // Target this HBA ccb_P->target(this); // Send the CCB to hardware if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // If RAID-3 is not supported... if (!(ccb_P->defData[12] & 0x08)) { // Clear the RAID 3 support flag raidSupport &= ~FLG_RAID_3; if (getRAIDtdef(3)!=NULL) raidDefList.del(); } } // Free the CCB ccb_P->clrInUse(); } } } //dptHBA_C::checkForRAID() - end //Function - dptHBA_C::handleMessage() - start //=========================================================================== // //Description: // // This routine handles DPT events for the dptRAIDmgr_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Turns the HBA's alarm on case MSG_ALARM_ON: if (isRAIDmodule()) retVal = sendMFC(MFC_ALARM_ON); break; // Turns the HBA's alarm off case MSG_ALARM_OFF: if (isRAIDmodule()) retVal = sendMFC(MFC_ALARM_OFF); break; // Stops all activity on this HBA so that a physical device may // be changed. case MSG_QUIET: retVal = quietBus(toEng_P); break; // Resumes activity on this HBA after a quiet command has been issued case MSG_UNQUIET: retVal = sendMFC(MFC_UNQUIET); break; // Re-reads the RAID tables on the drives and configures the system // accordingly. case MSG_RELOCK_DRIVES: retVal = sendMFC(MFC_READ_RAID_TBL); break; // Update the HBA's status case MSG_UPDATE_STATUS: retVal = updateStatus(fromEng_P); break; // Get the HBA's time case MSG_GET_TIME: retVal = getTime(fromEng_P); break; // Set the HBA's time case MSG_SET_TIME: retVal = setTime(toEng_P); break; // Return the HBA's event log case MSG_LOG_READ: retVal = rtnEventLog(toEng_P,fromEng_P); break; // Clear the HBA event log case MSG_LOG_CLEAR: retVal = clearEventLog(); break; // Set the HBA event log control word case MSG_LOG_SET_HBA_FILTER: retVal = setEventCtl(toEng_P); break; // Return global HBA read/write statistics information case MSG_GET_IO_STATS: retVal = rtnIOstats(fromEng_P,1); break; // Clear global HBA read/write statistics information case MSG_CLEAR_IO_STATS: retVal = rtnIOstats(NULL,0); break; // Return HBA specific statistics information case MSG_GET_HBA_STATS: retVal = rtnHBAstats(fromEng_P,1); break; // Clear HBA specific statistics information case MSG_CLEAR_HBA_STATS: retVal = rtnHBAstats(NULL,0); break; // Set an HBA data field to a specified value case MSG_SET_INFO: retVal = setDataField(toEng_P); break; // Return the contents of the HBA's NV RAM case MSG_GET_NV_INFO: retVal = readNV_RAM(fromEng_P); break; // Write the contents of the HBA's NV RAM case MSG_SET_NV_INFO: retVal = writeNV_RAM(toEng_P); break; // Attempts to switch from operational mode into flash mode case MSG_FLASH_SWITCH_INTO: retVal = flashSwitchInto(); break; // Attempts to switch from flash mode into operational mode case MSG_FLASH_SWITCH_OUT_OF: // If a non-zero input byte was specified... if ((toEng_P->writeIndex) && *toEng_P->data) // Skip the flash checksum test retVal = flashSwitchOutOf(1); else // Perform the flash checksum test retVal = flashSwitchOutOf(0); break; // Writes to the HBA's flash memory case MSG_FLASH_WRITE: retVal = flashWrite(toEng_P); break; // Writes to the HBA's flash memory without verification case MSG_FLASH_WR_NO_VERIFY: retVal = flashWrite(toEng_P,0); break; // Causes F/W to compute flash memory checksums... case MSG_FLASH_WRITE_DONE: if ((toEng_P->writeIndex) && *toEng_P->data) // Skip the flash checksum test retVal = flashWriteDone(0); else retVal = flashWriteDone(1); break; // Reads from the HBA's flash memory case MSG_FLASH_READ: retVal = flashRead(toEng_P,fromEng_P); break; // Returns detailed status information about the HBA's flash memory case MSG_FLASH_STATUS: retVal = flashStatus(fromEng_P); break; // Sets the region offset to be flashed case MSG_FLASH_SET_REGION: retVal = flashSetRegion(toEng_P); break; // Sets the HBA's exclusion period (no diags, rebuilds, verifies) case MSG_DIAG_EXCLUDE: // If F/W diagnostics are supported if (isFWdiagCapable()) retVal = setExclusion(toEng_P); break; // Return the HBA's array limits case MSG_RAID_GET_LIMITS: retVal = getArrayLimits(fromEng_P); break; //dz case MSG_STATS_LOG_READ: case MSG_STATS_LOG_CLEAR: case MSG_STATS_LOG_GET_STATUS: case MSG_STATS_LOG_SET_STATUS: // Send to the statistics logger retVal = osdLoggerCmd(message, (void*)toEng_P, (dptData_S*)fromEng_P, (uSHORT)myConn_P()->getIOmethod(), 0, (uLONG)getRAIDid()); break; case MSG_SET_ACCESS_RIGHTS: retVal = SetAccessRights(fromEng_P, toEng_P); break; case MSG_GET_ACCESS_RIGHTS: retVal = GetAccessRights(fromEng_P); break; case MSG_GET_ENVIRON_INFO: retVal = GetEnvironInfo(fromEng_P); break; case MSG_SET_ENVIRON_INFO: retVal = SetEnvironInfo(toEng_P); break; // Get backup battery info case MSG_GET_BATTERY_INFO: retVal = getBatteryInfo(toEng_P, fromEng_P); break; // Set backup battery thresholds case MSG_SET_BATTERY_THRESHOLDS: retVal = setBatteryThresholds(toEng_P); break; // Calibrate the backup battery case MSG_CALIBRATE_BATTERY: retVal = calibrateBattery(toEng_P); break; // Perform a DMA test on the controller case MSG_I2O_DMA_TEST: retVal = i2oDiagTest(toEng_P,fromEng_P, 0x07); break; // Perform a RAM test on the controller case MSG_I2O_RAM_TEST: retVal = i2oDiagTest(toEng_P,fromEng_P, 0x06); break; // Initiate the controller's built-in-self-test case MSG_I2O_BIST: retVal = i2oDiagTest(toEng_P,fromEng_P, 0x08); break; // Initialize the device busy logic case MSG_CHECK_BUSY: retVal = initBusyLogic(fromEng_P); break; // Set the array drive size table case MSG_SET_ARRAY_DRIVE_SIZES: retVal = setArrayDriveSizeTable(toEng_P); break; // Return the array drive size table case MSG_GET_ARRAY_DRIVE_SIZES: retVal = getArrayDriveSizeTable(fromEng_P); break; // Return the array drive size table case MSG_I2O_RESYNC: retVal = resetHba(toEng_P); break; // Send an I2O pass-through message case MSG_I2O_SEND_MESSAGE: retVal = sendI2OMessage(fromEng_P, toEng_P); break; // Return detailed channel information case MSG_GET_CHAN_INFO: retVal = getChanInfo(fromEng_P); break; default: // Call base class event handler retVal = dptRAIDhba_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return (retVal); } //dptHBA_C::handleMessage() - end //Function - dptHBA_C::getChanInfo() - start //=========================================================================== // This function returns detailed information about each I/O channel/ //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::getChanInfo(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { uCHAR hbaId_A[4]; dptChanInfo2_S rtnInfo; // Read NVRAM to get the HBA ID for each channel ccb_P->modeSense(0x2e); ccb_P->target(this); retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) { hbaId_A[0] = ccb_P->modeParam_P->getData()[0x08]; hbaId_A[1] = ccb_P->modeParam_P->getData()[0x09]; hbaId_A[2] = ccb_P->modeParam_P->getData()[0x0a]; hbaId_A[3] = ccb_P->modeParam_P->getData()[0x19]; ccb_P->reInit(); // Get log page 0x33 ccb_P->logSense(0x33,0,0xff); ccb_P->target(this); retVal = launchCCB(ccb_P); if (retVal ==MSG_RTN_COMPLETED) { uLONG numChannels = 0; uLONG *numChannels_P = (uLONG *) fromEng_P->data; fromEng_P->insert(numChannels); ccb_P->initLogSense(); while (ccb_P->log.isValidParam()) { if (ccb_P->log.code() == 0x0d) { numChannels++; memset(&rtnInfo, 0, sizeof(dptChanInfo2_S)); rtnInfo.chanNum = ccb_P->log.data_P()[0]; rtnInfo.length = sizeof(dptChanInfo2_S); rtnInfo.pc13Flags1 = ccb_P->log.data_P()[1]; rtnInfo.pc13Flags2 = ccb_P->log.data_P()[2]; rtnInfo.pc13Speed = ccb_P->log.data_P()[3]; rtnInfo.pc13ScamIdMap1 = ccb_P->log.data_P()[4]; rtnInfo.pc13ScamIdMap2 = ccb_P->log.data_P()[5]; if (ccb_P->log.length() >= 8) { rtnInfo.pc13Flags3 = ccb_P->log.data_P()[6]; rtnInfo.pc13Flags4 = ccb_P->log.data_P()[7]; } if (rtnInfo.chanNum < 4) { rtnInfo.hbaId = hbaId_A[rtnInfo.chanNum]; rtnInfo.maxXfrSpeed = chanInfo[rtnInfo.chanNum].scsiBusSpeed; if (rtnInfo.pc13Flags4 & FLG_CHAN2_ULTR320) { rtnInfo.maxXfrSpeed = 640; } else if (rtnInfo.pc13Flags4 & FLG_CHAN2_ULTR160) { rtnInfo.maxXfrSpeed = 320; } } if (!fromEng_P->insert(&rtnInfo, sizeof(dptChanInfo2_S))) { retVal = MSG_RTN_DATA_OVERFLOW; } } // Get the next log parameter ccb_P->log.next(); } *numChannels_P = numChannels; } } // end if (launchCCB()) // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) return(retVal); } //dptHBA_C::getChanInfo() - end //Function - dptHBA_C::resetHba() - start //=========================================================================== //Description: // This function attempts to reset the HBA //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::sendI2OMessage(dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; //fromEng_P->data //toEng_P->data return retVal; } //dptHBA_C::sendI2OMessage() - end //Function - dptHBA_C::resetHba() - start //=========================================================================== //Description: // This function attempts to reset the HBA //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::resetHba(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (isI2O()) { uLONG rescanFlags = 0; retVal = MSG_RTN_DATA_UNDERFLOW; if (toEng_P->extract(rescanFlags)) { retVal = osdRescan(getDrvrNum(), rescanFlags); if (retVal != MSG_RTN_IGNORED) { // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P==NULL) retVal = ERR_GET_CCB; else { // Get the inquiry data ccb_P->inquiry(); ccb_P->target(this); if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { inquiryInit((sdInquiry_S *)ccb_P->defData); } ccb_P->clrInUse(); // Get the H/W page etc. realInit(); } } } } return (retVal); } //dptHBA_C::resetHba() //Function - dptHBA_C::setArrayDriveSizeTable() - start //=========================================================================== //Description: // This function sets the array drive size table. //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::setArrayDriveSizeTable(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; uLONG saveTable = 0; uLONG numEntries = 0; toEng_P->extract(saveTable); if (!toEng_P->extract(numEntries)) retVal = MSG_RTN_DATA_UNDERFLOW; else if (((numEntries<<2)+8) > toEng_P->writeIndex) retVal = MSG_RTN_DATA_UNDERFLOW; else if (numEntries > MAX_DRIVE_SIZE_ENTRIES) retVal = ERR_DRIVE_SIZE_TABLE_MAX; else { if (driveSizeTable_P != NULL) { if (numEntries > driveSizeTable_P->getMaxEntries()) { retVal = ERR_DRIVE_SIZE_TABLE_MAX; } } if (retVal == MSG_RTN_COMPLETED) { driveSizeTable_S *ds_P = (driveSizeTable_S *) toEng_P->data; if (driveSizeTable_P != NULL) { ds_P->setMaxEntries(driveSizeTable_P->getMaxEntries()); } else { ds_P->setMaxEntries(MAX_DRIVE_SIZE_ENTRIES); } useDriveSizeTable(ds_P); if (saveTable) { retVal = writeDriveSizeTable(); } } } return (retVal); } //dptHBA_C::setArrayDriveSizeTable() //Function - dptHBA_C::getArrayDriveSizeTable() - start //=========================================================================== //Description: // This function returns the array drive size table. //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::getArrayDriveSizeTable(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; uLONG maxEntries = 0; uLONG numEntries = 0; if (driveSizeTable_P == NULL) { fromEng_P->insert(maxEntries); if (!fromEng_P->insert(numEntries)) { retVal = MSG_RTN_DATA_OVERFLOW; } } else { if (!fromEng_P->insert(driveSizeTable_P, 8+(driveSizeTable_P->getNumEntries()<<2))) { retVal = MSG_RTN_DATA_OVERFLOW; } } return (retVal); } //dptHBA_C::getArrayDriveSizeTable() //Function - dptHBA_C::initBusyLogic() - start //=========================================================================== //Description: // This function initializes the device busy checking code. //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::initBusyLogic(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; uLONG busyStatus = osdTargetBusy(0, 0, 0, 0); if (busyStatus & 0x80000000) { retVal = ERR_BUSY_CHECK_FAILED; } else if (busyStatus != 2) { retVal = (fromEng_P->insert(busyStatus)) ? MSG_RTN_COMPLETED : MSG_RTN_DATA_OVERFLOW; } return (retVal); } //dptHBA_C::initBusyLogic() //Function - dptHBA_C::i2oDiagTest() - start //=========================================================================== //Description: // This function starts a commanded diagnostic on an I2O controller. //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::i2oDiagTest(dptBuffer_S *toEng_P, dptBuffer_S *fromEng_P, uSHORT fnCode) { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (isI2O()) { uLONG rtnSize = 0; retVal = ERR_MEM_ALLOC; char *buff_P = new char[4096]; if (buff_P) { retVal = MSG_RTN_IGNORED; // Inititialize the message and data pointers memset(buff_P, 0, 4096); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *request_P = (PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *)buff_P; I2O_SINGLE_REPLY_MESSAGE_FRAME *reply_P = (I2O_SINGLE_REPLY_MESSAGE_FRAME *) (buff_P + 1024); char *data_P = buff_P + 2048; // Initialize the request message to issue a DPT private SCSI command if (fnCode == 7) { if (toEng_P->allocSize < 516) retVal = MSG_RTN_DATA_UNDERFLOW; else if (fromEng_P->allocSize < 536) retVal = MSG_RTN_DATA_OVERFLOW; else i2oInitDmaTest(buff_P, (char *)toEng_P->data+4, (char *)fromEng_P->data); } else i2oInitPrivateScsi(buff_P, 0x01, 2048, data_P); if (!fnCode) { request_P->CDBLength = 6; request_P->CDB[0] = 0x12; request_P->CDB[4] = 0xff; } else if (retVal == MSG_RTN_IGNORED) { request_P->CDBLength = 16; request_P->CDB[0] = 0xc2; request_P->CDB[2] = 0x01; // Function version request_P->CDB[3] = 0x01; // Function category = hardware setU2(request_P->CDB, 4, fnCode); // Function code #ifndef _DPT_BIG_ENDIAN osdSwap2((uSHORT *)(request_P->CDB+4)); #endif // If DMA test... if (fnCode == 0x07) { rtnSize = 0; uCHAR tempFlags = 0; uCHAR defFlags = 0; uCHAR defSourceByte = 0xaa; uCHAR defDestByte = 0x55; toEng_P->extract(tempFlags); toEng_P->extract(defFlags); toEng_P->extract(defSourceByte); toEng_P->extract(defDestByte); // Copy the "source data" if specified if (toEng_P->skip(512)) defFlags &= ~0x01; // Copy the "destination data" if specified if (toEng_P->extract(fromEng_P->data+8, 512)) defFlags &= ~0x02; // If the "source data" should be set to a specified value... if (defFlags & 0x01) memset(toEng_P->data+4, defSourceByte, 512); // If the "destination data" should be set to a specified value... if (defFlags & 0x02) memset(fromEng_P->data+8, defDestByte, 512); memset(fromEng_P->data, 0x00, 8); // Initial the CQC header to zero memset(fromEng_P->data+520, 0x00, 16); // Initial teh ECC data to zero request_P->CDB[14] = tempFlags; } // If RAM test... else if (fnCode == 0x06) { rtnSize = 16; uCHAR tempFlags = 0; if (!toEng_P->extract(tempFlags)) retVal = MSG_RTN_DATA_UNDERFLOW; else request_P->CDB[6] = tempFlags; } // BIST test... else if (fnCode == 0x08) { rtnSize = 4; } } if (retVal == MSG_RTN_IGNORED) { retVal = osdSendMessage(drvrRefNum, (I2O_MESSAGE_FRAME *) request_P, (I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME *) reply_P); if (retVal == MSG_RTN_COMPLETED) { if (I2O_SINGLE_REPLY_MESSAGE_FRAME_getReqStatus(reply_P) == I2O_REPLY_STATUS_SUCCESS) { if (fnCode == 7) { fromEng_P->setExtractSize(536); } else if (fnCode) { if (!fromEng_P->insert(data_P+8, rtnSize)) retVal = MSG_RTN_DATA_OVERFLOW; } else if (!fromEng_P->insert(data_P, 64)) { retVal = MSG_RTN_DATA_OVERFLOW; } } else retVal = ERR_I2O_REPLY_FAILURE; } } delete[] buff_P; } // (buff_P != NULL) } // end if (isI2O()) return (retVal); } //dptHBA_C::i2oDiagTest() //Function - dptHBA_C::i2oInitPrivateScsi() - start //=========================================================================== //Description: // This function initializes an I2O request message to send a DPT //private SCSI pass-through command. //--------------------------------------------------------------------------- void dptHBA_C::i2oInitPrivateScsi(char *buff_P, uLONG dataDir, uLONG dataSize, char *data_P) { PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *privScsi_P = (PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *) buff_P; I2O_PRIVATE_MESSAGE_FRAME *privI2o_P = &privScsi_P->PrivateMessageFrame; I2O_MESSAGE_FRAME *i2oMsg_P = &privI2o_P->StdMessageFrame; uCHAR versionOffset = 0x01; // Initialize the request message to perform a DPT private SCSI command I2O_MESSAGE_FRAME_setFunction(i2oMsg_P, I2O_PRIVATE_MESSAGE); I2O_MESSAGE_FRAME_setInitiatorAddress(i2oMsg_P, 0x01); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags(privScsi_P, I2O_SCB_FLAG_SENSE_DATA_IN_MESSAGE | I2O_SCB_FLAG_ENABLE_DISCONNECT); I2O_PRIVATE_MESSAGE_FRAME_setXFunctionCode(privI2o_P, I2O_SCSI_SCB_EXEC); I2O_PRIVATE_MESSAGE_FRAME_setOrganizationID(privI2o_P, DPT_ORGANIZATION_ID); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setInterpret(privScsi_P, 0x01); uLONG msgSize = sizeof(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE) - sizeof(I2O_SG_ELEMENT) - 4; if (dataDir) { msgSize += 4; // "ByteCount" field versionOffset |= (msgSize << 2) & 0xf0; I2O_SGE_SIMPLE_ELEMENT *sg_P = (I2O_SGE_SIMPLE_ELEMENT *)(buff_P + msgSize); I2O_FLAGS_COUNT *flagsCount_P = &sg_P->FlagsCount; if (dataDir == 1) { // data in I2O_FLAGS_COUNT_setFlags(flagsCount_P, (I2O_SGL_FLAGS_LAST_ELEMENT | I2O_SGL_FLAGS_END_OF_BUFFER | I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT)); uSHORT scbFlags = PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getSCBFlags(privScsi_P); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags(privScsi_P, scbFlags | I2O_SCB_FLAG_XFER_FROM_DEVICE); } else { // data out I2O_FLAGS_COUNT_setFlags(flagsCount_P, (I2O_SGL_FLAGS_LAST_ELEMENT | I2O_SGL_FLAGS_END_OF_BUFFER | I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT | I2O_SGL_FLAGS_DIR)); uSHORT scbFlags = PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getSCBFlags(privScsi_P); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags(privScsi_P, scbFlags | I2O_SCB_FLAG_XFER_TO_DEVICE); } I2O_FLAGS_COUNT_setCount(flagsCount_P, dataSize); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress(sg_P, (uLONG) data_P); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setByteCount(privScsi_P, dataSize); msgSize += sizeof(I2O_SGE_SIMPLE_ELEMENT); // SG element } I2O_MESSAGE_FRAME_setMessageSize(i2oMsg_P, (uSHORT)(msgSize >> 2)); I2O_MESSAGE_FRAME_setVersionOffset(i2oMsg_P, versionOffset); return; } //dptHBA_C::i2oInitPrivateScsi() - end //Function - dptHBA_C::i2oInitDmaTest() - start //=========================================================================== //Description: // This function initializes an I2O request message to send a DPT //private SCSI pass-through command. //--------------------------------------------------------------------------- void dptHBA_C::i2oInitDmaTest(char *buff_P, char *source_P, char *dest_P) { PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *privScsi_P = (PRIVATE_SCSI_SCB_EXECUTE_MESSAGE *) buff_P; I2O_PRIVATE_MESSAGE_FRAME *privI2o_P = &privScsi_P->PrivateMessageFrame; I2O_MESSAGE_FRAME *i2oMsg_P = &privI2o_P->StdMessageFrame; uCHAR versionOffset = 0x01; // Initialize the request message to perform a DPT private SCSI command I2O_MESSAGE_FRAME_setFunction(i2oMsg_P, I2O_PRIVATE_MESSAGE); I2O_MESSAGE_FRAME_setInitiatorAddress(i2oMsg_P, 0x01); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags(privScsi_P, I2O_SCB_FLAG_SENSE_DATA_IN_MESSAGE | I2O_SCB_FLAG_ENABLE_DISCONNECT); I2O_PRIVATE_MESSAGE_FRAME_setXFunctionCode(privI2o_P, I2O_SCSI_SCB_EXEC); I2O_PRIVATE_MESSAGE_FRAME_setOrganizationID(privI2o_P, DPT_ORGANIZATION_ID); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setInterpret(privScsi_P, 0x01); uLONG msgSize = sizeof(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE) - sizeof(I2O_SG_ELEMENT); versionOffset |= (msgSize << 2) & 0xf0; // Initialize the scatter/gather entry for the source buffer I2O_SGE_SIMPLE_ELEMENT *sg_P = (I2O_SGE_SIMPLE_ELEMENT *)(buff_P + msgSize); I2O_FLAGS_COUNT *flagsCount_P = &sg_P->FlagsCount; I2O_FLAGS_COUNT_setFlags(flagsCount_P, (I2O_SGL_FLAGS_END_OF_BUFFER | I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT | I2O_SGL_FLAGS_DIR)); uSHORT scbFlags = PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getSCBFlags(privScsi_P); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags(privScsi_P, scbFlags | I2O_SCB_FLAG_XFER_TO_DEVICE); I2O_FLAGS_COUNT_setCount(flagsCount_P, 512); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress(sg_P, (uLONG) source_P); msgSize += sizeof(I2O_SGE_SIMPLE_ELEMENT); // SG element // Initialize the scatter/gather entry for the destination buffer sg_P = (I2O_SGE_SIMPLE_ELEMENT *)(buff_P + msgSize); flagsCount_P = &sg_P->FlagsCount; I2O_FLAGS_COUNT_setFlags(flagsCount_P, (I2O_SGL_FLAGS_LAST_ELEMENT | I2O_SGL_FLAGS_END_OF_BUFFER | I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT)); scbFlags = PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getSCBFlags(privScsi_P); PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags(privScsi_P, scbFlags | I2O_SCB_FLAG_XFER_FROM_DEVICE); I2O_FLAGS_COUNT_setCount(flagsCount_P, 536); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress(sg_P, (uLONG) dest_P); msgSize += sizeof(I2O_SGE_SIMPLE_ELEMENT); // SG element // Set the byte count to the size of the largest buffer PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setByteCount(privScsi_P, 536); I2O_MESSAGE_FRAME_setMessageSize(i2oMsg_P, (uSHORT)(msgSize >> 2)); I2O_MESSAGE_FRAME_setVersionOffset(i2oMsg_P, versionOffset); return; } //dptHBA_C::i2oInitDmaTest() - end //Function - dptHBA_C::getBatteryInfo() - start //=========================================================================== //Description: // This function returns the backup battery information structure. //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::getBatteryInfo(dptBuffer_S *toEng_P, dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (isBatteryUnit()) { uCHAR pageControl = 0; uCHAR pageType = 0; if (toEng_P->extract(pageType)) { if (pageType) pageControl = 0x02; // Default values } // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P==NULL) retVal = ERR_GET_CCB; else { // Mode page 0x3A - battery info ccb_P->modeSense(0x3A, pageControl); // Target this HBA ccb_P->target(this); // Send the CCB to hardware retVal=launchCCB(ccb_P); if (retVal==MSG_RTN_COMPLETED) { uLONG tempLong = 0; uCHAR tempChar = 0; struct tm *tm_P = NULL; // pointer to the static structure returned by localtime() dptBatteryModePage_S *info_P = (dptBatteryModePage_S *) ccb_P->modeParam_P->getData(); info_P->scsiSwap(); tempLong = info_P->getStatus(); fromEng_P->insert(tempLong); tempLong = info_P->getCurrent(); fromEng_P->insert(tempLong); tempLong = info_P->getVoltage(); fromEng_P->insert(tempLong); tempLong = info_P->getDesignCapacity(); fromEng_P->insert(tempLong); tempLong = info_P->getFullChargeCapacity(); fromEng_P->insert(tempLong); tempLong = info_P->getRemainingCapacity(); fromEng_P->insert(tempLong); tempLong = info_P->getRemainingTime(); fromEng_P->insert(tempLong); tempLong = info_P->getMaxRemainingTime(); fromEng_P->insert(tempLong); tempLong = info_P->getTemperature(); fromEng_P->insert(tempLong); tempLong = info_P->getMaintenanceCycleCount(); fromEng_P->insert(tempLong); tempLong = info_P->getHwDesignVersion(); fromEng_P->insert(tempLong); // Manufacture date fields tempLong = info_P->getManufactureDate(); tempChar = (uCHAR) (tempLong & 0x1f); fromEng_P->insert(tempChar); // Day of month tempChar = (uCHAR) ((tempLong >> 5) & 0xf); fromEng_P->insert(tempChar); // Month tempChar = (uCHAR) ((tempLong >> 9) & 0x7f); fromEng_P->insert(tempChar); // Year (biased by 1980) tempChar = info_P->getFlags(); fromEng_P->insert(tempChar); // reserved byte // Thresholds tempLong = info_P->getWriteThruThreshold(); fromEng_P->insert(tempLong); tempLong = info_P->getPredictiveFailureThreshold(); fromEng_P->insert(tempLong); tempLong = 0; // used to be "normal threshold" now it's reserved fromEng_P->insert(tempLong); tempLong = info_P->getThresholdEnable(); fromEng_P->insert(tempLong); // Date of last maintenance calibration tempLong = info_P->getMaintenanceDate(); if (tempLong) { tm_P = localtime((const time_t *)&tempLong); if (tm_P == NULL) { tempLong = 0; fromEng_P->insert(tempLong); } else { tempChar = tm_P->tm_mday; fromEng_P->insert(tempChar); // Day of month tempChar = tm_P->tm_mon + 1; fromEng_P->insert(tempChar); // Month tempChar = tm_P->tm_year - 80; // Year is already biased by 1900 so we only need to take out another 80 fromEng_P->insert(tempChar); // Year tempChar = 0; fromEng_P->insert(tempChar); // reserved byte } } else fromEng_P->insert(tempLong); // Date of last initial calibration tempLong = info_P->getInitialCalibrationDate(); if (tempLong) { tm_P = localtime((const time_t *)&tempLong); if (tm_P == NULL) { tempLong = 0; fromEng_P->insert(tempLong); } else { tempChar = tm_P->tm_mday; fromEng_P->insert(tempChar); // Day of month tempChar = tm_P->tm_mon + 1; fromEng_P->insert(tempChar); // Month tempChar = tm_P->tm_year - 80; // Year is already biased by 1900 so we only need to take out another 80 fromEng_P->insert(tempChar); // Year tempChar = 0; fromEng_P->insert(tempChar); // reserved byte } } else fromEng_P->insert(tempLong); // ASCII fields info_P->getDeviceChemistry()[15] = 0; // ensure NULL terminated fromEng_P->insert(info_P->getDeviceChemistry(), 16); info_P->getManufacturerName()[15] = 0; // ensure NULL terminated fromEng_P->insert(info_P->getManufacturerName(), 16); info_P->getDeviceName()[15] = 0; // ensure NULL terminated if (!fromEng_P->insert(info_P->getDeviceName(), 16)) retVal = MSG_RTN_DATA_OVERFLOW; else retVal = MSG_RTN_COMPLETED; } // launchCCB() - end // Free the CCB ccb_P->clrInUse(); } // (ccb_P!=NULL) return retVal; } // if (isBatteryUnit()) return (retVal); } //dptHBA_C::getBatteryInfo() - end //Function - dptHBA_C::setBatteryThresholds() - start //=========================================================================== //Description: // This function sets the backup battery threshold levels. //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::setBatteryThresholds(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (isBatteryUnit()) { // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P==NULL) retVal = ERR_GET_CCB; else { // --- Read the battery info mode page --- // Mode page 0x3A - battery info ccb_P->modeSense(0x3A); // Target this HBA ccb_P->target(this); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Send the CCB to hardware if (retVal==MSG_RTN_COMPLETED) { uLONG tempLong = 0; dptBatteryModePage_S *info_P = (dptBatteryModePage_S *) ccb_P->modeParam_P->getData(); // --- Write the battery info mode page --- memset(ccb_P->eataCP.scsiCDB, 0, 12); ccb_P->modeSelect(0x3A, (uSHORT)(dptBatteryModePage_S::size() + 2)); ccb_P->target(this); toEng_P->extract(tempLong); info_P->setWriteThruThreshold((uSHORT)tempLong); info_P->swapWriteThruThreshold(); toEng_P->extract(tempLong); info_P->setPredictiveFailureThreshold((uSHORT)tempLong); info_P->swapPredictiveFailureThreshold(); toEng_P->extract(tempLong); // reserved if (!toEng_P->extract(tempLong)) retVal = MSG_RTN_DATA_UNDERFLOW; else { info_P->setThresholdEnable((uSHORT)tempLong); info_P->swapThresholdEnable(); // Send the mode select to hardware retVal = launchCCB(ccb_P); } } // launchCCB() - end // Free the CCB ccb_P->clrInUse(); } // (ccb_P!=NULL) } // end if (ccb_P!=NULL) return (retVal); } //dptHBA_C::setBatteryThresholds() - end //Function - dptHBA_C::calibrateBattery() - start //=========================================================================== //Description: // This function calibrates the backup battery. // // calibrationType = 0, Perform initial calibration (charge, discharge, recharge) // calibrationType = 1, Perform maintenance calibration (discharge, charge) //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::calibrateBattery(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (isBatteryUnit()) { uCHAR calibrationType = 0; // Get the calibration type (initial calibration == 0, maintenance calibration == 1) if (!toEng_P->extract(calibrationType)) retVal = MSG_RTN_DATA_UNDERFLOW; else retVal = sendMFC(MFC_CALIBRATE_BATTERY, calibrationType); } return (retVal); } //dptHBA_C::calibrateBattery() - end //Function - dptHBA_C::getBatteryStatus() - start //=========================================================================== //Description: // This function returns the backup battery information structure. //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::getBatteryStatus() { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (isBatteryUnit()) { uCHAR pageControl = 0; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P==NULL) retVal = ERR_GET_CCB; else { // Mode page 0x3A - battery info ccb_P->modeSense(0x3A, pageControl); // Target this HBA ccb_P->target(this); // Send the CCB to hardware retVal=launchCCB(ccb_P); if (retVal==MSG_RTN_COMPLETED) { dptBatteryModePage_S *info_P = (dptBatteryModePage_S *) ccb_P->modeParam_P->getData(); info_P->scsiSwap(); // Update the battery status and flags batteryStatus = info_P->getStatus(); batteryFlags = info_P->getFlags(); } // launchCCB() - end // Free the CCB ccb_P->clrInUse(); } // (ccb_P!=NULL) return retVal; } // end if (isBatteryUnit) return (retVal); } //dptHBA_C::getBatteryInfo() - end //Function - dptHBA_C::getArrayLimits() - start //=========================================================================== // //Description: // This function returns the firmware array limit information //for this HBA. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::getArrayLimits(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { retVal = MSG_RTN_IGNORED; // Initialize the CCB to do a log sense page 0x33 // Limit data buffer to 0xff bytes ccb_P->logSense(0x33,0,0xff); // Target this HBA ccb_P->target(this); // Send the CCB to hardware if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // Initialize the log page ccb_P->initLogSense(); // Find the array limits parameter if (ccb_P->log.find(0x0e)) { if (ccb_P->log.length() >= dptArrayLimits_S::size()) { // Return success retVal = MSG_RTN_COMPLETED; dptArrayLimits_S *limits_P = (dptArrayLimits_S *) ccb_P->log.data_P(); limits_P->scsiSwap(); if (!fromEng_P->insert(limits_P,dptArrayLimits_S::size())) retVal = MSG_RTN_DATA_OVERFLOW; } else retVal = MSG_RTN_IGNORED; } } // end if (launchCCB()==MSG_RTN_COMPLETED) // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) return (retVal); } //dptHBA_C::getArrayLimits() - end //Function - dptHBA_C::setExclusion() - start //=========================================================================== // //Description: // // This function sets the HBA's background task exclusion period. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::setExclusion(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; uCHAR startTime,endTime; toEng_P->extract(startTime); if (toEng_P->extract(endTime)) { // The time cannot be larger than 23 since it is a 24 hour count (0-23) if ((startTime >= 24) || (endTime >= 24) || (startTime > endTime)) retVal = MSG_RTN_FAILED | ERR_EXCLUSION_TIME; else { retVal = sendMFC(MFC_DIAG_EXCLUSION,startTime,endTime); if (retVal == MSG_RTN_COMPLETED) { // Update the HBA's background task exclusion period excludeStart = startTime; excludeEnd = endTime; } } } return (retVal); } //dptHBA_C::setExclusion() - end //Function - dptHBA_C::readDriveSizeTable() - start //=========================================================================== //Description: // This function reads the drive size table from the controller. //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::readDriveSizeTable() { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Read the controller's drive size table ccb_P->readDriveSizeTable(); // Target this HBA ccb_P->target(this); // Send the CCB to hardware retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) { driveSizeTable_S *ds_P = (driveSizeTable_S *) ccb_P->dataBuff_P; ds_P->swapFromBigEndian(); useDriveSizeTable(ds_P); } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::readDriveSizeTable() - end //Function - dptHBA_C::writeDriveSizeTable() - start //=========================================================================== //Description: // This function writes the current drive size table to the controller. //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::writeDriveSizeTable() { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_NO_DRIVE_SIZE_TABLE; if (driveSizeTable_P != NULL) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { uLONG tableSize = 8+(driveSizeTable_P->getNumEntries()<<2); // Get the drive size table ccb_P->writeDriveSizeTable(tableSize); // Target this HBA ccb_P->target(this); // Copy the current drive size table to the output buffer memcpy(ccb_P->dataBuff_P, driveSizeTable_P, tableSize); driveSizeTable_S *ds_P = (driveSizeTable_S *) ccb_P->dataBuff_P; ds_P->swapToBigEndian(); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); } } return (retVal); } //dptHBA_C::writeDriveSizeTable() - end //Function - dptHBA_C::useDriveSizeTable() - start //=========================================================================== //Description: // This function sets the current drive size table from the specified //structure. //--------------------------------------------------------------------------- void dptHBA_C::useDriveSizeTable(driveSizeTable_S *ds_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; // If a table has not been allocated... if (driveSizeTable_P == NULL) driveSizeTable_P = (driveSizeTable_S *) new uCHAR[8+(MAX_DRIVE_SIZE_ENTRIES<<2)]; // Limit the maximum number of entries to the engine's limit if (ds_P->getMaxEntries() > MAX_DRIVE_SIZE_ENTRIES) ds_P->setMaxEntries(MAX_DRIVE_SIZE_ENTRIES); // Limit the current number of entries to the table's limit if (ds_P->getNumEntries() > ds_P->getMaxEntries()) ds_P->setNumEntries(ds_P->getMaxEntries()); if (driveSizeTable_P) { // Clear the entire buffer memset(driveSizeTable_P, 0, 8+(MAX_DRIVE_SIZE_ENTRIES<<2)); // Copy the valid data memcpy(driveSizeTable_P, ds_P, 8+(ds_P->getNumEntries()<<2)); } } //dptHBA_C::useDriveSizeTable() - end //Function - dptHBA_C::sendMFC() - start //=========================================================================== // //Description: // // This function sends a RAID multi-function command to this HBA. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::sendMFC(uCHAR inCmd,uCHAR inModifier,uCHAR inParam) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB for a DPT multi-function command ccb_P->mfCmd(inCmd,inModifier,inParam); // Target this HBA ccb_P->target(this); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::sendMFC() - end //Function - dptHBA_C::sendExtMFC() - start //=========================================================================== // //Description: // // This function sends an extended multi-function command to this HBA. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::sendExtMFC(uCHAR inCmd,uCHAR inModifier, uLONG inParam1, uSHORT inParam2, uCHAR inParam3 ) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB for an extended DPT multi-function command ccb_P->extMfCmd(inCmd,inModifier,inParam1,inParam2,inParam3); // Target this HBA ccb_P->target(this); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::sendExtMFC() - end //Function - dptHBA_C::updateStatus() - start //=========================================================================== // //Description: // // This function updates this HBA's status. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::updateStatus(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; uSHORT LEDpattern; if (isReal()) { retVal = MSG_RTN_COMPLETED; // If the controller is in a blink LED condition... if (osdCheckBLED(getDrvrNum(),&LEDpattern)) { if ((LEDpattern == 0x69) || (LEDpattern == 0x6a)) { // If not previously in flash mode... if (status.main != SMAIN_FLASH_MODE) status.sub = SSUB_FLASH_INIT; status.main = SMAIN_FLASH_MODE; status.display = DSPLY_STAT_WARNING; } else { status.main = SMAIN_BLINK_LED; status.sub = (uCHAR) LEDpattern; status.display = DSPLY_STAT_FAILED; } } else { retVal = MSG_RTN_FAILED | ERR_GET_CCB; status.main = 0; status.sub = 0; status.display = DSPLY_STAT_OPTIMAL; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to do a log sense page 0x33 // Limit data buffer to 0xff bytes ccb_P->logSense(0x33,0,0xff); // Target this HBA ccb_P->target(this); // Send the CCB to hardware if ((retVal = launchCCB(ccb_P))==MSG_RTN_COMPLETED) { ccb_P->initLogSense(); // Find parameter #2 if (ccb_P->log.find(0x02)!=NULL) { fwFlags = ccb_P->log.data_P()[0]; } // Find parameter #9 if (ccb_P->log.findNext(0x09)!=NULL) { // Determine if the alarm is on or off if (ccb_P->log.data_P()[3] & 0x40) // Indicate that the alarm is on status.flags |= FLG_STAT_ALARM_ON; else // Indicate that the alarm is off status.flags &= ~FLG_STAT_ALARM_ON; } if (ccb_P->log.findNext(0x0c)!=NULL) { hbaFlags2 &= 0xffffff00; hbaFlags2 |= ((uSHORT) ccb_P->log.data_P()[0]) & 0xff; // Make the invalid subsystem status flag a valid flag hbaFlags2 ^= FLG_HBA_SUBSYS_VALID; } uSHORT notCrazy = 10; // for safety // Update all channel info while ((ccb_P->log.findNext(0x0d)!=NULL) && notCrazy--) updateChannelInfo(&(ccb_P->log)); if(hbaFlags2 & FLG_HBA_TEMP_PROBE) ccb_P->log.reset(); if (ccb_P->log.findNext(0x10)!=NULL) { currVoltage = *(uSHORT *)(ccb_P->log.data_P()); currTemperature = *(uSHORT *)(ccb_P->log.data_P()+2); osdSwap2(&currVoltage); osdSwap2(&currTemperature); } } // end if (launchCCB()) // Free the CCB ccb_P->clrInUse(); } // end if (ccb_!=NULL) } // end if (!blink LED) // Update the battery status getBatteryStatus(); // If returning the status... if (fromEng_P != NULL) { // If not another type of error... if (!fromEng_P->insert(&status,sizeof(dptStatus_S))) { if (retVal == MSG_RTN_COMPLETED) retVal = MSG_RTN_DATA_OVERFLOW; } } } // end if (isReal()) return (retVal); } //dptHBA_C::updateStatus() - end //Function - dptHBA_C::getTime() - start //=========================================================================== // //Description: // // This function reads the time from the HBA. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::getTime(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CDB to perform a mode sense ccb_P->modeSense(0x2f); // Target this HBA ccb_P->target(this); // Send the CCB to hardware if ((retVal = launchCCB(ccb_P))==MSG_RTN_COMPLETED) { uLONG inTime = getU4(ccb_P->modeParam_P->getData(),2); reverseBytes(inTime); retVal = MSG_RTN_DATA_OVERFLOW; if (fromEng_P->insert(inTime)) retVal = MSG_RTN_COMPLETED; } // end if (launchCCB()) // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) return(retVal); } //dptHBA_C::getTime() - end //Function - dptHBA_C::setTime() - start //=========================================================================== // //Description: // // This function sets the HBA time. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::setTime(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; uLONG hbaTime; // Get the new time value if (toEng_P->extract(hbaTime)) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Zero the data buffer ccb_P->clrData(); // Initialize the CCB to do a mode select page 0x2f ccb_P->modeSelect6(0x2f,0x06+2); // Target this HBA ccb_P->target(this); // Set the time uLONG *time_P = (uLONG *) (ccb_P->modeParam_P->getData()+2); setU4(time_P,0,hbaTime); reverseBytes(*time_P); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) } return(retVal); } //dptHBA_C::setTime() - end //Function - dptHBA_C::checkForEmul() - start //=========================================================================== // //Description: // // This function checks for emulated drives associated with this HBA. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptHBA_C::checkForEmul() { uSHORT done = 0; dptDevice_C *dev_P = (dptDevice_C *) logList.reset(); while ((dev_P!=NULL) && !done) { done = dev_P->checkForEmulation(); dev_P = (dptDevice_C *) logList.next(); } } //dptHBA_C::checkForEmul() - end //Function - dptHBA_C::getEventCtl() - start //=========================================================================== // //Description: // // This function gets the DPT HBA event log control word. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptHBA_C::getEventCtl() { engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to get the HBA event log control word ccb_P->modeSense(0x22,0,0,0x60); // Target this HBA ccb_P->target(this); if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // Get the event log control word eventLogCtl = getU4(ccb_P->modeParam_P->getData(),0); reverseBytes(eventLogCtl); } // Free the CCB ccb_P->clrInUse(); } } //dptHBA_C::getEventCtl() - end //Function - dptHBA_C::setEventCtl() - start //=========================================================================== // //Description: // // This function sets the DPT HBA event log control word. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::setEventCtl(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; uLONG newEventCtl; uCHAR saveToNV; // Get the new event control word if (toEng_P->extract(newEventCtl)) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get the save to non-volatile status if (!toEng_P->extract(saveToNV)) saveToNV = 1; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to get the HBA event log control word ccb_P->modeSelect(0x22,0x04+2,saveToNV & 0x7f); // Target this HBA ccb_P->target(this); // Set the event log control word reverseBytes(newEventCtl); setU4(ccb_P->modeParam_P->getData(),0,newEventCtl); // Send the mode select to hardware retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) eventLogCtl = newEventCtl; // Free the CCB ccb_P->clrInUse(); } } return (retVal); } //dptHBA_C::setEventCtl() - end //Function - dptHBA_C::rtnEventLog() - start //=========================================================================== // //Description: // // This function returns the event log for this HBA (non-destructively). // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::rtnEventLog(dptBuffer_S *toEng_P, dptBuffer_S *fromEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; uLONG offset = 0; if (is512kCache() || isI2O()) { if (!toEng_P->extract(offset)) offset = 0; // Get the event log data - Do not clear the event log retVal = doLogSense(fromEng_P,0x34,1,offset,1); if (retVal==MSG_RTN_COMPLETED) { dptHBAlog_C hbaLog; // Initialize the HBA log sense data (reverse byte ordering) hbaLog.initSense(fromEng_P->data,1); } } return (retVal); } //dptHBA_C::rtnEventLog() - end //Function - dptHBA_C::clearEventLog() - start //=========================================================================== // //Description: // // This function clears the HBA event log. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::clearEventLog() { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Target this HBA ccb_P->target(this); // Indicate that this is an event logger command ccb_P->setLoggerCmd(0); // Initialize the CCB to perform a SCSI log sense ccb_P->logSense(0x34,0,0xff); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::clearEventLog() - end //Function - dptHBA_C::rtnHBAstats() - start //=========================================================================== // //Description: // // Return this HBA's global statistics information. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::rtnHBAstats(dptBuffer_S *fromEng_P, uCHAR savePage ) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to get the global statistics page ccb_P->logSense(0x30,savePage); // Target this HBA ccb_P->target(this); // Send the CCB to hardware if ((retVal = launchCCB(ccb_P))==MSG_RTN_COMPLETED) { if (savePage) { retVal = MSG_RTN_DATA_OVERFLOW; dptHBAstatLog_C hbaStat; // Initialize the log page data (reverse bytes) hbaStat.initSense(ccb_P->defData,1); // Copy the statistics data to the output buffer if (fromEng_P->insert(hbaStat.data_P(),sizeof(hbaStats_S))) retVal = MSG_RTN_COMPLETED; } } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::rtnHBAstats() - end //Function - dptHBA_C::rtnIOstats() - start //=========================================================================== // //Description: // // Return this HBA's global read/write statistics information. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::rtnIOstats(dptBuffer_S *fromEng_P, uCHAR savePage ) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; // If clear stats data... if (!savePage) // Clear the statistics buffer retVal = addRWstats(NULL,savePage); else if (fromEng_P->allocSize>=sizeof(devStats_S)) { // Initialize the return statistics to zero memset(fromEng_P->data,0,sizeof(devStats_S)); // Get this device's statistics retVal = addRWstats((uLONG *)fromEng_P->data,savePage); // Set the buffer's write indexes fromEng_P->writeIndex = sizeof(devStats_S); } return (retVal); } //dptHBA_C::rtnIOstats() - end //Function - dptHBA_C::delEmulation() - start //=========================================================================== // //Description: // // This function deletes all emulated drives associated with this //HBA. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::delEmulation() { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; dptEmulation_S *emul_P; uSHORT bitTest; uSHORT emulStatus; dptAddr_S devAddr; uSHORT i; uCHAR emulAddrs[8]; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Target this HBA ccb_P->target(this); // Get the emulated drive mode page ccb_P->modeSense(0x3d,0,0,0x60); if ((retVal=launchCCB(ccb_P))==MSG_RTN_COMPLETED) { // Cast the return data as mode emul_P = (dptEmulation_S *) ccb_P->modeParam_P->getData(); // Save the status byte emulStatus = emul_P->getStatus(); // If there are any emulated drives... if (emul_P->getStatus() & 0x0f) { // Save the emulated drive SCSI addresses memcpy(emulAddrs,emul_P->getChanID0_P(),8); // Zero the output data buffer ccb_P->clrData(); for (bitTest=1,i=0;bitTest<=0x08;bitTest<<=1,i+=2) { if (emulStatus & bitTest) { // Re-initialize the CCB ccb_P->reInit(); // Perform an emulated drive page select ccb_P->modeSelect(0x3d,0x10); // Set the emulated drive's SCSI address devAddr.chan = emulAddrs[i] >> 5; devAddr.id = emulAddrs[i] & 0x1f; devAddr.lun = emulAddrs[i+1]; // Target the emulated drive address ccb_P->target(devAddr,this,CCB_ORIG_MGR); emul_P->setStatus((uCHAR) bitTest); // Send the CCB to the HBA launchCCB(ccb_P); } } } } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::delEmulation() - end //Function - dptHBA_C::flashWriteInit() - start //=========================================================================== // //Description: // // This function performs the required initialization to prepare //the HBA's flash memory to be programmed. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::flashWriteInit(engCCB_C *ccb_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_FLASH_SWITCH_MODES; updateStatus(); if (!isFlashMode()) switchToFlashMode(ccb_P); // If in flash mode... if (isI2O()) { // kmc 10/02/1998 - Initializing to zero here. // When using the setregion methods, we have to reset this to 0, // or else we get the wrong offsets when sending them down with the // flashcmd in ::flashWrite(...) flashWriteCnt = 0; retVal = MSG_RTN_COMPLETED; } else if (isFlashMode()) { // Erase the flash ccb_P->reInit(); ccb_P->target(this); time_t pre, post; time(&pre); ccb_P->flashCmd(FLASH_CMD_ERASE); if ((retVal = launchCCB(ccb_P)) == MSG_RTN_COMPLETED) { flashStablize(); time(&post); dptBuffer_S *inBuffer_P = dptBuffer_S::newBuffer(1024); dptBuffer_S *outBuffer_P = dptBuffer_S::newBuffer(1024); if (inBuffer_P && outBuffer_P && ((post-pre) > 1)) { inBuffer_P->reset(); retVal += flashStatus(inBuffer_P); dptFlashStatus_S *status_P = (dptFlashStatus_S *) &inBuffer_P->data[8]; uLONG numFlashBytes = status_P->getBurnSize(); uLONG curRead = 0; while(curRead < numFlashBytes) { outBuffer_P->reset(); outBuffer_P->insert(curRead); outBuffer_P->insert((uLONG) 512); inBuffer_P->reset(); retVal += flashRead(outBuffer_P,inBuffer_P); for(int x = 0; x < 512; x++) { if (inBuffer_P->data[x] != 0xff) retVal++; } curRead += 512; } dptBuffer_S::delBuffer(inBuffer_P); dptBuffer_S::delBuffer(outBuffer_P); } } if (retVal) retVal = MSG_RTN_FAILED | ERR_FLASH_ERASE; else { status.sub = SSUB_FLASH_WRITE; flashWriteCnt = 0; retVal = MSG_RTN_COMPLETED; } } else retVal = MSG_RTN_FAILED | ERR_FLASH_ERASE; return (retVal); } //dptHBA_C::flashWriteInit() - end //Function - dptHBA_C::flashWrite() - start //=========================================================================== // //Description: // // This function writes the specified data to the next unwritten //location in the flash memory. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::flashWrite(dptBuffer_S *toEng_P,uINT verify) { DEBUG_BEGIN(1, dptHBA_C::flashWrite()); DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // If we're not in flash write mode... if (isFlashMode() != SSUB_FLASH_WRITE) { // Try to get into flash write mode if ((retVal = flashWriteInit(ccb_P)) != MSG_RTN_COMPLETED) return (retVal); // Indicate that we are prepared to write to the flash status.sub = SSUB_FLASH_WRITE; } retVal = MSG_RTN_DATA_UNDERFLOW; if (toEng_P->writeIndex & 0x1ff) retVal = MSG_RTN_FAILED | ERR_FLASH_WRITE_512; else { uLONG bytesWritten = 0; while (toEng_P->extract(ccb_P->defData,512)) { ccb_P->reInit(); ccb_P->target(this); ccb_P->flashCmd(FLASH_CMD_WRITE,flashWriteCnt + flashRegionOffset); retVal = launchCCB(ccb_P); if (verify && (retVal == MSG_RTN_COMPLETED)) { flashStablize(); retVal = MSG_RTN_FAILED | ERR_FLASH_ENG_VERIFY; ccb_P->reInit(); ccb_P->target(this); ccb_P->flashCmd(FLASH_CMD_READ,flashWriteCnt + flashRegionOffset); if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) { if (memcmp(toEng_P->data+bytesWritten,ccb_P->defData,512) == 0) retVal = MSG_RTN_COMPLETED; } } flashStablize(); // If a failure has occurred... if (retVal != MSG_RTN_COMPLETED) { status.sub = SSUB_FLASH_INIT; DEBUG(1, PRT_ADDR << "FLASH FAILURE - retVal=0x" << hex << retVal); break; } bytesWritten += 512; flashWriteCnt += 512; DEBUG(1, PRT_ADDR << PRT_STAT << (int)flashWriteCnt << "Byte written"); } } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::flashWrite() - end //Function - dptHBA_C::flashWriteDone() - start //=========================================================================== // //Description: // // This function closes out the flash programming process. This //function causes the F/W flash code to compute and write the //flash checksums. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::flashWriteDone(uCHAR sendToHW) { // if SM has requested that we reset our pointers and not write // the checksum in the FW if (!isI2O() && !sendToHW) { status.sub = SSUB_FLASH_INIT; return(MSG_RTN_COMPLETED); } DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // If in flash write mode... // if (isFlashMode() == SSUB_FLASH_WRITE) { // Always take out of flash write mode status.sub = SSUB_FLASH_INIT; // Send the write done command to firmware ccb_P->target(this); ccb_P->flashCmd(FLASH_CMD_WRITE_DONE); retVal = launchCCB(ccb_P); flashStablize(); // } // else // retVal = MSG_RTN_FAILED | ERR_FLASH_INIT_REQ; // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::flashWriteDone() - end //Function - dptHBA_C::flashRead() - start //=========================================================================== // //Description: // // This function reads from the HBA's flash memory. Reading of //the flash does not require that the HBA be in flash mode. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::flashRead(dptBuffer_S *toEng_P,dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { uLONG flashAddr; uLONG bytesRequested; retVal = MSG_RTN_DATA_UNDERFLOW; toEng_P->extract(flashAddr); if (toEng_P->extract(bytesRequested)) { uLONG bytesToRead; while (bytesRequested) { bytesToRead = (bytesRequested > 512) ? 512 : bytesRequested; ccb_P->target(this); ccb_P->flashCmd(FLASH_CMD_READ,flashAddr + flashRegionOffset,bytesToRead); retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) { if (!fromEng_P->insert(ccb_P->defData,bytesToRead)) retVal = MSG_RTN_DATA_OVERFLOW; } flashStablize(); if (retVal != MSG_RTN_COMPLETED) break; flashAddr += bytesToRead; bytesRequested -= bytesToRead; } } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::flashRead() - end //Function - dptHBA_C::flashStatus() - start //=========================================================================== // //Description: // // This function inquires the status of the HBA's flash memory. //This status command does not require that the HBA be in flash //mode. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::flashStatus(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { retVal = MSG_RTN_DATA_OVERFLOW; uLONG fwStatus = 0; fromEng_P->insert(flashWriteCnt + flashRegionOffset); ccb_P->target(this); ccb_P->flashCmd(FLASH_CMD_STATUS); if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) { fwStatus = 1; fromEng_P->insert(fwStatus); dptFlashStatus_S *fstat_P = (dptFlashStatus_S *) ccb_P->defData; fstat_P->scsiSwap(); if (fromEng_P->insert(ccb_P->defData,dptFlashStatus_S::size())) retVal = MSG_RTN_COMPLETED; } else if (fromEng_P->insert(fwStatus)) retVal = MSG_RTN_COMPLETED; flashStablize(); // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::flashStatus() - end //Function - dptHBA_C::flashSwitchInto() - start //=========================================================================== // //Description: // // This function attempts to switch the HBA into flash mode from //operational mode. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::flashSwitchInto() { DPT_RTN_T retVal = MSG_RTN_IGNORED; updateStatus(); // If in operational mode... if (!isFlashMode()) { retVal = ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P != NULL) { // Attempt to switch to flash mode switchToFlashMode(ccb_P); // If in flash mode... retVal = (isFlashMode()) ? MSG_RTN_COMPLETED : ERR_FLASH_SWITCH_MODES; // Free the CCB ccb_P->clrInUse(); } } return (retVal); } //dptHBA_C::flashSwitchInto() - end //Function - dptHBA_C::flashSwitchOutOf() - start //=========================================================================== // //Description: // // This function attempt to switch the firmware into operational //mode from flash mode. This function causes the firmware to perform //a "cold" reboot. // if (method == 0) // a "normal" switch to operational mode is attempted // else // a no-checksum switch is attempted for the purposes of // verifying the functionality newly burned firmware // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::flashSwitchOutOf(uINT skipChecksumTst) { DPT_RTN_T retVal = MSG_RTN_IGNORED; // Determine how to switch out of flash mode uCHAR action = (skipChecksumTst) ? FLASH_CMD_TST_RESTART : FLASH_CMD_RESTART; DEBUG_BEGIN(1, dptHBA_C::flashSwitchOutOf()); updateStatus(); DEBUG(1, PRT_DADDR(this) << PRT_STAT); // If in flash mode... if (isFlashMode()) { retVal = ERR_GET_CCB; // Attempt to switch to operational mode engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { ccb_P->target(this); ccb_P->flashCmd(action); retVal = launchCCB(ccb_P); // if we are testing the new flash code, give the F/W a few seconds to do thier // thing before we start "attacking" them if (action == FLASH_CMD_TST_RESTART) #if defined (_DPT_MSDOS) || defined (_DPT_UNIX) sleep(5); #elif defined (_DPT_WINNT) Sleep(5000); #elif defined (_DPT_OS2) DosSleep(5000); #endif if (retVal == MSG_RTN_COMPLETED) status.main = status.sub = 0; // Free the CCB ccb_P->clrInUse(); } } return (retVal); } //dptHBA_C::flashSwitchOutOf() - end //Function - dptHBA_C::switchToFlashMode() - start //=========================================================================== // //Description: // // This function tries to switch the firmware into flash mode. //In order to switch into flash mode all F/W level diagnostics and //all RAID builds, rebuilds, and verifies must be stopped, and all //dirty cache must be flushed. This command will fail if F/W cannot //switch for any of the reasons mentioned above. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::switchToFlashMode(engCCB_C *ccb_P) { DEBUG_BEGIN(1, dptHBA_C::switchToFlashMode()); // Try to switch into flash mode ccb_P->reInit(); ccb_P->target(this); ccb_P->flashCmd(FLASH_CMD_FLASH_MODE); DPT_RTN_T retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) { // sleep for 2 seconds to make sure the FW has dones thier init'ing. #if defined(_DPT_MSDOS) || defined (_DPT_UNIX) sleep(2); #elif defined (_DPT_WINNT) Sleep(2000); #elif defined (_DPT_OS2) DosSleep(2000); #endif for (uINT i=0;i<50;i++) { updateStatus(); if (isFlashMode()) { #if defined(_DPT_MSDOS) || defined (_DPT_UNIX) sleep(1); #elif defined (_DPT_WINNT) Sleep(1000); #elif defined (_DPT_OS2) DosSleep(1000); #endif ccb_P->reInit(); ccb_P->target(this); ccb_P->inquiry(); launchCCB(ccb_P); sdInquiry_S *inq_P = (sdInquiry_S *) ccb_P->defData; } break; } } DEBUG(1, PRT_DADDR(this) << "flash in retVal=" << hex << retVal << \ PRT_STAT); return (retVal); } //dptHBA_C::switchToFlashMode() - end //Function - dptHBA_C::flashSetRegion() - start //=========================================================================== // //Description: // // This function // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::flashSetRegion(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; uLONG RegionType = 0; uLONG BootFlags = 0; uLONG ActualSize = 0; uINT topAligned = 0; if (!isI2O()) { retVal = MSG_RTN_FAILED; } else { toEng_P->extract(RegionType); toEng_P->extract(BootFlags); toEng_P->extract(ActualSize); uLONG flashSize = FLASH_REGION_NVRAM_OFFSET + 0x4000L; uLONG biosOffset = FLASH_REGION_BIOS_OFFSET; uLONG utilOffset = FLASH_REGION_UTILITY_OFFSET; // Determine if top or bottom aligned if (BootFlags & FW_LOAD_TOP) { topAligned = 1; } engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { DPTI_BootFlags = (uSHORT)BootFlags; // Get the flash status to help determine region sizes ccb_P->target(this); ccb_P->flashCmd(FLASH_CMD_STATUS); if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) { dptFlashStatus_S *fstat_P = (dptFlashStatus_S *) ccb_P->defData; fstat_P->scsiSwap(); flashSize = fstat_P->getFlashSize(); biosOffset = fstat_P->getBurnSize(); } // Read the first 512 bytes of the BIOS region to determine the utility region offset utilOffset = biosOffset + 0x8000L; // default = BIOS offset + 32k ccb_P->reInit(); ccb_P->target(this); ccb_P->flashCmd(FLASH_CMD_READ, biosOffset, 512); if (launchCCB(ccb_P) == MSG_RTN_COMPLETED) { if ((ccb_P->defData[0] == 0x55) && (ccb_P->defData[1] == 0xaa)) { utilOffset = ccb_P->defData[2]; utilOffset <<= 9; utilOffset += biosOffset; } } ccb_P->clrInUse(); } switch(RegionType) { case FLASH_REGION_FIRMWARE: flashRegionOffset = FLASH_REGION_FIRMWARE_OFFSET; if (topAligned && (biosOffset > ActualSize)) { flashRegionOffset = biosOffset - ActualSize; // burnSize - ActualSize } break; case FLASH_REGION_BIOS: flashRegionOffset = biosOffset; break; case FLASH_REGION_UTILITY: flashRegionOffset = utilOffset; break; case FLASH_REGION_NVRAM: flashRegionOffset = flashSize - 0x4000L; // flash size - 16k break; case FLASH_REGION_SERIAL_NUM: flashRegionOffset = flashSize - 0x2000L; // flash size - 8k break; default : retVal = MSG_RTN_FAILED; break; } } return (retVal); } //dptHBA_C::flashSetRegion() - end //Function - dptHBA_C::flashStablize() - start //=========================================================================== // //Description: the board is in flash mode, wait until we see the // bled code before going on // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptHBA_C::flashStablize() { uSHORT LEDpattern = 0; if (!isI2O() && status.main == SMAIN_FLASH_MODE) { while((LEDpattern & 0x00ff) != 0x69) osdCheckBLED(getDrvrNum(),&LEDpattern); } } // - end //Function - dptHBA_C::setDataField() - start //=========================================================================== // //Description: // // This function sets the specified data field to the specified //value. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::setDataField(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; uSHORT dataField,tempShort; // If a data field was specified... if (toEng_P->extract(dataField)) { switch (dataField) { case DF_RBLD_POLL_FREQ: if (toEng_P->extract(tempShort)) { rbldPollFreq = tempShort; retVal = updateLAPparams(); } break; case DF_RBLD_BOOT_CHECK: if (toEng_P->extract(tempShort)) { if (tempShort) raidFlags |= FLG_RBLD_BOOT_CHECK; else raidFlags &= ~FLG_RBLD_BOOT_CHECK; retVal = updateLAPparams(); } break; case DF_SPIN_DOWN_DELAY: if (toEng_P->extract(tempShort)) { spinDownDelay = tempShort; retVal = updateLAPparams(); } break; default: toEng_P->replay(); retVal = dptRAIDhba_C::setDataField(toEng_P); break; } // end switch (dataField) } // return (retVal); } //dptHBA_C::setDataField() - end //Function - dptHBA_C::readNV_RAM() - start //=========================================================================== // //Description: // // This function attempts to read the contents of the HBA's //non-volatile memory. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::readNV_RAM(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P != NULL) { // Attempt to read the contents of the NV RAM ccb_P->modeSense(0x2e); ccb_P->target(this); if ((retVal = launchCCB(ccb_P)) == MSG_RTN_COMPLETED) { if (fromEng_P->insert(ccb_P->modeParam_P->getData(),128)) retVal = MSG_RTN_COMPLETED; else retVal = MSG_RTN_DATA_OVERFLOW; } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::readNV_RAM() - end //Function - dptHBA_C::writeNV_RAM() - start //=========================================================================== // //Description: // // This function attempts to write the contents of the HBA's //non-volatile memory. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::writeNV_RAM(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P != NULL) { ccb_P->clrData(); ccb_P->modeSelect(0x2e,128+2); ccb_P->target(this); retVal = MSG_RTN_DATA_UNDERFLOW; // Insert the data to be written to the NV RAM if (toEng_P->extract(ccb_P->modeParam_P->getData(),128)) { // Compute the checksum char checksum = 0; char *byte_P = (char *) ccb_P->modeParam_P->getData(); for (uSHORT i=0;i<127;i++) checksum += *byte_P++; checksum = -checksum; ccb_P->modeParam_P->getData()[127] = checksum; retVal = launchCCB(ccb_P); } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptHBA_C::writeNV_RAM() - end //Function - dptHBA_C::quietBus() - start //=========================================================================== // //Description: // // This function quiets the SCSI bus and optionally blinks the //LED of this device. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::quietBus(dptBuffer_S *toEng_P) { uSHORT blinkMode = 1; uCHAR modifier = 0x80; if (!toEng_P->extract(blinkMode)) blinkMode = 0; if (blinkMode) modifier = 0xa0; return (sendMFC(MFC_QUIET,modifier)); } //dptHBA_C::quietBus() - end //Function - dptHBA_C::updateLAPparams() - start //=========================================================================== // //Description: // // This function overrides the dptManager_C::updateLAPparams() //function and updates the background priority via the extended //multifunction command if the dptManager_C found no RAID devices //to which to send the logical array page. // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::updateLAPparams() { // Attempt to update all logical array page data DPT_RTN_T retVal = dptManager_C::updateLAPparams(); // If the logical array page was not issued to at least 1 device if (retVal == (MSG_RTN_FAILED | ERR_NO_RAID_DEVICES)) // Try to set the background priority via the multi-function cmd retVal = sendExtMFC(0x0b,0,0L,rbldAmount,(uCHAR)rbldFrequency); return (retVal); } //dptHBA_C::updateLAPparams() - end //Function - dptHBA_C::setPhyMagicNums() - start //=========================================================================== // //Description: // // This function attempts to set the RAID magic number of all //unarrayed physical DASD devices. //--------------------------------------------------------------------------- void dptHBA_C::setPhyMagicNums() { dptDevice_C *dev_P = (dptDevice_C *) logList.reset(); while (dev_P) { // If an unarrayed physical DASD device with no magic number... if ((dev_P->getLevel()==2) && (dev_P->getObjType()==DPT_SCSI_DASD) && !dev_P->isComponent() && !dev_P->isRemoveable() && !dev_P->getMagicNum()) { // Attempt to set the physical device's magic number dev_P->setPhyMagicNum(); } dev_P = (dptDevice_C *) logList.next(); } } //dptHBA_C::setPhyMagicNums() - end //Function - dptHBA_C::GetAccessRights - start //=========================================================================== // //Description: // // This function attempts to get the HBA's access rights // //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::GetAccessRights(dptBuffer_S *fromEng_P) { DPT_RTN_T rtnVal = ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P) { // target the me ccb_P->target(this); // get the hba's portion of the rights ccb_P->modeSense(0x2d); // send it if ((rtnVal = launchCCB(ccb_P)) == MSG_RTN_COMPLETED) { dptMultiInitPage_S page; // copy the hba's poritons of the access rights memcpy(&page, ccb_P->modeParam_P->getData(), page.size()); page.scsiSwap(); fromEng_P->insert(&page, page.size()); // loop thru all the attached devices, we can look at the physical list // because the GetAccessRights function will get the RAID parent if any dptDevice_C *dev_P = (dptDevice_C *) phyList.reset(); while(dev_P) { rtnVal = dev_P->GetAccessRights(fromEng_P); dev_P = (dptDevice_C *) phyList.next(); } } } return rtnVal; } //Function - dptHBA_C::setPhyMagicNums() - start //=========================================================================== // //Description: // // This function attempts to set the RAID magic number of all //unarrayed physical DASD devices. //--------------------------------------------------------------------------- DPT_RTN_T dptHBA_C::SetAccessRights(dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P) { DPT_RTN_T rtnVal = MSG_RTN_DATA_UNDERFLOW; uCHAR acquire = 0; dptMultiInitPage_S page; // makw sure we get the data we need if (toEng_P->extract(&page, page.size())) { if (toEng_P->writeIndex - toEng_P->readIndex >= dptMultiInitList_S::size() + 1) { toEng_P->extract(acquire); rtnVal = MSG_RTN_COMPLETED; } } engCCB_C *ccb_P = getCCB(); if (ccb_P) { // target the me ccb_P->target(this); // get the hba's portion of the rights ccb_P->modeSelect(0x2d, (uSHORT)(2+dptMultiInitPage_S::size()), (acquire >> 1) | 0x80); // scsi swap page.scsiSwap(); // copy the data memcpy(ccb_P->modeParam_P->getData(), &page, page.size()); // send it if ((rtnVal = launchCCB(ccb_P)) == MSG_RTN_COMPLETED) { // go thru the physical list setting the rights there, the arrays will // automatically be set as well dptDevice_C *dev_P = (dptDevice_C *) phyList.reset(); while(dev_P) { toEng_P->replay(); toEng_P->skip(page.size()); DPT_RTN_T devRtn = dev_P->SetAccessRights(fromEng_P, toEng_P); // a device returned an error, palce its tag in if (devRtn) { fromEng_P->insert(dev_P->tag()); rtnVal = devRtn; } dev_P = (dptDevice_C *) phyList.next(); } } } else rtnVal = ERR_GET_CCB; return rtnVal; } DPT_RTN_T dptHBA_C::GetEnvironInfo(dptBuffer_S *fromEng_P) { DPT_RTN_T rtnVal = MSG_RTN_FAILED; dptHBAenviron_S info; info.clear(); //TODO: make something in the logger that make the following events "special" in that // it keeps track of the count and last triggered // 0x4014 // 0x4015 // 0x4017 // 0x4018 // for now, set it to 0xffffffff info.setHighTempCount(0xffffffff); info.setHighTempLast(0xffffffff); info.setVeryHighTempCount(0xffffffff); info.setVeryHighTempLast(0xffffffff); info.setLowVoltCount(0xffffffff); info.setLowVoltLast(0xffffffff); info.setHightVoltCount(0xffffffff); info.setHightVoltLast(0xffffffff); // this updates the temp and volt updateStatus(fromEng_P); fromEng_P->reset(); if(currVoltage != 0xffff) info.setCurVolt(currVoltage); else info.setCurVolt(0xffffffff); if(currTemperature != 0xffff) info.setCurTemp(currTemperature); else info.setCurTemp(0xffffffff); // get the temp thresholds readNV_RAM(fromEng_P); dptNVRAM_S *nv_P = (dptNVRAM_S *) &fromEng_P->data; if (nv_P->getHighTemp()) info.setHighTempThresh((uLONG) nv_P->getHighTemp()); else info.setHighTempThresh((uLONG) 46); if (nv_P->getVeryHighTemp()) info.setVeryHighTempThresh((uLONG) nv_P->getVeryHighTemp()); else info.setVeryHighTempThresh((uLONG) 60); fromEng_P->reset(); // give them the buffer if (fromEng_P->insert(&info, info.size())) rtnVal = MSG_RTN_COMPLETED; return rtnVal; } DPT_RTN_T dptHBA_C::SetEnvironInfo(dptBuffer_S *toEng_P) { DPT_RTN_T rtnVal = MSG_RTN_FAILED; dptHBAenviron_S info; info.clear(); if (toEng_P->extract(&info, info.size())) { readNV_RAM(toEng_P); dptNVRAM_S *nv_P = (dptNVRAM_S *) &toEng_P->data; nv_P->setHighTemp((uCHAR)info.getHighTempThresh()); nv_P->setVeryHighTemp((uCHAR)info.getHighTempThresh()); rtnVal = writeNV_RAM(toEng_P); } return rtnVal; } raidutils-0.0.6.orig/raideng/hba.hpp0000664000175000000620000004622310044153311017213 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __HBA_HPP #define __HBA_HPP //File - HBA.HPP //*************************************************************************** // //Description: // // This file contains the class definitions for all the DPT HBA //classes. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Class - dptSCSIhba_C::- start //=========================================================================== // //Description: // // This class defines a SCSI Host Bus Adapter (HBA). // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptSCSIhba_C : public dptManager_C { // Friends............................................ // Needs to set private data friend class dptSCSIdrvr_C; // Needs to set private data friend class dptDriver_C; // Set Boolean flags.................................. // Make this HBA a primary HBA void setPrimary() { flags |= FLG_HBA_PRIMARY; } // Make this HBA a secondary HBA void setSecondary() { flags &= ~FLG_HBA_PRIMARY; } protected: // Data............................................... // Miscellaneous flags - see bit definitions in get_info.h uSHORT flags; #if defined (_DPT_SOLARIS) && defined (_DPT_BIG_ENDIAN) // need a uSHORT here for alignment to avoid a SIGBUS. // Despite the fact that this class shouldn't be packed, their // compiler stills blows because it misaligns ioAddr. uSHORT blowMeKludge; #endif // solaris - big_endian // The HBA's I/O address (EISA, ISA, or PCI) dptIOaddr_U ioAddr; // # by which the driver references this HBA uSHORT drvrRefNum; // DPT ID bytes (EISA ID PAL or PCI vendor & product ID) dptHBAid_U id; // DMA channel # uSHORT drqNum; // Interrupt Request (IRQ) # uSHORT irqNum; // Total amount of memory on the HBA uLONG totalMem; // Event Log control word uLONG eventLogCtl; // Attached modules uSHORT modules; // Host to HBA bus speed (3 char NULL terminated ASCII - Mb/sec) uCHAR busSpeed[4]; // Host to HBA bus type - see definitions in get_info.h uCHAR busType; // SCSI bus transfer speed (5, 10, 20 Mb/sec) uCHAR scsiBusSpeed; // CPU speed (Mhz) uCHAR cpuSpeed; // 680XX uCHAR cpuType; // Size of each memory bank (Mbytes) uCHAR memBank[4]; // Size of each memory bank (Mbytes) uLONG extMemBank[4]; // FW type based on HBA model (070,230...) uSHORT fwType; // More flags - see bit definitions in get_info.h (flags2) uLONG hbaFlags2; // Number of bytes successfully written to the flash uLONG flashWriteCnt; // Offset of Flash region for GEN 5 uLONG flashRegionOffset; // Software selectable RAID ID # used with driver level arrays uCHAR raidSWid; // Slot specific RAID ID # used with driver level arrays uCHAR raidSlotID; // PCI bus # uCHAR busNum; // PCI device/function # uCHAR devFnNum; // SCSI channel information dptChanInfo_S chanInfo[MAX_NUM_CHANS]; // Start of the background task exclusion period uCHAR excludeStart; // End of the background task exclusion period uCHAR excludeEnd; // Current Voltage uSHORT currVoltage; // Current Temperature (celcius - low bit is .5) uSHORT currTemperature; // Maximum major stripe size as returned by firmware uSHORT maxMajorStripe; // Maximum number of components in an array uSHORT maxRaidComponents; // Maximum number of RAID table entries that can be stored on disk uSHORT maxRaidDiskEntries; // Maximum number of RAID table entries firmware can hold in memory uSHORT maxRaidMemEntries; // Current number of RAID table entries uSHORT numRaidEntriesUsed; // Battery status uSHORT batteryStatus; uCHAR batteryFlags; uCHAR batteryReserved; // Host bus info from log page 0x33 parameter code 0x07 uCHAR hostBusInfo; // Flags from log page 0x33 parameter code 0x02 uCHAR fwFlags; // Functions.................................. DPT_RTN_T rtnMembankCapacities(dptBuffer_S *fromEng_P); // Virtual Functions.................................. // Return object information in the specified output buffer virtual DPT_RTN_T rtnInfo(dptBuffer_S *); // Determine if the specified object type can be created virtual uSHORT isValidAbsentObj(uSHORT); // Set the various object flags virtual void setObjFlags(uSHORT,uSHORT); // Set absent object information from the specified input buffer virtual DPT_RTN_T setInfo(dptBuffer_S *,uSHORT); public: // Constructor/Destructor............................. dptSCSIhba_C(); // Virtual Functions.................................. // Return the size of this object's information structure virtual uLONG infoSize() { return (sizeof(dptHBAinfo_S)); } // Get this object's flags virtual void getObjFlags(uSHORT &flg); // Boolean Functions.................................. // Detremines if the HBA is primary uSHORT isPrimary() { return (flags & FLG_HBA_PRIMARY); } // Determines if the HBA is secondary uSHORT isSecondary() { return (!(flags & FLG_HBA_PRIMARY)); } // Determines if there is a RAID module attached uSHORT isRAIDmodule() { return (modules & (FLG_MOD_DM401X | FLG_MOD_DM4000 | FLG_MOD_DMI | FLG_MOD_RC4040 | FLG_MOD_RC4041)); } // Determines if there is a Cache module attached uSHORT isCacheModule() { return (modules & (FLG_MOD_CM401X | FLG_MOD_CM4000 | FLG_MOD_CMI | FLG_MOD_RC4040 | FLG_MOD_RC4041)); } // Determines if there is at least 512k of cache on the HBA uSHORT is512kCache() { return (totalMem >= 0x80000L); } // Determines if this HBA has an edge triggered interrupt uSHORT isEdge() { return (!(irqNum & 0x100)); } // Determines if DPT's ECC algorithm is supported uSHORT isECCenabled() { return (flags & FLG_HBA_ECC_ENABLED); } // Determines if the "Interpret Format" command is supported by F/W uLONG isInterpretFormat() { return (hbaFlags2 & FLG_HBA_INTERPRET_FMT); } // Determines if the "Interpret Format" command is supported by F/W uLONG isECCsizeErr() { return (hbaFlags2 & FLG_HBA_ECC_SIZE_ERR); } // Determines if F/W based diagnostics are supported uLONG isFWdiagCapable() { return (hbaFlags2 & FLG_HBA_DIAGNOSTICS); } // Determines if the HBA is an I2O HBA uLONG isI2O() { return (hbaFlags2 & FLG_HBA_I2O); } // Determines if the HBA has a backup battery capability // (this bit should be set even is a battery isn't installed) uLONG isBatteryUnit() { return (modules & FLG_MOD_BBU); } // Determines if the second release of I2O HBA // - Determine log page 0x36 format // - Determines physical array page format // - Determines if fibre SCSI ID packing is supported uLONG isI2OVer2() { return (hbaFlags2 & FLG_HBA_I2O_VER2); } // Determine if manual JBOD is active uLONG isManualJBODactive() { return (hbaFlags2 & FLG_HBA_MANUAL_JBOD_ACTIVE); } // Return the maximum channel number uCHAR getNumChans() { return phyRange.getMaxChan() + 1; } // Determines if the HBA is an I2O HBA uSHORT isUDMA() { return (chanInfo[0].flags & FLG_CHAN_UDMA); } // Determines if the HBA is an I2O HBA uLONG isClusterMode() { return (hbaFlags2 & FLG_HBA_CLUSTER_MODE); } // Return private data................................ // Return this HBA's ISA address uSHORT getISAaddr() { return (ioAddr.std.isa); } // Return this HBA's EISA address uSHORT getEISAaddr() { return (ioAddr.std.eisa); } // Return this HBA's PCI address uLONG getPCIaddr() { return (ioAddr.pci); } // Return this HBA's EISA slot number uSHORT getEISAslot() { return (ioAddr.std.eisa>>12); } // Return the # by which the driver references this HBA uSHORT getDrvrNum() { return (drvrRefNum); } // Return the IRQ # uSHORT getIRQnum() { return (irqNum & 0xff); } // Return the active RAID ID # uSHORT getRAIDid() { if (raidSWid) return (raidSWid); else return (raidSlotID); } // Return the software selectable RAID ID # uSHORT getSWid() { return ((uSHORT)raidSWid); } // Return the slot specific RAID ID # uSHORT getSlotID() { return ((uSHORT)raidSlotID); } // Decrement the number of RAID table entries used (numRaidEntriesUsed) void decRaidEntries(); // Increment the number of RAID table entries used (numRaidEntriesUsed) void incRaidEntries(); // Set Private Data................................... // Sets the base address based upon the specified RAID ID # void setBaseFromRAIDid(uSHORT); }; //dptSCSIhba_C - end //Class - dptRAIDhba_C - start //=========================================================================== // //Description: // // This class defines a RAID HBA. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptRAIDhba_C : public dptSCSIhba_C { // Sets up default RAID definitions void setDefRAID(); protected: // Data............................................... // The logical array page to be used uSHORT lapPage; // Miscellaneous flags for internal engine use uSHORT privateEngFlags; // Virtual Functions.................................. // Called after a device has been added to the logical device // list. Can be used to update device flags... virtual void postAddLog(dptCoreDev_C *); // Performs post delete operations // (Called prior to the object actually being deleted from memory) virtual void postDelete(dptCoreObj_C *); // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); public: // Constructor/Destructor............................. dptRAIDhba_C(); // Virtual Functions.................................. // Get this object's flags virtual void getObjFlags(uSHORT &flg); // Internal flags..................................... uSHORT isBusResetDesired() { return (privateEngFlags & 0x01); } void setBusResetDesired() { privateEngFlags |= 0x01; } void clrBusResetDesired() { privateEngFlags &= ~0x01; } // Other Functions.................................... // Updates the Hot Spare protection status for RAID drives attached // to this HBA. void updateHSprotection(); // Determines if this HBA is capable of configuring RAID devices virtual uSHORT isRAIDcapable(); // Determines if this HBA can configure RAID devices uSHORT isRAIDready(); }; //dptRAIDhba_C - end //Class - dptHBA_C - start //=========================================================================== // //Description: // // This class is the highest level DPT HBA class. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptHBA_C : public dptRAIDhba_C { // Determines if the target device is an "NCR" type RAID BCD uSHORT isRAIDbcd(); protected: // Virtual Functions.................................. // Finds this manager's physical objects virtual uSHORT findMyPhysicals(); // Finds this manager's logical objects virtual uSHORT findMyLogicals(); // Return the logical array page used virtual uSHORT getLAPpage() { return (lapPage); } // Finds a component device virtual dptDevice_C * findComponent(dptAddr_S,uSHORT=0,uLONG=0, dptCoreList_C *list_P=NULL); // Performs initialization of a real object (SCSI Inquiry...) virtual void realInit(); // Perform initialization after all this manager's devices // have been initialized virtual void scanPostInit() { if (isRAIDcapable()) updateHSprotection(); } // Updates the logical array page (LAP) parameters virtual DPT_RTN_T updateLAPparams(); // Get HBA hardware information void getHWinfo(); // Get NV RAM information void getNVinfo(); // Get HBA hardware information void updateChannelInfo(dptSCSIlog_C *); // Determines if FW responds to RAID commands void checkForRAID(); // Check for emulated drives void checkForEmul(); // Get the event log control word void getEventCtl(); // Read the drive size table from the controller DPT_RTN_T readDriveSizeTable(); // Write the drive size table to the controller DPT_RTN_T writeDriveSizeTable(); // Use the specified drive size table void useDriveSizeTable(driveSizeTable_S *ds_P); // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); // Set the HBA's background exclusion period DPT_RTN_T setExclusion(dptBuffer_S *); // Send a DPT multi-function command to the HBA DPT_RTN_T sendMFC(uCHAR,uCHAR=0,uCHAR=0); // Send an extended DPT multi-function command to the HBA DPT_RTN_T sendExtMFC(uCHAR,uCHAR=0,uLONG=0,uSHORT=0,uCHAR=0); // Updates this HBA's status DPT_RTN_T updateStatus(dptBuffer_S *fromEng_P=NULL); // Get the HBA's time DPT_RTN_T getTime(dptBuffer_S *); // Set the HBA's time DPT_RTN_T setTime(dptBuffer_S *); // Non-destructively reads the HBA's event log DPT_RTN_T rtnEventLog(dptBuffer_S *,dptBuffer_S *); // Clear the HBA event log DPT_RTN_T clearEventLog(); // Set the HBA event log control word DPT_RTN_T setEventCtl(dptBuffer_S *); // Return the global HBA statistics information DPT_RTN_T rtnHBAstats(dptBuffer_S *,uCHAR); // Return the global HBA statistics information DPT_RTN_T rtnIOstats(dptBuffer_S *,uCHAR); // Return the HBA's array limits DPT_RTN_T getArrayLimits(dptBuffer_S *); // Prepares the HBA's flash memory for programming DPT_RTN_T flashWriteInit(engCCB_C *); // Writes to the flash memory in 512 byte chunks DPT_RTN_T flashWrite(dptBuffer_S *,uINT=1); // Commands the flash F/W to compute & write the flash checksums DPT_RTN_T flashWriteDone(uCHAR sendToHW); // Reads a specified number of bytes from a specified location // in the flash memory. DPT_RTN_T flashRead(dptBuffer_S *,dptBuffer_S *); // Returns detailed information about the status of the flash memory DPT_RTN_T flashStatus(dptBuffer_S *); // Attempts to switch from operational mode into flash mode DPT_RTN_T flashSwitchInto(); // Attempts to switch from flash mode into operational mode DPT_RTN_T flashSwitchOutOf(uINT=0); // Attempts to switch the firmware into flash command mode DPT_RTN_T switchToFlashMode(engCCB_C *); // Sets the region to flash for GEN 5 boards DPT_RTN_T flashSetRegion(dptBuffer_S *); // called after a flash ommand completes ok // used to wait for older flash code to write the // bled code out void flashStablize(); // Set the specified data field to the specified value virtual DPT_RTN_T setDataField(dptBuffer_S *); // Reads tehe contents of the HBA's NV RAM DPT_RTN_T readNV_RAM(dptBuffer_S *); // Writes the contents of the HBA's NV RAM DPT_RTN_T writeNV_RAM(dptBuffer_S *); // Quiet the SCSI bus DPT_RTN_T quietBus(dptBuffer_S *); // get and set access rights for existing devices DPT_RTN_T SetAccessRights(dptBuffer_S *, dptBuffer_S *); DPT_RTN_T GetAccessRights(dptBuffer_S *); // whatd going on with the space in/around the hba? DPT_RTN_T GetEnvironInfo(dptBuffer_S *fromEng_P); DPT_RTN_T SetEnvironInfo(dptBuffer_S *fromEng_P); // Backup battery functions DPT_RTN_T getBatteryInfo(dptBuffer_S *toEng_P, dptBuffer_S *fromEng_P); // Return the battery info structure DPT_RTN_T setBatteryThresholds(dptBuffer_S *toEng_P); // Set the battery threshold value DPT_RTN_T calibrateBattery(dptBuffer_S *toEng_P); // Calibrate the battery DPT_RTN_T getBatteryStatus(); // Updated the HBA's battery status variables // I2O controller diagnostic functions DPT_RTN_T i2oDiagTest(dptBuffer_S *toEng_P, dptBuffer_S *fromEng_P, uSHORT fnCode=0); // Perform a commanded diagnostic void i2oInitPrivateScsi(char *, uLONG, uLONG, char *); void i2oInitDmaTest(char *, char *, char *); DPT_RTN_T initBusyLogic(dptBuffer_S *fromEng_P); // Initialize device busy logic // Set the array drive size table DPT_RTN_T setArrayDriveSizeTable(dptBuffer_S *); // Return the array drive size table DPT_RTN_T getArrayDriveSizeTable(dptBuffer_S *); // Reset the HBA (IOP reset) DPT_RTN_T resetHba(dptBuffer_S *toEng_P); // Send an I2O pass-through message DPT_RTN_T sendI2OMessage(dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P); DPT_RTN_T getChanInfo(dptBuffer_S *fromEng_P); public: // Adjust a CCB as necessary and pass it on to the next manager virtual DPT_RTN_T passCCB(engCCB_C *); // Delete all emulated drives associated with this HBA DPT_RTN_T delEmulation(); // Determines if the HBA is in blink LED mode uSHORT isBlinkLED() { return (status.main==SMAIN_BLINK_LED); } // Determines if the HBA is in flash command mode uSHORT isFlashMode() { if (status.main==SMAIN_FLASH_MODE) return (status.sub); else return (0); } // Set the RAID magic number of all unarrayed physical DASD devices void setPhyMagicNums(); }; //dptHBA_C - end #endif raidutils-0.0.6.orig/raideng/i2oadptr.h0000664000175000000620000003534210044153333017651 0ustar bapstaff00000000000000/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2oadptr.h 10 4/30/01 12:57p Salyzyn $ */ /**************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corproation. * All rights reserved. * * Copyright 1999 I2O Special Interest Group (I2O SIG). All rights reserved. * All rights reserved * * TERMS AND CONDITIONS OF USE * * Redistribution and use in source form, with or without modification, are * permitted provided that redistributions of source code must retain the * above copyright notice, this list of conditions and the following disclaimer. * * This software is provided `as is' by Distributed Processing Technology and * any express or implied warranties, including, but not limited to, the * implied warranties of merchantability and fitness for a particular purpose, * are disclaimed. In no event shall Distributed Processing Technology be * liable for any direct, indirect, incidental, special, exemplary or * consequential damages (including, but not limited to, procurement of * substitute goods or services; loss of use, data, or profits; or business * interruptions) however caused and on any theory of liability, whether in * contract, strict liability, or tort (including negligence or otherwise) * arising in any way out of the use of this driver software, even if advised * of the possibility of such damage. * * This header file, and any modifications of this header file, are provided * contingent upon your agreement and adherence to the here-listed terms and * conditions. By accepting and/or using this header file, you agree to abide * by these terms and conditions and that these terms and conditions will be * construed and governed in accordance with the laws of the State of California, * without reference to conflict-of-law provisions. If you do not agree * to these terms and conditions, please delete this file, and any copies, * permanently, without making any use thereof. * * THIS HEADER FILE IS PROVIDED FREE OF CHARGE ON AN AS-IS BASIS WITHOUT * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE. I2O SIG DOES NOT WARRANT THAT THIS HEADER FILE WILL MEET THE * USER'S REQUIREMENTS OR THAT ITS OPERATION WILL BE UNINTERRUPTED OR * ERROR-FREE. * * I2O SIG DISCLAIMS ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF * ANY PROPRIETARY RIGHTS, RELATING TO THE IMPLEMENTATION OF THE I2O * SPECIFICATIONS. I2O SIG DOES NOT WARRANT OR REPRESENT THAT SUCH * IMPLEMENTATIONS WILL NOT INFRINGE SUCH RIGHTS. * * THE USER OF THIS HEADER FILE SHALL HAVE NO RECOURSE TO I2O SIG FOR ANY * ACTUAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOST DATA * OR LOST PROFITS ARISING OUT OF THE USE OR INABILITY TO USE THIS PROGRAM. * * I2O SIG grants the user of this header file a license to copy, distribute, * and modify it, for any purpose, under the following terms. Any copying, * distribution, or modification of this header file must not delete or alter * the copyright notice of I2O SIG or any of these Terms and Conditions. * * Any distribution of this header file must not include a charge for the * header file (unless such charges are strictly for the physical acts of * copying or transferring copies). However, distribution of a product in * which this header file is embedded may include a charge so long as any * such charge does not include any charge for the header file itself. * * Any modification of this header file constitutes a derivative work based * on this header file. Any distribution of such derivative work: (1) must * include prominent notices that the header file has been changed from the * original, together with the dates of any changes; (2) automatically includes * this same license to the original header file from I2O SIG, without any * restriction thereon from the distributing user; and (3) must include a * grant of license of the modified file under the same terms and conditions * as these Terms and Conditions. * * The I2O SIG Web site can be found at: http://www.i2osig.org * * The I2O SIG encourages you to deposit derivative works based on this * header file at the I2O SIG Web site. Furthermore, to become a Registered * Developer of the I2O SIG, sign up at the Web site or call 415.750.8352 * (United States). ****************************************************************/ #if !defined(I2O_ADPTR_HDR) #define I2O_ADPTR_HDR #if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__)) # if (KERN_VERSION < 3) # include "i386/pci/i2omsg.h" # else # include "dev/asr/i2omsg.h" # endif #else # include "i2omsg.h" /* Include the Base Message file */ #endif #define I2OADPTR_REV 1_5_1 /* Header file revision string */ /***************************************************************************** * * i2oadptr.h -- I2O Adapter Class Message defintion file * * * Revision History: * * 1.5.d 03/06/97 - First definition for spec. draft version 1.5d. * 1.5.1 05/02/97 - Corrections from review cycle: * 1) Remove "SCSI" from function definition comment. * 2) Add revision string. * 3) Convert tabs to spaces. * 4) New disclaimer. * * * *****************************************************************************/ /* NOTES: Gets, reads, receives, etc. are all even numbered functions. Sets, writes, sends, etc. are all odd numbered functions. Functions that both send and receive data can be either but an attempt is made to use the function number that indicates the greater transfer amount. Functions that do not send or receive data use odd function numbers. Some functions are synonyms like read, receive and send, write. All common functions will have a code of less than 0x80. Unique functions to a class will start at 0x80. Executive Functions start at 0xA0. Utility Message function codes range from 0 - 0x1f Base Message function codes range from 0x20 - 0xfe Private Message function code is 0xff. */ PRAGMA_ALIGN_PUSH PRAGMA_PACK_PUSH /* Bus Adapter Class specific functions */ #define I2O_HBA_ADAPTER_RESET 0x85 #define I2O_HBA_BUS_QUIESCE 0x8b #define I2O_HBA_BUS_RESET 0x87 #define I2O_HBA_BUS_SCAN 0x89 /* Detailed Status Codes for HBA operations Note: The 16-bit Detailed Status Code field for HBA operations is divided into two separate 8-bit fields. The lower 8 bits are reserved. The upper 8 bits are used to report Adapter Status information. The definitions for these two fields, however, will be consistent with the standard reply message frame structure declaration, which treats this as a single 16-bit field. In addition, the values used will be consistent with the Adapter Status codes defined for the SCSI Peripheral class. Theses codes are based on CAM-1. In other words, these definitions are a subset of the SCSI peripheral class codes. Where applicable, "SCSI" has been removed from the definition. */ #define I2O_HBA_DSC_MASK 0xFF00 #define I2O_HBA_DSC_SUCCESS 0x0000 #define I2O_HBA_DSC_ADAPTER_BUSY 0x0500 #define I2O_HBA_DSC_COMMAND_TIMEOUT 0x0B00 #define I2O_HBA_DSC_COMPLETE_WITH_ERROR 0x0400 #define I2O_HBA_DSC_FUNCTION_UNAVAILABLE 0x3A00 #define I2O_HBA_DSC_NO_ADAPTER 0x1100 #define I2O_HBA_DSC_PARITY_ERROR_FAILURE 0x0F00 #define I2O_HBA_DSC_PATH_INVALID 0x0700 #define I2O_HBA_DSC_PROVIDE_FAILURE 0x1600 #define I2O_HBA_DSC_QUEUE_FROZEN 0x4000 #define I2O_HBA_DSC_REQUEST_ABORTED 0x0200 #define I2O_HBA_DSC_REQUEST_INVALID 0x0600 #define I2O_HBA_DSC_REQUEST_LENGTH_ERROR 0x1500 #define I2O_HBA_DSC_REQUEST_TERMINATED 0x1800 #define I2O_HBA_DSC_RESOURCE_UNAVAILABLE 0x3400 #define I2O_HBA_DSC_BUS_BUSY 0x3F00 #define I2O_HBA_DSC_BUS_RESET 0x0E00 #define I2O_HBA_DSC_ID_INVALID 0x3900 #define I2O_HBA_DSC_SEQUENCE_FAILURE 0x1400 #define I2O_HBA_DSC_UNABLE_TO_ABORT 0x0300 #define I2O_HBA_DSC_UNABLE_TO_TERMINATE 0x0900 #define I2O_HBA_DSC_UNACKNOWLEDGED_EVENT 0x3500 #define I2O_HBA_DSC_UNEXPECTED_BUS_FREE 0x1300 /****************************************************************************/ /* Bus Adapter Parameter Groups */ /****************************************************************************/ #define I2O_HBA_CONTROLLER_INFO_GROUP_NO 0x0000 #define I2O_HBA_HISTORICAL_STATS_GROUP_NO 0x0100 #define I2O_HBA_SCSI_CONTROLLER_INFO_GROUP_NO 0x0200 #define I2O_HBA_SCSI_BUS_PORT_INFO_GROUP_NO 0x0201 #define I2O_HBA_FCA_CONTROLLER_INFO_GROUP_NO 0x0300 #define I2O_HBA_FCA_PORT_INFO_GROUP_NO 0x0301 /* - 0000h - HBA Controller Information Parameter Group */ /* Bus Type */ #define I2O_HBA_BUS_TYPE_GENERIC 0x00 #define I2O_HBA_BUS_TYPE_SCSI 0x01 #define I2O_HBA_BUS_TYPE_FCA 0x10 typedef struct _I2O_HBA_CONTROLLER_INFO_SCALAR { U8 BusType; U8 BusState; U16 Reserved2; U8 BusName[12]; } I2O_HBA_CONTROLLER_INFO_SCALAR, *PI2O_HBA_CONTROLLER_INFO_SCALAR; /* - 0100h - HBA Historical Stats Parameter Group */ typedef struct _I2O_HBA_HIST_STATS_SCALAR { U32 TimeLastPoweredUp; U32 TimeLastReset; } I2O_HBA_HIST_STATS_SCALAR, *PI2O_HBA_HIST_STATS_SCALAR; /* - 0200h - HBA SCSI Controller Information Parameter Group */ /* SCSI Type */ #define I2O_SCSI_TYPE_UNKNOWN 0x00 #define I2O_SCSI_TYPE_SCSI_1 0x01 #define I2O_SCSI_TYPE_SCSI_2 0x02 #define I2O_SCSI_TYPE_SCSI_3 0x03 /* Protection Management */ #define I2O_SCSI_PORT_PROT_OTHER 0x00 #define I2O_SCSI_PORT_PROT_UNKNOWN 0x01 #define I2O_SCSI_PORT_PROT_UNPROTECTED 0x02 #define I2O_SCSI_PORT_PROT_PROTECTED 0x03 #define I2O_SCSI_PORT_PROT_SCC 0x04 /* Settings */ #define I2O_SCSI_PORT_PARITY_FLAG 0x01 #define I2O_SCSI_PORT_PARITY_DISABLED 0x00 #define I2O_SCSI_PORT_PARITY_ENABLED 0x01 #define I2O_SCSI_PORT_SCAN_ORDER_FLAG 0x02 #define I2O_SCSI_PORT_SCAN_LOW_TO_HIGH 0x00 #define I2O_SCSI_PORT_SCAN_HIGH_TO_LOW 0x02 #define I2O_SCSI_PORT_IID_FLAG 0x04 #define I2O_SCSI_PORT_IID_DEFAULT 0x00 #define I2O_SCSI_PORT_IID_SPECIFIED 0x04 #define I2O_SCSI_PORT_SCAM_FLAG 0x08 #define I2O_SCSI_PORT_SCAM_DISABLED 0x00 #define I2O_SCSI_PORT_SCAM_ENABLED 0x08 #define I2O_SCSI_PORT_TYPE_FLAG 0x80 #define I2O_SCSI_PORT_TYPE_PARALLEL 0x00 #define I2O_SCSI_PORT_TYPE_SERIAL 0x80 typedef struct _I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR { U8 SCSIType; U8 ProtectionManagement; U8 Settings; U8 Reserved1; U32 InitiatorID; U64 ScanLun0Only; U16 DisableDevice; U8 MaxOffset; U8 MaxDataWidth; U64 MaxSyncRate; } I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR, *PI2O_HBA_SCSI_CONTROLLER_INFO_SCALAR; /* - 0201h - HBA SCSI Bus Port Information Parameter Group */ /* NOTE: Refer to the SCSI Peripheral Class Bus Port Information Parameter Group field definitions for HBA SCSI Bus Port field definitions. */ typedef struct _I2O_HBA_SCSI_BUS_PORT_INFO_SCALAR { U8 PhysicalInterface; U8 ElectricalInterface; U8 Isochronous; U8 ConnectorType; U8 ConnectorGender; U8 Reserved1; U16 Reserved2; U32 MaxNumberDevices; U32 DeviceIdBegin; U32 DeviceIdEnd; U8 LunBegin[8]; U8 LunEnd[8]; } I2O_HBA_SCSI_BUS_PORT_INFO_SCALAR, *PI2O_HBA_SCSI_BUS_PORT_INFO_SCALAR; /* - 0300h - HBA FCA Controller Information Parameters Group defines */ /* SCSI Type */ #define I2O_FCA_TYPE_UNKNOWN 0x00 #define I2O_FCA_TYPE_FCAL 0x01 typedef struct _I2O_HBA_FCA_CONTROLLER_INFO_SCALAR { U8 FcaType; U8 Reserved1; U16 Reserved2; } I2O_HBA_FCA_CONTROLLER_INFO_SCALAR, *PI2O_HBA_FCA_CONTROLLER_INFO_SCALAR; /* - 0301h - HBA FCA Port Information Parameters Group defines */ typedef struct _I2O_HBA_FCA_PORT_INFO_SCALAR { U32 Reserved4; } I2O_HBA_FCA_PORT_INFO_SCALAR, *PI2O_HBA_FCA_PORT_INFO_SCALAR; /****************************************************************************/ /* I2O Bus Adapter Class Specific Message Definitions */ /****************************************************************************/ /****************************************************************************/ /* I2O Bus Adapter Class Reply Message Frame */ typedef struct _I2O_HBA_REPLY_MESSAGE_FRAME { I2O_SINGLE_REPLY_MESSAGE_FRAME StdReplyFrame; } I2O_HBA_REPLY_MESSAGE_FRAME, *PI2O_HBA_REPLY_MESSAGE_FRAME; /****************************************************************************/ /* I2O HBA Adapter Reset Message Frame */ typedef struct _I2O_HBA_ADAPTER_RESET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_HBA_ADAPTER_RESET_MESSAGE, *PI2O_HBA_ADAPTER_RESET_MESSAGE; /****************************************************************************/ /* I2O HBA Bus Quiesce Message Frame */ typedef U32 I2O_HBQ_FLAGS; #define I2O_HBQ_FLAG_NORMAL 0x0000 #define I2O_HBQ_FLAG_QUIESCE 0x0001 typedef struct _I2O_HBA_BUS_QUIESCE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_HBQ_FLAGS Flags; } I2O_HBA_BUS_QUIESCE_MESSAGE, *PI2O_HBA_BUS_QUIESCE_MESSAGE; /****************************************************************************/ /* I2O HBA Bus Reset Message Frame */ typedef struct _I2O_HBA_BUS_RESET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_HBA_BUS_RESET_MESSAGE, *PI2O_HBA_BUS_RESET_MESSAGE; /****************************************************************************/ /* I2O HBA Bus Scan Message Frame */ /* NOTE: SCSI-2 8-bit scalar LUN goes into offset 1 of Lun arrays */ typedef struct _I2O_HBA_BUS_SCAN_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_HBA_BUS_SCAN_MESSAGE, *PI2O_HBA_BUS_SCAN_MESSAGE; PRAGMA_PACK_POP PRAGMA_ALIGN_POP #endif /* I2O_ADPTR_HDR */ raidutils-0.0.6.orig/raideng/i2obscsi.h0000664000175000000620000004640310044153333017642 0ustar bapstaff00000000000000/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2obscsi.h 14 4/30/01 12:57p Salyzyn $ */ /**************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. * All rights reserved. * * Copyright 1999 I2O Special Interest Group (I2O SIG). All rights reserved. * All rights reserved * * TERMS AND CONDITIONS OF USE * * Redistribution and use in source form, with or without modification, are * permitted provided that redistributions of source code must retain the * above copyright notice, this list of conditions and the following disclaimer. * * This software is provided `as is' by Distributed Processing Technology and * any express or implied warranties, including, but not limited to, the * implied warranties of merchantability and fitness for a particular purpose, * are disclaimed. In no event shall Distributed Processing Technology be * liable for any direct, indirect, incidental, special, exemplary or * consequential damages (including, but not limited to, procurement of * substitute goods or services; loss of use, data, or profits; or business * interruptions) however caused and on any theory of liability, whether in * contract, strict liability, or tort (including negligence or otherwise) * arising in any way out of the use of this driver software, even if advised * of the possibility of such damage. * * This header file, and any modifications of this header file, are provided * contingent upon your agreement and adherence to the here-listed terms and * conditions. By accepting and/or using this header file, you agree to abide * by these terms and conditions and that these terms and conditions will be * construed and governed in accordance with the laws of the State of California, * without reference to conflict-of-law provisions. If you do not agree * to these terms and conditions, please delete this file, and any copies, * permanently, without making any use thereof. * * THIS HEADER FILE IS PROVIDED FREE OF CHARGE ON AN AS-IS BASIS WITHOUT * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE. I2O SIG DOES NOT WARRANT THAT THIS HEADER FILE WILL MEET THE * USER'S REQUIREMENTS OR THAT ITS OPERATION WILL BE UNINTERRUPTED OR * ERROR-FREE. * * I2O SIG DISCLAIMS ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF * ANY PROPRIETARY RIGHTS, RELATING TO THE IMPLEMENTATION OF THE I2O * SPECIFICATIONS. I2O SIG DOES NOT WARRANT OR REPRESENT THAT SUCH * IMPLEMENTATIONS WILL NOT INFRINGE SUCH RIGHTS. * * THE USER OF THIS HEADER FILE SHALL HAVE NO RECOURSE TO I2O SIG FOR ANY * ACTUAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOST DATA * OR LOST PROFITS ARISING OUT OF THE USE OR INABILITY TO USE THIS PROGRAM. * * I2O SIG grants the user of this header file a license to copy, distribute, * and modify it, for any purpose, under the following terms. Any copying, * distribution, or modification of this header file must not delete or alter * the copyright notice of I2O SIG or any of these Terms and Conditions. * * Any distribution of this header file must not include a charge for the * header file (unless such charges are strictly for the physical acts of * copying or transferring copies). However, distribution of a product in * which this header file is embedded may include a charge so long as any * such charge does not include any charge for the header file itself. * * Any modification of this header file constitutes a derivative work based * on this header file. Any distribution of such derivative work: (1) must * include prominent notices that the header file has been changed from the * original, together with the dates of any changes; (2) automatically includes * this same license to the original header file from I2O SIG, without any * restriction thereon from the distributing user; and (3) must include a * grant of license of the modified file under the same terms and conditions * as these Terms and Conditions. * * The I2O SIG Web site can be found at: http://www.i2osig.org * * The I2O SIG encourages you to deposit derivative works based on this * header file at the I2O SIG Web site. Furthermore, to become a Registered * Developer of the I2O SIG, sign up at the Web site or call 415.750.8352 * (United States). ****************************************************************/ #if !defined(I2O_BASE_SCSI_HDR) #define I2O_BASE_SCSI_HDR #if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__)) # if (KERN_VERSION < 3) # include "i386/pci/i2omsg.h" /* Include the Base Message file */ # else # include "dev/asr/i2omsg.h" # endif #else # include "i2omsg.h" /* Include the Base Message file */ #endif #define I2OBSCSI_REV 1_5_1 /* Header file revision string */ /***************************************************************************** * * I2OBSCSI.h -- I2O Base SCSI Device Class Message defintion file * * This file contains information presented in Chapter 6, Section 6 & 7 of * the I2O Specification. * * Revision History: (Revision History tracks the revision number of the I2O * specification) * * .92 - First marked revsion used for Proof of Concept. * .93 - Change to match the rev .93 of the spec. * .95 - Updated to Rev .95 of 2/5/96. * 1.00 - Checked and Updated against spec version 1.00 4/9/96. * 1.xx - Updated to the 1.x version of the I2O Specification on 11/11/96. * 1.xx - 11/14/96 * 1) Removed duplicate device type definitions. * 2) Added "DSC" to Detailed Status Code definitions. * 3) Changed SCSI-3 LUN fields from U64 to U8 array. * 1.xx 11/15/96 - Added #pragma statments for i960. * 1.xx 11/20/96 - Changed duplicate Bus Scan structure to Bus Reset. * 1.xx 12/05/96 - Added Auto Request Sense flag definition. * 1.5d 03/06/97 - Update for spec. draft version 1.5d. * 1) Converted SCSI bus adapter class to generic in i2oadptr.h. * 2) Fixed DSC reference: changed from _BUS_SCAN to _BUS_RESET. * 1.5d 03/031/97 - Made AutoSense flag definition consistent with spec. * 1.5d 04/11/97 - Corrections from review cycle: * 1) Corrected typo in I2O_SCSI_PERIPHERAL_TYPE_PARALLEL. * 2) Corrected typo in I2O_SCSI_PORT_CONN_UNSHIELDED_P_HD. * 1.5.1 05/02/97 - Corrections from review cycle: * 1) Remove #include for i2omstor.h. * 2) Add revision string. * 3) Convert tabs to spaces. * 4) New disclaimer. * *****************************************************************************/ /* NOTES: Gets, reads, receives, etc. are all even numbered functions. Sets, writes, sends, etc. are all odd numbered functions. Functions that both send and receive data can be either but an attempt is made to use the function number that indicates the greater transfer amount. Functions that do not send or receive data use odd function numbers. Some functions are synonyms like read, receive and send, write. All common functions will have a code of less than 0x80. Unique functions to a class will start at 0x80. Executive Functions start at 0xA0. Utility Message function codes range from 0 - 0x1f Base Message function codes range from 0x20 - 0xfe Private Message function code is 0xff. */ PRAGMA_ALIGN_PUSH PRAGMA_PACK_PUSH /* SCSI Peripheral Class specific functions Although the names are SCSI Peripheral class specific, the values assigned are common with other classes when applicable. */ #define I2O_SCSI_DEVICE_RESET 0x27 #define I2O_SCSI_SCB_ABORT 0x83 #define I2O_SCSI_SCB_EXEC 0x81 /* Detailed Status Codes for SCSI operations The 16-bit Detailed Status Code field for SCSI operations is divided into two separate 8-bit fields. The lower 8 bits are used to report Device Status information. The upper 8 bits are used to report Adapter Status information. The definitions for these two fields, however, will be consistent with the standard reply message frame structure declaration, which treats this as a single 16-bit field. */ /* SCSI Device Completion Status Codes (defined by SCSI-2/3)*/ #define I2O_SCSI_DEVICE_DSC_MASK 0x00FF #define I2O_SCSI_DSC_SUCCESS 0x0000 #define I2O_SCSI_DSC_CHECK_CONDITION 0x0002 #define I2O_SCSI_DSC_BUSY 0x0008 #define I2O_SCSI_DSC_RESERVATION_CONFLICT 0x0018 #define I2O_SCSI_DSC_COMMAND_TERMINATED 0x0022 #define I2O_SCSI_DSC_TASK_SET_FULL 0x0028 #define I2O_SCSI_DSC_ACA_ACTIVE 0x0030 /* SCSI Adapter Status Codes (based on CAM-1) */ #define I2O_SCSI_HBA_DSC_MASK 0xFF00 #define I2O_SCSI_HBA_DSC_SUCCESS 0x0000 #define I2O_SCSI_HBA_DSC_REQUEST_ABORTED 0x0200 #define I2O_SCSI_HBA_DSC_UNABLE_TO_ABORT 0x0300 #define I2O_SCSI_HBA_DSC_COMPLETE_WITH_ERROR 0x0400 #define I2O_SCSI_HBA_DSC_ADAPTER_BUSY 0x0500 #define I2O_SCSI_HBA_DSC_REQUEST_INVALID 0x0600 #define I2O_SCSI_HBA_DSC_PATH_INVALID 0x0700 #define I2O_SCSI_HBA_DSC_DEVICE_NOT_PRESENT 0x0800 #define I2O_SCSI_HBA_DSC_UNABLE_TO_TERMINATE 0x0900 #define I2O_SCSI_HBA_DSC_SELECTION_TIMEOUT 0x0A00 #define I2O_SCSI_HBA_DSC_COMMAND_TIMEOUT 0x0B00 #define I2O_SCSI_HBA_DSC_MR_MESSAGE_RECEIVED 0x0D00 #define I2O_SCSI_HBA_DSC_SCSI_BUS_RESET 0x0E00 #define I2O_SCSI_HBA_DSC_PARITY_ERROR_FAILURE 0x0F00 #define I2O_SCSI_HBA_DSC_AUTOSENSE_FAILED 0x1000 #define I2O_SCSI_HBA_DSC_NO_ADAPTER 0x1100 #define I2O_SCSI_HBA_DSC_DATA_OVERRUN 0x1200 #define I2O_SCSI_HBA_DSC_UNEXPECTED_BUS_FREE 0x1300 #define I2O_SCSI_HBA_DSC_SEQUENCE_FAILURE 0x1400 #define I2O_SCSI_HBA_DSC_REQUEST_LENGTH_ERROR 0x1500 #define I2O_SCSI_HBA_DSC_PROVIDE_FAILURE 0x1600 #define I2O_SCSI_HBA_DSC_BDR_MESSAGE_SENT 0x1700 #define I2O_SCSI_HBA_DSC_REQUEST_TERMINATED 0x1800 #define I2O_SCSI_HBA_DSC_IDE_MESSAGE_SENT 0x3300 #define I2O_SCSI_HBA_DSC_RESOURCE_UNAVAILABLE 0x3400 #define I2O_SCSI_HBA_DSC_UNACKNOWLEDGED_EVENT 0x3500 #define I2O_SCSI_HBA_DSC_MESSAGE_RECEIVED 0x3600 #define I2O_SCSI_HBA_DSC_INVALID_CDB 0x3700 #define I2O_SCSI_HBA_DSC_LUN_INVALID 0x3800 #define I2O_SCSI_HBA_DSC_SCSI_TID_INVALID 0x3900 #define I2O_SCSI_HBA_DSC_FUNCTION_UNAVAILABLE 0x3A00 #define I2O_SCSI_HBA_DSC_NO_NEXUS 0x3B00 #define I2O_SCSI_HBA_DSC_SCSI_IID_INVALID 0x3C00 #define I2O_SCSI_HBA_DSC_CDB_RECEIVED 0x3D00 #define I2O_SCSI_HBA_DSC_LUN_ALREADY_ENABLED 0x3E00 #define I2O_SCSI_HBA_DSC_BUS_BUSY 0x3F00 #define I2O_SCSI_HBA_DSC_QUEUE_FROZEN 0x4000 /****************************************************************************/ /* SCSI Peripheral Device Parameter Groups */ /****************************************************************************/ /* SCSI Configuration and Operating Structures and Defines */ #define I2O_SCSI_DEVICE_INFO_GROUP_NO 0x0000 #define I2O_SCSI_DEVICE_BUS_PORT_INFO_GROUP_NO 0x0001 /* - 0000h - SCSI Device Information Parameters Group defines */ /* Device Type */ #define I2O_SCSI_DEVICE_TYPE_DIRECT 0x00 #define I2O_SCSI_DEVICE_TYPE_SEQUENTIAL 0x01 #define I2O_SCSI_DEVICE_TYPE_PRINTER 0x02 #define I2O_SCSI_DEVICE_TYPE_PROCESSOR 0x03 #define I2O_SCSI_DEVICE_TYPE_WORM 0x04 #define I2O_SCSI_DEVICE_TYPE_CDROM 0x05 #define I2O_SCSI_DEVICE_TYPE_SCANNER 0x06 #define I2O_SCSI_DEVICE_TYPE_OPTICAL 0x07 #define I2O_SCSI_DEVICE_TYPE_MEDIA_CHANGER 0x08 #define I2O_SCSI_DEVICE_TYPE_COMM 0x09 #define I2O_SCSI_DEVICE_GRAPHICS_1 0x0A #define I2O_SCSI_DEVICE_GRAPHICS_2 0x0B #define I2O_SCSI_DEVICE_TYPE_ARRAY_CONT 0x0C #define I2O_SCSI_DEVICE_TYPE_SES 0x0D #define I2O_SCSI_DEVICE_TYPE_UNKNOWN 0x1F /* Flags */ #define I2O_SCSI_PERIPHERAL_TYPE_FLAG 0x01 #define I2O_SCSI_PERIPHERAL_TYPE_PARALLEL 0x00 #define I2O_SCSI_PERIPHERAL_TYPE_SERIAL 0x01 #define I2O_SCSI_RESERVED_FLAG 0x02 #define I2O_SCSI_DISCONNECT_FLAG 0x04 #define I2O_SCSI_DISABLE_DISCONNECT 0x00 #define I2O_SCSI_ENABLE_DISCONNECT 0x04 #define I2O_SCSI_MODE_MASK 0x18 #define I2O_SCSI_MODE_SET_DATA 0x00 #define I2O_SCSI_MODE_SET_DEFAULT 0x08 #define I2O_SCSI_MODE_SET_SAFEST 0x10 #define I2O_SCSI_DATA_WIDTH_MASK 0x60 #define I2O_SCSI_DATA_WIDTH_8 0x00 #define I2O_SCSI_DATA_WIDTH_16 0x20 #define I2O_SCSI_DATA_WIDTH_32 0x40 #define I2O_SCSI_SYNC_NEGOTIATION_FLAG 0x80 #define I2O_SCSI_DISABLE_SYNC_NEGOTIATION 0x00 #define I2O_SCSI_ENABLE_SYNC_NEGOTIATION 0x80 /* - 0001h - SCSI Device Bus Port Info Parameters Group defines */ /* Physical */ #define I2O_SCSI_PORT_PHYS_OTHER 0x01 #define I2O_SCSI_PORT_PHYS_UNKNOWN 0x02 #define I2O_SCSI_PORT_PHYS_PARALLEL 0x03 #define I2O_SCSI_PORT_PHYS_FIBRE_CHANNEL 0x04 #define I2O_SCSI_PORT_PHYS_SERIAL_P1394 0x05 #define I2O_SCSI_PORT_PHYS_SERIAL_SSA 0x06 /* Electrical */ #define I2O_SCSI_PORT_ELEC_OTHER 0x01 #define I2O_SCSI_PORT_ELEC_UNKNOWN 0x02 #define I2O_SCSI_PORT_ELEC_SINGLE_ENDED 0x03 #define I2O_SCSI_PORT_ELEC_DIFFERENTIAL 0x04 #define I2O_SCSI_PORT_ELEC_LOW_VOLT_DIFF 0x05 #define I2O_SCSI_PORT_ELEC_OPTICAL 0x06 /* Isochronous */ #define I2O_SCSI_PORT_ISOC_NO 0x00 #define I2O_SCSI_PORT_ISOC_YES 0x01 #define I2O_SCSI_PORT_ISOC_UNKNOWN 0x02 /* Connector Type */ #define I2O_SCSI_PORT_CONN_OTHER 0x01 #define I2O_SCSI_PORT_CONN_UNKNOWN 0x02 #define I2O_SCSI_PORT_CONN_NONE 0x03 #define I2O_SCSI_PORT_CONN_SHIELDED_A_HD 0x04 #define I2O_SCSI_PORT_CONN_UNSHIELDED_A_HD 0x05 #define I2O_SCSI_PORT_CONN_SHIELDED_A_LD 0x06 #define I2O_SCSI_PORT_CONN_UNSHIELDED_A_LD 0x07 #define I2O_SCSI_PORT_CONN_SHIELDED_P_HD 0x08 #define I2O_SCSI_PORT_CONN_UNSHIELDED_P_HD 0x09 #define I2O_SCSI_PORT_CONN_SCA_I 0x0A #define I2O_SCSI_PORT_CONN_SCA_II 0x0B #define I2O_SCSI_PORT_CONN_FC_DB9 0x0C #define I2O_SCSI_PORT_CONN_FC_FIBRE 0x0D #define I2O_SCSI_PORT_CONN_FC_SCA_II_40 0x0E #define I2O_SCSI_PORT_CONN_FC_SCA_II_20 0x0F #define I2O_SCSI_PORT_CONN_FC_BNC 0x10 /* Connector Gender */ #define I2O_SCSI_PORT_CONN_GENDER_OTHER 0x01 #define I2O_SCSI_PORT_CONN_GENDER_UNKOWN 0x02 #define I2O_SCSI_PORT_CONN_GENDER_FEMALE 0x03 #define I2O_SCSI_PORT_CONN_GENDER_MALE 0x04 /* SCSI Device Group 0000h - Device Information Parameter Group */ typedef struct _I2O_SCSI_DEVICE_INFO_SCALAR { U8 DeviceType; U8 Flags; U16 Reserved2; U32 Identifier; U8 LunInfo[8]; /* SCSI-2 8-bit scalar LUN goes into offset 1 */ U32 QueueDepth; U8 Reserved1a; U8 NegOffset; U8 NegDataWidth; U8 Reserved1b; U64 NegSyncRate; } I2O_SCSI_DEVICE_INFO_SCALAR, *PI2O_SCSI_DEVICE_INFO_SCALAR; /* SCSI Device Group 0001h - Bus Port Information Parameter Group */ typedef struct _I2O_SCSI_BUS_PORT_INFO_SCALAR { U8 PhysicalInterface; U8 ElectricalInterface; U8 Isochronous; U8 ConnectorType; U8 ConnectorGender; U8 Reserved1; U16 Reserved2; U32 MaxNumberDevices; } I2O_SCSI_BUS_PORT_INFO_SCALAR, *PI2O_SCSI_BUS_PORT_INFO_SCALAR; /****************************************************************************/ /* I2O SCSI Peripheral Event Indicator Assignment */ #define I2O_SCSI_EVENT_SCSI_SMART 0x00000010 /****************************************************************************/ /* SCSI Peripheral Class Specific Message Definitions */ /****************************************************************************/ /****************************************************************************/ /* I2O SCSI Peripheral Successful Completion Reply Message Frame */ typedef struct _I2O_SCSI_SUCCESS_REPLY_MESSAGE_FRAME { I2O_SINGLE_REPLY_MESSAGE_FRAME StdReplyFrame; U32 TransferCount; } I2O_SCSI_SUCCESS_REPLY_MESSAGE_FRAME, *PI2O_SCSI_SUCCESS_REPLY_MESSAGE_FRAME; /****************************************************************************/ /* I2O SCSI Peripheral Error Report Reply Message Frame */ #ifdef _WIN64 #define I2O_SCSI_SENSE_DATA_SZ 44 #else #define I2O_SCSI_SENSE_DATA_SZ 40 #endif typedef struct _I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME { I2O_SINGLE_REPLY_MESSAGE_FRAME StdReplyFrame; U32 TransferCount; U32 AutoSenseTransferCount; U8 SenseData[I2O_SCSI_SENSE_DATA_SZ]; } I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME, *PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME; /****************************************************************************/ /* I2O SCSI Device Reset Message Frame */ typedef struct _I2O_SCSI_DEVICE_RESET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_SCSI_DEVICE_RESET_MESSAGE, *PI2O_SCSI_DEVICE_RESET_MESSAGE; /****************************************************************************/ /* I2O SCSI Control Block Abort Message Frame */ typedef struct _I2O_SCSI_SCB_ABORT_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_TRANSACTION_CONTEXT TransactionContextToAbort; } I2O_SCSI_SCB_ABORT_MESSAGE, *PI2O_SCSI_SCB_ABORT_MESSAGE; /****************************************************************************/ /* I2O SCSI Control Block Execute Message Frame */ #define I2O_SCSI_CDB_LENGTH 16 typedef U16 I2O_SCB_FLAGS; #define I2O_SCB_FLAG_XFER_DIR_MASK 0xC000 #define I2O_SCB_FLAG_NO_DATA_XFER 0x0000 #define I2O_SCB_FLAG_XFER_FROM_DEVICE 0x4000 #define I2O_SCB_FLAG_XFER_TO_DEVICE 0x8000 #define I2O_SCB_FLAG_ENABLE_DISCONNECT 0x2000 #define I2O_SCB_FLAG_TAG_TYPE_MASK 0x0380 #define I2O_SCB_FLAG_NO_TAG_QUEUEING 0x0000 #define I2O_SCB_FLAG_SIMPLE_QUEUE_TAG 0x0080 #define I2O_SCB_FLAG_HEAD_QUEUE_TAG 0x0100 #define I2O_SCB_FLAG_ORDERED_QUEUE_TAG 0x0180 #define I2O_SCB_FLAG_ACA_QUEUE_TAG 0x0200 #define I2O_SCB_FLAG_AUTOSENSE_MASK 0x0060 #define I2O_SCB_FLAG_DISABLE_AUTOSENSE 0x0000 #define I2O_SCB_FLAG_SENSE_DATA_IN_MESSAGE 0x0020 #define I2O_SCB_FLAG_SENSE_DATA_IN_BUFFER 0x0060 typedef struct _I2O_SCSI_SCB_EXECUTE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U8 CDBLength; U8 Reserved; I2O_SCB_FLAGS SCBFlags; U8 CDB[I2O_SCSI_CDB_LENGTH]; U32 ByteCount; I2O_SG_ELEMENT SGL; } I2O_SCSI_SCB_EXECUTE_MESSAGE, *PI2O_SCSI_SCB_EXECUTE_MESSAGE; PRAGMA_PACK_POP PRAGMA_ALIGN_POP #endif /* I2O_BASE_SCSI_HDR */ raidutils-0.0.6.orig/raideng/i2odep.h0000664000175000000620000013504310044153311017302 0ustar bapstaff00000000000000/**************************************************************************** All software on this website is made available under the following terms and conditions. By downloading this software, you agree to abide by these terms and conditions with respect to this software. I2O SIG All rights reserved. These header files are provided, pursuant to your I2O SIG membership agreement, free of charge on an as-is basis without warranty of any kind, either express or implied, including but not limited to, implied warranties or merchantability and fitness for a particular purpose. I2O SIG does not warrant that this program will meet the user's requirements or that the operation of these programs will be uninterrupted or error-free. Acceptance and use of this program constitutes the user's understanding that he will have no recourse to I2O SIG for any actual or consequential damages including, but not limited to, loss profits arising out of use or inability to use this program. Member is permitted to create derivative works to this header-file program. However, all copies of the program and its derivative works must contain the I2O SIG copyright notice. **************************************************************************/ /* * This template provides place holders for architecture and compiler * dependencies. It should be filled in and renamed as i2odep.h. * i2odep.h is included by i2otypes.h. marks the places to fill. */ #ifndef __INCi2odeph #define __INCi2odeph #define I2ODEP_REV 1_5_4 /* * Pragma macros. These are to assure appropriate alignment between * host/IOP as defined by the I2O Specification. Each one of the shared * header files includes these macros. */ #define PRAGMA_ALIGN_PUSH #define PRAGMA_ALIGN_POP #define PRAGMA_PACK_PUSH #define PRAGMA_PACK_POP /* Setup the basics */ typedef signed char S8; typedef signed short S16; typedef unsigned char U8; typedef unsigned short U16; typedef unsigned long U32; typedef unsigned short S32; #if defined(WIN32) || defined(__UNIX__) || defined(__SPARC__) typedef char CHAR; typedef char *pCHAR; typedef char INT8; typedef char *pINT8; typedef unsigned char UINT8; typedef unsigned char *pUINT8; typedef short INT16; typedef short *pINT16; typedef unsigned short UINT16; typedef unsigned short *pUINT16; #ifdef _MSC_VER #if (_MSC_VER < 1200) // if less than VC++ 6.0 typedef long INT32; typedef unsigned long UINT32; #endif #else typedef long INT32; typedef unsigned long UINT32; #endif typedef long *pINT32; typedef unsigned long *pUINT32; #if (!defined STATIC) # define STATIC static #endif #if (!defined pVOID) # define pVOID void * #endif #if (!defined pBOOLEAN) # define pBOOLEAN BOOLEAN * #endif #endif //WIN32 #if (defined(__SPARC__)) //typedef SCSI_REQUEST_BLOCK OS_REQUEST_T; //typedef PSCSI_REQUEST_BLOCK pOS_REQUEST_T; # define STATIC static # define pVOID void * # define pBOOLEAN BOOLEAN * #endif /* Bitfields */ #if (defined(__BORLANDC__)) typedef U16 BF; #else typedef U32 BF; #endif /* VOID */ #ifndef __VOID #if (defined(_DPT_ARC)) # define VOID void #else #if !defined(WIN32) typedef void VOID; #endif #endif #define __VOID #endif /* Boolean */ #ifndef __BOOL #define __BOOL #if !defined(WIN32) typedef unsigned char BOOL; #endif #endif #if (!defined(__FAR__)) # if (defined(__BORLANDC__)) # define __FAR__ far # else # define __FAR__ # endif #endif /* NULL */ #if (!defined(NULL)) # define NULL ((VOID __FAR__ *)0L) #endif /* * Define some generalized portability macros * These macros follow the following parameterization: * _F_getXXX(pointer,primaryElement<,offset>,referredElement) * _F_setXXX(pointer,primaryElement<,offset>,referredElement,newValue) * These parameters are shortened to u, w, x, y and z to reduce clutter. */ #if (defined(__BORLANDC__)) # define I2O_TID_MASK ((U16)((1L<x))) & I2O_TID_MASK) # define _F_setTID(w,x,y,z) (*((U16 __FAR__ *)(&((w)->x)))\ &= 0xFFFF - I2O_TID_MASK);\ (*((U16 __FAR__ *)(&((w)->x)))\ |=(U16)(z)&I2O_TID_MASK) /* Seconds 12 bits (optimized with the assumption of 12 & 12) */ # define _F_getTID1(w,x,y) ((*(U16 __FAR__ *)(((U8 __FAR__ *)(&((w)->x)))\ + (I2O_TID_SZ/8)))\ >> (I2O_TID_SZ-((I2O_TID_SZ/8)*8))) # define _F_setTID1(w,x,y,z) ((*((U16 __FAR__ *)(((U8 __FAR__ *)(&((w)->x)))\ + (I2O_TID_SZ/8)))) &= (0xFFFF >> I2O_TID_SZ));\ ((*((U16 __FAR__ *)(((U8 __FAR__ *)(&((w)->x)))\ + (I2O_TID_SZ/8)))) |= (z)\ << (I2O_TID_SZ-((I2O_TID_SZ/8)*8))) /* Last 8 bits */ # define _F_getFunc(w,x,y) (*(((U8 __FAR__ *)(&((w)->x)))\ + ((I2O_TID_SZ+I2O_TID_SZ)/8))) # define _F_setFunc(w,x,y,z) (_F_getFunc(w,x,y) = (z)) # define I2O_SG_COUNT_MASK ((U32)((1L<x)))&I2O_SG_COUNT_MASK) # define _F_setCount(w,x,y,z) (*((U32 __FAR__ *)(&((w)->x)))\ &= 0xFFFFFFFFL - I2O_SG_COUNT_MASK);\ (*((U32 __FAR__ *)(&((w)->x)))\ |= (z) & I2O_SG_COUNT_MASK) /* Last 8 bits */ # define _F_getFlags(w,x,y) (*(((U8 __FAR__ *)(&((w)->x)))\ + (I2O_SG_COUNT_SZ/8))) # define _F_setFlags(w,x,y,z) (_F_getFlags(w,x,y) = (z)) /* Other accesses that are simpler */ # define _F_get1bit(w,x,y,z) ((U8)((w)->z)) # define _F_set1bit(w,x,y,z,u) ((w)->z = (u)) # define _F_get1bit1(w,x,y,z) ((U8)((w)->z)) # define _F_set1bit1(w,x,y,z,u) ((w)->z = (u)) # define _F_get4bit4(w,x,y,z) ((U8)((w)->z)) # define _F_set4bit4(w,x,y,z,u) ((w)->z = (u)) # define _F_get8bit(w,x,y,z) ((U8)((w)->z)) # define _F_set8bit(w,x,y,z,u) ((w)->z = (u)) # define _F_get12bit(w,x,y,z) ((U16)((w)->z)) # define _F_set12bit(w,x,y,z,u) ((w)->z = (u)) # define _F_get12bit4(w,x,y,z) ((U16)((w)->z)) # define _F_set12bit4(w,x,y,z,u) ((w)->z = (u)) # define _F_get16bit(w,x,y,z) ((U16)((w)->z)) # define _F_set16bit(w,x,y,z,u) ((w)->z = (u)) #elif (defined(_DPT_BIG_ENDIAN)) /* First 12 bits */ # define _F_getTID(w,x,y) getL12bit(w,x,0) # define _F_setTID(w,x,y,z) setL12bit(w,x,0,z) # define _F_getTID1(w,x,y) getL12bit1(w,x,0) # define _F_setTID1(w,x,y,z) setL12bit1(w,x,0,z) # define _F_getFunc(w,x,y) getL8bit(w,x,3) # define _F_setFunc(w,x,y,z) setL8bit(w,x,3,z) # define _F_getCount(w,x,y) getL24bit1(w,x,0) # define _F_setCount(w,x,y,z) setL24bit1(w,x,0,z) # define _F_getFlags(w,x,y) getL8bit(w,x,3) # define _F_setFlags(w,x,y,z) setL8bit(w,x,3,z) /* Other accesses that are simpler */ # define _F_get1bit(w,x,y,z) getL1bit(w,x,y) # define _F_set1bit(w,x,y,z,u) setL1bit(w,x,y,u) # define _F_get1bit1(w,x,y,z) getL1bit1(w,x,y) # define _F_set1bit1(w,x,y,z,u) setL1bit1(w,x,y,u) # define _F_get4bit4(w,x,y,z) getL4bit(w,x,y) # define _F_set4bit4(w,x,y,z,u) setL4bit(w,x,y,u) # define _F_get8bit(w,x,y,z) getL8bit(w,x,y) # define _F_set8bit(w,x,y,z,u) setL8bit(w,x,y,u) # define _F_get12bit(w,x,y,z) getL12bit(w,x,y) # define _F_set12bit(w,x,y,z,u) setL12bit(w,x,y,z) # define _F_get12bit4(w,x,y,z) getL12bit1(w,x,(y)-1) # define _F_set12bit4(w,x,y,z,u) setL12bit1(w,x,(y)-1,u) # define _F_get16bit(w,x,y,z) getL16bit(w,x,y) # define _F_set16bit(w,x,y,z,u) setL16bit(w,x,y,u) #else # define _F_getTID(w,x,y) ((U16)((w)->y)) # define _F_setTID(w,x,y,z) ((w)->y = (z)) # define _F_getTID1(w,x,y) ((U16)((w)->y)) # define _F_setTID1(w,x,y,z) ((w)->y = (z)) # define _F_getFunc(w,x,y) ((U8)((w)->y)) # define _F_setFunc(w,x,y,z) ((w)->y = (z)) # define _F_getCount(w,x,y) ((U32)((w)->y)) # define _F_setCount(w,x,y,z) ((w)->y = (z)) # define _F_getFlags(w,x,y) ((U8)((w)->y)) # define _F_setFlags(w,x,y,z) ((w)->y = (z)) # define _F_get1bit(w,x,y,z) ((U8)((w)->z)) # define _F_set1bit(w,x,y,z,u) ((w)->z = (u)) # define _F_get1bit1(w,x,y,z) ((U8)((w)->z)) # define _F_set1bit1(w,x,y,z,u) ((w)->z = (u)) # define _F_get4bit4(w,x,y,z) ((U8)((w)->z)) # define _F_set4bit4(w,x,y,z,u) ((w)->z = (u)) # define _F_get8bit(w,x,y,z) ((U8)((w)->z)) # define _F_set8bit(w,x,y,z,u) ((w)->z = (u)) # define _F_get12bit(w,x,y,z) ((U16)((w)->z)) # define _F_set12bit(w,x,y,z,u) ((w)->z = (u)) # define _F_get12bit4(w,x,y,z) ((U16)((w)->z)) # define _F_set12bit4(w,x,y,z,u) ((w)->z = (u)) # define _F_get16bit(w,x,y,z) ((U16)((w)->z)) # define _F_set16bit(w,x,y,z,u) ((w)->z = (u)) #endif /* * Define some specific portability macros * These macros follow the following parameterization: * XXX_getYYY (pointer) * XXX_setYYY (pointer, newValue) * These parameters are shortened to x and y to reduce clutter. */ // // General SGE // #define I2O_FLAGS_COUNT_getCount(x) _F_getCount(x,Count,Count) #define I2O_FLAGS_COUNT_setCount(x,y) _F_setCount(x,Count,Count,y) #define I2O_FLAGS_COUNT_getFlags(x) _F_getFlags(x,Count,Flags) #define I2O_FLAGS_COUNT_setFlags(x,y) _F_setFlags(x,Count,Flags,y) // // I2O_SGE_SIMPLE_ELEMENT // #define I2O_SGE_SIMPLE_ELEMENT_getPhysicalAddress(x) \ getLU4((&(x)->PhysicalAddress),0) #define I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress(x,y) \ setLU4((&(x)->PhysicalAddress),0,y) // // I2O_SGE_LONG_TRANSACTION_ELEMENT // #define I2O_SGE_LONG_TRANSACTION_ELEMENT_getLongElementLength(x)\ _F_getCount(x,LongElementLength,LongElementLength) #define I2O_SGE_LONG_TRANSACTION_ELEMENT_setLongElementLength(x,y)\ _F_setCount(x,LongElementLength,LongElementLength,y) #define I2O_SGE_LONG_TRANSACTION_ELEMENT_getFlags(x)\ _F_getFlags(x,LongElementLength,Flags) #define I2O_SGE_LONG_TRANSACTION_ELEMENT_setFlags(x,y)\ _F_setFlags(x,LongElementLength,Flags,y) // // I2O_SGE_LONG_TRANSPORT_ELEMENT // #define I2O_SGE_LONG_TRANSPORT_ELEMENT_getLongElementLength(x)\ _F_getCount(x,LongElementLength,LongElementLength) #define I2O_SGE_LONG_TRANSPORT_ELEMENT_setLongElementLength(x,y)\ _F_setCount(x,LongElementLength,LongElementLength,y) #define I2O_SGE_LONG_TRANSPORT_ELEMENT_getFlags(x)\ _F_getFlags(x,LongElementLength,Flags) #define I2O_SGE_LONG_TRANSPORT_ELEMENT_setFlags(x,y)\ _F_setFlags(x,LongElementLength,Flags,y) // // I2O_EXEC_ADAPTER_ASSIGN_MESSAGE // #define I2O_EXEC_ADAPTER_ASSIGN_MESSAGE_getDdmTID(x)\ _F_getTID(x,DdmTID,DdmTID) #define I2O_EXEC_ADAPTER_ASSIGN_MESSAGE_setDdmTID(x,y)\ _F_setTID(x,DDdmTID,DdmTID,y) #define I2O_EXEC_ADAPTER_ASSIGN_MESSAGE_getOperationFlags(x)\ _F_getFunc(x,DdmTID,OperationFlags) #define I2O_EXEC_ADAPTER_ASSIGN_MESSAGE_setOperationFlags(x,y)\ _F_setFunc(x,DdmTID,OperationFlags,y) // // I2O_EXEC_BIOS_INFO_SET_MESSAGE // #define I2O_EXEC_BIOS_INFO_SET_MESSAGE_getDeviceTID(x)\ _F_getTID(x,DeviceTID,DeviceTID) #define I2O_EXEC_BIOS_INFO_SET_MESSAGE_setDeviceTID(x,y)\ _F_setTID(x,DeviceTID,DeviceTID,y) #define I2O_EXEC_BIOS_INFO_SET_MESSAGE_getBiosInfo(x)\ _F_getFunc(x,DeviceTID,BiosInfo) #define I2O_EXEC_BIOS_INFO_SET_MESSAGE_setBiosInfo(x,y) \ _F_setFunc(x,DeviceTID,BiosInfo,y) // // I2O_ALIAS_CONNECT_SETUP // #define I2O_ALIAS_CONNECT_SETUP_getIOP1AliasForTargetDevice(x)\ _F_getTID(x,IOP1AliasForTargetDevice,IOP1AliasForTargetDevice) #define I2O_ALIAS_CONNECT_SETUP_setIOP1AliasForTargetDevice(x,y)\ _F_setTID(x,IOP1AliasForTargetDevice,IOP1AliasForTargetDevice,y) #define I2O_ALIAS_CONNECT_SETUP_getIOP2AliasForInitiatorDevice(x)\ _F_getTID1(x,IOP1AliasForTargetDevice,IOP2AliasForInitiatorDevice) #define I2O_ALIAS_CONNECT_SETUP_setIOP2AliasForInitiatorDevice(x,y)\ _F_setTID1(x,IOP1AliasForTargetDevice,IOP2AliasForInitiatorDevice,y) // // I2O_OBJECT_CONNECT_SETUP // #define I2O_OBJECT_CONNECT_SETUP_getTargetDevice(x)\ _F_getTID(x,TargetDevice,TargetDevice) #define I2O_OBJECT_CONNECT_SETUP_setTargetDevice(x,y)\ _F_setTID(x,TargetDevice,TargetDevice,y) #define I2O_OBJECT_CONNECT_SETUP_getInitiatorDevice(x)\ _F_getTID1(x,TargetDevice,InitiatorDevice) #define I2O_OBJECT_CONNECT_SETUP_setInitiatorDevice(x,y)\ _F_setTID1(x,TargetDevice,InitiatorDevice,y) #define I2O_OBJECT_CONNECT_SETUP_getOperationFlags(x)\ _F_getFunc(x,TargetDevice,OperationFlags) #define I2O_OBJECT_CONNECT_SETUP_setOperationFlags(x,y)\ _F_setFunc(x,TargetDevice,OperationFlags,y) // // I2O_OBJECT_CONNECT_REPLY // #define I2O_OBJECT_CONNECT_REPLY_getTargetDevice(x)\ _F_getTID(x,TargetDevice,TargetDevice) #define I2O_OBJECT_CONNECT_REPLY_setTargetDevice(x,y)\ _F_setTID(x,TargetDevice,TargetDevice,y) #define I2O_OBJECT_CONNECT_REPLY_getInitiatorDevice(x)\ _F_getTID1(x,TargetDevice,InitiatorDevice) #define I2O_OBJECT_CONNECT_REPLY_setInitiatorDevice(x,y)\ _F_setTID1(x,TargetDevice,InitiatorDevice,y) #define I2O_OBJECT_CONNECT_REPLY_getReplyStatusCode(x)\ _F_getFunc(x,TargetDevice,ReplyStatusCode) #define I2O_OBJECT_CONNECT_REPLY_setReplyStatusCode(x,y)\ _F_setFunc(x,TargetDevice,ReplyStatusCode,y) // // I2O_EXEC_DEVICE_ASSIGN_MESSAGE // #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_getDeviceTID(x)\ _F_getTID(x,Object.DeviceTID,Object.DeviceTID) #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_setDeviceTID(x,y)\ _F_setTID(x,Object.DeviceTID,Object.DeviceTID,y) #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_getIOP_ID(x)\ _F_getTID1(x,Object.DeviceTID,Object.IOP_ID) #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_setIOP_ID(x,y)\ _F_setTID1(x,Object.DeviceTID,Object.IOP_ID,y) #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_getOperationFlags(x)\ _F_getFunc(x,Object.DeviceTID,Object.OperationFlags) #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_setOperationFlags(x,y)\ _F_setFunc(x,Object.DeviceTID,Object.OperationFlags,y) // // I2O_EXEC_DEVICE_RELEASE_MESSAGE // #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_getDeviceTID(x)\ _F_getTID(x,Object.DeviceTID,Object.DeviceTID) #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_setDeviceTID(x,y)\ _F_setTID(x,Object.DeviceTID,Object.DeviceTID,y) #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_getIOP_ID(x)\ _F_getTID1(x,Object.DeviceTID,Object.IOP_ID) #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_setIOP_ID(x,y)\ _F_setTID1(x,Object.DeviceTID,Object.IOP_ID,y) #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_getOperationFlags(x)\ _F_getFunc(x,Object.DeviceTID,Object.OperationFlags) #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_setOperationFlags(x,y)\ _F_setFunc(x,Object.DeviceTID,Object.OperationFlags,y) // // I2O_EXEC_IOP_RESET_MESSAGE // #define I2O_EXEC_IOP_RESET_MESSAGE_getTargetAddress(x)\ _F_getTID(x,TargetAddress,TargetAddress) #define I2O_EXEC_IOP_RESET_MESSAGE_setTargetAddress(x,y)\ _F_setTID(x,TargetAddress,TargetAddress,y) #define I2O_EXEC_IOP_RESET_MESSAGE_getInitiatorAddress(x)\ _F_getTID1(x,TargetAddress,InitiatorAddress) #define I2O_EXEC_IOP_RESET_MESSAGE_setInitiatorAddress(x,y)\ _F_setTID1(x,TargetAddress,InitiatorAddress,y) #define I2O_EXEC_IOP_RESET_MESSAGE_getFunction(x)\ _F_getFunc(x,TargetAddress,Function) #define I2O_EXEC_IOP_RESET_MESSAGE_setFunction(x,y)\ _F_setFunc(x,TargetAddress,Function,y) // //I2O_EXEC_IOP_HARDWARE_SCALAR // #define I2O_EXEC_IOP_HARDWARE_SCALAR_getI2oVendorID(x)\ getLU2((&(x)->I2oVendorID),0) // // I2O_EXEC_STATUS_GET_MESSAGE // #define I2O_EXEC_STATUS_GET_MESSAGE_getVersionOffset(x)\ getU1((&(x)->VersionOffset),0) #define I2O_EXEC_STATUS_GET_MESSAGE_setVersionOffset(x,y)\ setU1((&(x)->VersionOffset),0,y) #define I2O_EXEC_STATUS_GET_MESSAGE_getMsgFlags(x)\ getU1((&(x)->VersionOffset),1) #define I2O_EXEC_STATUS_GET_MESSAGE_setMsgFlags(x,y)\ setU1((&(x)->VersionOffset),1,y) #define I2O_EXEC_STATUS_GET_MESSAGE_getMessageSize(x)\ getLU2((&(x)->VersionOffset),2) #define I2O_EXEC_STATUS_GET_MESSAGE_setMessageSize(x,y)\ setLU2((&(x)->VersionOffset),2,y) #define I2O_EXEC_STATUS_GET_MESSAGE_getReplyBufferAddressLow(x)\ getLU4((&(x)->ReplyBufferAddressLow),0) #define I2O_EXEC_STATUS_GET_MESSAGE_setReplyBufferAddressLow(x,y)\ setLU4((&(x)->ReplyBufferAddressLow),0,y) #define I2O_EXEC_STATUS_GET_MESSAGE_getReplyBufferAddressHigh(x)\ getLU4((&(x)->ReplyBufferAddressHigh),0) #define I2O_EXEC_STATUS_GET_MESSAGE_setReplyBufferAddressHigh(x,y)\ setLU4((&(x)->ReplyBufferAddressHigh),0,y) #define I2O_EXEC_STATUS_GET_MESSAGE_getReplyBufferLength(x)\ getLU4((&(x)->ReplyBufferLength),0) #define I2O_EXEC_STATUS_GET_MESSAGE_setReplyBufferLength(x,y)\ setLU4((&(x)->ReplyBufferLength),0,y) #define I2O_EXEC_STATUS_GET_MESSAGE_getTargetAddress(x)\ _F_getTID(x,TargetAddress,TargetAddress) #define I2O_EXEC_STATUS_GET_MESSAGE_setTargetAddress(x,y)\ _F_setTID(x,TargetAddress,TargetAddress,y) #define I2O_EXEC_STATUS_GET_MESSAGE_getInitiatorAddress(x)\ _F_getTID1(x,TargetAddress,InitiatorAddress) #define I2O_EXEC_STATUS_GET_MESSAGE_setInitiatorAddress(x,y)\ _F_setTID1(x,TargetAddress,InitiatorAddress,y) #define I2O_EXEC_STATUS_GET_MESSAGE_getFunction(x)\ _F_getFunc(x,TargetAddress,Function) #define I2O_EXEC_STATUS_GET_MESSAGE_setFunction(x,y)\ _F_setFunc(x,TargetAddress,Function,y) // // I2O_MESSAGE_FRAME // #define I2O_MESSAGE_FRAME_getVersionOffset(x)\ getU1((&((x)->VersionOffset)),0) #define I2O_MESSAGE_FRAME_setVersionOffset(x,y)\ setU1(((&(x)->VersionOffset)),0,y) #define I2O_MESSAGE_FRAME_getMsgFlags(x)\ getU1((&((x)->VersionOffset)),1) #define I2O_MESSAGE_FRAME_setMsgFlags(x,y)\ setU1((&((x)->VersionOffset)),1,y) #define I2O_MESSAGE_FRAME_getMessageSize(x)\ getLU2((&((x)->VersionOffset)),2) #define I2O_MESSAGE_FRAME_setMessageSize(x,y)\ setLU2((&((x)->VersionOffset)),2,y) #define I2O_MESSAGE_FRAME_getTargetAddress(x)\ _F_getTID(x,TargetAddress,TargetAddress) #define I2O_MESSAGE_FRAME_setTargetAddress(x,y)\ _F_setTID(x,TargetAddress,TargetAddress,y) #define I2O_MESSAGE_FRAME_getInitiatorAddress(x)\ _F_getTID1(x,TargetAddress,InitiatorAddress) #define I2O_MESSAGE_FRAME_setInitiatorAddress(x,y)\ _F_setTID1(x,TargetAddress,InitiatorAddress,y) #define I2O_MESSAGE_FRAME_getFunction(x)\ _F_getFunc(x,TargetAddress,Function) #define I2O_MESSAGE_FRAME_setFunction(x,y)\ _F_setFunc(x,TargetAddress,Function,y) // 32 bit only for now #define I2O_MESSAGE_FRAME_getInitiatorContext(x)\ (x)->InitiatorContext #define I2O_MESSAGE_FRAME_setInitiatorContext(x,y)\ ((x)->InitiatorContext = (y)) /* * We are spilling the 64 bit Context field into the Transaction * context of the specific frames. Synchronous commands (resetIop * et al) do not have this field, so beware. Also, Failed Reply frames * can not contain the 64 bit context, the software must reference * the PreservedMFA and pick up the 64 bit context from the incoming * message frame. The software must make no reference to the * TransactionContext field at all. */ #if defined(_MSC_VER) && _MSC_VER >= 800 #ifndef uint64_t #define uint64_t unsigned __int64 #endif #endif #define I2O_MESSAGE_FRAME_getInitiatorContext64(x)\ (*((uint64_t *)(&((x)->InitiatorContext)))) #define I2O_MESSAGE_FRAME_setInitiatorContext64(x,y)\ ((*((uint64_t *)(&((x)->InitiatorContext))))=(y)) // // I2O_EXEC_OUTBOUND_INIT_MESSAGE // #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_getHostPageFrameSize(x)\ getLU4((&(x)->HostPageFrameSize),0) #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_setHostPageFrameSize(x,y)\ setLU4((&(x)->HostPageFrameSize),0,y) #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_getInitCode(x)\ getU1((&(x)->InitCode),0) #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_setInitCode(x,y)\ setU1((&(x)->InitCode),0,y) #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_getreserved(x)\ getU1((&(x)->reserved),0) #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_setreserved(x,y)\ setU1((&(x)->reserved),0,y) #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_getOutboundMFrameSize(x)\ getLU2((&(x)->OutboundMFrameSize),0) #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_setOutboundMFrameSize(x,y)\ setLU2((&(x)->OutboundMFrameSize),0,y) // // I2O_EXEC_SYS_TAB_SET_MESSAGE // #define I2O_EXEC_SYS_TAB_SET_MESSAGE_getIOP_ID(x)\ _F_get12bit(x,IOP_ID,IOP_ID) #define I2O_EXEC_SYS_TAB_SET_MESSAGE_setIOP_ID(x,y)\ _F_set12bit(x,IOP_ID,IOP_ID,y) //#define I2O_EXEC_SYS_TAB_SET_MESSAGE_getreserved1(x) #define I2O_EXEC_SYS_TAB_SET_MESSAGE_getHostUnitID(x)\ _F_get16bit(x,IOP_ID,2,HostUnitID) #define I2O_EXEC_SYS_TAB_SET_MESSAGE_setHostUnitID(x,y)\ _F_set16bit(x,IOP_ID,2,HostUnitID,y) #define I2O_EXEC_SYS_TAB_SET_MESSAGE_getSegmentNumber(x)\ _F_get12bit(x,SegmentNumber,SegmentNumber) #define I2O_EXEC_SYS_TAB_SET_MESSAGE_setSegmentNumber(x,y)\ _F_get12bit(x,SegmentNumber,SegmentNumber,y) // later // I2O_EXEC_SYS_ENABLE_MESSAGE // // // I2O_CLASS_ID // #define I2O_CLASS_ID_getClass(x)\ _F_get12bit(x,Class,0,Class) #define I2O_CLASS_ID_setClass(x,y)\ _F_set12bit(x,Class,0,Class,y) #define I2O_CLASS_ID_getVersion(x)\ _F_get4bit4(x,Class,1,Version) #define I2O_CLASS_ID_setVersion(x,y)\ _F_set4bit4(x,Class,1,Version,y) #define I2O_CLASS_ID_getOrganizationID(x)\ _F_get16bit(x,Class,2,OrganizationID) #define I2O_CLASS_ID_setOrganizationID(x,y)\ _F_set16bit(x,Class,2,OrganizationID,y) // // I2O_SET_SYSTAB_HEADER // #define I2O_SET_SYSTAB_HEADER_getNumberEntries(x)\ getU1((&((x)->NumberEntries)),0) #define I2O_SET_SYSTAB_HEADER_setNumberEntries(x,y)\ setU1((&(x)->NumberEntries),0,y) #define I2O_SET_SYSTAB_HEADER_getSysTabVersion(x)\ getU1((&((x)->SysTabVersion)),0) #define I2O_SET_SYSTAB_HEADER_setSysTabVersion(x,y)\ setU1((&(x)->SysTabVersion),0,y) // U16 reserved // U32 CurrentChangeIndicator // // I2O_IOP_ENTRY // #define I2O_IOP_ENTRY_getOrganizationID(x)\ getLU2((&((x)->OrganizationID)),0) #define I2O_IOP_ENTRY_setOrganizationID(x,y)\ setLU2((&((x)->OrganizationID)),0,y) //#define I2O_IOP_ENTRY_getreserved U16; #define I2O_IOP_ENTRY_getIOP_ID(x)\ _F_get12bit(x,IOP_ID,IOP_ID) #define I2O_IOP_ENTRY_setIOP_ID(x,y)\ _F_set12bit(x,IOP_ID,IOP_ID,y) // BF reserved3:I2O_RESERVED_4BITS; // BF reserved1:I2O_RESERVED_16BITS; #define I2O_IOP_ENTRY_getSegmentNumber(x)\ _F_get12bit(x,SegmentNumber,SegmentNumber) #define I2O_IOP_ENTRY_setSegmentNumber(x,y)\ _F_set12bit(x,SegmentNumber,SegmentNumber,y) #define I2O_IOP_ENTRY_getI2oVersion(x)\ _F_get4bit4(x,SegmentNumber,1,I2oVersion) #define I2O_IOP_ENTRY_setI2oVersion(x,y)\ _F_set4bit4(x,SegmentNumber,1,I2oVersion,y) #define I2O_IOP_ENTRY_getIopState(x)\ _F_get8bit(x,SegmentNumber,2,IopState) #define I2O_IOP_ENTRY_setIopState(x,y)\ _F_set8bit(x,SegmentNumber,2,IopState,y) #define I2O_IOP_ENTRY_getMessengerType(x)\ _F_get8bit(x,SegmentNumber,3,MessengerType) #define I2O_IOP_ENTRY_setMessengerType(x,y)\ _F_set8bit(x,SegmentNumber,3,MessengerType,y) #define I2O_IOP_ENTRY_getInboundMessageFrameSize(x)\ getLU2((&((x)->InboundMessageFrameSize)),0) #define I2O_IOP_ENTRY_setInboundMessageFrameSize(x,y)\ setLU2((&((x)->InboundMessageFrameSize)),0,y) #define I2O_IOP_ENTRY_getreserved2(x)\ getLU2((&((x)->reserved2)),0) #define I2O_IOP_ENTRY_setreserved2(x,y)\ setLU2((&((x)->reserved2)),0,y) #define I2O_IOP_ENTRY_getLastChanged(x)\ getLU4((&((x)->LastChanged)),0) #define I2O_IOP_ENTRY_setLastChanged(x,y)\ setLU4((&((x)->LastChanged)),0,y) #define I2O_IOP_ENTRY_getIopCapabilities(x)\ getLU4((&((x)->IopCapabilities)),0) #define I2O_IOP_ENTRY_setIopCapabilities(x,y)\ setLU4((&((x)->IopCapabilities)),0,y) // might want to declare I2O_MESSENGER_INFO struct #define I2O_IOP_ENTRY_getInboundMessagePortAddressLow(x)\ getLU4((&((x)->MessengerInfo.InboundMessagePortAddressLow)),0) #define I2O_IOP_ENTRY_setInboundMessagePortAddressLow(x,y)\ setLU4((&((x)->MessengerInfo.InboundMessagePortAddressLow)),0,y) #define I2O_IOP_ENTRY_getInboundMessagePortAddressHigh(x)\ getLU4((&((x)->MessengerInfo.InboundMessagePortAddressHigh)),0) #define I2O_IOP_ENTRY_setInboundMessagePortAddressHigh(x,y)\ setLU4((&((x)->MessengerInfo.InboundMessagePortAddressHigh)),0,y) // // I2O_HRT // #define I2O_HRT_getNumberEntries(x)\ getLU2((&((x)->NumberEntries)),0) #define I2O_HRT_setNumberEntries(x,y)\ setLU2((&(x)->NumberEntries),0,y) #define I2O_HRT_getEntryLength(x)\ getU1((&(x)->EntryLength),0) #define I2O_HRT_setEntryLength(x,y)\ setU1((&(x)->EntryLength),0,y) #define I2O_HRT_getHRTVersion(x)\ getU1((&(x)->HRTVersion),0) #define I2O_HRT_setHRTVersion(x,y)\ setU1((&(x)->HRTVersion),0,y) #define I2O_HRT_getCurrentChangeIndicator(x)\ getLU4((&(x)->CurrentChangeIndicator),0) #define I2O_HRT_setCurrentChangeIndicator(x,y)\ setLU4((&(x)->CurrentChangeIndicator),0,y) #define I2O_HRT_getHRTEntryPtr(x,y)\ ((&((x)->HRTEntry[0+y]))) // // I2O_HRT_ENTRY // #define I2O_HRT_ENTRY_getAdapterID(x)\ getLU4((&((x)->AdapterID)),0) #define I2O_HRT_ENTRY_setAdapterID(x,y)\ setLU4((&(x)->AdapterID),0,y) #define I2O_HRT_ENTRY_getControllingTID(x)\ _F_get12bit(x,ControllingTID,ControllingTID) #define I2O_HRT_ENTRY_setControllingTID(x,y)\ _F_set12bit(x,ControllingTID,ControllingTID,y) #define I2O_HRT_ENTRY_getAdapterState(x)\ _F_get4bit4(x,ControllingTID,1,AdapterState) #define I2O_HRT_ENTRY_setIAdapterState(x,y)\ _F_set4bit4(x,ControllingTID,1,AdapterState,y) #define I2O_HRT_ENTRY_getBusNumber(x)\ _F_get8bit(x,ControllingTID,2,BusNumber) #define I2O_HRT_ENTRY_setBusNumber(x,y)\ _F_set8bit(x,ControllingTID,2,BusNumber,y) #define I2O_HRT_ENTRY_getBusType(x)\ _F_get8bit(x,ControllingTID,3,BusType) #define I2O_HRT_ENTRY_setBusType(x,y)\ _F_set8bit(x,ControllingTID,3,BusType,y) #define I2O_HRT_ENTRY_getPCIBusPtr(x,y)\ (&((x)->uBus.PCIBus)) // // I2O_LCT // #define I2O_LCT_getTableSize(x)\ _F_get16bit(x,TableSize,0,TableSize) #define I2O_LCT_setTableSize(x,y)\ _F_set16bit(x,TableSize,0,TableSize,y) #define I2O_LCT_getBootDeviceTID(x)\ _F_get12bit(x,TableSize,2,BootDeviceTID) #define I2O_LCT_setBootDeviceTID(x,y)\ _F_set12bit(x,TableSize,2,BootDeviceTID,y) #define I2O_LCT_getLctVer(x)\ _F_get4bit4(x,TableSize,3,LctVer) #define I2O_LCT_setLctVer(x,y)\ _F_set4bit4(x,TableSize,3,LctVer,y) #define I2O_LCT_getIopFlags(x)\ getLU4((&(x)->IopFlags),0) #define I2O_LCT_setIopFlags(x,y)\ setLU4((&(x)->IopFlags),0,y) #define I2O_LCT_getCurrentChangeIndicator(x)\ getLU4((&(x)->CurrentChangeIndicator),0) #define I2O_LCT_setCurrentChangeIndicator(x,y)\ setLU4((&(x)->CurrentChangeIndicator),0,y) #define I2O_LCT_getLCTEntryPtr(x,y)\ (&((x)->LCTEntry[0+y])) // // I2O_LCT_ENTRY // #define I2O_LCT_ENTRY_getTableEntrySize(x)\ _F_get16bit(x,TableEntrySize,0,TableEntrySize) #define I2O_LCT_ENTRY_setTableEntrySize(x,y)\ _F_set16bit(x,TableEntrySize,0,TableEntrySize,y) #define I2O_LCT_ENTRY_getLocalTID(x)\ _F_get12bit(x,TableEntrySize,2,LocalTID) #define I2O_LCT_ENTRY_setLocalTID(x,y)\ _F_set12bit(x,TableEntrySize,2,LocalTID,y) // BF 4 reserved:I2O_4BIT_VERSION_SZ; #define I2O_LCT_ENTRY_getChangeIndicator(x)\ getLU4((&(x)->ChangeIndicator),0) #define I2O_LCT_ENTRY_setChangeIndicator(x,y)\ setLU4((&(x)->ChangeIndicator),0,y) #define I2O_LCT_ENTRY_getDeviceFlags(x)\ getLU4((&(x)->DeviceFlags),0) #define I2O_LCT_ENTRY_setDeviceFlags(x,y)\ setLU4((&(x)->DeviceFlags),0,y) #define I2O_LCT_ENTRY_getClassIDPtr(x)\ (&((x)->ClassID)) #define I2O_LCT_ENTRY_getSubClassInfo(x)\ getLU4((&(x)->SubClassInfo),0) #define I2O_LCT_ENTRY_setSubClassInfo(x,y)\ setLU4((&(x)->SubClassInfo),0,y) #define I2O_LCT_ENTRY_getUserTID(x)\ _F_getTID(x,UserTID,UserTID) #define I2O_LCT_ENTRY_setUserTID(x,y)\ _F_setTID(x,UserTID,UserTID,y) #define I2O_LCT_ENTRY_getParentTID(x)\ _F_getTID1(x,UserTID,ParentTID) #define I2O_LCT_ENTRY_setParentTID(x,y)\ _F_getTID1(x,UserTID,ParentTID,y) #define I2O_LCT_ENTRY_getBiosInfo(x)\ _F_getFunc(x,UserTID,BiosInfo) #define I2O_LCT_ENTRY_setBiosInfo(x,y)\ _F_setFunc(x,UserTID,BiosInfo,y) // 2 ulong U8 8 IdentityTag[I2O_IDENTITY_TAG_SZ]; #define I2O_LCT_ENTRY_getEventCapabilities(x)\ getLU4((&(x)->EventCapabilities),0) #define I2O_LCT_ENTRY_setEventCapabilities(x,y)\ setLU4((&(x)->EventCapabilities),0,y) // // I2O_PARAM_OPERATIONS_LIST_HEADER // #define I2O_PARAM_OPERATIONS_LIST_HEADER_getOperationCount(x)\ getLU2((&(x)->OperationCount),0) #define I2O_PARAM_OPERATIONS_LIST_HEADER_setOperationCount(x,y)\ setLU2((&(x)->OperationCount),0,y) #define I2O_PARAM_OPERATIONS_LIST_HEADER_getReserved(x)\ getLU2((&(x)->Reserved),0) #define I2O_PARAM_OPERATIONS_LIST_HEADER_setReserved(x,y)\ setLU2((&(x)->Reserved),0,y) // // I2O_PARAM_OPERATION_ALL_TEMPLATE // #define I2O_PARAM_OPERATION_ALL_TEMPLATE_getOperation(x)\ getLU2((&(x)->Operation),0) #define I2O_PARAM_OPERATION_ALL_TEMPLATE_setOperation(x,y)\ setLU2((&(x)->Operation),0,y) #define I2O_PARAM_OPERATION_ALL_TEMPLATE_getGroupNumber(x)\ getLU2((&(x)->GroupNumber),0) #define I2O_PARAM_OPERATION_ALL_TEMPLATE_setGroupNumber(x,y)\ setLU2((&(x)->GroupNumber),0,y) #define I2O_PARAM_OPERATION_ALL_TEMPLATE_getFieldCount(x)\ getLU2((&(x)->FieldCount),0) #define I2O_PARAM_OPERATION_ALL_TEMPLATE_setFieldCount(x,y)\ setLU2((&(x)->FieldCount),0,y) // // I2O_PARAM_RESULTS_LIST_HEADER // #define I2O_PARAM_RESULTS_LIST_HEADER_getResultCount(x)\ getLU2((&(x)->ResultCount),0) #define I2O_PARAM_RESULTS_LIST_HEADER_setResultCount(x,y)\ setLU2((&(x)->ResultCount),0,y) #define I2O_PARAM_RESULTS_LIST_HEADER_getReserved(x)\ getLU2((&(x)->Reserved),0) #define I2O_PARAM_RESULTS_LIST_HEADER_setReserved(x,y)\ setLU2((&(x)->Reserved),0,y) #define I2O_PARAM_RESULTS_LIST_HEADER_getBlockStatus(x)\ getU1((&(x)->BlockStatus),0) // //I2O_PARAM_READ_OPERATION_RESULT // #define I2O_PARAM_READ_OPERATION_RESULT_getBlockStatus(x)\ getU1((&(x)->BlockStatus),0) // later // I2O_HBA_ADAPTER_RESET_MESSAGE // // LATER // I2O_SCSI_DEVICE_RESET_MESSAGE // // LATER // I2O_HBA_BUS_RESET_MESSAGE // // // I2O_EXEC_LCT_NOTIFY_MESSAGE // // I2O_MESSAGE_FRAME StdMessageFrame; // I2O_TRANSACTION_CONTEXT TransactionContext; #define I2O_EXEC_LCT_NOTIFY_MESSAGE_getClassIdentifier(x)\ getLU4((&(x)->ClassIdentifier),0) #define I2O_EXEC_LCT_NOTIFY_MESSAGE_setClassIdentifier(x,y)\ setLU4((&(x)->ClassIdentifier),0,y) #define I2O_EXEC_LCT_NOTIFY_MESSAGE_getLastReportedChangeIndicator(x)\ getLU4((&(x)->LastReportedChangeIndicator),0) #define I2O_EXEC_LCT_NOTIFY_MESSAGE_setLastReportedChangeIndicator(x,y)\ setLU4((&(x)->LastReportedChangeIndicator),0,y) // I2O_SG_ELEMENT SGL; // // I2O_UTIL_PARAMS_GET_MESSAGE // // I2O_MESSAGE_FRAME StdMessageFrame; // I2O_TRANSACTION_CONTEXT TransactionContext; #define I2O_UTIL_PARAMS_GET_MESSAGE_getOperationFlags(x)\ getLU4((&(x)->OperationFlags),0) #define I2O_UTIL_PARAMS_GET_MESSAGE_setOperationFlags(x,y)\ setLU4((&(x)->OperationFlags),0,y) #define I2O_UTIL_PARAMS_GET_MESSAGE_setTransactionContext(x,y)\ ((x)->TransactionContext = (y)) // I2O_SG_ELEMENT SGL; // // I2O_SCSI_SCB_ABORT_MESSAGE // #define I2O_SCSI_SCB_ABORT_MESSAGE_getStdMessageFramePtr(x)\ (&((x)->StdMessageFrame)) #define I2O_SCSI_SCB_ABORT_MESSAGE_getTransactionContext(x)\ (x)->TransactionContext #define I2O_SCSI_SCB_ABORT_MESSAGE_setTransactionContext(x,y)\ ((x)->TransactionContext = (y)) #define I2O_SCSI_SCB_ABORT_MESSAGE_getTransactionContextToAbort(x)\ (x)->TransactionContextToAbort #define I2O_SCSI_SCB_ABORT_MESSAGE_setTransactionContextToAbort(x,y)\ ((x)->TransactionContextToAbort = (y)) // // I2O_DPT_DEVICE_INFO_SCALAR // #define I2O_DPT_DEVICE_INFO_SCALAR_getDeviceType(x)\ getU1((&(x)->DeviceType),0) #define I2O_DPT_DEVICE_INFO_SCALAR_setDeviceType(x,y)\ setU1((&(x)->DeviceType),0,y) #define I2O_DPT_DEVICE_INFO_SCALAR_getFlags(x)\ getU1((&(x)->Flags),0) #define I2O_DPT_DEVICE_INFO_SCALAR_setFlags(x,y)\ setU1((&(x)->Flags),0,y) #define I2O_DPT_DEVICE_INFO_SCALAR_getBus(x)\ getLU2((&(x)->Bus),0) #define I2O_DPT_DEVICE_INFO_SCALAR_setBus(x,y)\ setLU2((&(x)->Bus),0,y) #define I2O_DPT_DEVICE_INFO_SCALAR_getIdentifier(x)\ getLU4((&(x)->Identifier),0) #define I2O_DPT_DEVICE_INFO_SCALAR_setIdentifier(x,y)\ setLU4((&(x)->Identifier),0,y) // U8 LunInfo[8]; /* SCSI-2 8-bit scalar LUN goes into offset 1 */ #define I2O_DPT_DEVICE_INFO_SCALAR_getLunInfo(x)\ getU1((&(x)->LunInfo[0]),1) #define I2O_DPT_DEVICE_INFO_SCALAR_setLunInfo(x,y)\ setU1((&(x)->LunInfo[0]),1,y) // // I2O_PRIVATE_MESSAGE_FRAME // //typedef struct _I2O_PRIVATE_MESSAGE_FRAME { // I2O_MESSAGE_FRAME StdMessageFrame; // I2O_TRANSACTION_CONTEXT TransactionContext; // U16 XFunctionCode; // U16 OrganizationID; // PrivatePayload[]; //} I2O_PRIVATE_MESSAGE_FRAME, *PI2O_PRIVATE_MESSAGE_FRAME; #define I2O_PRIVATE_MESSAGE_FRAME_getTransactionContext(x) \ (x)->TransactionContext #define I2O_PRIVATE_MESSAGE_FRAME_setTransactionContext(x,y) \ ((x)->TransactionContext = (y)) #define I2O_PRIVATE_MESSAGE_FRAME_getXFunctionCode(x) \ getLU2((&(x)->XFunctionCode),0) #define I2O_PRIVATE_MESSAGE_FRAME_setXFunctionCode(x,y) \ setLU2((&(x)->XFunctionCode),0,y) #define I2O_PRIVATE_MESSAGE_FRAME_getOrganizationID(x) \ getLU2((&(x)->OrganizationID),0) #define I2O_PRIVATE_MESSAGE_FRAME_setOrganizationID(x,y) \ setLU2((&(x)->OrganizationID),0,y) //typedef struct _PRIVATE_SCSI_SCB_EXECUTE_MESSAGE { // I2O_PRIVATE_MESSAGE_FRAME PRIVATE_SCSI_SCB_EXECUTE_MESSAGE; // BF TID:16; /* Upper four bits currently are zero */ // /* Command is interpreted by the host */ // BF Interpret:1; // /* if TRUE, deal with Physical Firmware Array information */ // BF Physical:1; // BF Reserved1:14; // U8 CDBLength; // U8 Reserved; // I2O_SCB_FLAGS SCBFlags; // U8 CDB[ I2O_SCSI_CDB_LENGTH=16 ]; // U32 ByteCount; // I2O_SG_ELEMENT SGL; //} PRIVATE_SCSI_SCB_EXECUTE_MESSAGE, * PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE; // // PRIVATE_SCSI_SCB_EXECUTE_MESSAGE // #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getPRIVATE_SCSI_SCB_EXECUTE_MESSAGEPtr(x)\ (&((x)->PRIVATE_SCSI_SCB_EXECUTE_MESSAGE)) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getCDBLength(x)\ getU1((&(x)->CDBLength),0) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setCDBLength(x,y)\ setU1((&(x)->CDBLength),0,y) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getReserved(x)\ getU1((&(x)->Reserved),0) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setReserved(x,y)\ setU1((&(x)->Reserved),0,y) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getSCBFlags(x)\ getLU2((&(x)->SCBFlags),0) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags(x,y)\ setLU2((&(x)->SCBFlags),0,y) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getByteCount(x)\ getLU4((&((x)->ByteCount)),0) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setByteCount(x,y)\ setLU4((&((x)->ByteCount)),0,y) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getTID(x)\ _F_get16bit(x,TID,0,TID) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setTID(x,y)\ _F_set16bit(x,TID,0,TID,y) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getInterpret(x)\ _F_get1bit(x,TID,2,Interpret) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setInterpret(x,y)\ _F_set1bit(x,TID,2,Interpret,y) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getPhysical(x)\ _F_get1bit1(x,TID,2,Physical) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setPhysical(x,y)\ _F_set1bit1(x,TID,2,Physical,y) #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getCDBPtr(x)\ (&((x)->CDB[0])) // // PRIVATE_FLASH_REGION_MESSAGE // #define PRIVATE_FLASH_REGION_MESSAGE_getFlashRegion(x) \ getLU4((&((x)->FlashRegion)),0) #define PRIVATE_FLASH_REGION_MESSAGE_setFlashRegion(x,y) \ setLU4((&((x)->FlashRegion)),0,y) #define PRIVATE_FLASH_REGION_MESSAGE_getRegionOffset(x) \ getLU4((&((x)->RegionOffset)),0) #define PRIVATE_FLASH_REGION_MESSAGE_setRegionOffset(x,y) \ setLU4((&((x)->RegionOffset)),0,y) #define PRIVATE_FLASH_REGION_MESSAGE_getByteCount(x) \ getLU4((&((x)->ByteCount)),0) #define PRIVATE_FLASH_REGION_MESSAGE_setByteCount(x,y) \ setLU4((&((x)->ByteCount)),0,y) // // I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR // #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getSCSIType(x)\ getU1((&(x)->SCSIType),0) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setSCSIType(x,y)\ setU1((&(x)->SCSIType),0,y) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getProtectionManagement(x)\ getU1((&(x)->ProtectionManagement),0) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setProtectionManagement(x,y)\ setU1((&(x)->ProtectionManagement),0,y) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getSettings(x)\ getU1((&(x)->Settings),0) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setSettings(x,y)\ setU1((&(x)->Settings),0,y) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getReserved1(x)\ getU1((&(x)->Reserved1),0) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setReserved1(x,y)\ setU1((&(x)->Reserved1),0,y) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getInitiatorID(x)\ getLU4((&(x)->InitiatorID),0) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setInitiatorID(x,y)\ setLU4((&(x)->InitiatorID),0,y) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getScanLun0Only(x)\ getLU4((&(x)->ScanLun0Only),0) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setScanLun0Only(x,y)\ setLU4((&(x)->ScanLun0Only),0,y) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getDisableDevice(x)\ getLU2((&(x)->DisableDevice),0) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setDisableDevice(x,y)\ setLU2((&(x)->DisableDevice),0,y) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getMaxOffset(x)\ getU1((&(x)->MaxOffset),0) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setMaxOffset(x,y)\ setU1((&(x)->MaxOffset),0,y) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getMaxDataWidth(x)\ getU1((&(x)->MaxDataWidth),0) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setMaxDataWidth(x,y)\ setU1((&(x)->MaxDataWidth),0,y) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getMaxSyncRate(x)\ getLU4((&(x)->MaxSyncRate),0) #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setMaxSyncRate(x,y)\ setLU4((&(x)->MaxSyncRate),0,y) // // I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME // #define I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_getStdReplyFramePtr(x)\ (&((x)->StdReplyFrame)) #define I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_getTransferCount(x)\ getLU4((&(x)->TransferCount),0) #define I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_setTransferCount(x,y)\ setLU4((&(x)->TransferCount),0,y) #define I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_getAutoSenseTransferCount(x)\ getLU4((&(x)->AutoSenseTransferCount),0) #define I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_setAutoSenseTransferCount(x,y)\ setLU4((&(x)->AutoSenseTransferCount),0,y) // // I2O_SINGLE_REPLY_MESSAGE_FRAME // #define I2O_SINGLE_REPLY_MESSAGE_FRAME_getStdMessageFramePtr(x)\ (&((x)->StdMessageFrame)) #define I2O_SINGLE_REPLY_MESSAGE_FRAME_getTransactionContext(x)\ (x)->TransactionContext #define I2O_SINGLE_REPLY_MESSAGE_FRAME_setTransactionContext(x,y)\ ((x)->TransactionContext = (y)) #define I2O_SINGLE_REPLY_MESSAGE_FRAME_getDetailedStatusCode(x)\ getLU2((&((x)->DetailedStatusCode)),0) #define I2O_SINGLE_REPLY_MESSAGE_FRAME_setDetailedStatusCode(x,y)\ setLU2((&((x)->DetailedStatusCode)),0,y) #define I2O_SINGLE_REPLY_MESSAGE_FRAME_getreserved(x)\ getU1((&((x)->reserved)),0) #define I2O_SINGLE_REPLY_MESSAGE_FRAME_setreserved(x,y)\ setU1((&((x)->reserved)),0,y) #define I2O_SINGLE_REPLY_MESSAGE_FRAME_getReqStatus(x)\ getU1((&((x)->ReqStatus)),0) #define I2O_SINGLE_REPLY_MESSAGE_FRAME_setReqStatus(x,y)\ setU1((&((x)->ReqStatus)),0,y) // // I2O_SCSI_SCB_EXECUTE_MESSAGE // #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getStdMessageFramePtr(x)\ (&((x)->StdMessageFrame)) #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getTransactionContext(x)\ (x)->TransactionContext #define I2O_SCSI_SCB_EXECUTE_MESSAGE_setTransactionContext(x,y)\ ((x)->TransactionContext = (y)) #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getCDBLength(x)\ getU1((&((x)->CDBLength)),0) #define I2O_SCSI_SCB_EXECUTE_MESSAGE_setCDBLength(x,y)\ setU1((&((x)->CDBLength)),0,y) #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getReserved(x)\ getU1((&((x)->Reserved)),0) #define I2O_SCSI_SCB_EXECUTE_MESSAGE_setReserved(x,y)\ setU1((&((x)->Reserved)),0,y) #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getSCBFlags(x)\ getLU2((&((x)->SCBFlags)),0) #define I2O_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags(x,y)\ setLU2((&((x)->SCBFlags)),0,y) #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getByteCount(x)\ getLU2((&((x)->ByteCount)),0) #define I2O_SCSI_SCB_EXECUTE_MESSAGE_setByteCount(x,y)\ setLU2((&((x)->ByteCount)),0,y) // define for these // U8 CDB[16]; // I2O_SG_ELEMENT SGL; // // I2O_FAILURE_REPLY_MESSAGE_FRAME // #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getStdMessageFramePtr(x)\ (&((x)->StdMessageFrame)) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getTransactionContext(x)\ (x)->TransactionContext #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setTransactionContext(x,y)\ ((x)->TransactionContext = (y)) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getLowestVersion(x)\ getU1((&((x)->LowestVersion)),0) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setLowestVersion(x,y)\ setU1((&((x)->LowestVersion)),0,y) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getHighestVersion(x)\ getU1((&((x)->HighestVersion)),0) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setHighestVersion(x,y)\ setU1((&((x)->HighestVersion)),0,y) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getAgeLimit(x)\ getLU4((&((x)->AgeLimit)),0) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setAgeLimit(x,y)\ setLU4((&((x)->AgeLimit)),0,y) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getSeverity(x)\ _F_get8bit(x,Severity,0,Severity) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setSeverity(x,y)\ _F_set8bit(x,Severity,0,Severity,y) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getFailureCode(x)\ _F_get8bit(x,Severity,1,FailureCode) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setFailureCode(x,y)\ _F_get8bit(x,Severity,1,FailureCode,y) //#define I2O_FAILURE_REPLY_MESSAGE_FRAME_getFailingHostUnitID(x)\ // _F_get16bit(x,reserved,1,FailingHostUnitID) //#define I2O_FAILURE_REPLY_MESSAGE_FRAME_setFailingHostUnitID(x,y)\ // _F_set16bit(x,reserved,1,FailingHostUnitID,y) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getPreservedMFA(x)\ getLU4((&((x)->PreservedMFA)),0) #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setPreservedMFA(x,y)\ setLU4((&((x)->PreservedMFA)),0,y) // // I2O_EXEC_STATUS_GET_REPLY // #define I2O_EXEC_STATUS_GET_REPLY_getOrganizationID(x)\ getLU2((&(x)->OrganizationID),0) #define I2O_EXEC_STATUS_GET_REPLY_setOrganizationID(x,y)\ setLU2((&(x)->OrganizationID),0,y) //#define I2O_EXEC_STATUS_GET_REPLY_getreserved; #define I2O_EXEC_STATUS_GET_REPLY_getIOP_ID(x)\ _F_get12bit(x,IOP_ID,IOP_ID) #define I2O_EXEC_STATUS_GET_REPLY_setIOP_ID(x,y)\ _F_set12bit(x,IOP_ID,IOP_ID,y) //#define I2O_EXEC_STATUS_GET_REPLY_getreserved1(x) #define I2O_EXEC_STATUS_GET_REPLY_getHostUnitID(x)\ _F_get16bit(x,IOP_ID,2,HostUnitID) #define I2O_EXEC_STATUS_GET_REPLY_setHostUnitID(x,y)\ _F_set16bit(x,IOP_ID,2,HostUnitID,y) #define I2O_EXEC_STATUS_GET_REPLY_getSegmentNumber(x)\ _F_get12bit(x,SegmentNumber,0,SegmentNumber) #define I2O_EXEC_STATUS_GET_REPLY_setSegmentNumber(x,y)\ _F_set12bit(x,SegmentNumber,0,SegmentNumber,y) #define I2O_EXEC_STATUS_GET_REPLY_getI2oVersion(x)\ _F_get4bit4(x,SegmentNumber,1,I2oVersion) #define I2O_EXEC_STATUS_GET_REPLY_setI2oVersion(x,y)\ _F_set4bit4(x,SegmentNumber,1,I2oVersion,y) #define I2O_EXEC_STATUS_GET_REPLY_getIopState(x)\ _F_get8bit(x,SegmentNumver,2,IopState) #define I2O_EXEC_STATUS_GET_REPLY_setIopState(x,y)\ _F_set8bit(x,SegmentNumver,2,IopState,y) #define I2O_EXEC_STATUS_GET_REPLY_getMessengerType(x)\ _F_get8bit(x,SegmentNumber,3,MessengerType) #define I2O_EXEC_STATUS_GET_REPLY_setMessengerType(x,y)\ _F_get8bit(x,SegmentNumber,3,MessengerType,y) #define I2O_EXEC_STATUS_GET_REPLY_getInboundMFrameSize(x)\ getLU2((&(x)->InboundMFrameSize),0) #define I2O_EXEC_STATUS_GET_REPLY_setInboundMFrameSize(x,y)\ setLU2((&(x)->InboundMFrameSize),0,y) #define I2O_EXEC_STATUS_GET_REPLY_getInitCode(x)\ getU1((&(x)->InitCode),0) #define I2O_EXEC_STATUS_GET_REPLY_setInitCode(x,y)\ setU1((&(x)->InitCode),0,y) //#define I2O_EXEC_STATUS_GET_REPLY_getreserved2(x) #define I2O_EXEC_STATUS_GET_REPLY_getMaxInboundMFrames(x)\ getLU4((&(x)->MaxInboundMFrames),0) #define I2O_EXEC_STATUS_GET_REPLY_setMaxInboundMFrames(x,y)\ setLU4((&(x)->MaxInboundMFrames),0,y) #define I2O_EXEC_STATUS_GET_REPLY_getCurrentInboundMFrames(x)\ getLU4((&(x)->CurrentInboundMFrames),0) #define I2O_EXEC_STATUS_GET_REPLY_setCurrentInboundMFrames(x,y)\ setLU4((&(x)->CurrentInboundMFrames),0,y) #define I2O_EXEC_STATUS_GET_REPLY_getMaxOutboundMFrames(x)\ getLU4((&(x)->MaxOutboundMFrames),0) #define I2O_EXEC_STATUS_GET_REPLY_setMaxOutboundMFrames(x,y)\ setLU4((&(x)->MaxOutboundMFrames),0,y) //#define I2O_EXEC_STATUS_GET_REPLY_getProductIDString(x) #define I2O_EXEC_STATUS_GET_REPLY_getExpectedLCTSize(x)\ getLU4((&(x)->ExpectedLCTSize),0) #define I2O_EXEC_STATUS_GET_REPLY_setExpectedLCTSize(x,y)\ setLU4((&(x)->ExpectedLCTSize),0,y) #define I2O_EXEC_STATUS_GET_REPLY_getIopCapabilities(x)\ getLU4((&(x)->IopCapabilities),0) #define I2O_EXEC_STATUS_GET_REPLY_setIopCapabilities(x,y)\ setLU4((&(x)->IopCapabilities),0,y) #define I2O_EXEC_STATUS_GET_REPLY_getDesiredPrivateMemSize(x)\ getLU4((&(x)->DesiredPrivateMemSize),0) #define I2O_EXEC_STATUS_GET_REPLY_setDesiredPrivateMemSize(x,y)\ setLU4((&(x)->DesiredPrivateMemSize),0,y) #define I2O_EXEC_STATUS_GET_REPLY_getCurrentPrivateMemSize(x)\ getLU4((&(x)->CurrentPrivateMemSize),0) #define I2O_EXEC_STATUS_GET_REPLY_setCurrentPrivateMemSize(x,y)\ setLU4((&(x)->CurrentPrivateMemSize),0,y) #define I2O_EXEC_STATUS_GET_REPLY_getCurrentPrivateMemBase(x)\ getLU4((&(x)->CurrentPrivateMemBase),0) #define I2O_EXEC_STATUS_GET_REPLY_setCurrentPrivateMemBase(x,y)\ setLU4((&(x)->CurrentPrivateMemBase),0,y) #define I2O_EXEC_STATUS_GET_REPLY_getDesiredPrivateIOSize(x)\ getLU4((&(x)->DesiredPrivateIOSize),0) #define I2O_EXEC_STATUS_GET_REPLY_setDesiredPrivateIOSize(x,y)\ setLU4((&(x)->DesiredPrivateIOSize),0,y) #define I2O_EXEC_STATUS_GET_REPLY_getCurrentPrivateIOSize(x)\ getLU4((&(x)->CurrentPrivateIOSize),0) #define I2O_EXEC_STATUS_GET_REPLY_setCurrentPrivateIOSize(x,y)\ setLU4((&(x)->CurrentPrivateIOSize),0,y) #define I2O_EXEC_STATUS_GET_REPLY_getCurrentPrivateIOBase(x)\ getLU4((&(x)->CurrentPrivateIOBase),0) #define I2O_EXEC_STATUS_GET_REPLY_setCurrentPrivateIOBase(x,y)\ setLU4((&(x)->CurrentPrivateIOBase),0,y) //#define I2O_EXEC_STATUS_GET_REPLY_getreserved3(x) #define I2O_EXEC_STATUS_GET_REPLY_getSyncByte(x)\ getU1((&(x)->SyncByte),0) #define I2O_EXEC_STATUS_GET_REPLY_setSyncByte(x,y)\ setU1((&(x)->SyncByte),0,y) #endif /* __INCi2odeph */ raidutils-0.0.6.orig/raideng/i2odpt.h0000664000175000000620000002157510044153332017330 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #if !defined(I2O_DPT_HDR) #define I2O_DPT_HDR #define DPT_ORGANIZATION_ID 0x1B /* For Private Messages */ /* * PrivateMessageFrame.StdMessageFrame.Function = I2O_PRIVATE_MESSAGE * PrivateMessageFrame.XFunctionCode = I2O_SCSI_SCB_EXEC */ typedef struct _PRIVATE_SCSI_SCB_EXECUTE_MESSAGE { I2O_PRIVATE_MESSAGE_FRAME PrivateMessageFrame; # if (defined(sparc) || defined(_DPT_BIG_ENDIAN)) U32 TID; /* Upper four bits currently are zero */ # else BF TID:16; /* Upper four bits currently are zero */ /* Command is interpreted by the host */ BF Interpret:1; /* if TRUE, deal with Physical Firmware Array information */ BF Physical:1; BF Reserved1:14; # endif U8 CDBLength; U8 Reserved; I2O_SCB_FLAGS SCBFlags; U8 CDB[ I2O_SCSI_CDB_LENGTH ]; U32 ByteCount; I2O_SG_ELEMENT SGL; } PRIVATE_SCSI_SCB_EXECUTE_MESSAGE, * PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE; /* * Flash access and programming messages * PrivateMessageFrame.StdMessageFrame.Function = I2O_PRIVATE_MESSAGE * PrivateMessageFrame.XFunctionCode = PRIVATE_FLAGS_REGION_* * * SIZE returns the total size of a region of flash * READ copies a region (or portion thereof) into the buffer specified * by the SGL * WRITE writes a region (or portion thereof) using the data specified * by the SGL * * Flash regions * * 0 operational-mode firmware * 1 software (bios/utility) * 2 oem nvram defaults * 3 hba serial number * 4 boot-mode firmware * * Any combination of RegionOffset and ByteCount can be specified providing * they fit within the size of the specified region. * * Flash messages should be targeted to the Executive TID 0x000 */ #define PRIVATE_FLASH_REGION_SIZE 0x0100 #define PRIVATE_FLASH_REGION_READ 0x0101 #define PRIVATE_FLASH_REGION_WRITE 0x0102 #define PRIVATE_FLASH_REGION_CRC 0x0103 typedef struct _PRIVATE_FLASH_REGION_MESSAGE { I2O_PRIVATE_MESSAGE_FRAME PrivateMessageFrame; U32 FlashRegion; U32 RegionOffset; U32 ByteCount; I2O_SG_ELEMENT SGL; } PRIVATE_FLASH_REGION_MESSAGE, * PPRIVATE_FLASH_REGION_MESSAGE; /* DPT Driver Printf message */ #define PRIVATE_DRIVER_PRINTF 0x0200 /* FwPrintFlags */ #define FW_FIRMWARE_FLAGS_NO_HEADER_B 0x00000001 /* Remove date header */ typedef struct _PRIVATE_DRIVER_PRINTF_MESSAGE { I2O_PRIVATE_MESSAGE_FRAME PrivateMessageFrame; /* total bytes in PrintBuffer, including header */ U32 PrintBufferByteCount; /* exact data to be copied into the serial PrintBuffer */ U8 PrintBuffer[1]; } PRIVATE_DRIVER_PRINTF_MESSAGE, * PPRIVATE_DRIVER_PRINTF_MESSAGE; /* DPT Enable Diagnostics message 0x0201 */ #define PRIVATE_DIAG_ENABLE 0x0201 typedef struct _PRIVATE_DIAG_ENABLE_MESSAGE { I2O_PRIVATE_MESSAGE_FRAME PrivateMessageFrame; } PRIVATE_DIAG_MESSAGE_FRAME, * PPRIVATE_DIAG_MESSAGE_FRAME; /* DPT Driver Get/Put message */ #define PRIVATE_DRIVER_GET 0x300 #define PRIVATE_DRIVER_PUT 0x301 typedef struct _PRIVATE_DRIVER_GETPUT_MESSAGE { I2O_PRIVATE_MESSAGE_FRAME PrivateMessageFrame; U32 Offset; U32 ByteCount; I2O_SG_ELEMENT SGL; } PRIVATE_DRIVER_GETPUT_MESSAGE, * PPRIVATE_DRIVER_GETPUT_MESSAGE; /****************************************************************************/ /* DPT Peripheral Device Parameter Groups */ /****************************************************************************/ /* DPT Configuration and Operating Structures and Defines */ #define I2O_DPT_DEVICE_INFO_GROUP_NO 0x8000 /* - 8000h - DPT Device Information Parameters Group defines */ /* Device Type */ #define I2O_DPT_DEVICE_TYPE_DIRECT I2O_SCSI_DEVICE_TYPE_DIRECT #define I2O_DPT_DEVICE_TYPE_SEQUENTIAL I2O_SCSI_DEVICE_TYPE_SEQUENTIAL #define I2O_DPT_DEVICE_TYPE_PRINTER I2O_SCSI_DEVICE_TYPE_PRINTER #define I2O_DPT_DEVICE_TYPE_PROCESSOR I2O_SCSI_DEVICE_TYPE_PROCESSOR #define I2O_DPT_DEVICE_TYPE_WORM I2O_SCSI_DEVICE_TYPE_WORM #define I2O_DPT_DEVICE_TYPE_CDROM I2O_SCSI_DEVICE_TYPE_CDROM #define I2O_DPT_DEVICE_TYPE_SCANNER I2O_SCSI_DEVICE_TYPE_SCANNER #define I2O_DPT_DEVICE_TYPE_OPTICAL I2O_SCSI_DEVICE_TYPE_OPTICAL #define I2O_DPT_DEVICE_TYPE_MEDIA_CHANGER I2O_SCSI_DEVICE_TYPE_MEDIA_CHANGER #define I2O_DPT_DEVICE_TYPE_COMM I2O_SCSI_DEVICE_TYPE_COMM #define I2O_DPT_DEVICE_GRAPHICS_1 I2O_SCSI_DEVICE_GRAPHICS_1 #define I2O_DPT_DEVICE_GRAPHICS_2 I2O_SCSI_DEVICE_GRAPHICS_2 #define I2O_DPT_DEVICE_TYPE_ARRAY_CONT I2O_SCSI_DEVICE_TYPE_ARRAY_CONT #define I2O_DPT_DEVICE_TYPE_UNKNOWN I2O_SCSI_DEVICE_TYPE_UNKNOWN /* Flags */ #define I2O_DPT_PERIPHERAL_TYPE_FLAG I2O_SCSI_PERIPHERAL_TYPE_FLAG #define I2O_DPT_PERIPHERAL_TYPE_PARALLEL I2O_SCSI_PERIPHERAL_TYPE_PARALLEL #define I2O_DPT_PERIPHERAL_TYPE_SERIAL I2O_SCSI_PERIPHERAL_TYPE_SERIAL #define I2O_DPT_RESERVED_FLAG I2O_SCSI_RESERVED_FLAG #define I2O_DPT_DISCONNECT_FLAG I2O_SCSI_DISCONNECT_FLAG #define I2O_DPT_DISABLE_DISCONNECT I2O_SCSI_DISABLE_DISCONNECT #define I2O_DPT_ENABLE_DISCONNECT I2O_SCSI_ENABLE_DISCONNECT #define I2O_DPT_MODE_MASK I2O_SCSI_MODE_MASK #define I2O_DPT_MODE_SET_DATA I2O_SCSI_MODE_SET_DATA #define I2O_DPT_MODE_SET_DEFAULT I2O_SCSI_MODE_SET_DEFAULT #define I2O_DPT_MODE_SET_SAFEST I2O_SCSI_MODE_SET_SAFEST #define I2O_DPT_DATA_WIDTH_MASK I2O_SCSI_DATA_WIDTH_MASK #define I2O_DPT_DATA_WIDTH_8 I2O_SCSI_DATA_WIDTH_8 #define I2O_DPT_DATA_WIDTH_16 I2O_SCSI_DATA_WIDTH_16 #define I2O_DPT_DATA_WIDTH_32 I2O_SCSI_DATA_WIDTH_32 #define I2O_DPT_SYNC_NEGOTIATION_FLAG I2O_SCSI_SYNC_NEGOTIATION_FLAG #define I2O_DPT_DISABLE_SYNC_NEGOTIATION I2O_SCSI_DISABLE_SYNC_NEGOTIATION #define I2O_DPT_ENABLE_SYNC_NEGOTIATION I2O_SCSI_ENABLE_SYNC_NEGOTIATION /* DPT Device Group 8000h - Device Information Parameter Group */ typedef struct _I2O_DPT_DEVICE_INFO_SCALAR { U8 DeviceType; /* Identical to I2O_SCSI_DEVICE_INFO SCALAR */ U8 Flags; /* Identical to I2O_SCSI_DEVICE_INFO SCALAR */ U16 Bus; U32 Identifier; U8 LunInfo[8]; /* SCSI-2 8-bit scalar LUN goes into offset 1 */ } I2O_DPT_DEVICE_INFO_SCALAR, *PI2O_DPT_DEVICE_INFO_SCALAR; #define I2O_DPT_EXEC_IOP_BUFFERS_GROUP_NO 0x8000 /* DPT Exec Iop Buffers Group 8000h */ typedef struct _I2O_DPT_EXEC_IOP_BUFFERS_SCALAR { U32 SerialOutputOffset; /* offset from base address to header */ U32 SerialOutputSize; /* size of data buffer in bytes */ U32 SerialHeaderSize; /* size of data buffer header in bytes */ U32 SerialFlagsSupported; /* Mask of debug flags supported */ } I2O_DPT_EXEC_IOP_BUFFERS_SCALAR, *PI2O_DPT_EXEC_IOP_BUFFERS_SCALAR; #endif /* I2O_DPT_HDR */ raidutils-0.0.6.orig/raideng/i2oexec.h0000664000175000000620000014353210044153313017462 0ustar bapstaff00000000000000/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2oexec.h 17 4/30/01 12:57p Salyzyn $ */ /**************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. * All rights reserved. * * Copyright 1999 I2O Special Interest Group (I2O SIG). All rights reserved. * All rights reserved * * TERMS AND CONDITIONS OF USE * * Redistribution and use in source form, with or without modification, are * permitted provided that redistributions of source code must retain the * above copyright notice, this list of conditions and the following disclaimer. * * This software is provided `as is' by Distributed Processing Technology and * any express or implied warranties, including, but not limited to, the * implied warranties of merchantability and fitness for a particular purpose, * are disclaimed. In no event shall Distributed Processing Technology be * liable for any direct, indirect, incidental, special, exemplary or * consequential damages (including, but not limited to, procurement of * substitute goods or services; loss of use, data, or profits; or business * interruptions) however caused and on any theory of liability, whether in * contract, strict liability, or tort (including negligence or otherwise) * arising in any way out of the use of this driver software, even if advised * of the possibility of such damage. * * This header file, and any modifications of this header file, are provided * contingent upon your agreement and adherence to the here-listed terms and * conditions. By accepting and/or using this header file, you agree to abide * by these terms and conditions and that these terms and conditions will be * construed and governed in accordance with the laws of the State of California, * without reference to conflict-of-law provisions. If you do not agree * to these terms and conditions, please delete this file, and any copies, * permanently, without making any use thereof. * * THIS HEADER FILE IS PROVIDED FREE OF CHARGE ON AN AS-IS BASIS WITHOUT * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE. I2O SIG DOES NOT WARRANT THAT THIS HEADER FILE WILL MEET THE * USER'S REQUIREMENTS OR THAT ITS OPERATION WILL BE UNINTERRUPTED OR * ERROR-FREE. * * I2O SIG DISCLAIMS ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF * ANY PROPRIETARY RIGHTS, RELATING TO THE IMPLEMENTATION OF THE I2O * SPECIFICATIONS. I2O SIG DOES NOT WARRANT OR REPRESENT THAT SUCH * IMPLEMENTATIONS WILL NOT INFRINGE SUCH RIGHTS. * * THE USER OF THIS HEADER FILE SHALL HAVE NO RECOURSE TO I2O SIG FOR ANY * ACTUAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOST DATA * OR LOST PROFITS ARISING OUT OF THE USE OR INABILITY TO USE THIS PROGRAM. * * I2O SIG grants the user of this header file a license to copy, distribute, * and modify it, for any purpose, under the following terms. Any copying, * distribution, or modification of this header file must not delete or alter * the copyright notice of I2O SIG or any of these Terms and Conditions. * * Any distribution of this header file must not include a charge for the * header file (unless such charges are strictly for the physical acts of * copying or transferring copies). However, distribution of a product in * which this header file is embedded may include a charge so long as any * such charge does not include any charge for the header file itself. * * Any modification of this header file constitutes a derivative work based * on this header file. Any distribution of such derivative work: (1) must * include prominent notices that the header file has been changed from the * original, together with the dates of any changes; (2) automatically includes * this same license to the original header file from I2O SIG, without any * restriction thereon from the distributing user; and (3) must include a * grant of license of the modified file under the same terms and conditions * as these Terms and Conditions. * * The I2O SIG Web site can be found at: http://www.i2osig.org * * The I2O SIG encourages you to deposit derivative works based on this * header file at the I2O SIG Web site. Furthermore, to become a Registered * Developer of the I2O SIG, sign up at the Web site or call 415.750.8352 * (United States). ****************************************************************/ /********************************************************************* * I2OExec.h -- I2O Executive Class Message definition file * * This file contains information presented in Chapter 4 of the I2O(tm) * Specification. **********************************************************************/ #if !defined(I2O_EXECUTIVE_HDR) #define I2O_EXECUTIVE_HDR #define I2OEXEC_REV 1_5_4 /* I2OExec header file revision string */ #if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__)) # if (!defined(KERN_VERSION)) # include # endif # if (KERN_VERSION < 3) # include "i386/pci/i2omsg.h" /* Include the Base Message file */ # include "i386/pci/i2outil.h" # else # include "dev/asr/i2omsg.h" /* Include the Base Message file */ # include "dev/asr/i2outil.h" # endif #else # include "i2omsg.h" /* Include the Base Message file */ # include "i2outil.h" #endif /* NOTES: Gets, reads, receives, etc. are all even numbered functions. Sets, writes, sends, etc. are all odd numbered functions. Functions that both send and receive data can be either but an attempt is made to use the function number that indicates the greater transfer amount. Functions that do not send or receive data use odd function numbers. Some functions are synonyms like read, receive and send, write. All common functions will have a code of less than 0x80. Unique functions to a class will start at 0x80. Executive Functions start at 0xA0. Utility Message function codes range from 0 - 0x1f Base Message function codes range from 0x20 - 0xfe Private Message function code is 0xff. */ PRAGMA_ALIGN_PUSH PRAGMA_PACK_PUSH /* I2O Executive Function Codes. */ #define I2O_EXEC_ADAPTER_ASSIGN 0xB3 #define I2O_EXEC_ADAPTER_READ 0xB2 #define I2O_EXEC_ADAPTER_RELEASE 0xB5 #define I2O_EXEC_BIOS_INFO_SET 0xA5 #define I2O_EXEC_BOOT_DEVICE_SET 0xA7 #define I2O_EXEC_CONFIG_VALIDATE 0xBB #define I2O_EXEC_CONN_SETUP 0xCA #define I2O_EXEC_DDM_DESTROY 0xB1 #define I2O_EXEC_DDM_ENABLE 0xD5 #define I2O_EXEC_DDM_QUIESCE 0xC7 #define I2O_EXEC_DDM_RESET 0xD9 #define I2O_EXEC_DDM_SUSPEND 0xAF #define I2O_EXEC_DEVICE_ASSIGN 0xB7 #define I2O_EXEC_DEVICE_RELEASE 0xB9 #define I2O_EXEC_HRT_GET 0xA8 #define I2O_EXEC_IOP_CLEAR 0xBE #define I2O_EXEC_IOP_CONNECT 0xC9 #define I2O_EXEC_IOP_RESET 0xBD #define I2O_EXEC_LCT_NOTIFY 0xA2 #define I2O_EXEC_OUTBOUND_INIT 0xA1 #define I2O_EXEC_PATH_ENABLE 0xD3 #define I2O_EXEC_PATH_QUIESCE 0xC5 #define I2O_EXEC_PATH_RESET 0xD7 #define I2O_EXEC_STATIC_MF_CREATE 0xDD #define I2O_EXEC_STATIC_MF_RELEASE 0xDF #define I2O_EXEC_STATUS_GET 0xA0 #define I2O_EXEC_SW_DOWNLOAD 0xA9 #define I2O_EXEC_SW_UPLOAD 0xAB #define I2O_EXEC_SW_REMOVE 0xAD #define I2O_EXEC_SYS_ENABLE 0xD1 #define I2O_EXEC_SYS_MODIFY 0xC1 #define I2O_EXEC_SYS_QUIESCE 0xC3 #define I2O_EXEC_SYS_TAB_SET 0xA3 /* I2O Get Status State values */ #define I2O_IOP_STATE_INITIALIZING 0x01 #define I2O_IOP_STATE_RESET 0x02 #define I2O_IOP_STATE_HOLD 0x04 #define I2O_IOP_STATE_READY 0x05 #define I2O_IOP_STATE_OPERATIONAL 0x08 #define I2O_IOP_STATE_FAILED 0x10 #define I2O_IOP_STATE_FAULTED 0x11 /* Event Indicator Assignments for the Executive Class. */ #define I2O_EVENT_IND_RESOURCE_LIMIT 0x00000001 #define I2O_EVENT_IND_CONNECTION_FAIL 0x00000002 #define I2O_EVENT_IND_ADAPTER_FAULT 0x00000004 #define I2O_EVENT_IND_POWER_FAIL 0x00000008 #define I2O_EVENT_IND_RESET_PENDING 0x00000010 #define I2O_EVENT_IND_RESET_IMMINENT 0x00000020 #define I2O_EVENT_IND_HARDWARE_FAIL 0x00000040 #define I2O_EVENT_IND_XCT_CHANGE 0x00000080 #define I2O_EVENT_IND_NEW_LCT_ENTRY 0x00000100 #define I2O_EVENT_IND_MODIFIED_LCT 0x00000200 #define I2O_EVENT_IND_DDM_AVAILABILITY 0x00000400 /* Resource Limit Event Data */ #define I2O_EVENT_RESOURCE_LIMIT_LOW_MEMORY 0x00000001 #define I2O_EVENT_RESOURCE_LIMIT_INBOUND_POOL_LOW 0x00000002 #define I2O_EVENT_RESOURCE_LIMIT_OUTBOUND_POOL_LOW 0x00000004 /* Connection Fail Event Data */ #define I2O_EVENT_CONNECTION_FAIL_REPOND_NORMAL 0x00000000 #define I2O_EVENT_CONNECTION_FAIL_NOT_REPONDING 0x00000001 #define I2O_EVENT_CONNECTION_FAIL_NO_AVAILABLE_FRAMES 0x00000002 /* Reset Pending Event Data */ #define I2O_EVENT_RESET_PENDING_POWER_LOSS 0x00000001 #define I2O_EVENT_RESET_PENDING_CODE_VIOLATION 0x00000002 /* Reset Imminent Event Data */ #define I2O_EVENT_RESET_IMMINENT_UNKNOWN_CAUSE 0x00000000 #define I2O_EVENT_RESET_IMMINENT_POWER_LOSS 0x00000001 #define I2O_EVENT_RESET_IMMINENT_CODE_VIOLATION 0x00000002 #define I2O_EVENT_RESET_IMMINENT_PARITY_ERROR 0x00000003 #define I2O_EVENT_RESET_IMMINENT_CODE_EXCEPTION 0x00000004 #define I2O_EVENT_RESET_IMMINENT_WATCHDOG_TIMEOUT 0x00000005 /* Hardware Fail Event Data */ #define I2O_EVENT_HARDWARE_FAIL_UNKNOWN_CAUSE 0x00000000 #define I2O_EVENT_HARDWARE_FAIL_CPU_FAILURE 0x00000001 #define I2O_EVENT_HARDWARE_FAIL_MEMORY_FAULT 0x00000002 #define I2O_EVENT_HARDWARE_FAIL_DMA_FAILURE 0x00000003 #define I2O_EVENT_HARDWARE_FAIL_IO_BUS_FAILURE 0x00000004 /* DDM Availability Event Data */ #define I2O_EVENT_DDM_AVAILIBILITY_RESPOND_NORMAL 0x00000000 #define I2O_EVENT_DDM_AVAILIBILITY_CONGESTED 0x00000001 #define I2O_EVENT_DDM_AVAILIBILITY_NOT_RESPONDING 0x00000002 #define I2O_EVENT_DDM_AVAILIBILITY_PROTECTION_VIOLATION 0x00000003 #define I2O_EVENT_DDM_AVAILIBILITY_CODE_VIOLATION 0x00000004 /****************************************************************************/ #define I2O_OPERATION_FLAG_ASSIGN_PERMANENT 0x01 /* ExecAdapterAssign Function Message Frame structure. */ typedef struct _I2O_EXEC_ADAPTER_ASSIGN_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; #if (defined(__BORLANDC__)) U32 DdmTID; #else BF DdmTID:I2O_TID_SZ; BF reserved:I2O_RESERVED_12BITS; BF OperationFlags:I2O_8BIT_FLAGS_SZ; #endif I2O_HRT_ENTRY HRTEntry; } I2O_EXEC_ADAPTER_ASSIGN_MESSAGE, *PI2O_EXEC_ADAPTER_ASSIGN_MESSAGE; /****************************************************************************/ #define I2O_REQUEST_FLAG_CONFIG_REGISTER 0x00000000 #define I2O_REQUEST_FLAG_IO_REGISTER 0x00000001 #define I2O_REQUEST_FLAG_ADAPTER_MEMORY 0x00000002 /* ExecAdapterRead Function Message Frame structure. */ typedef struct _I2O_EXEC_ADAPTER_READ_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U32 AdapterID; U32 RequestFlags; U32 Offset; U32 Length; I2O_SG_ELEMENT SGL; } I2O_EXEC_ADAPTER_READ_MESSAGE, *PI2O_EXEC_ADAPTER_READ_MESSAGE; /****************************************************************************/ #define I2O_OPERATION_FLAG_RELEASE_PERMANENT 0x01 /* ExecAdapterRelease Function Message Frame structure. */ typedef struct _I2O_EXEC_ADAPTER_RELEASE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U8 reserved[3]; U8 OperationFlags; I2O_HRT_ENTRY HRTEntry; } I2O_EXEC_ADAPTER_RELEASE_MESSAGE, *PI2O_EXEC_ADAPTER_RELEASE_MESSAGE; /****************************************************************************/ /* ExecBiosInfoSet Function Message Frame structure. */ typedef struct _I2O_EXEC_BIOS_INFO_SET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; #if (defined(__BORLANDC__)) U32 DeviceTID; #else BF DeviceTID:I2O_TID_SZ; BF reserved:I2O_RESERVED_12BITS; BF BiosInfo:I2O_BIOS_INFO_SZ; #endif } I2O_EXEC_BIOS_INFO_SET_MESSAGE, *PI2O_EXEC_BIOS_INFO_SET_MESSAGE; /****************************************************************************/ /* ExecBootDeviceSet Function Message Frame structure. */ typedef struct _I2O_EXEC_BOOT_DEVICE_SET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; BF BootDevice:I2O_TID_SZ; BF reserved:I2O_RESERVED_4BITS; BF reserved1:I2O_RESERVED_16BITS; } I2O_EXEC_BOOT_DEVICE_SET_MESSAGE, *PI2O_EXEC_BOOT_DEVICE_SET_MESSAGE; /****************************************************************************/ /* ExecConfigValidate Function Message Frame structure. */ typedef struct _I2O_EXEC_CONFIG_VALIDATE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_EXEC_CONFIG_VALIDATE_MESSAGE, *PI2O_EXEC_CONFIG_VALIDATE_MESSAGE; /****************************************************************************/ /* ExecConnSetup Requestor */ typedef struct _I2O_ALIAS_CONNECT_SETUP { #if (defined(__BORLANDC__)) U32 IOP1AliasForTargetDevice; #else BF IOP1AliasForTargetDevice:I2O_TID_SZ; BF IOP2AliasForInitiatorDevice:I2O_TID_SZ; BF reserved:I2O_RESERVED_8BITS; #endif } I2O_ALIAS_CONNECT_SETUP, *PI2O_ALIAS_CONNECT_SETUP; #define I2O_OPERATION_FLAG_PEER_TO_PEER_BIDIRECTIONAL 0x01 /* ExecConnSetup Object */ typedef struct _I2O_OBJECT_CONNECT_SETUP { #if (defined(__BORLANDC__)) U32 TargetDevice; #else BF TargetDevice:I2O_TID_SZ; BF InitiatorDevice:I2O_TID_SZ; BF OperationFlags:I2O_8BIT_FLAGS_SZ; #endif } I2O_OBJECT_CONNECT_SETUP, *PI2O_OBJECT_CONNECT_SETUP; /* ExecConnSetup Function Message Frame structure. */ typedef struct _I2O_EXEC_CONN_SETUP_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_OBJECT_CONNECT_SETUP ObjectInfo; I2O_ALIAS_CONNECT_SETUP AliasInfo; U16 IOP2InboundMFrameSize; U16 reserved; U32 MessageClass; } I2O_EXEC_CONN_SETUP_MESSAGE, *PI2O_EXEC_CONN_SETUP_MESSAGE; /* ExecConnSetup Object Reply */ typedef struct _I2O_OBJECT_CONNECT_REPLY { #if (defined(__BORLANDC__)) U32 TargetDevice; #else BF TargetDevice:I2O_TID_SZ; BF InitiatorDevice:I2O_TID_SZ; BF ReplyStatusCode:I2O_8BIT_FLAGS_SZ; #endif } I2O_OBJECT_CONNECT_REPLY, *PI2O_OBJECT_CONNECT_REPLY; /* ExecConnSetup reply structure. */ typedef struct _I2O_EXEC_CONN_SETUP_REPLY { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_OBJECT_CONNECT_REPLY ObjectInfo; I2O_ALIAS_CONNECT_SETUP AliasInfo; U16 IOP2InboundMFrameSize; U16 reserved; } I2O_EXEC_CONN_SETUP_REPLY, *PI2O_EXEC_CONN_SETUP_REPLY; /****************************************************************************/ /* ExecDdmDestroy Function Message Frame structure. */ typedef struct _I2O_EXEC_DDM_DESTROY_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; BF DdmTID:I2O_TID_SZ; BF reserved:I2O_RESERVED_4BITS; BF reserved1:I2O_RESERVED_16BITS; } I2O_EXEC_DDM_DESTROY_MESSAGE, *PI2O_EXEC_DDM_DESTROY_MESSAGE; /****************************************************************************/ /* ExecDdmEnable Function Message Frame structure. */ typedef struct _I2O_EXEC_DDM_ENABLE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; BF DeviceTID:I2O_TID_SZ; BF reserved2:I2O_RESERVED_4BITS; BF reserved1:I2O_RESERVED_16BITS; BF IOP_ID:I2O_IOP_ID_SZ; BF reserved:I2O_RESERVED_4BITS; BF HostUnitID:I2O_UNIT_ID_SZ; } I2O_EXEC_DDM_ENABLE_MESSAGE, *PI2O_EXEC_DDM_ENABLE_MESSAGE; /****************************************************************************/ /* ExecDdmQuiesce Function Message Frame structure. */ typedef struct _I2O_EXEC_DDM_QUIESCE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; BF DeviceTID:I2O_TID_SZ; BF reserved2:I2O_RESERVED_4BITS; BF reserved1:I2O_RESERVED_16BITS; BF IOP_ID:I2O_IOP_ID_SZ; BF reserved:I2O_RESERVED_4BITS; BF HostUnitID:I2O_UNIT_ID_SZ; } I2O_EXEC_DDM_QUIESCE_MESSAGE, *PI2O_EXEC_DDM_QUIESCE_MESSAGE; /****************************************************************************/ /* ExecDdmReset Function Message Frame structure. */ typedef struct _I2O_EXEC_DDM_RESET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; BF DeviceTID:I2O_TID_SZ; BF reserved2:I2O_RESERVED_4BITS; BF reserved1:I2O_RESERVED_16BITS; BF IOP_ID:I2O_IOP_ID_SZ; BF reserved:I2O_RESERVED_4BITS; BF HostUnitID:I2O_UNIT_ID_SZ; } I2O_EXEC_DDM_RESET_MESSAGE, *PI2O_EXEC_DDM_RESET_MESSAGE; /****************************************************************************/ /* ExecDdmSuspend Function Message Frame structure. */ typedef struct _I2O_EXEC_DDM_SUSPEND_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; BF DdmTID:I2O_TID_SZ; BF reserved:I2O_RESERVED_4BITS; BF reserved1:I2O_RESERVED_16BITS; } I2O_EXEC_DDM_SUSPEND_MESSAGE, *PI2O_EXEC_DDM_SUSPEND_MESSAGE; /****************************************************************************/ #define I2O_OPERATION_FLAG_ASSIGN_PERMANENT 0x01 /* ExecDeviceAssign Function Message Frame structure. */ typedef struct _I2O_EXEC_DEVICE_ASSIGN_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; #if (defined(__BORLANDC__)) U32 DeviceTID; #else BF DeviceTID:I2O_TID_SZ; BF DdmTID:I2O_TID_SZ; BF OperationFlags:I2O_8BIT_FLAGS_SZ; #endif BF IOP_ID:I2O_IOP_ID_SZ; BF reserved:I2O_RESERVED_4BITS; BF HostUnitID:I2O_UNIT_ID_SZ; } I2O_EXEC_DEVICE_ASSIGN_MESSAGE, *PI2O_EXEC_DEVICE_ASSIGN_MESSAGE; /****************************************************************************/ #define I2O_OPERATION_FLAG_RELEASE_PERMANENT 0x01 /* ExecDeviceRelease Function Message Frame structure. */ typedef struct _I2O_EXEC_DEVICE_RELEASE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; #if (defined(__BORLANDC__)) U32 DeviceTID; #else BF DeviceTID:I2O_TID_SZ; BF DdmTID:I2O_TID_SZ; BF OperationFlags:I2O_8BIT_FLAGS_SZ; #endif BF IOP_ID:I2O_IOP_ID_SZ; BF reserved:I2O_RESERVED_4BITS; BF HostUnitID:I2O_UNIT_ID_SZ; } I2O_EXEC_DEVICE_RELEASE_MESSAGE, *PI2O_EXEC_DEVICE_RELEASE_MESSAGE; /****************************************************************************/ /* HRT Entry Structure defined in I2OMSG.H */ /* ExecHrtGet Function Message Frame structure. */ typedef struct _I2O_EXEC_HRT_GET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_SG_ELEMENT SGL; } I2O_EXEC_HRT_GET_MESSAGE, *PI2O_EXEC_HRT_GET_MESSAGE; /****************************************************************************/ /* ExecIopClear Function Message Frame structure. */ typedef struct _I2O_EXEC_IOP_CLEAR_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_EXEC_IOP_CLEAR_MESSAGE, *PI2O_EXEC_IOP_CLEAR_MESSAGE; /****************************************************************************/ /* ExecIopConnect Function Message Frame structure. */ typedef struct _I2O_EXEC_IOP_CONNECT_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; BF reserved:I2O_RESERVED_16BITS; BF reserved3:I2O_RESERVED_8BITS; BF IOP1MsgerType:I2O_MESSENGER_TYPE_SZ; U16 IOP1InboundMFrameSize; BF IOP1AliasForIOP2:I2O_TID_SZ; U8 reserved1; BF IOP_ID1:I2O_IOP_ID_SZ; BF reserved2:I2O_RESERVED_4BITS; BF HostUnitID1:I2O_UNIT_ID_SZ; } I2O_EXEC_IOP_CONNECT_MESSAGE, *PI2O_EXEC_IOP_CONNECT_MESSAGE; /* ExecIopConnect reply structure */ typedef struct _I2O_EXEC_IOP_CONNECT_IOP_REPLY { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U16 DetailedStatusCode; U8 reserved; U8 ReqStatus; U16 IOP2InboundMFrameSize; BF IOP2AliasForIOP1:I2O_TID_SZ; U8 reserved1; BF IOP_ID2:I2O_IOP_ID_SZ; BF reserved2:I2O_RESERVED_4BITS; BF HostUnitID2:I2O_UNIT_ID_SZ; } I2O_EXEC_IOP_CONNECT_REPLY, *PI2O_EXEC_IOP_CONNECT_REPLY; /****************************************************************************/ #define I2O_EXEC_IOP_RESET_RESERVED_SZ 16 #define I2O_EXEC_IOP_RESET_IN_PROGRESS 0x01 #define I2O_EXEC_IOP_RESET_REJECTED 0x02 #define I2O_EXEC_IOP_RESET_STATUS_RESERVED_SZ 3 typedef struct _I2O_EXEC_IOP_RESET_STATUS { # if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 ResetStatus; # else U8 ResetStatus; U8 reserved[I2O_EXEC_IOP_RESET_STATUS_RESERVED_SZ]; # endif } I2O_EXEC_IOP_RESET_STATUS, *PI2O_EXEC_IOP_RESET_STATUS; /* ExecIopReset Function Message Frame structure. */ typedef struct _I2O_EXEC_IOP_RESET_MESSAGE { U8 VersionOffset; U8 MsgFlags; U16 MessageSize; #if (defined(__BORLANDC__) || defined(sparc)) U32 TargetAddress; #else BF TargetAddress:I2O_TID_SZ; BF InitiatorAddress:I2O_TID_SZ; BF Function:I2O_FUNCTION_SZ; #endif U8 Reserved[I2O_EXEC_IOP_RESET_RESERVED_SZ]; U32 StatusWordLowAddress; U32 StatusWordHighAddress; } I2O_EXEC_IOP_RESET_MESSAGE, *PI2O_EXEC_IOP_RESET_MESSAGE; /****************************************************************************/ /* LCT Entry Structure defined in I2OMSG.H */ /* ExecLCTNotify Function Message Frame structure. */ typedef struct _I2O_EXEC_LCT_NOTIFY_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U32 ClassIdentifier; U32 LastReportedChangeIndicator; I2O_SG_ELEMENT SGL; } I2O_EXEC_LCT_NOTIFY_MESSAGE, *PI2O_EXEC_LCT_NOTIFY_MESSAGE; /****************************************************************************/ /* ExecOutboundInit Function Message Frame structure. */ typedef struct _I2O_EXEC_OUTBOUND_INIT_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U32 HostPageFrameSize; U8 InitCode; U8 reserved; U16 OutboundMFrameSize; I2O_SG_ELEMENT SGL; } I2O_EXEC_OUTBOUND_INIT_MESSAGE, *PI2O_EXEC_OUTBOUND_INIT_MESSAGE; #define I2O_EXEC_OUTBOUND_INIT_IN_PROGRESS 0x01 #define I2O_EXEC_OUTBOUND_INIT_REJECTED 0x02 #define I2O_EXEC_OUTBOUND_INIT_FAILED 0x03 #define I2O_EXEC_OUTBOUND_INIT_COMPLETE 0x04 #define I2O_EXEC_OUTBOUND_INIT_RESERVED_SZ 3 typedef struct _I2O_EXEC_OUTBOUND_INIT_STATUS { U8 InitStatus; U8 reserved[I2O_EXEC_OUTBOUND_INIT_RESERVED_SZ]; } I2O_EXEC_OUTBOUND_INIT_STATUS, *PI2O_EXEC_OUTBOUND_INIT_STATUS; typedef struct _I2O_EXEC_OUTBOUND_INIT_RECLAIM_LIST { U32 MFACount; U32 MFAReleaseCount; U32 MFAAddress[1]; } I2O_EXEC_OUTBOUND_INIT_RECLAIM_LIST, *PI2O_EXEC_OUTBOUND_INIT_RECLAIM_LIST; /****************************************************************************/ /* ExecPathEnable Function Message Frame structure. */ typedef struct _I2O_EXEC_PATH_ENABLE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; BF IOP_ID:I2O_IOP_ID_SZ; BF reserved:I2O_RESERVED_4BITS; BF HostUnitID:I2O_UNIT_ID_SZ; } I2O_EXEC_PATH_ENABLE_MESSAGE, *PI2O_EXEC_PATH_ENABLE_MESSAGE; /****************************************************************************/ /* ExecPathQuiesce Function Message Frame structure. */ typedef struct _I2O_EXEC_PATH_QUIESCE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; BF IOP_ID:I2O_IOP_ID_SZ; BF reserved:I2O_RESERVED_4BITS; BF HostUnitID:I2O_UNIT_ID_SZ; } I2O_EXEC_PATH_QUIESCE_MESSAGE, *PI2O_EXEC_PATH_QUIESCE_MESSAGE; /****************************************************************************/ /* ExecPathReset Function Message Frame structure. */ typedef struct _I2O_EXEC_PATH_RESET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; BF IOP_ID:I2O_IOP_ID_SZ; BF reserved:I2O_RESERVED_4BITS; BF HostUnitID:I2O_UNIT_ID_SZ; } I2O_EXEC_PATH_RESET_MESSAGE, *PI2O_EXEC_PATH_RESET_MESSAGE; /****************************************************************************/ #define I2O_EXEC_STATIC_MF_CREATE_RESERVED_SZ 3 /* ExecStaticMfCreate Message Frame structure */ typedef struct _I2O_EXEC_STATIC_MF_CREATE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U8 MaxOutstanding; U8 reserved[I2O_EXEC_STATIC_MF_CREATE_RESERVED_SZ]; I2O_MESSAGE_FRAME StaticMessageFrame; } I2O_EXEC_STATIC_MF_CREATE_MESSAGE, *PI2O_EXEC_STATIC_MF_CREATE_MESSAGE; /* ExecStaticMfCreate Message Frame reply */ typedef struct _I2O_EXEC_STATIC_MF_CREATE_REPLY { I2O_SINGLE_REPLY_MESSAGE_FRAME StdReplyFrame; PI2O_MESSAGE_FRAME StaticMFA; } I2O_EXEC_STATIC_MF_CREATE_REPLY, *PI2O_EXEC_STATIC_MF_CREATE_REPLY; /* ExecStaticMfRelease Message Frame structure */ typedef struct _I2O_EXEC_STATIC_MF_RELEASE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; PI2O_MESSAGE_FRAME StaticMFA; } I2O_EXEC_STATIC_MF_RELEASE_MESSAGE, *PI2O_EXEC_STATIC_MF_RELEASE_MESSAGE; /****************************************************************************/ #define I2O_EXEC_STATUS_GET_RESERVED_SZ 16 /* ExecStatusGet Function Message Frame structure. */ typedef struct _I2O_EXEC_STATUS_GET_MESSAGE { U8 VersionOffset; U8 MsgFlags; U16 MessageSize; #if (defined(__BORLANDC__) || defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 TargetAddress; #else BF TargetAddress:I2O_TID_SZ; BF InitiatorAddress:I2O_TID_SZ; BF Function:I2O_FUNCTION_SZ; #endif U8 Reserved[I2O_EXEC_STATUS_GET_RESERVED_SZ]; U32 ReplyBufferAddressLow; U32 ReplyBufferAddressHigh; U32 ReplyBufferLength; } I2O_EXEC_STATUS_GET_MESSAGE, *PI2O_EXEC_STATUS_GET_MESSAGE; #define I2O_IOP_STATUS_PROD_ID_STR_SZ 24 #define I2O_EXEC_STATUS_GET_REPLY_RESERVED_SZ 6 /* ExecStatusGet reply Structure */ #define I2O_IOP_CAP_CONTEXT_32_ONLY 0x00000000 #define I2O_IOP_CAP_CONTEXT_64_ONLY 0x00000001 #define I2O_IOP_CAP_CONTEXT_32_64_NOT_CURRENTLY 0x00000002 #define I2O_IOP_CAP_CONTEXT_32_64_CURRENTLY 0x00000003 #define I2O_IOP_CAP_CURRENT_CONTEXT_NOT_CONFIG 0x00000000 #define I2O_IOP_CAP_CURRENT_CONTEXT_32_ONLY 0x00000004 #define I2O_IOP_CAP_CURRENT_CONTEXT_64_ONLY 0x00000008 #define I2O_IOP_CAP_CURRENT_CONTEXT_32_64 0x0000000C #define I2O_IOP_CAP_INBOUND_PEER_SUPPORT 0x00000010 #define I2O_IOP_CAP_OUTBOUND_PEER_SUPPORT 0x00000020 #define I2O_IOP_CAP_PEER_TO_PEER_SUPPORT 0x00000040 typedef struct _I2O_EXEC_STATUS_GET_REPLY { U16 OrganizationID; U16 reserved; #if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 IOP_ID; #else BF IOP_ID:I2O_IOP_ID_SZ; BF reserved1:I2O_RESERVED_4BITS; BF HostUnitID:I2O_UNIT_ID_SZ; #endif #if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 SegmentNumber; #else BF SegmentNumber:I2O_SEGMENT_NUMBER_SZ; BF I2oVersion:I2O_4BIT_VERSION_SZ; BF IopState:I2O_IOP_STATE_SZ; BF MessengerType:I2O_MESSENGER_TYPE_SZ; #endif U16 InboundMFrameSize; U8 InitCode; U8 reserved2; U32 MaxInboundMFrames; U32 CurrentInboundMFrames; U32 MaxOutboundMFrames; U8 ProductIDString[I2O_IOP_STATUS_PROD_ID_STR_SZ]; U32 ExpectedLCTSize; U32 IopCapabilities; U32 DesiredPrivateMemSize; U32 CurrentPrivateMemSize; U32 CurrentPrivateMemBase; U32 DesiredPrivateIOSize; U32 CurrentPrivateIOSize; U32 CurrentPrivateIOBase; U8 reserved3[3]; U8 SyncByte; } I2O_EXEC_STATUS_GET_REPLY, *PI2O_EXEC_STATUS_GET_REPLY; /****************************************************************************/ #define I2O_EXEC_SW_DOWNLOAD_FLAG_LOAD_MEMORY 0x00 #define I2O_EXEC_SW_DOWNLOAD_FLAG_PERMANENT_STORE 0x01 #define I2O_EXEC_SW_DOWNLOAD_FLAG_EXPERIMENTAL 0x00 #define I2O_EXEC_SW_DOWNLOAD_FLAG_OVERRIDE 0x02 #define I2O_EXEC_SW_TYPE_DDM 0x01 #define I2O_EXEC_SW_TYPE_DDM_MPB 0x02 #define I2O_EXEC_SW_TYPE_DDM_CONFIG_TABLE 0x03 #define I2O_EXEC_SW_TYPE_IRTOS 0x11 #define I2O_EXEC_SW_TYPE_IRTOS_PRIVATE_MODULE 0x12 #define I2O_EXEC_SW_TYPE_IRTOS_DIALOG_TABLE 0x13 #define I2O_EXEC_SW_TYPE_IOP_PRIVATE_MODULE 0x22 #define I2O_EXEC_SW_TYPE_IOP_DIALOG_TABLE 0x23 /* I2O ExecSwDownload/Upload/Remove SwID Structure */ typedef struct _I2O_SW_ID { U16 ModuleID; U16 OrganizationID; } I2O_SW_ID, *PI2O_SW_ID; /* ExecSwDownload Function Message Frame structure. */ typedef struct _I2O_EXEC_SW_DOWNLOAD_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U8 CurrentFragment; U8 TotalFragments; U8 SwType; U8 DownloadFlags; U32 SWSize; I2O_SW_ID SwID; I2O_SG_ELEMENT SGL; } I2O_EXEC_SW_DOWNLOAD_MESSAGE, *PI2O_EXEC_SW_DOWNLOAD_MESSAGE; /****************************************************************************/ /* ExecSwUpload Function Message Frame structure. */ typedef struct _I2O_EXEC_SW_UPLOAD_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U8 CurrentFragment; U8 TotalFragments; U8 SwType; U8 UploadFlags; U32 SWSize; I2O_SW_ID SwID; I2O_SG_ELEMENT SGL; } I2O_EXEC_SW_UPLOAD_MESSAGE, *PI2O_EXEC_SW_UPLOAD_MESSAGE; /****************************************************************************/ /* ExecSwRemove Function Message Frame structure. */ typedef struct _I2O_EXEC_SW_REMOVE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U16 reserved; U8 SwType; U8 RemoveFlags; U32 SWSize; I2O_SW_ID SwID; } I2O_EXEC_SW_REMOVE_MESSAGE, *PI2O_EXEC_SW_REMOVE_MESSAGE; /****************************************************************************/ /* ExecSysEnable Function Message Frame structure. */ typedef struct _I2O_EXEC_SYS_ENABLE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_EXEC_SYS_ENABLE_MESSAGE, *PI2O_EXEC_SYS_ENABLE_MESSAGE; /****************************************************************************/ /* ExecSysModify Function Message Frame structure. */ typedef struct _I2O_EXEC_SYS_MODIFY_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_SG_ELEMENT SGL; } I2O_EXEC_SYS_MODIFY_MESSAGE, *PI2O_EXEC_SYS_MODIFY_MESSAGE; /****************************************************************************/ /* ExecSysQuiesce Function Message Frame structure. */ typedef struct _I2O_EXEC_SYS_QUIESCE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_EXEC_SYS_QUIESCE_MESSAGE, *PI2O_EXEC_SYS_QUIESCE_MESSAGE; /****************************************************************************/ /* ExecSysTabSet (System Table) Function Message Frame structure. */ #define I2O_EXEC_SYS_TAB_IOP_ID_LOCAL_IOP 0x000 #define I2O_EXEC_SYS_TAB_IOP_ID_LOCAL_HOST 0x001 #define I2O_EXEC_SYS_TAB_IOP_ID_UNKNOWN_IOP 0xFFF #define I2O_EXEC_SYS_TAB_HOST_UNIT_ID_LOCAL_UNIT 0x0000 #define I2O_EXEC_SYS_TAB_HOST_UNIT_ID_UNKNOWN_UNIT 0xffff #define I2O_EXEC_SYS_TAB_SEG_NUMBER_LOCAL_SEGMENT 0x000 #define I2O_EXEC_SYS_TAB_SEG_NUMBER_UNKNOWN_SEGMENT 0xfff typedef struct _I2O_EXEC_SYS_TAB_SET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; #if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 IOP_ID; #else BF IOP_ID:I2O_IOP_ID_SZ; BF reserved:I2O_RESERVED_4BITS; BF HostUnitID:I2O_UNIT_ID_SZ; #endif #if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 SegmentNumber; #else BF SegmentNumber:I2O_SEGMENT_NUMBER_SZ; BF reserved2:I2O_RESERVED_4BITS; BF reserved3:I2O_RESERVED_16BITS; #endif I2O_SG_ELEMENT SGL; } I2O_EXEC_SYS_TAB_SET_MESSAGE, *PI2O_EXEC_SYS_TAB_SET_MESSAGE; /* ExecSysTabSet (System Table) Header Reply structure. */ #define I2O_SET_SYSTAB_RESERVED_SZ 8 typedef struct _I2O_SET_SYSTAB_HEADER { U8 NumberEntries; U8 SysTabVersion; U16 reserved; U32 CurrentChangeIndicator; U8 reserved1[I2O_SET_SYSTAB_RESERVED_SZ]; /* I2O_SYSTAB_ENTRY SysTabEntry[1]; */ } I2O_SET_SYSTAB_HEADER, *PI2O_SET_SYSTAB_HEADER; #define I2O_RESOURCE_MANAGER_VERSION 0 typedef struct _MESSENGER_INFO { U32 InboundMessagePortAddressLow; U32 InboundMessagePortAddressHigh; } I2O_MESSENGER_INFO, *PI2O_MESSENGER_INFO; /* ExecSysTabSet IOP Descriptor Entry structure. */ typedef struct _I2O_IOP_ENTRY { U16 OrganizationID; U16 reserved; #if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 IOP_ID; #else BF IOP_ID:I2O_IOP_ID_SZ; BF reserved3:I2O_RESERVED_4BITS; BF reserved1:I2O_RESERVED_16BITS; #endif #if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 SegmentNumber; #else BF SegmentNumber:I2O_SEGMENT_NUMBER_SZ; BF I2oVersion:I2O_4BIT_VERSION_SZ; BF IopState:I2O_IOP_STATE_SZ; BF MessengerType:I2O_MESSENGER_TYPE_SZ; #endif U16 InboundMessageFrameSize; U16 reserved2; U32 LastChanged; U32 IopCapabilities; I2O_MESSENGER_INFO MessengerInfo; } I2O_IOP_ENTRY, *PI2O_IOP_ENTRY; /****************************************************************************/ /* Executive Parameter Groups */ /****************************************************************************/ #define I2O_EXEC_IOP_HARDWARE_GROUP_NO 0x0000 #define I2O_EXEC_IOP_MESSAGE_IF_GROUP_NO 0x0001 #define I2O_EXEC_EXECUTING_ENVIRONMENT_GROUP_NO 0x0002 #define I2O_EXEC_EXECUTING_DDM_LIST_GROUP_NO 0x0003 #define I2O_EXEC_DRIVER_STORE_GROUP_NO 0x0004 #define I2O_EXEC_DRIVER_STORE_TABLE_GROUP_NO 0x0005 #define I2O_EXEC_IOP_BUS_ATTRIBUTES_GROUP_NO 0x0006 #define I2O_EXEC_IOP_SW_ATTRIBUTES_GROUP_NO 0x0007 #define I2O_EXEC_HARDWARE_RESOURCE_TABLE_GROUP_NO 0x0100 #define I2O_EXEC_LCT_SCALAR_GROUP_NO 0x0101 #define I2O_EXEC_LCT_TABLE_GROUP_NO 0x0102 #define I2O_EXEC_SYSTEM_TABLE_GROUP_NO 0x0103 #define I2O_EXEC_EXTERNAL_CONN_TABLE_GROUP_NO 0x0104 /* EXEC Group 0000h - IOP Hardware Parameter Group */ /* IOP HardWare Capabilities defines */ #define I2O_IOP_HW_CAP_SELF_BOOT 0x00000001 #define I2O_IOP_HW_CAP_IRTOS_UPGRADEABLE 0x00000002 #define I2O_IOP_HW_CAP_DOWNLOADABLE_DDM 0x00000004 #define I2O_IOP_HW_CAP_INSTALLABLE_DDM 0x00000008 #define I2O_IOP_HW_CAP_BATTERY_BACKUP_RAM 0x00000010 /* IOP Processor Type defines */ #define I2O_IOP_PROC_TYPE_INTEL_80960 0x00 #define I2O_IOP_PROC_TYPE_AMD_29000 0x01 #define I2O_IOP_PROC_TYPE_MOTOROLA_68000 0x02 #define I2O_IOP_PROC_TYPE_ARM 0x03 #define I2O_IOP_PROC_TYPE_MIPS 0x04 #define I2O_IOP_PROC_TYPE_SPARC 0x05 #define I2O_IOP_PROC_TYPE_POWER_PC 0x06 #define I2O_IOP_PROC_TYPE_ALPHA 0x07 #define I2O_IOP_PROC_TYPE_INTEL_X86 0x08 #define I2O_IOP_PROC_TYPE_OTHER 0xFF typedef struct _I2O_EXEC_IOP_HARDWARE_SCALAR { U16 I2oVendorID; U16 ProductID; U32 ProcessorMemory; U32 PermMemory; U32 HWCapabilities; U8 ProcessorType; U8 ProcessorVersion; } I2O_EXEC_IOP_HARDWARE_SCALAR, *PI2O_EXEC_IOP_HARDWARE_SCALAR; /* EXEC Group 0001h - IOP Message Interface Parameter Group */ /* InitCode defines */ #define I2O_MESSAGE_IF_INIT_CODE_NO_OWNER 0x00 #define I2O_MESSAGE_IF_INIT_CODE_BIOS 0x10 #define I2O_MESSAGE_IF_INIT_CODE_OEM_BIOS_EXTENSION 0x20 #define I2O_MESSAGE_IF_INIT_CODE_ROM_BIOS_EXTENSION 0x30 #define I2O_MESSAGE_IF_INIT_CODE_OS 0x80 typedef struct _I2O_EXEC_IOP_MESSAGE_IF_SCALAR { U32 InboundFrameSize; U32 InboundSizeTarget; U32 InboundMax; U32 InboundTarget; U32 InboundPoolCount; U32 InboundCurrentFree; U32 InboundCurrentPost; U16 StaticCount; U16 StaticInstanceCount; U16 StaticLimit; U16 StaticInstanceLimit; U32 OutboundFrameSize; U32 OutboundMax; U32 OutboundMaxTarget; U32 OutboundCurrentFree; U32 OutboundCurrentPost; U8 InitCode; } I2O_EXEC_IOP_MESSAGE_IF_SCALAR, *PI2O_EXEC_IOP_MESSAGE_IF_SCALAR; /* EXEC Group 0002h - Executing Environment Parameter Group */ typedef struct _I2O_EXEC_EXECUTE_ENVIRONMENT_SCALAR { U32 MemTotal; U32 MemFree; U32 PageSize; U32 EventQMax; U32 EventQCurrent; U32 DDMLoadMax; } I2O_EXEC_EXECUTE_ENVIRONMENT_SCALAR, *PI2O_EXEC_EXECUTE_ENVIRONMENT_SCALAR; /* EXEC Group 0003h - Executing DDM's Parameter Group */ /* ModuleType Defines */ #define I2O_EXEC_DDM_MODULE_TYPE_OTHER 0x00 #define I2O_EXEC_DDM_MODULE_TYPE_DOWNLOAD 0x01 #define I2O_EXEC_DDM_MODULE_TYPE_EMBEDDED 0x22 typedef struct _I2O_EXEC_EXECUTE_DDM_TABLE { U16 DdmTID; U8 ModuleType; U8 reserved; U16 I2oVendorID; U16 ModuleID; U8 ModuleName[I2O_MODULE_NAME_SZ]; U32 ModuleVersion; U32 DataSize; U32 CodeSize; } I2O_EXEC_EXECUTE_DDM_TABLE, *PI2O_EXEC_EXECUTE_DDM_TABLE; /* EXEC Group 0004h - Driver Store Environment Parameter Group */ typedef struct _I2O_EXEC_DRIVER_STORE_SCALAR { U32 ModuleLimit; U32 ModuleCount; U32 CurrentSpace; U32 FreeSpace; } I2O_EXEC_DRIVER_STORE_SCALAR, *PI2O_EXEC_DRIVER_STORE_SCALAR; /* EXEC Group 0005h - Driver Store Parameter Group */ typedef struct _I2O_EXEC_DRIVER_STORE_TABLE { U16 StoredDdmIndex; U8 ModuleType; U8 reserved; U16 I2oVendorID; U16 ModuleID; U8 ModuleName[I2O_MODULE_NAME_SZ]; U32 ModuleVersion; U16 DateDay; U16 DateMonth; U32 DateYear; U32 ModuleSize; U32 MpbSize; U32 ModuleFlags; } I2O_EXEC_DRIVER_STORE_TABLE, *PI2O_EXEC_DRIVER_STORE_TABLE; /* EXEC Group 0006h - IOP's Bus Attributes Parameter Group */ #define I2O_EXEC_IOP_BUS_ATTRIB_SYSTEM_BUS 0x00 #define I2O_EXEC_IOP_BUS_ATTRIB_BRIDGED_SYSTEM_BUS 0x01 #define I2O_EXEC_IOP_BUS_ATTRIB_PRIVATE 0x02 typedef struct _I2O_EXEC_IOP_BUS_ATTRIBUTE_TABLE { U32 BusID; U8 BusType; U8 MaxAdapters; U8 AdapterCount; U8 BusAttributes; } I2O_EXEC_IOP_BUS_ATTRIBUTE_TABLE, *PI2O_EXEC_IOP_BUS_ATTRIBUTE_TABLE; /* EXEC Group 0007h - IOP's Bus Attributes Parameter Group */ #define I2O_EXEC_IOP_SW_CAP_IRTOS_I2O_COMPLIANT 0x00000001 #define I2O_EXEC_IOP_SW_CAP_IRTOS_UPGRADEABLE 0x00000002 #define I2O_EXEC_IOP_SW_CAP_DOWNLOADABLE_DDM 0x00000004 #define I2O_EXEC_IOP_SW_CAP_INSTALLABLE_DDM 0x00000008 typedef struct _I2O_EXEC_IOP_SW_ATTRIBUTES_SCALAR { U16 I2oVendorID; U16 ProductID; U32 CodeSize; U32 SWCapabilities; } I2O_EXEC_IOP_SW_ATTRIBUTES_SCALAR, *PI2O_EXEC_IOP_SW_ATTRIBUTES_SCALAR; /* EXEC Group 0100h - Hardware Resource Table Parameter Group */ typedef struct _I2O_EXEC_HARDWARE_RESOURCE_TABLE { U32 AdapterID; U16 StateInfo; /* AdapterState plus Local TID */ U8 BusNumber; U8 BusType; U64 PhysicalLocation; U32 MemorySpace; U32 IoSpace; } I2O_EXEC_HARDWARE_RESOURCE_TABLE, *PI2O_EXEC_HARDWARE_RESOURCE_TABLE; /* EXEC Group 0101h - Logical Configuration Table Scalar Parameter Group */ typedef struct _I2O_EXEC_LCT_SCALAR { U16 BootDevice; U32 IopFlags; U32 CurrentChangeIndicator; } I2O_EXEC_LCT_SCALAR, *PI2O_EXEC_LCT_SCALAR; /* EXEC Group 0102h - Logical Configuration Table Parameter Group */ typedef struct _I2O_EXEC_LCT_TABLE { U16 LocalTID; U16 UserTID; U16 ParentTID; U16 DdmTID; U32 ChangeIndicator; U32 DeviceFlags; U32 ClassID; U32 SubClass; U8 IdentityTag[I2O_IDENTITY_TAG_SZ]; U32 EventCapabilities; U8 BiosInfo; } I2O_EXEC_LCT_TABLE, *PI2O_EXEC_LCT_TABLE; /* EXEC Group 0103h - System Table Parameter Group */ #define I2O_MESSENGER_TYPE_MEMORY_MAPPED_MESSAGE_UNIT 0x0 typedef struct _I2O_EXEC_SYSTEM_TABLE { U16 IOP_ID; U16 OrganizationID; U16 SegmentNumber; U8 Version; U8 IopState; U8 MessengerType; U8 reserved; U32 InboundMessagePortAddress; U16 InboundMessageFrameSize; U32 IopCapabilities; I2O_MESSENGER_INFO MessengerInfo; } I2O_EXEC_SYSTEM_TABLE, *PI2O_EXEC_SYSTEM_TABLE; /* EXEC Group 0104h - External Connection Table Parameter Group */ #define I2O_EXEC_XCT_FLAGS_REMOTE_IOP_CREATED_CONNECTION 0x00 #define I2O_EXEC_XCT_FLAGS_THIS_IOP_CREATED_CONNECTION 0x01 typedef struct _I2O_EXEC_EXTERNAL_CONNECTION_TABLE { U16 LocalAliasTID; U16 RemoteTID; U16 RemoteIOP; U16 RemoteUnitID; U8 Flags; U8 reserved; } I2O_EXEC_EXTERNAL_CONNECTION_TABLE, *PI2O_EXEC_EXTERNAL_CONNECTION_TABLE; /****************************************************************************/ PRAGMA_PACK_POP PRAGMA_ALIGN_POP #endif /* I2O_EXECUTIVE_HDR */ raidutils-0.0.6.orig/raideng/i2omodul.h0000664000175000000620000001121110044153312017641 0ustar bapstaff00000000000000/**************************************************************************** All software on this website is made available under the following terms and conditions. By downloading this software, you agree to abide by these terms and conditions with respect to this software. I2O SIG All rights reserved. These header files are provided, pursuant to your I2O SIG membership agreement, free of charge on an as-is basis without warranty of any kind, either express or implied, including but not limited to, implied warranties or merchantability and fitness for a particular purpose. I2O SIG does not warrant that this program will meet the user's requirements or that the operation of these programs will be uninterrupted or error-free. Acceptance and use of this program constitutes the user's understanding that he will have no recourse to I2O SIG for any actual or consequential damages including, but not limited to, loss profits arising out of use or inability to use this program. Member is permitted to create derivative works to this header-file program. However, all copies of the program and its derivative works must contain the I2O SIG copyright notice. **************************************************************************/ #ifndef __INCi2omoduleh #define __INCi2omoduleh #define I2OMODULE_REV 1_5_4 #include "i2otypes.h" /* major capabilities bit definitions */ #define I2O_MODULE_32_BIT_CONTEXT_SUPPORT 0x0 #define I2O_MODULE_64_BIT_CONTEXT_SUPPORT 0x1 #define I2O_MODULE_32_OR_64_BIT_CONTEXT_SUPPORT 0x2 #define I2O_MODULE_32_AND_64_BIT_CONTEXT_SUPPORT 0x3 /* module header table types */ #define I2O_MODULE_INDEX_TABLE 0x0000 #define I2O_MODULE_ADAPTER_TABLE 0x0001 #define I2O_MODULE_DEVICE_TABLE 0x0002 #define I2O_MODULE_OBSOLETE_DDM_TABLE 0x0003 #define I2O_MODULE_TCL_TABLE 0x0004 /* Module header */ typedef struct { U32 headerSize; /* size of this header and tables */ U16 orgId; /* I2O organization ID */ U16 moduleId; /* assigned to vendor of module */ U16 day; /* ascii 4 digit year DDM produced */ U16 month; /* ascii 4 digit year DDM produced */ U32 year; /* ascii 4 digit year DDM produced */ U8 i2oVersion; /* I2O version info */ U8 majorCapabilities; /* capbilities bits */ U16 reserved; /* reserved */ U32 codeSize; /* text/data/bss */ U32 tableOffset; /* offset to numTables */ U32 memoryReq; /* pre-attach memory requiremets */ U32 memoryPreferred; /* additional desired */ char moduleVersion[4]; /* 4 ascii characters */ U8 processorType; /* IOP processor type */ U8 processVersion; /* IOP processor type */ U8 objCodeFormat; /* DDM object module format */ U8 reserved1; /* reserved */ U32 numTables; /* number of descriptor tables */ char moduleInfo[24]; /* ascii string name */ } I2O_MODULE_DESC_HDR; /* Module Parameter Block */ typedef struct { U32 mpbSize; /* size of this header and tables */ U16 orgId; /* I2O organization ID */ U16 modId; /* assigned to vendor of module */ U32 mpbVersion; /* MPB version info */ U32 reserved; /* reserved */ } I2O_MODULE_PARAM_BLK; /* Generic header for module tables. This applies to all tables in the * module header apart from the TCL script table, which does not define * the entrySize and numEntries fields. */ typedef struct { U16 length; /* length of table in 32 bit words */ U16 descriptorId; /* descriptor ID = 0x0000 */ U8 entrySize; /* size of entries in 32 bit words */ U8 numEntries; /* number of entries */ U8 tableVersion; /* table version */ U8 reserved; /* reserved */ } I2O_MODULE_TABLE; typedef struct { U16 tableDescId; /* descriptor ID of table */ U16 reserved; /* reserved */ U32 tableOffset; /* offset in bytes of table from start of mod hdr */ } I2O_INDEX_TABLE_ENTRY; typedef struct { U32 classId; /* Message class */ U32 subClass; /* Subclass */ } I2O_DEVICE_TABLE_ENTRY; typedef struct { U16 orgId; /* Organization ID */ U16 modId; /* Module ID */ } I2O_OBSOLETE_DDM_TABLE_ENTRY; #endif /* __INCi2omoduleh */ raidutils-0.0.6.orig/raideng/i2omsg.h0000664000175000000620000014453510044153313017330 0ustar bapstaff00000000000000/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2omsg.h 30 4/30/01 12:57p Salyzyn $ */ /**************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. * All rights reserved. * * Copyright 1999 I2O Special Interest Group (I2O SIG). All rights reserved. * All rights reserved * * TERMS AND CONDITIONS OF USE * * Redistribution and use in source form, with or without modification, are * permitted provided that redistributions of source code must retain the * above copyright notice, this list of conditions and the following disclaimer. * * This software is provided `as is' by Distributed Processing Technology and * any express or implied warranties, including, but not limited to, the * implied warranties of merchantability and fitness for a particular purpose, * are disclaimed. In no event shall Distributed Processing Technology be * liable for any direct, indirect, incidental, special, exemplary or * consequential damages (including, but not limited to, procurement of * substitute goods or services; loss of use, data, or profits; or business * interruptions) however caused and on any theory of liability, whether in * contract, strict liability, or tort (including negligence or otherwise) * arising in any way out of the use of this driver software, even if advised * of the possibility of such damage. * * This header file, and any modifications of this header file, are provided * contingent upon your agreement and adherence to the here-listed terms and * conditions. By accepting and/or using this header file, you agree to abide * by these terms and conditions and that these terms and conditions will be * construed and governed in accordance with the laws of the State of California, * without reference to conflict-of-law provisions. If you do not agree * to these terms and conditions, please delete this file, and any copies, * permanently, without making any use thereof. * * THIS HEADER FILE IS PROVIDED FREE OF CHARGE ON AN AS-IS BASIS WITHOUT * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE. I2O SIG DOES NOT WARRANT THAT THIS HEADER FILE WILL MEET THE * USER'S REQUIREMENTS OR THAT ITS OPERATION WILL BE UNINTERRUPTED OR * ERROR-FREE. * * I2O SIG DISCLAIMS ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF * ANY PROPRIETARY RIGHTS, RELATING TO THE IMPLEMENTATION OF THE I2O * SPECIFICATIONS. I2O SIG DOES NOT WARRANT OR REPRESENT THAT SUCH * IMPLEMENTATIONS WILL NOT INFRINGE SUCH RIGHTS. * * THE USER OF THIS HEADER FILE SHALL HAVE NO RECOURSE TO I2O SIG FOR ANY * ACTUAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOST DATA * OR LOST PROFITS ARISING OUT OF THE USE OR INABILITY TO USE THIS PROGRAM. * * I2O SIG grants the user of this header file a license to copy, distribute, * and modify it, for any purpose, under the following terms. Any copying, * distribution, or modification of this header file must not delete or alter * the copyright notice of I2O SIG or any of these Terms and Conditions. * * Any distribution of this header file must not include a charge for the * header file (unless such charges are strictly for the physical acts of * copying or transferring copies). However, distribution of a product in * which this header file is embedded may include a charge so long as any * such charge does not include any charge for the header file itself. * * Any modification of this header file constitutes a derivative work based * on this header file. Any distribution of such derivative work: (1) must * include prominent notices that the header file has been changed from the * original, together with the dates of any changes; (2) automatically includes * this same license to the original header file from I2O SIG, without any * restriction thereon from the distributing user; and (3) must include a * grant of license of the modified file under the same terms and conditions * as these Terms and Conditions. * * The I2O SIG Web site can be found at: http://www.i2osig.org * * The I2O SIG encourages you to deposit derivative works based on this * header file at the I2O SIG Web site. Furthermore, to become a Registered * Developer of the I2O SIG, sign up at the Web site or call 415.750.8352 * (United States). ****************************************************************/ /********************************************************************* * I2OMsg.h -- I2O Message defintion file * * This file contains information presented in Chapter 3, 4 and 6 of * the I2O(tm) Specification and most of the I2O Global defines and * Typedefs. **********************************************************************/ #if !defined(I2O_MESSAGE_HDR) #define I2O_MESSAGE_HDR #define I2OMSG_REV 1_5_4 /* I2OMsg header file revision string */ /* NOTES: Gets, reads, receives, etc. are all even numbered functions. Sets, writes, sends, etc. are all odd numbered functions. Functions that both send and receive data can be either but an attempt is made to use the function number that indicates the greater transfer amount. Functions that do not send or receive data use odd function numbers. Some functions are synonyms like read, receive and send, write. All common functions will have a code of less than 0x80. Unique functions to a class will start at 0x80. Executive Functions start at 0xA0. Utility Message function codes range from 0 - 0x1f Base Message function codes range from 0x20 - 0xfe Private Message function code is 0xff. */ #if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__)) # if (KERN_VERSION < 3) # include "i386/pci/i2otypes.h" # else # include "dev/asr/i2otypes.h" # endif #else # include "i2otypes.h" #endif PRAGMA_ALIGN_PUSH PRAGMA_PACK_PUSH /* Set to 1 for 64 bit Context Fields */ #define I2O_64BIT_CONTEXT 0 /****************************************************************************/ /* Common functions accross all classes. */ #define I2O_PRIVATE_MESSAGE 0xFF /****************************************************************************/ /* Class ID and Code Assignments */ #define I2O_CLASS_VERSION_10 0x00 #define I2O_CLASS_VERSION_11 0x01 /* Class Code Names: Table 6-1 Class Code Assignments. */ #define I2O_CLASS_EXECUTIVE 0x000 #define I2O_CLASS_DDM 0x001 #define I2O_CLASS_RANDOM_BLOCK_STORAGE 0x010 #define I2O_CLASS_SEQUENTIAL_STORAGE 0x011 #define I2O_CLASS_LAN 0x020 #define I2O_CLASS_WAN 0x030 #define I2O_CLASS_FIBRE_CHANNEL_PORT 0x040 #define I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL 0x041 #define I2O_CLASS_SCSI_PERIPHERAL 0x051 #define I2O_CLASS_ATE_PORT 0x060 #define I2O_CLASS_ATE_PERIPHERAL 0x061 #define I2O_CLASS_FLOPPY_CONTROLLER 0x070 #define I2O_CLASS_FLOPPY_DEVICE 0x071 #define I2O_CLASS_BUS_ADAPTER_PORT 0x080 /* Class Codes 0x090 - 0x09f are reserved for Peer-to-Peer classes */ #define I2O_CLASS_MATCH_ANYCLASS 0xffffffff #define I2O_SUBCLASS_i960 0x001 #define I2O_SUBCLASS_HDM 0x020 #define I2O_SUBCLASS_ISM 0x021 /****************************************************************************/ /* Message Frame defines and structures */ /* Defines for the Version_Status field. */ #define I2O_VERSION_10 0x00 #define I2O_VERSION_11 0x01 #define I2O_VERSION_OFFSET_NUMBER_MASK 0x07 #define I2O_VERSION_OFFSET_SGL_TRL_OFFSET_MASK 0xF0 /* Defines for the Message Flags Field. */ /* Please Note the the FAIL bit is only set in the Transport Fail Message. */ #define I2O_MESSAGE_FLAGS_STATIC 0x01 #define I2O_MESSAGE_FLAGS_64BIT_CONTEXT 0x02 #define I2O_MESSAGE_FLAGS_MULTIPLE 0x10 #define I2O_MESSAGE_FLAGS_FAIL 0x20 #define I2O_MESSAGE_FLAGS_LAST 0x40 #define I2O_MESSAGE_FLAGS_REPLY 0x80 /* Defines for Request Status Codes: Table 3-1 Reply Status Codes. */ #define I2O_REPLY_STATUS_SUCCESS 0x00 #define I2O_REPLY_STATUS_ABORT_DIRTY 0x01 #define I2O_REPLY_STATUS_ABORT_NO_DATA_TRANSFER 0x02 #define I2O_REPLY_STATUS_ABORT_PARTIAL_TRANSFER 0x03 #define I2O_REPLY_STATUS_ERROR_DIRTY 0x04 #define I2O_REPLY_STATUS_ERROR_NO_DATA_TRANSFER 0x05 #define I2O_REPLY_STATUS_ERROR_PARTIAL_TRANSFER 0x06 #define I2O_REPLY_STATUS_PROCESS_ABORT_DIRTY 0x08 #define I2O_REPLY_STATUS_PROCESS_ABORT_NO_DATA_TRANSFER 0x09 #define I2O_REPLY_STATUS_PROCESS_ABORT_PARTIAL_TRANSFER 0x0A #define I2O_REPLY_STATUS_TRANSACTION_ERROR 0x0B #define I2O_REPLY_STATUS_PROGRESS_REPORT 0x80 /* DetailedStatusCode defines for ALL messages: Table 3-2 Detailed Status Codes. */ #define I2O_DETAIL_STATUS_SUCCESS 0x0000 #define I2O_DETAIL_STATUS_BAD_KEY 0x0002 #define I2O_DETAIL_STATUS_TCL_ERROR 0x0003 #define I2O_DETAIL_STATUS_REPLY_BUFFER_FULL 0x0004 #define I2O_DETAIL_STATUS_NO_SUCH_PAGE 0x0005 #define I2O_DETAIL_STATUS_INSUFFICIENT_RESOURCE_SOFT 0x0006 #define I2O_DETAIL_STATUS_INSUFFICIENT_RESOURCE_HARD 0x0007 #define I2O_DETAIL_STATUS_CHAIN_BUFFER_TOO_LARGE 0x0009 #define I2O_DETAIL_STATUS_UNSUPPORTED_FUNCTION 0x000A #define I2O_DETAIL_STATUS_DEVICE_LOCKED 0x000B #define I2O_DETAIL_STATUS_DEVICE_RESET 0x000C #define I2O_DETAIL_STATUS_INAPPROPRIATE_FUNCTION 0x000D #define I2O_DETAIL_STATUS_INVALID_INITIATOR_ADDRESS 0x000E #define I2O_DETAIL_STATUS_INVALID_MESSAGE_FLAGS 0x000F #define I2O_DETAIL_STATUS_INVALID_OFFSET 0x0010 #define I2O_DETAIL_STATUS_INVALID_PARAMETER 0x0011 #define I2O_DETAIL_STATUS_INVALID_REQUEST 0x0012 #define I2O_DETAIL_STATUS_INVALID_TARGET_ADDRESS 0x0013 #define I2O_DETAIL_STATUS_MESSAGE_TOO_LARGE 0x0014 #define I2O_DETAIL_STATUS_MESSAGE_TOO_SMALL 0x0015 #define I2O_DETAIL_STATUS_MISSING_PARAMETER 0x0016 #define I2O_DETAIL_STATUS_TIMEOUT 0x0017 #define I2O_DETAIL_STATUS_UNKNOWN_ERROR 0x0018 #define I2O_DETAIL_STATUS_UNKNOWN_FUNCTION 0x0019 #define I2O_DETAIL_STATUS_UNSUPPORTED_VERSION 0x001A #define I2O_DEATIL_STATUS_DEVICE_BUSY 0x001B #define I2O_DETAIL_STATUS_DEVICE_NOT_AVAILABLE 0x001C /* Common I2O Field sizes */ #define I2O_TID_SZ 12 #define I2O_FUNCTION_SZ 8 #define I2O_UNIT_ID_SZ 16 #define I2O_SEGMENT_NUMBER_SZ 12 #define I2O_IOP_ID_SZ 12 #define I2O_GROUP_ID_SZ 16 #define I2O_IOP_STATE_SZ 8 #define I2O_MESSENGER_TYPE_SZ 8 #define I2O_CLASS_ID_SZ 12 #define I2O_CLASS_ORGANIZATION_ID_SZ 16 #define I2O_4BIT_VERSION_SZ 4 #define I2O_8BIT_FLAGS_SZ 8 #define I2O_COMMON_LENGTH_FIELD_SZ 16 #define I2O_DEVID_DESCRIPTION_SZ 16 #define I2O_DEVID_VENDOR_INFO_SZ 16 #define I2O_DEVID_PRODUCT_INFO_SZ 16 #define I2O_DEVID_REV_LEVEL_SZ 8 #define I2O_MODULE_NAME_SZ 24 #define I2O_BIOS_INFO_SZ 8 #define I2O_RESERVED_4BITS 4 #define I2O_RESERVED_8BITS 8 #define I2O_RESERVED_12BITS 12 #define I2O_RESERVED_16BITS 16 #define I2O_RESERVED_20BITS 20 #define I2O_RESERVED_24BITS 24 #define I2O_RESERVED_28BITS 28 typedef U32 I2O_PARAMETER_TID; #if I2O_64BIT_CONTEXT typedef U64 I2O_INITIATOR_CONTEXT; typedef U64 I2O_TRANSACTION_CONTEXT; #else typedef U32 I2O_INITIATOR_CONTEXT; typedef U32 I2O_TRANSACTION_CONTEXT; #endif /* Serial Number format defines */ #define I2O_SERIAL_FORMAT_UNKNOWN 0 #define I2O_SERIAL_FORMAT_BINARY 1 #define I2O_SERIAL_FORMAT_ASCII 2 #define I2O_SERIAL_FORMAT_UNICODE 3 #define I2O_SERIAL_FORMAT_LAN_MAC 4 #define I2O_SERIAL_FORMAT_WAN 5 /* Special TID Assignments */ #define I2O_IOP_TID 0 #define I2O_HOST_TID 1 /****************************************************************************/ /* I2O Message Frame common for all messages */ typedef struct _I2O_MESSAGE_FRAME { U8 VersionOffset; U8 MsgFlags; U16 MessageSize; #if (defined(__BORLANDC__)) || defined(_DPT_BIG_ENDIAN) || (defined(sparc)) U32 TargetAddress; #else BF TargetAddress:I2O_TID_SZ; BF InitiatorAddress:I2O_TID_SZ; BF Function:I2O_FUNCTION_SZ; #endif I2O_INITIATOR_CONTEXT InitiatorContext; } I2O_MESSAGE_FRAME, *PI2O_MESSAGE_FRAME; /****************************************************************************/ /* Transaction Reply Lists (TRL) Control Word structure */ #define I2O_TRL_FLAGS_SINGLE_FIXED_LENGTH 0x00 #define I2O_TRL_FLAGS_SINGLE_VARIABLE_LENGTH 0x40 #define I2O_TRL_FLAGS_MULTIPLE_FIXED_LENGTH 0x80 typedef struct _I2O_TRL_CONTROL_WORD { U8 TrlCount; U8 TrlElementSize; U8 reserved; U8 TrlFlags; #if I2O_64BIT_CONTEXT U32 Padding; /* Padding for 64 bit */ #endif } I2O_TRL_CONTROL_WORD, *PI2O_TRL_CONTROL_WORD; /****************************************************************************/ /* I2O Successful Single Transaction Reply Message Frame structure. */ typedef struct _I2O_SINGLE_REPLY_MESSAGE_FRAME { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U16 DetailedStatusCode; U8 reserved; U8 ReqStatus; /* ReplyPayload */ } I2O_SINGLE_REPLY_MESSAGE_FRAME, *PI2O_SINGLE_REPLY_MESSAGE_FRAME; /****************************************************************************/ /* I2O Successful Multiple Transaction Reply Message Frame structure. */ typedef struct _I2O_MULTIPLE_REPLY_MESSAGE_FRAME { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRL_CONTROL_WORD TrlControlWord; U16 DetailedStatusCode; U8 reserved; U8 ReqStatus; /* TransactionDetails[] */ } I2O_MULTIPLE_REPLY_MESSAGE_FRAME, *PI2O_MULTIPLE_REPLY_MESSAGE_FRAME; /****************************************************************************/ /* I2O Private Message Frame structure. */ typedef struct _I2O_PRIVATE_MESSAGE_FRAME { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U16 XFunctionCode; U16 OrganizationID; /* PrivatePayload[] */ } I2O_PRIVATE_MESSAGE_FRAME, *PI2O_PRIVATE_MESSAGE_FRAME; /****************************************************************************/ /* Message Failure Severity Codes */ #define I2O_SEVERITY_FORMAT_ERROR 0x1 #define I2O_SEVERITY_PATH_ERROR 0x2 #define I2O_SEVERITY_PATH_STATE 0x4 #define I2O_SEVERITY_CONGESTION 0x8 /* Transport Failure Codes: Table 3-3 Mesasge Failure Codes */ #define I2O_FAILURE_CODE_TRANSPORT_SERVICE_SUSPENDED 0x81 #define I2O_FAILURE_CODE_TRANSPORT_SERVICE_TERMINATED 0x82 #define I2O_FAILURE_CODE_TRANSPORT_CONGESTION 0x83 #define I2O_FAILURE_CODE_TRANSPORT_FAIL 0x84 #define I2O_FAILURE_CODE_TRANSPORT_STATE_ERROR 0x85 #define I2O_FAILURE_CODE_TRANSPORT_TIME_OUT 0x86 #define I2O_FAILURE_CODE_TRANSPORT_ROUTING_FAILURE 0x87 #define I2O_FAILURE_CODE_TRANSPORT_INVALID_VERSION 0x88 #define I2O_FAILURE_CODE_TRANSPORT_INVALID_OFFSET 0x89 #define I2O_FAILURE_CODE_TRANSPORT_INVALID_MSG_FLAGS 0x8A #define I2O_FAILURE_CODE_TRANSPORT_FRAME_TOO_SMALL 0x8B #define I2O_FAILURE_CODE_TRANSPORT_FRAME_TOO_LARGE 0x8C #define I2O_FAILURE_CODE_TRANSPORT_INVALID_TARGET_ID 0x8D #define I2O_FAILURE_CODE_TRANSPORT_INVALID_INITIATOR_ID 0x8E #define I2O_FAILURE_CODE_TRANSPORT_INVALID_INITIATOR_CONTEXT 0x8F #define I2O_FAILURE_CODE_TRANSPORT_UNKNOWN_FAILURE 0xFF /* IOP_ID and Severity sizes */ #define I2O_FAILCODE_SEVERITY_SZ 8 #define I2O_FAILCODE_CODE_SZ 8 /* I2O Transport Message Reply for Message Failure. */ typedef struct _I2O_FAILURE_REPLY_MESSAGE_FRAME { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; # if (defined(_DPT_BIG_ENDIAN) || defined(sparc) || defined(__BORLANDC__)) U32 LowestVersion; U32 reserved; # else U8 LowestVersion; U8 HighestVersion; /* BF Severity:I2O_FAILCODE_SEVERITY_SZ; // BF FailureCode:I2O_FAILCODE_CODE_SZ; // // Due to our compiler padding this structure and making it larger than // it really is (4 bytes larger), we are re-defining these two fields */ U8 Severity; U8 FailureCode; BF reserved:I2O_RESERVED_4BITS; BF FailingHostUnitID:I2O_UNIT_ID_SZ; BF reserved1:12; # endif U32 AgeLimit; U32 PreservedMFA; } I2O_FAILURE_REPLY_MESSAGE_FRAME, *PI2O_FAILURE_REPLY_MESSAGE_FRAME; /* I2O Transport Message Reply for Transaction Error. */ typedef struct _I2O_TRANSACTION_ERROR_REPLY_MESSAGE_FRAME { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U16 DetailedStatusCode; U8 reserved; U8 ReqStatus; /* Should always be Transaction Error */ U32 ErrorOffset; U8 BitOffset; U8 reserved1; U16 reserved2; } I2O_TRANSACTION_ERROR_REPLY_MESSAGE_FRAME, *PI2O_TRANSACTION_ERROR_REPLY_MESSAGE_FRAME; /****************************************************************************/ /* Misc. commonly used structures */ /* Class ID Block */ typedef struct _I2O_CLASS_ID { #if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 Class; #else BF Class:I2O_CLASS_ID_SZ; BF Version:I2O_4BIT_VERSION_SZ; BF OrganizationID:I2O_CLASS_ORGANIZATION_ID_SZ; #endif } I2O_CLASS_ID, *PI2O_CLASS_ID; #define I2O_MAX_SERIAL_NUMBER_SZ 256 typedef struct _I2O_SERIAL_INFO { U8 SerialNumberLength; U8 SerialNumberFormat; U8 SerialNumber[I2O_MAX_SERIAL_NUMBER_SZ]; } I2O_SERIAL_INFO, *PI2O_SERIAL_INFO; /****************************************************************************/ /* Hardware Resource Table (HRT) and Logical Configuration Table (LCT) */ /****************************************************************************/ /* Bus Type Code defines */ #define I2O_LOCAL_BUS 0 #define I2O_ISA_BUS 1 #define I2O_EISA_BUS 2 #define I2O_MCA_BUS 3 #define I2O_PCI_BUS 4 #define I2O_PCMCIA_BUS 5 #define I2O_NUBUS_BUS 6 #define I2O_CARDBUS_BUS 7 #define I2O_OTHER_BUS 0x80 #define I2O_HRT_STATE_SZ 4 #define I2O_HRT_BUS_NUMBER_SZ 8 #define I2O_HRT_BUS_TYPE_SZ 8 /* Bus Structures */ /* PCI Bus */ typedef struct _I2O_PCI_BUS_INFO { U8 PciFunctionNumber; U8 PciDeviceNumber; U8 PciBusNumber; U8 reserved; U16 PciVendorID; U16 PciDeviceID; } I2O_PCI_BUS_INFO, *PI2O_PCI_BUS_INFO; /* Local Bus */ typedef struct _I2O_LOCAL_BUS_INFO { U16 LbBaseIOPort; U16 reserved; U32 LbBaseMemoryAddress; } I2O_LOCAL_BUS_INFO, *PI2O_LOCAL_BUS_INFO; /* ISA Bus */ typedef struct _I2O_ISA_BUS_INFO { U16 IsaBaseIOPort; U8 CSN; U8 reserved; U32 IsaBaseMemoryAddress; } I2O_ISA_BUS_INFO, *PI2O_ISA_BUS_INFO; /* EISA Bus */ typedef struct _I2O_EISA_BUS_INFO { U16 EisaBaseIOPort; U8 reserved; U8 EisaSlotNumber; U32 EisaBaseMemoryAddress; } I2O_EISA_BUS_INFO, *PI2O_EISA_BUS_INFO; /* MCA Bus */ typedef struct _I2O_MCA_BUS_INFO { U16 McaBaseIOPort; U8 reserved; U8 McaSlotNumber; U32 McaBaseMemoryAddress; } I2O_MCA_BUS_INFO, *PI2O_MCA_BUS_INFO; /* Other Bus */ typedef struct _I2O_OTHER_BUS_INFO { U16 BaseIOPort; U16 reserved; U32 BaseMemoryAddress; } I2O_OTHER_BUS_INFO, *PI2O_OTHER_BUS_INFO; /* HRT Entry Block */ typedef struct _I2O_HRT_ENTRY { U32 AdapterID; #if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 ControllingTID; #else BF ControllingTID:I2O_TID_SZ; BF AdapterState:I2O_HRT_STATE_SZ; BF BusNumber:I2O_HRT_BUS_NUMBER_SZ; BF BusType:I2O_HRT_BUS_TYPE_SZ; #endif union { /* PCI Bus */ I2O_PCI_BUS_INFO PCIBus; /* Local Bus */ I2O_LOCAL_BUS_INFO LocalBus; /* ISA Bus */ I2O_ISA_BUS_INFO ISABus; /* EISA Bus */ I2O_EISA_BUS_INFO EISABus; /* MCA Bus */ I2O_MCA_BUS_INFO MCABus; /* Other. */ I2O_OTHER_BUS_INFO OtherBus; }uBus; } I2O_HRT_ENTRY, *PI2O_HRT_ENTRY; /* I2O Hardware Resource Table structure. */ typedef struct _I2O_HRT { U16 NumberEntries; U8 EntryLength; U8 HRTVersion; U32 CurrentChangeIndicator; I2O_HRT_ENTRY HRTEntry[1]; } I2O_HRT, *PI2O_HRT; /****************************************************************************/ /* Logical Configuration Table */ /****************************************************************************/ /* I2O Logical Configuration Table structures. */ #define I2O_IDENTITY_TAG_SZ 8 /* I2O Logical Configuration Table Device Flags */ #define I2O_LCT_DEVICE_FLAGS_CONF_DIALOG_REQUEST 0x01 #define I2O_LCT_DEVICE_FLAGS_MORE_THAN_1_USER 0x02 #define I2O_LCT_DEVICE_FLAGS_PEER_SERVICE_DISABLED 0x10 #define I2O_LCT_DEVICE_FLAGS_MANAGEMENT_SERVICE_DISABLED 0x20 /* LCT Entry Block */ typedef struct _I2O_LCT_ENTRY { #if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 TableEntrySize; #else BF TableEntrySize:I2O_COMMON_LENGTH_FIELD_SZ; BF LocalTID:I2O_TID_SZ; BF reserved:I2O_4BIT_VERSION_SZ; #endif U32 ChangeIndicator; U32 DeviceFlags; I2O_CLASS_ID ClassID; U32 SubClassInfo; #if (defined(__BORLANDC__)) || defined(_DPT_BIG_ENDIAN) || (defined(sparc)) U32 UserTID; #else BF UserTID:I2O_TID_SZ; BF ParentTID:I2O_TID_SZ; BF BiosInfo:I2O_BIOS_INFO_SZ; #endif U8 IdentityTag[I2O_IDENTITY_TAG_SZ]; U32 EventCapabilities; } I2O_LCT_ENTRY, *PI2O_LCT_ENTRY; /* I2O Logical Configuration Table structure. */ typedef struct _I2O_LCT { #if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 TableSize; #else BF TableSize:I2O_COMMON_LENGTH_FIELD_SZ; BF BootDeviceTID:I2O_TID_SZ; BF LctVer:I2O_4BIT_VERSION_SZ; #endif U32 IopFlags; U32 CurrentChangeIndicator; I2O_LCT_ENTRY LCTEntry[1]; } I2O_LCT, *PI2O_LCT; /****************************************************************************/ /* Memory Addressing structures and defines. */ /* SglFlags defines. */ #define I2O_SGL_FLAGS_LAST_ELEMENT 0x80 #define I2O_SGL_FLAGS_END_OF_BUFFER 0x40 #define I2O_SGL_FLAGS_IGNORE_ELEMENT 0x00 #define I2O_SGL_FLAGS_TRANSPORT_ELEMENT 0x04 #define I2O_SGL_FLAGS_BIT_BUCKET_ELEMENT 0x08 #define I2O_SGL_FLAGS_IMMEDIATE_DATA_ELEMENT 0x0C #define I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT 0x10 #define I2O_SGL_FLAGS_PAGE_LIST_ADDRESS_ELEMENT 0x20 #define I2O_SGL_FLAGS_CHAIN_POINTER_ELEMENT 0x30 #define I2O_SGL_FLAGS_LONG_TRANSACTION_ELEMENT 0x40 #define I2O_SGL_FLAGS_SHORT_TRANSACTION_ELEMENT 0x70 #define I2O_SGL_FLAGS_SGL_ATTRIBUTES_ELEMENT 0x7C #define I2O_SGL_FLAGS_BC0 0x01 #define I2O_SGL_FLAGS_BC1 0x02 #define I2O_SGL_FLAGS_DIR 0x04 #define I2O_SGL_FLAGS_LOCAL_ADDRESS 0x08 #define I2O_SGL_FLAGS_CONTEXT_COUNT_MASK 0x03 #define I2O_SGL_FLAGS_ADDRESS_MODE_MASK 0x3C #define I2O_SGL_FLAGS_NO_CONTEXT 0x00 /* Scatter/Gather Truth Table */ /* typedef enum _SG_TYPE { INVALID, Ignore, TransportDetails, BitBucket, ImmediateData, Simple, PageList, ChainPointer, ShortTransaction, LongTransaction, SGLAttributes, INVALID/ReservedLongFormat, INVALID/ReservedShortFormat } SG_TYPE, *PSG_TYPE; 0x00 Ignore; 0x04 TransportDetails; 0x08 BitBucket; 0x0C ImmediateData; 0x10 Simple; 0x14 Simple; 0x18 Simple; 0x1C Simple; 0x20 PageList; 0x24 PageList; 0x28 PageList; 0x2C PageList; 0x30 ChainPointer; 0x34 INVALID; 0x38 ChainPointer; 0x3C INVALID; 0x40 LongTransaction; 0x44 INVALID/ReservedLongFormat; 0x48 BitBucket; 0x4C ImmediateData; 0x50 Simple; 0x54 Simple; 0x58 Simple; 0x5C Simple; 0x60 PageList; 0x64 PageList; 0x68 PageList; 0x6C PageList; 0x70 ShortTransaction; 0x74 INVALID/ReservedShortFormat; 0x78 INVALID/ReservedShortFormat; 0x7C SGLAttributes; */ /* 32 Bit Context Field defines */ #define I2O_SGL_FLAGS_CONTEXT32_NULL 0x00 #define I2O_SGL_FLAGS_CONTEXT32_U32 0x01 #define I2O_SGL_FLAGS_CONTEXT32_U64 0x02 #define I2O_SGL_FLAGS_CONTEXT32_U96 0x03 #define I2O_SGL_FLAGS_CONTEXT32_NULL_SZ 0x00 #define I2O_SGL_FLAGS_CONTEXT32_U32_SZ 0x04 #define I2O_SGL_FLAGS_CONTEXT32_U64_SZ 0x08 #define I2O_SGL_FLAGS_CONTEXT32_U96_SZ 0x0C /* 64 Bit Context Field defines */ #define I2O_SGL_FLAGS_CONTEXT64_NULL 0x00 #define I2O_SGL_FLAGS_CONTEXT64_U64 0x01 #define I2O_SGL_FLAGS_CONTEXT64_U128 0x02 #define I2O_SGL_FLAGS_CONTEXT64_U192 0x03 #define I2O_SGL_FLAGS_CONTEXT64_NULL_SZ 0x00 #define I2O_SGL_FLAGS_CONTEXT64_U64_SZ 0x08 #define I2O_SGL_FLAGS_CONTEXT64_U128_SZ 0x10 #define I2O_SGL_FLAGS_CONTEXT64_U192_SZ 0x18 /* SGL Attribute Element defines */ #define I2O_SGL_ATTRIBUTE_FLAGS_BIT_BUCKET_HINT 0x0400 #define I2O_SGL_ATTRIBUTE_FLAGS_IMMEDIATE_DATA_HINT 0x0200 #define I2O_SGL_ATTRIBUTE_FLAGS_LOCAL_ADDRESS_HINT 0x0100 #define I2O_SGL_ATTRIBUTE_FLAGS_32BIT_TRANSACTION 0x0000 #define I2O_SGL_ATTRIBUTE_FLAGS_64BIT_TRANSACTION 0x0004 #define I2O_SGL_ATTRIBUTE_FLAGS_32BIT_LOCAL_ADDRESS 0x0000 /* SG Size defines */ #define I2O_SG_COUNT_SZ 24 #define I2O_SG_FLAGS_SZ 8 /* Standard Flags and Count fields for SG Elements */ typedef struct _I2O_FLAGS_COUNT { #if (defined(__BORLANDC__)) || defined(_DPT_BIG_ENDIAN) || (defined(sparc)) U32 Count; #else BF Count:I2O_SG_COUNT_SZ; BF Flags:I2O_SG_FLAGS_SZ; #endif } I2O_FLAGS_COUNT, *PI2O_FLAGS_COUNT; /* Bit Bucket Element */ typedef struct _I2O_SGE_BIT_BUCKET_ELEMENT { I2O_FLAGS_COUNT FlagsCount; U32 BufferContext; } I2O_SGE_BIT_BUCKET_ELEMENT, *PI2O_SGE_BIT_BUCKET_ELEMENT; /* Chain Addressing Scatter-Gather Element */ typedef struct _I2O_SGE_CHAIN_ELEMENT { I2O_FLAGS_COUNT FlagsCount; U32 PhysicalAddress; } I2O_SGE_CHAIN_ELEMENT, *PI2O_SGE_CHAIN_ELEMENT; /* Chain Addressing with Context Scatter-Gather Element */ typedef struct _I2O_SGE_CHAIN_CONTEXT_ELEMENT { I2O_FLAGS_COUNT FlagsCount; U32 Context[1]; U32 PhysicalAddress; } I2O_SGE_CHAIN_CONTEXT_ELEMENT, *PI2O_SGE_CHAIN_CONTEXT_ELEMENT; /* Ignore Scatter-Gather Element */ typedef struct _I2O_SGE_IGNORE_ELEMENT { I2O_FLAGS_COUNT FlagsCount; } I2O_SGE_IGNORE_ELEMENT, *PI2O_SGE_IGNORE_ELEMENT; /* Immediate Data Element */ typedef struct _I2O_SGE_IMMEDIATE_DATA_ELEMENT { I2O_FLAGS_COUNT FlagsCount; } I2O_SGE_IMMEDIATE_DATA_ELEMENT, *PI2O_SGE_IMMEDIATE_DATA_ELEMENT; /* Immediate Data with Context Element */ typedef struct _I2O_SGE_IMMEDIATE_DATA_CONTEXT_ELEMENT { I2O_FLAGS_COUNT FlagsCount; U32 BufferContext; } I2O_SGE_IMMEDIATE_DATA_CONTEXT_ELEMENT, *PI2O_SGE_IMMEDIATE_DATA_CONTEXT_ELEMENT; /* Long Transaction Parameters Element */ typedef struct _I2O_SGE_LONG_TRANSACTION_ELEMENT { #if (defined(__BORLANDC__)) U32 LongElementLength; #else BF LongElementLength:I2O_SG_COUNT_SZ; BF Flags:I2O_SG_FLAGS_SZ; #endif U32 BufferContext; } I2O_SGE_LONG_TRANSACTION_ELEMENT, *PI2O_SGE_LONG_TRANSACTION_ELEMENT; /* Page List Scatter-Gather Element */ typedef struct _I2O_SGE_PAGE_ELEMENT { I2O_FLAGS_COUNT FlagsCount; U32 PhysicalAddress[1]; } I2O_SGE_PAGE_ELEMENT , *PI2O_SGE_PAGE_ELEMENT ; /* Page List with Context Scatter-Gather Element */ typedef struct _I2O_SGE_PAGE_CONTEXT_ELEMENT { I2O_FLAGS_COUNT FlagsCount; U32 BufferContext[1]; U32 PhysicalAddress[1]; } I2O_SGE_PAGE_CONTEXT_ELEMENT, *PI2O_SGE_PAGE_CONTEXT_ELEMENT; /* SGL Attribute Element */ typedef struct _I2O_SGE_SGL_ATTRIBUTES_ELEMENT { U16 SglAttributeFlags; U8 ElementLength; U8 Flags; U32 PageFrameSize; } I2O_SGE_SGL_ATTRIBUTES_ELEMENT, *PI2O_SGE_SGL_ATTRIBUTES_ELEMENT; /* Short Transaction Parameters Element */ typedef struct _I2O_SGE_SHORT_TRANSACTION_ELEMENT { U16 ClassFields; U8 ElementLength; U8 Flags; U32 BufferContext; } I2O_SGE_SHORT_TRANSACTION_ELEMENT, *PI2O_SGE_SHORT_TRANSACTION_ELEMENT; /* Simple Addressing Scatter-Gather Element */ typedef struct _I2O_SGE_SIMPLE_ELEMENT { I2O_FLAGS_COUNT FlagsCount; U32 PhysicalAddress; } I2O_SGE_SIMPLE_ELEMENT, *PI2O_SGE_SIMPLE_ELEMENT; /* Simple Addressing with Context Scatter-Gather Element */ typedef struct _I2O_SGE_SIMPLE_CONTEXT_ELEMENT { I2O_FLAGS_COUNT FlagsCount; U32 BufferContext[1]; U32 PhysicalAddress; } I2O_SGE_SIMPLE_CONTEXT_ELEMENT, *PI2O_SGE_SIMPLE_CONTEXT_ELEMENT; /* Transport Detail Element */ typedef struct _I2O_SGE_TRANSPORT_ELEMENT { #if (defined(__BORLANDC__)) U32 LongElementLength; #else BF LongElementLength:I2O_SG_COUNT_SZ; BF Flags:I2O_SG_FLAGS_SZ; #endif } I2O_SGE_TRANSPORT_ELEMENT, *PI2O_SGE_TRANSPORT_ELEMENT; typedef struct _I2O_SG_ELEMENT { union { /* Bit Bucket Element */ I2O_SGE_BIT_BUCKET_ELEMENT BitBucket; /* Chain Addressing Element */ I2O_SGE_CHAIN_ELEMENT Chain; /* Chain Addressing with Context Element */ I2O_SGE_CHAIN_CONTEXT_ELEMENT ChainContext; /* Ignore Scatter-Gather Element */ I2O_SGE_IGNORE_ELEMENT Ignore; /* Immediate Data Element */ I2O_SGE_IMMEDIATE_DATA_ELEMENT ImmediateData; /* Immediate Data with Context Element */ I2O_SGE_IMMEDIATE_DATA_CONTEXT_ELEMENT ImmediateDataContext; /* Long Transaction Parameters Element */ I2O_SGE_LONG_TRANSACTION_ELEMENT LongTransaction; /* Page List Element */ I2O_SGE_PAGE_ELEMENT Page; /* Page List with Context Element */ I2O_SGE_PAGE_CONTEXT_ELEMENT PageContext; /* SGL Attribute Element */ I2O_SGE_SGL_ATTRIBUTES_ELEMENT SGLAttribute; /* Short Transaction Parameters Element */ I2O_SGE_SHORT_TRANSACTION_ELEMENT ShortTransaction; /* Simple Addressing Element */ I2O_SGE_SIMPLE_ELEMENT Simple[1]; /* Simple Addressing with Context Element */ I2O_SGE_SIMPLE_CONTEXT_ELEMENT SimpleContext[1]; /* Transport Detail Element */ I2O_SGE_TRANSPORT_ELEMENT Transport; #if (defined(sun) && defined(u)) // there is a macro defined in Solaris sys/user.h for u, rename this to uSG } uSG ; #else } u ; #endif } I2O_SG_ELEMENT, *PI2O_SG_ELEMENT; /****************************************************************************/ /* Basic Parameter Group Access */ /****************************************************************************/ /* Operation Function Numbers */ #define I2O_PARAMS_OPERATION_FIELD_GET 0x0001 #define I2O_PARAMS_OPERATION_LIST_GET 0x0002 #define I2O_PARAMS_OPERATION_MORE_GET 0x0003 #define I2O_PARAMS_OPERATION_SIZE_GET 0x0004 #define I2O_PARAMS_OPERATION_TABLE_GET 0x0005 #define I2O_PARAMS_OPERATION_FIELD_SET 0x0006 #define I2O_PARAMS_OPERATION_LIST_SET 0x0007 #define I2O_PARAMS_OPERATION_ROW_ADD 0x0008 #define I2O_PARAMS_OPERATION_ROW_DELETE 0x0009 #define I2O_PARAMS_OPERATION_TABLE_CLEAR 0x000A /* Operations List Header */ typedef struct _I2O_PARAM_OPERATIONS_LIST_HEADER { U16 OperationCount; U16 Reserved; } I2O_PARAM_OPERATIONS_LIST_HEADER, *PI2O_PARAM_OPERATIONS_LIST_HEADER; /* Results List Header */ typedef struct _I2O_PARAM_RESULTS_LIST_HEADER { U16 ResultCount; U16 Reserved; } I2O_PARAM_RESULTS_LIST_HEADER, *PI2O_PARAM_RESULTS_LIST_HEADER; /* Read Operation Result Block Template Structure */ typedef struct _I2O_PARAM_READ_OPERATION_RESULT { U16 BlockSize; U8 BlockStatus; U8 ErrorInfoSize; /* Operations Results */ /* Pad (if any) */ /* ErrorInformation (if any) */ } I2O_PARAM_READ_OPERATION_RESULT, *PI2O_PARAM_READ_OPERATION_RESULT; typedef struct _I2O_TABLE_READ_OPERATION_RESULT { U16 BlockSize; U8 BlockStatus; U8 ErrorInfoSize; U16 RowCount; U16 MoreFlag; /* Operations Results */ /* Pad (if any) */ /* ErrorInformation (if any) */ } I2O_TABLE_READ_OPERATION_RESULT, *PI2O_TABLE_READ_OPERATION_RESULT; /* Error Information Template Structure */ typedef struct _I2O_PARAM_ERROR_INFO_TEMPLATE { U16 OperationCode; U16 GroupNumber; U16 FieldIdx; U8 AdditionalStatus; U8 NumberKeys; /* List of Key Values (variable) */ /* Pad (if any) */ } I2O_PARAM_ERROR_INFO_TEMPLATE, *PI2O_PARAM_ERROR_INFO_TEMPLATE; /* Operation Template for Specific Fields */ typedef struct _I2O_PARAM_OPERATION_SPECIFIC_TEMPLATE { U16 Operation; U16 GroupNumber; U16 FieldCount; U16 FieldIdx[1]; /* Pad (if any) */ } I2O_PARAM_OPERATION_SPECIFIC_TEMPLATE, *PI2O_PARAM_OPERATION_SPECIFIC_TEMPLATE; /* Operation Template for All Fields */ typedef struct _I2O_PARAM_OPERATION_ALL_TEMPLATE { U16 Operation; U16 GroupNumber; U16 FieldCount; /* Pad (if any) */ } I2O_PARAM_OPERATION_ALL_TEMPLATE, *PI2O_PARAM_OPERATION_ALL_TEMPLATE; /* Operation Template for All List Fields */ typedef struct _I2O_PARAM_OPERATION_ALL_LIST_TEMPLATE { U16 Operation; U16 GroupNumber; U16 FieldCount; U16 KeyCount; U8 KeyValue; /* Pad (if any) */ } I2O_PARAM_OPERATION_ALL_LIST_TEMPLATE, *PI2O_PARAM_OPERATION_ALL_LIST_TEMPLATE; /* Modify Operation Result Block Template Structure */ typedef struct _I2O_PARAM_MODIFY_OPERATION_RESULT { U16 BlockSize; U8 BlockStatus; U8 ErrorInfoSize; /* ErrorInformation (if any) */ } I2O_PARAM_MODIFY_OPERATION_RESULT, *PI2O_PARAM_MODIFY_OPERATION_RESULT; /* Operation Template for Row Delete */ typedef struct _I2O_PARAM_OPERATION_ROW_DELETE_TEMPLATE { U16 Operation; U16 GroupNumber; U16 RowCount; U8 KeyValue; } I2O_PARAM_OPERATION_ROW_DELETE_TEMPLATE, *PI2O_PARAM_OPERATION_ROW_DELETE_TEMPLATE; /* Operation Template for Table Clear */ typedef struct _I2O_PARAM_OPERATION_TABLE_CLEAR_TEMPLATE { U16 Operation; U16 GroupNumber; } I2O_PARAM_OPERATION_TABLE_CLEAR_TEMPLATE, *PI2O_PARAM_OPERATION_TABLE_CLEAR_TEMPLATE; /* Status codes and Error Information for Parameter functions */ #define I2O_PARAMS_STATUS_SUCCESS 0x00 #define I2O_PARAMS_STATUS_BAD_KEY_ABORT 0x01 #define I2O_PARAMS_STATUS_BAD_KEY_CONTINUE 0x02 #define I2O_PARAMS_STATUS_BUFFER_FULL 0x03 #define I2O_PARAMS_STATUS_BUFFER_TOO_SMALL 0x04 #define I2O_PARAMS_STATUS_FIELD_UNREADABLE 0x05 #define I2O_PARAMS_STATUS_FIELD_UNWRITEABLE 0x06 #define I2O_PARAMS_STATUS_INSUFFICIENT_FIELDS 0x07 #define I2O_PARAMS_STATUS_INVALID_GROUP_ID 0x08 #define I2O_PARAMS_STATUS_INVALID_OPERATION 0x09 #define I2O_PARAMS_STATUS_NO_KEY_FIELD 0x0A #define I2O_PARAMS_STATUS_NO_SUCH_FIELD 0x0B #define I2O_PARAMS_STATUS_NON_DYNAMIC_GROUP 0x0C #define I2O_PARAMS_STATUS_OPERATION_ERROR 0x0D #define I2O_PARAMS_STATUS_SCALAR_ERROR 0x0E #define I2O_PARAMS_STATUS_TABLE_ERROR 0x0F #define I2O_PARAMS_STATUS_WRONG_GROUP_TYPE 0x10 /****************************************************************************/ /* GROUP Parameter Groups */ /****************************************************************************/ /* GROUP Configuration and Operating Structures and Defines */ /* Groups Numbers */ #define I2O_UTIL_PARAMS_DESCRIPTOR_GROUP_NO 0xF000 #define I2O_UTIL_PHYSICAL_DEVICE_TABLE_GROUP_NO 0xF001 #define I2O_UTIL_CLAIMED_TABLE_GROUP_NO 0xF002 #define I2O_UTIL_USER_TABLE_GROUP_NO 0xF003 #define I2O_UTIL_PRIVATE_MESSAGE_EXTENSIONS_GROUP_NO 0xF005 #define I2O_UTIL_AUTHORIZED_USER_TABLE_GROUP_NO 0xF006 #define I2O_UTIL_DEVICE_IDENTITY_GROUP_NO 0xF100 #define I2O_UTIL_DDM_IDENTITY_GROUP_NO 0xF101 #define I2O_UTIL_USER_INFORMATION_GROUP_NO 0xF102 #define I2O_UTIL_SGL_OPERATING_LIMITS_GROUP_NO 0xF103 #define I2O_UTIL_SENSORS_GROUP_NO 0xF200 /* UTIL Group F000h - GROUP DESCRIPTORS Parameter Group */ #define I2O_UTIL_GROUP_PROPERTIES_GROUP_TABLE 0x01 #define I2O_UTIL_GROUP_PROPERTIES_ROW_ADDITION 0x02 #define I2O_UTIL_GROUP_PROPERTIES_ROW_DELETION 0x04 #define I2O_UTIL_GROUP_PROPERTIES_CLEAR_OPERATION 0x08 typedef struct _I2O_UTIL_GROUP_DESCRIPTOR_TABLE { U16 GroupNumber; U16 FieldCount; U16 RowCount; U8 Properties; U8 reserved; } I2O_UTIL_GROUP_DESCRIPTOR_TABLE, *PI2O_UTIL_GROUP_DESCRIPTOR_TABLE; /* UTIL Group F001h - Physical Device Table Parameter Group */ typedef struct _I2O_UTIL_PHYSICAL_DEVICE_TABLE { U32 AdapterID; } I2O_UTIL_PHYSICAL_DEVICE_TABLE, *PI2O_UTIL_PHYSICAL_DEVICE_TABLE; /* UTIL Group F002h - Claimed Table Parameter Group */ typedef struct _I2O_UTIL_CLAIMED_TABLE { U16 ClaimedTID; } I2O_UTIL_CLAIMED_TABLE, *PI2O_UTIL_CLAIMED_TABLE; /* UTIL Group F003h - User Table Parameter Group */ typedef struct _I2O_UTIL_USER_TABLE { U16 Instance; U16 UserTID; U8 ClaimType; U8 reserved1; U16 reserved2; } I2O_UTIL_USER_TABLE, *PI2O_UTIL_USER_TABLE; /* UTIL Group F005h - Private Message Extensions Parameter Group */ typedef struct _I2O_UTIL_PRIVATE_MESSAGE_EXTENSIONS_TABLE { U16 ExtInstance; U16 OrganizationID; U16 XFunctionCode; } I2O_UTIL_PRIVATE_MESSAGE_EXTENSIONS_TABLE, *PI2O_UTIL_PRIVATE_MESSAGE_EXTENSIONS_TABLE; /* UTIL Group F006h - Authorized User Table Parameter Group */ typedef struct _I2O_UTIL_AUTHORIZED_USER_TABLE { U16 AlternateTID; } I2O_UTIL_AUTHORIZED_USER_TABLE, *PI2O_UTIL_AUTHORIZED_USER_TABLE; /* UTIL Group F100h - Device Identity Parameter Group */ typedef struct _I2O_UTIL_DEVICE_IDENTITY_SCALAR { U32 ClassID; U16 OwnerTID; U16 ParentTID; U8 VendorInfo[I2O_DEVID_VENDOR_INFO_SZ]; U8 ProductInfo[I2O_DEVID_PRODUCT_INFO_SZ]; U8 Description[I2O_DEVID_DESCRIPTION_SZ]; U8 ProductRevLevel[I2O_DEVID_REV_LEVEL_SZ]; U8 SNFormat; U8 SerialNumber[I2O_MAX_SERIAL_NUMBER_SZ]; } I2O_UTIL_DEVICE_IDENTITY_SCALAR, *PI2O_UTIL_DEVICE_IDENTITY_SCALAR; /* UTIL Group F101h - DDM Identity Parameter Group */ typedef struct _I2O_UTIL_DDM_IDENTITY_SCALAR { U16 DdmTID; U8 ModuleName[I2O_MODULE_NAME_SZ]; U8 ModuleRevLevel[I2O_DEVID_REV_LEVEL_SZ]; U8 SNFormat; U8 SerialNumber[I2O_MAX_SERIAL_NUMBER_SZ]; } I2O_UTIL_DDM_IDENTITY_SCALAR, *PI2O_UTIL_DDM_IDENTITY_SCALAR; /* UTIL Group F102h - User Information Parameter Group */ #define I2O_USER_DEVICE_NAME_SZ 64 #define I2O_USER_SERVICE_NAME_SZ 64 #define I2O_USER_PHYSICAL_LOCATION_SZ 64 typedef struct _I2O_UTIL_USER_INFORMATION_SCALAR { U8 DeviceName[I2O_USER_DEVICE_NAME_SZ]; U8 ServiceName[I2O_USER_SERVICE_NAME_SZ]; U8 PhysicalLocation[I2O_USER_PHYSICAL_LOCATION_SZ]; U32 InstanceNumber; } I2O_UTIL_USER_INFORMATION_SCALAR, *PI2O_UTIL_USER_INFORMATION_SCALAR; /* UTIL Group F103h - SGL Operating Limits Parameter Group */ typedef struct _I2O_UTIL_SGL_OPERATING_LIMITS_SCALAR { U32 SglChainSize; U32 SglChainSizeMax; U32 SglChainSizeTarget; U16 SglFragCount; U16 SglFragCountMax; U16 SglFragCountTarget; } I2O_UTIL_SGL_OPERATING_LIMITS_SCALAR, *PI2O_UTIL_SGL_OPERATING_LIMITS_SCALAR; /* UTIL Group F200h - Sensors Parameter Group */ #define I2O_SENSOR_COMPONENT_OTHER 0x00 #define I2O_SENSOR_COMPONENT_PLANAR_LOGIC_BOARD 0x01 #define I2O_SENSOR_COMPONENT_CPU 0x02 #define I2O_SENSOR_COMPONENT_CHASSIS 0x03 #define I2O_SENSOR_COMPONENT_POWER_SUPPLY 0x04 #define I2O_SENSOR_COMPONENT_STORAGE 0x05 #define I2O_SENSOR_COMPONENT_EXTERNAL 0x06 #define I2O_SENSOR_SENSOR_CLASS_ANALOG 0x00 #define I2O_SENSOR_SENSOR_CLASS_DIGITAL 0x01 #define I2O_SENSOR_SENSOR_TYPE_OTHER 0x00 #define I2O_SENSOR_SENSOR_TYPE_THERMAL 0x01 #define I2O_SENSOR_SENSOR_TYPE_DC_VOLTAGE 0x02 #define I2O_SENSOR_SENSOR_TYPE_AC_VOLTAGE 0x03 #define I2O_SENSOR_SENSOR_TYPE_DC_CURRENT 0x04 #define I2O_SENSOR_SENSOR_TYPE_AC_CURRENT 0x05 #define I2O_SENSOR_SENSOR_TYPE_DOOR_OPEN 0x06 #define I2O_SENSOR_SENSOR_TYPE_FAN_OPERATIONAL 0x07 #define I2O_SENSOR_SENSOR_STATE_NORMAL 0x00 #define I2O_SENSOR_SENSOR_STATE_ABNORMAL 0x01 #define I2O_SENSOR_SENSOR_STATE_UNKNOWN 0x02 #define I2O_SENSOR_SENSOR_STATE_LOW_CAT 0x03 #define I2O_SENSOR_SENSOR_STATE_LOW 0x04 #define I2O_SENSOR_SENSOR_STATE_LOW_WARNING 0x05 #define I2O_SENSOR_SENSOR_STATE_HIGH_WARNING 0x06 #define I2O_SENSOR_SENSOR_STATE_HIGH 0x07 #define I2O_SENSOR_SENSOR_STATE_HIGH_CAT 0x08 #define I2O_SENSOR_EVENT_ENABLE_STATE_CHANGE 0x0001 #define I2O_SENSOR_EVENT_ENABLE_LOW_CATASTROPHIC 0x0002 #define I2O_SENSOR_EVENT_ENABLE_LOW_READING 0x0004 #define I2O_SENSOR_EVENT_ENABLE_LOW_WARNING 0x0008 #define I2O_SENSOR_EVENT_ENABLE_CHANGE_TO_NORMAL 0x0010 #define I2O_SENSOR_EVENT_ENABLE_HIGH_WARNING 0x0020 #define I2O_SENSOR_EVENT_ENABLE_HIGH_READING 0x0040 #define I2O_SENSOR_EVENT_ENABLE_HIGH_CATASTROPHIC 0x0080 typedef struct _I2O_UTIL_SENSORS_TABLE { U16 SensorInstance; U8 Component; U16 ComponentInstance; U8 SensorClass; U8 SensorType; S8 ScalingExponent; S32 ActualReading; S32 MinimumReading; S32 Low2LowCatThreshold; S32 LowCat2LowThreshold; S32 LowWarn2LowThreshold; S32 Low2LowWarnThreshold; S32 Norm2LowWarnThreshold; S32 LowWarn2NormThreshold; S32 NominalReading; S32 HiWarn2NormThreshold; S32 Norm2HiWarnThreshold; S32 High2HiWarnThreshold; S32 HiWarn2HighThreshold; S32 HiCat2HighThreshold; S32 Hi2HiCatThreshold; S32 MaximumReading; U8 SensorState; U16 EventEnable; } I2O_UTIL_SENSORS_TABLE, *PI2O_UTIL_SENSORS_TABLE; PRAGMA_PACK_POP PRAGMA_ALIGN_POP #endif /* I2O_MESSAGE_HDR */ raidutils-0.0.6.orig/raideng/i2omstor.h0000664000175000000620000010312110044153310017665 0ustar bapstaff00000000000000/**************************************************************** * Copyright 1999 I2O Special Interest Group (I2O SIG). All rights reserved. * All rights reserved * * TERMS AND CONDITIONS OF USE * * This header file, and any modifications of this header file, are provided * contingent upon your agreement and adherence to the here-listed terms and * conditions. By accepting and/or using this header file, you agree to abide * by these terms and conditions and that these terms and conditions will be * construed and governed in accordance with the laws of the State of California, * without reference to conflict-of-law provisions. If you do not agree * to these terms and conditions, please delete this file, and any copies, * permanently, without making any use thereof. * * THIS HEADER FILE IS PROVIDED FREE OF CHARGE ON AN AS-IS BASIS WITHOUT * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE. I2O SIG DOES NOT WARRANT THAT THIS HEADER FILE WILL MEET THE * USER'S REQUIREMENTS OR THAT ITS OPERATION WILL BE UNINTERRUPTED OR * ERROR-FREE. * * I2O SIG DISCLAIMS ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF * ANY PROPRIETARY RIGHTS, RELATING TO THE IMPLEMENTATION OF THE I2O * SPECIFICATIONS. I2O SIG DOES NOT WARRANT OR REPRESENT THAT SUCH * IMPLEMENTATIONS WILL NOT INFRINGE SUCH RIGHTS. * * THE USER OF THIS HEADER FILE SHALL HAVE NO RECOURSE TO I2O SIG FOR ANY * ACTUAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOST DATA * OR LOST PROFITS ARISING OUT OF THE USE OR INABILITY TO USE THIS PROGRAM. * * I2O SIG grants the user of this header file a license to copy, distribute, * and modify it, for any purpose, under the following terms. Any copying, * distribution, or modification of this header file must not delete or alter * the copyright notice of I2O SIG or any of these Terms and Conditions. * * Any distribution of this header file must not include a charge for the * header file (unless such charges are strictly for the physical acts of * copying or transferring copies). However, distribution of a product in * which this header file is embedded may include a charge so long as any * such charge does not include any charge for the header file itself. * * Any modification of this header file constitutes a derivative work based * on this header file. Any distribution of such derivative work: (1) must * include prominent notices that the header file has been changed from the * original, together with the dates of any changes; (2) automatically includes * this same license to the original header file from I2O SIG, without any * restriction thereon from the distributing user; and (3) must include a * grant of license of the modified file under the same terms and conditions * as these Terms and Conditions. * * The I2O SIG Web site can be found at: http://www.i2osig.org * * The I2O SIG encourages you to deposit derivative works based on this * header file at the I2O SIG Web site. Furthermore, to become a Registered * Developer of the I2O SIG, sign up at the Web site or call 415.750.8352 * (United States). ****************************************************************/ #if !defined(I2O_MSTOR_HDR) #define I2O_MSTOR_HDR #include "i2omsg.h" /* Include the Base Message file */ #define I2OMSTOR_REV 1_5_1 /* Header file revision string */ /***************************************************************************** * * I2OMStor.h -- I2O Random Block Storage Devices Class Message defintion file * * This file contains information presented in Chapter 6, Section 4 of * the I2O Specification. * * Revision History: (Revision History tracks the revision number of the I2O * specification) * * .92 - First marked revsion used for Proof of Concept. * .93 - Change to match the rev .93 of the spec. * .95 - Updated to Rev .95 of 2/5/96. * 1.00 - Checked and Updated against spec version 1.00 4/9/96. * 1.xx - Updated to the 1.x version of the I2O Specification (11/04/96). * (RAID disk parameter group definition is not complete.) * 1.xx - 11/06/96 1) Changed to new SGL addressing nomenclature. * 2) Changed I2O_BSA_FLAGS reference to I2O_BSA_CTL_FLAGS. * 3) Added BSA request message definitions. * 4) Commented out subclass and RAID request message definitions. * 1.xx - 11/11/96 * 1) Updated BSA Cache Control parameters group definitions. * 1.xx - 11/13/96 * 1) Changed messages definitions from "I20" to "I2O". * 2) Fixed I2O_BSA_MEDIA_EJECT references. * 3) Added "DSC" to Detailed Status Code definitions. * 1.xx 11/15/96 - Added #pragma statments for i960. * 1.5d 03/05/97 - Update for spec. draft version 1.5d. * 1) Added "_BSA" designation to the three reply messages. * 2) Added BSA_TIMEOUT DSC. * 1.5d 04/11/97 - Corrections from review cycle: * 1) Added reserved1 field to OPERATIONAL_CONTROL parameter group. * 2) Added reserved2 field to ERROR_LOG parameter group. * 3) Added reserved1 field to HIST_STATS parameter group. * 4) Added reserved2 field to HIST_STATS parameter group. * 5) Added reserved1 field to STORAGE_HIST_STATS parameter group. * 6) Added reserved2 field to STORAGE_HIST_STATS parameter group. * 7) Removed double underscore from MEDIA_INFO parameter group. * 1.5.1 05/02/97 - Corrections from review cycle: * 1) Change reply templates to include RetryCount field. * 2) Add Aborted Operation reply message. * 3) Remove #include for i2outil.h. * 4) Add field to 32-bit align CACHE_CONTROL parameter group. * 5) Add optional RAID parameter group definitions. * 6) Add fields to 32-bit align REDUNDANCY parameter group. * 7) Add fields to 32-bit align COMPONENT_SPARES parm group. * 8) Add fields to 32-bit align ASSOCIATION parameter group. * 9) Add revision string. * 10) Convert tabs to spaces. * 11) New disclaimer. * *****************************************************************************/ /* NOTES: Gets, reads, receives, etc. are all even numbered functions. Sets, writes, sends, etc. are all odd numbered functions. Functions that both send and receive data can be either but an attempt is made to use the function number that indicates the greater transfer amount. Functions that do not send or receive data use odd function numbers. Some functions are synonyms like read, receive and send, write. All common functions will have a code of less than 0x80. Unique functions to a class will start at 0x80. Executive Functions start at 0xA0. Utility Message function codes range from 0 - 0x1f Base Message function codes range from 0x20 - 0xfe Private Message function code is 0xff. */ PRAGMA_ALIGN_PUSH PRAGMA_PACK_PUSH /****************************************************************************/ /* Random Block Storage Class specific functions Although the names are block storage class specific, the values assigned are common with other classes when applicable. */ #define I2O_BSA_BLOCK_READ 0x30 #define I2O_BSA_BLOCK_REASSIGN 0x71 #define I2O_BSA_BLOCK_WRITE 0x31 #define I2O_BSA_BLOCK_WRITE_VERIFY 0x33 #define I2O_BSA_CACHE_FLUSH 0x37 #define I2O_BSA_DEVICE_RESET 0x27 #define I2O_BSA_MEDIA_EJECT 0x43 #define I2O_BSA_MEDIA_FORMAT 0x45 #define I2O_BSA_MEDIA_LOCK 0x49 #define I2O_BSA_MEDIA_MOUNT 0x41 #define I2O_BSA_MEDIA_UNLOCK 0x4B #define I2O_BSA_MEDIA_VERIFY 0x35 #define I2O_BSA_POWER_MANAGEMENT 0x70 #define I2O_BSA_STATUS_CHECK 0x25 /* RAID Additions. */ /* #define I2O_MANAGEMENT 0x81 #define I2O_DIAGNOSTICS 0x83 #define I2O_INSTRUMENTATION 0x85 */ /* Detailed Status Codes for Random Block Storage operations */ #define I2O_BSA_DSC_SUCCESS 0x0000 #define I2O_BSA_DSC_MEDIA_ERROR 0x0001 #define I2O_BSA_DSC_ACCESS_ERROR 0x0002 #define I2O_BSA_DSC_DEVICE_FAILURE 0x0003 #define I2O_BSA_DSC_DEVICE_NOT_READY 0x0004 #define I2O_BSA_DSC_MEDIA_NOT_PRESENT 0x0005 #define I2O_BSA_DSC_MEDIA_LOCKED 0x0006 #define I2O_BSA_DSC_MEDIA_FAILURE 0x0007 #define I2O_BSA_DSC_PROTOCOL_FAILURE 0x0008 #define I2O_BSA_DSC_BUS_FAILURE 0x0009 #define I2O_BSA_DSC_ACCESS_VIOLATION 0x000A #define I2O_BSA_DSC_WRITE_PROTECTED 0x000B #define I2O_BSA_DSC_DEVICE_RESET 0x000C #define I2O_BSA_DSC_VOLUME_CHANGED 0x000D #define I2O_BSA_DSC_TIMEOUT 0x000E /****************************************************************************/ /* Block Storage Parameter Groups */ /****************************************************************************/ /* Block Storage Configuration and Operating Structures and Defines */ /* Block Storage Parameter Groups */ #define I2O_BSA_DEVICE_INFO_GROUP_NO 0x0000 #define I2O_BSA_OPERATIONAL_CONTROL_GROUP_NO 0x0001 #define I2O_BSA_POWER_CONTROL_GROUP_NO 0x0002 #define I2O_BSA_CACHE_CONTROL_GROUP_NO 0x0003 #define I2O_BSA_MEDIA_INFO_GROUP_NO 0x0004 #define I2O_BSA_ERROR_LOG_GROUP_NO 0x0005 /* Block Storage Optional Historical Statistics Parameter Groups */ #define I2O_BSA_HISTORICAL_STATS_CONTROL_GROUP_NO 0x0180 #define I2O_BSA_STORAGE_HISTORICAL_STATS_GROUP_NO 0x0181 #define I2O_BSA_CACHE_HISTORICAL_STATS_GROUP_NO 0x0182 /* Block Storage Optional RAID Disk Parameter Groups */ #define I2O_BSA_VOLUME_SET_INFORMATION_GROUP_NO 0x0200 #define I2O_BSA_PROTECTED_SPACE_EXTENT_GROUP_NO 0x0201 #define I2O_BSA_AGGREGATE_PROT_SPACE_EXT_GROUP_NO 0x0202 #define I2O_BSA_PHYSICAL_EXTENT_GROUP_NO 0x0203 #define I2O_BSA_AGGREGATE_PHYSICAL_EXT_GROUP_NO 0x0204 #define I2O_BSA_REDUNDANCY_GROUP_NO 0x0205 #define I2O_BSA_COMPONENT_SPARES_GROUP_NO 0x0206 #define I2O_BSA_ASSOCIATION_TABLE_GROUP_NO 0x0207 /* - 0000h - Device Information Parameters Group defines */ /* Device Type */ #define I2O_BSA_DEVICE_TYPE_DIRECT 0x00 #define I2O_BSA_DEVICE_TYPE_WORM 0x04 #define I2O_BSA_DEVICE_TYPE_CDROM 0x05 #define I2O_BSA_DEVICE_TYPE_OPTICAL 0x07 /* Device Capability Support */ #define I2O_BSA_DEV_CAP_CACHING 0x00000001 #define I2O_BSA_DEV_CAP_MULTI_PATH 0x00000002 #define I2O_BSA_DEV_CAP_DYNAMIC_CAPACITY 0x00000004 #define I2O_BSA_DEV_CAP_REMOVABLE_MEDIA 0x00000008 #define I2O_BSA_DEV_CAP_REMOVEABLE_DEVICE 0x00000010 #define I2O_BSA_DEV_CAP_READ_ONLY 0x00000020 #define I2O_BSA_DEV_CAP_LOCKOUT 0x00000040 #define I2O_BSA_DEV_CAP_BOOT_BYPASS 0x00000080 #define I2O_BSA_DEV_CAP_COMPRESSION 0x00000100 #define I2O_BSA_DEV_CAP_DATA_SECURITY 0x00000200 #define I2O_BSA_DEV_CAP_RAID 0x00000400 /* Device States */ #define I2O_BSA_DEV_STATE_CACHING 0x00000001 #define I2O_BSA_DEV_STATE_POWERED_ON 0x00000002 #define I2O_BSA_DEV_STATE_READY 0x00000004 #define I2O_BSA_DEV_STATE_MEDIA_LOADED 0x00000008 #define I2O_BSA_DEV_STATE_DEVICE_LOADED 0x00000010 #define I2O_BSA_DEV_STATE_READ_ONLY 0x00000020 #define I2O_BSA_DEV_STATE_LOCKOUT 0x00000040 #define I2O_BSA_DEV_STATE_BOOT_BYPASS 0x00000080 #define I2O_BSA_DEV_STATE_COMPRESSION 0x00000100 #define I2O_BSA_DEV_STATE_DATA_SECURITY 0x00000200 #define I2O_BSA_DEV_STATE_RAID 0x00000400 /* - 0001h - Operational Control Parameters Group defines */ /* No definition required */ /* - 0002h - Power Control Parameters Group defines */ /* On Access */ #define I2O_BSA_POWERED_UP_ON_ACCESS 0x00000001 #define I2O_BSA_LOAD_ON_ACCESS 0x00000002 /* - 0003h - Cache Control Parameters Group defines */ /* Write Policy */ #define I2O_BSA_NO_WRITE_CACHE 0x00 #define I2O_BSA_WRITE_TO_CACHE 0x01 #define I2O_BSA_WRITE_THRU_CACHE 0x02 /* Read Policy */ #define I2O_BSA_NO_READ_CACHE 0x00 #define I2O_BSA_READ_CACHE 0x01 #define I2O_BSA_READ_AHEAD_CACHE 0x02 #define I2O_BSA_READ_READ_AHEAD_CACHE 0x03 /* Error Correction */ #define I2O_BSA_ERR_COR_NONE 0x00 #define I2O_BSA_ERR_COR_UNKNOWN 0x01 #define I2O_BSA_ERR_COR_OTHER 0x02 #define I2O_BSA_ERR_COR_PARITY 0x03 #define I2O_BSA_ERR_COR_SINGLE_BIT_ECC 0x04 #define I2O_BSA_ERR_COR_MULTI_BIT_ECC 0x05 /* - 0004h - Media Information Parameters Group defines */ /* No definition required */ /* - 0005h - Error Log Parameters Group defines */ /* No definition required */ /* - 0180h - Historical Statistics Control Parameters Group defines */ /* Statistis Control */ #define I2O_BSA_STAT_CTL_STORAGE_ENABLE 0x01 #define I2O_BSA_STAT_CTL_CACHE_ENABLE 0x02 /* - 0181h - Storage Historical Statistics Parameter Group defines */ /* No definition required */ /* - 0182h - Cache Historical Statistics Parameter Group defines */ /* No definition required */ /* - 0200H - Volume Set Information Parameter Group defines */ /* No definition required */ /* - 0201h - Protected Space Extent Parameter Group defines */ /* Data Stripe Granularity */ #define I2O_BSA_DATA_STRIPE_OTHER 0x00 #define I2O_BSA_DATA_STRIPE_UNKNOWN 0x01 #define I2O_BSA_DATA_STRIPE_BITS 0x02 #define I2O_BSA_DATA_STRIPE_BYTES 0x03 #define I2O_BSA_DATA_STRIPE_16BIT_WORDS 0x04 #define I2O_BSA_DATA_STRIPE_32BIT_DWORDS 0x05 #define I2O_BSA_DATA_STRIPE_BLOCKS 0x06 /* - 0202h - Aggregate Protected Space Extent Parameter Group defines */ /* No definition required */ /* - 0203h - Physical Extent Parameter Group defines */ /* Granularity Unit */ #define I2O_BSA_GRANULARITY_OTHER 0x00 #define I2O_BSA_GRANULARITY_UNKNOWN 0x01 #define I2O_BSA_GRANULARITY_BITS 0x02 #define I2O_BSA_GRANULARITY_BYTES 0x03 #define I2O_BSA_GRANULARITY_16BIT_WORDS 0x04 #define I2O_BSA_GRANULARITY_32BIT_DWORDS 0x05 #define I2O_BSA_GRANULARITY_BLOCKS 0x06 /* - 0204h - Aggregate Physical Extent Parameter Group defines */ /* No definition required */ /* - 0205h - Redundancy Parameter Group defines */ /* Redundancy Type */ #define I2O_BSA_REDUNDANCY_OTHER 0x00 #define I2O_BSA_REDUNDANCY_UNKNOWN 0x01 #define I2O_BSA_REDUNDANCY_NONE 0x02 #define I2O_BSA_REDUNDANCY_COPY 0x03 #define I2O_BSA_REDUNDANCY_XOR 0x04 #define I2O_BSA_REDUNDANCY_P_Q 0x05 #define I2O_BSA_REDUNDANCY_S 0x06 #define I2O_BSA_REDUNDANCY_P_S 0x07 /* - 0206h - Component Spares Parameter Group defines */ /* Spare Functioning State */ #define I2O_BSA_SPARE_STATE_OTHER 0x00 #define I2O_BSA_SPARE_STATE_UNKNOWN 0x01 #define I2O_BSA_SPARE_STATE_INACTIVE 0x02 #define I2O_BSA_SPARE_STATE_ACTIVE 0x03 #define I2O_BSA_SPARE_STATE_LOAD_BALANCE 0x04 /* - 0207h - Association Table Parameter Group defines */ /* Type */ #define I2O_BSA_ASSOC_TYPE_PHYSICAL 0x00 #define I2O_BSA_ASSOC_TYPE_LOGICAL 0x01 #define I2O_BSA_ASSOC_TYPE_LOG_TO_PHYS 0x02 #define I2O_BSA_ASSOC_TYPE_PROTECTION 0x03 #define I2O_BSA_ASSOC_TYPE_SPARE 0x04 #define I2O_BSA_ASSOC_TYPE_CACHE 0x05 #define I2O_BSA_ASSOC_TYPE_SOFTWARE 0x06 /* Object 1 Type */ #define I2O_BSA_OBJECT_1_CONTROLLER 0x00 #define I2O_BSA_OBJECT_1_DEVICE 0x01 #define I2O_BSA_OBJECT_1_BUS_PORT 0x02 #define I2O_BSA_OBJECT_1_VOLUME_SET 0x03 #define I2O_BSA_OBJECT_1_PROT_SPACE_EXT 0x04 #define I2O_BSA_OBJECT_1_AGG_PROT_SPACE_EXT 0x05 #define I2O_BSA_OBJECT_1_PHYSICAL_EXT 0x06 #define I2O_BSA_OBJECT_1_AGG_PHYSICAL_EXT 0x07 #define I2O_BSA_OBJECT_1_REDUNDANCY 0x08 #define I2O_BSA_OBJECT_1_CACHE 0x09 #define I2O_BSA_OBJECT_1_SOFTWARE 0x0A /* Object 2 Type */ #define I2O_BSA_OBJECT_2_CONTROLLER 0x00 #define I2O_BSA_OBJECT_2_DEVICE 0x01 #define I2O_BSA_OBJECT_2_BUS_PORT 0x02 #define I2O_BSA_OBJECT_2_VOLUME_SET 0x03 #define I2O_BSA_OBJECT_2_PROT_SPACE_EXT 0x04 #define I2O_BSA_OBJECT_2_AGG_PROT_SPACE_EXT 0x05 #define I2O_BSA_OBJECT_2_PHYSICAL_EXT 0x06 #define I2O_BSA_OBJECT_2_AGG_PHYSICAL_EXT 0x07 #define I2O_BSA_OBJECT_2_REDUNDANCY 0x08 #define I2O_BSA_OBJECT_2_CACHE 0x09 #define I2O_BSA_OBJECT_2_SOFTWARE 0x0A /* Block Storage Group 0000h - Device Information Parameter Group */ typedef struct _I2O_BSA_DEVICE_INFO_SCALAR { U8 DeviceType; U8 NumberOfPaths; U16 PowerState; U32 BlockSize; U64 DeviceCapacity; U32 DeviceCapabilitySupport; U32 DeviceState; } I2O_BSA_DEVICE_INFO_SCALAR, *PI2O_BSA_DEVICE_INFO_SCALAR; /* Block Storage Group 0001h - Operational Control Parameter Group */ typedef struct _I2O_BSA_OPERATIONAL_CONTROL_SCALAR { U8 AutoReassign; U8 ReassignTolerance; U8 RetryAttempts; U8 reserved1; U32 ReassignSize; U32 ExpectedTimeout; U32 RWVTimeout; U32 RWVTimeoutBase; U32 TimeoutBase; U32 OrderedRequestDepth; U32 AtomicWriteSize; } I2O_BSA_OPERATIONAL_CONTROL_SCALAR, *PI2O_BSA_OPERATIONAL_CONTROL_SCALAR; /* Block Storage Group 0002h - Power Control Parameter Group */ typedef struct _I2O_BSA_POWER_CONTROL_SCALAR { U32 PowerdownTimeout; U32 OnAccess; } I2O_BSA_POWER_CONTROL_SCALAR, *PI2O_BSA_POWER_CONTROL_SCALAR; /* Block Storage Group 0003h - Cache Control Parameter Group */ typedef struct _I2O_BSA_CACHE_CONTROL_SCALAR { U32 TotalCacheSize; U32 ReadCacheSize; U32 WriteCacheSize; U8 WritePolicy; U8 ReadPolicy; U8 ErrorCorrection; U8 reserved1; /* Note: not in 1.5 spec. */ } I2O_BSA_CACHE_CONTROL_SCALAR, *PI2O_BSA_CACHE_CONTROL_SCALAR; /* Block Storage Group 0004h - Media Information Parameter Group */ typedef struct _I2O_BSA_MEDIA_INFO_SCALAR { U64 Capacity; U32 BlockSize; } I2O_BSA_MEDIA_INFO_SCALAR, *PI2O_BSA_MEDIA_INFO_SCALAR; /* Block Storage Group 0005h - Error Log Parameter Group */ typedef struct _I2O_BSA_ERROR_LOG_TABLE { U16 ErrorDataIndex; U8 Function; U8 RetryCount; U16 DetailedErrorCode; U16 reserved2; U64 TimeStamp; U32 UserInfo; } I2O_BSA_ERROR_LOG_TABLE, *PI2O_BSA_ERROR_LOG_TABLE; /* Block Storage Group 0180h - Optional Historical STATS Support/Control */ typedef struct _I2O_BSA_HIST_STATS_SCALAR { U8 StatisticsControl; U8 reserved1; U16 reserved2; U32 StorageStatistics; U32 CacheStatistics; } I2O_BSA_HIST_STATS_SCALAR, *PI2O_BSA_HIST_STATS_SCALAR; /* Block Storage Group 0181h - Optional Storage Historical STATS */ typedef struct _I2O_BSA_STORAGE_HIST_STATS_SCALAR { U64 ReadCommands; U64 WriteCommands; U8 DataUnit; U8 reserved1; U16 reserved2; U64 IORange1Read; U64 IORange2Read; U64 IORange3Read; U64 IORange4Read; U64 IORange1Write; U64 IORange2Write; U64 IORange3Write; U64 IORange4Write; U64 NumberSeeks; } I2O_BSA_STORAGE_HIST_STATS_SCALAR, *PI2O_BSA_STORAGE_HIST_STATS_SCALAR; /* Block Storage Group 0182h - Optional Cache Historical STATS */ typedef struct _I2O_BSA_CACHE_HIST_STATS_SCALAR { U64 CacheAccess; U64 CacheHit; U64 PartialCacheHit; U64 HitDataSize; U32 ValidUsage; U32 DirtyUsage; U32 TimeLastFault; U32 LastFaultFailure; } I2O_BSA_CACHE_HIST_STATS_SCALAR, *PI2O_BSA_CACHE_HIST_STATS_SCALAR; /* Block Storage Group 0200h - Optional Volume Set Information */ typedef struct _I2O_BSA_VOLUME_INFO_SCALAR { U8 Name[64]; U64 TotalStorageCapacity; U64 StripeLength; U64 InterleaveDepth; } I2O_BSA_VOLUME_INFO_SCALAR, *PI2O_BSA_VOLUME_INFO_SCALAR; /* Block Storage Group 0201h - Optional Protected Space Extent */ typedef struct _I2O_BSA_PROT_SPACE_EXT_SCALAR { U64 StartAddress; U64 NumberBlocks; U32 BlockSize; U32 DataStripeGranularity; U32 DataStripeLength; } I2O_BSA_PROT_SPACE_EXT_SCALAR, *PI2O_BSA_PROT_SPACE_EXT_SCALAR; /* Block Storage Group 0202h - Optional Aggregate Protected Space Extent */ typedef struct _I2O_BSA_AGG_PROT_SPACE_EXT_SCALAR { U64 NumberBlocks; } I2O_BSA_AGG_PROT_SPACE_EXT_SCALAR, *PI2O_BSA_AGG_PROT_SPACE_EXT_SCALAR; /* Block Storage Group 0203h - Optional Physical Extent */ typedef struct _I2O_BSA_PHYS_EXT_SCALAR { U64 StartAddress; U64 NumberBlocks; U32 BlockSize; U32 GranularityUnit; U64 CheckDataInterleave; U64 CheckData; U64 UserData; } I2O_BSA_PHYS_EXT_SCALAR, *PI2O_BSA_PHYS_EXT_SCALAR; /* Block Storage Group 0204h - Optional Aggregate Physical Extent */ typedef struct _I2O_BSA_AGG_PHYS_EXT_SCALAR { U64 NumberBlocks; U64 CheckData; } I2O_BSA_AGG_PHYS_EXT_SCALAR, *PI2O_BSA_AGG_PHYS_EXT_SCALAR; /* Block Storage Group 0205h - Optional Redundancy Table */ typedef struct _I2O_BSA_REDUNDANCY_SCALAR { U8 RedundancyType; U8 reserved1; /* Note: not in 1.5 spec. */ U16 reserved2; /* Note: not in 1.5 spec. */ } I2O_BSA_REDUNDANCY_SCALAR, *PI2O_BSA_REDUNDANCY_SCALAR; /* Block Storage Group 0206h - Optional Component Spares */ typedef struct _I2O_BSA_COMPONENT_SPARES_TABLE { U8 RowNumber; U8 SpareType; U8 ToBeSparedIndex; U8 SparedIndex; U8 SpareFunctioningState; U8 reserved1; /* Note: not in 1.5 spec. */ U16 reserved2; /* Note: not in 1.5 spec. */ } I2O_BSA_COMPONENT_SPARES_TABLE, *PI2O_BSA_COMPONENT_SPARES_TABLE; /* Block Storage Group 0207h - Optional Association Table */ typedef struct _I2O_BSA_ASSOCIATION_TABLE { U8 RowNumber; U8 Type; U8 Object1Type; U8 Object1Index; U8 Object2Type; U8 Object2Index; U16 reserved2; /* Note: not in 1.5 spec. */ } I2O_BSA_ASSOCIATION_TABLE, *PI2O_BSA_ASSOCIATION_TABLE; /****************************************************************************/ /* I2O BSA Block Storage Event Indicator Assignment */ #define I2O_BSA_EVENT_VOLUME_LOAD 0x00000001 #define I2O_BSA_EVENT_VOLUME_UNLOAD 0x00000002 #define I2O_BSA_EVENT_VOLUME_UNLOAD_REQUEST 0x00000004 #define I2O_BSA_EVENT_CAPACITY_CHANGE 0x00000008 #define I2O_BSA_EVENT_SCSI_SMART 0x00000010 /****************************************************************************/ /* Block Storage Class Specific Message Definitions */ /****************************************************************************/ /****************************************************************************/ /* I2O Block Storage Reply Message Frame Template */ typedef struct _I2O_BSA_REPLY_MESSAGE_FRAME { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U16 DetailedStatusCode; U8 RetryCount; U8 ReqStatus; /* ReplyPayload */ } I2O_BSA_REPLY_MESSAGE_FRAME, *PI2O_BSA_REPLY_MESSAGE_FRAME; /****************************************************************************/ /* I2O Block Storage Successful Completion Reply Message Frame */ typedef struct _I2O_BSA_SUCCESS_REPLY_MESSAGE_FRAME { I2O_BSA_REPLY_MESSAGE_FRAME BsaReplyFrame; U32 TransferCount; } I2O_BSA_SUCCESS_REPLY_MESSAGE_FRAME, *PI2O_BSA_SUCCESS_REPLY_MESSAGE_FRAME; /****************************************************************************/ /* I2O Block Storage Aborted Operation Reply Message Frame */ typedef struct _I2O_BSA_ABORT_REPLY_MESSAGE_FRAME { I2O_BSA_REPLY_MESSAGE_FRAME BsaReplyFrame; } I2O_BSA_ABORT_REPLY_MESSAGE_FRAME, *PI2O_BSA_ABORT_REPLY_MESSAGE_FRAME; /****************************************************************************/ /* I2O Block Storage Progress Report Reply Message Frame */ typedef struct _I2O_BSA_PROGRESS_REPLY_MESSAGE_FRAME { I2O_BSA_REPLY_MESSAGE_FRAME BsaReplyFrame; U8 PercentComplete; U8 Reserved[3]; } I2O_BSA_PROGRESS_REPLY_MESSAGE_FRAME, *PI2O_BSA_PROGRESS_REPLY_MESSAGE_FRAME; /****************************************************************************/ /* I2O Block Storage Error Report Reply Message Frame */ typedef struct _I2O_BSA_ERROR_REPLY_MESSAGE_FRAME { I2O_BSA_REPLY_MESSAGE_FRAME BsaReplyFrame; U32 TransferCount; U64 LogicalByteAddress; } I2O_BSA_ERROR_REPLY_MESSAGE_FRAME, *PI2O_BSA_ERROR_REPLY_MESSAGE_FRAME; /****************************************************************************/ /* I2O BSA request message flag definitions */ /* I2O BSA Control Flags */ typedef U16 I2O_BSA_CTL_FLAGS; #define I2O_BSA_FLAG_PROGRESS_REPORT 0x0080 /* I2O BSA Block Read Message Control Flags */ typedef U16 I2O_BSA_READ_FLAGS; #define I2O_BSA_RD_FLAG_DONT_RETRY 0x0001 #define I2O_BSA_RD_FLAG_SOLO 0x0002 #define I2O_BSA_RD_FLAG_CACHE_READ 0x0004 #define I2O_BSA_RD_FLAG_READ_PREFETCH 0x0008 #define I2O_BSA_RD_FLAG_CACHE_DATA 0x0010 /* I2O BSA Block Write Message Control Flags */ typedef U16 I2O_BSA_WRITE_FLAGS; #define I2O_BSA_WR_FLAG_DONT_RETRY 0x0001 #define I2O_BSA_WR_FLAG_SOLO 0x0002 #define I2O_BSA_WR_FLAG_DONT_CACHE 0x0004 #define I2O_BSA_WR_FLAG_WRITE_THRU 0x0008 #define I2O_BSA_WR_FLAG_WRITE_TO 0x0010 /* I2O BSA Device Reset Message Control Flags */ typedef U16 I2O_BSA_RESET_FLAGS; #define I2O_BSA_FLAG_HARD_RESET 0x0001 /* I2O BSA Media Verify Message Control Flags */ typedef U16 I2O_BSA_VERIFY_FLAGS; /* Progress Report flag definition is valid */ #define I2O_BSA_ERROR_CORRECTION 0x0040 /* I2O BSA Removeable Media Identifier values */ typedef U32 I2O_BSA_MEDIA_ID; #define I2O_BSA_MEDIA_ID_CURRENT_MOUNTED 0xFFFFFFFF /* I2O BSA Removeable Media Load Flags */ typedef U8 I2O_BSA_LOAD_FLAGS; #define I2O_BSA_LOAD_FLAG_MEDIA_LOCK 0x80 /* I2O BSA Power Management Operation values */ typedef U8 I2O_BSA_OPERATION; #define I2O_BSA_POWER_MGT_PARTIAL_POWER_UP 0x01 #define I2O_BSA_POWER_MGT_POWER_UP 0x02 #define I2O_BSA_POWER_MGT_POWER_UP_LOAD 0x03 #define I2O_BSA_POWER_MGT_QUIESCE_DEVICE 0x20 #define I2O_BSA_POWER_MGT_PARTIAL_POWER_DOWN 0x21 #define I2O_BSA_POWER_MGT_PARTIAL_POWER_DOWN_UNLOAD 0x22 #define I2O_BSA_POWER_MGT_POWER_DOWN_UNLOAD 0x23 #define I2O_BSA_POWER_MGT_POWER_DOWN_RETAIN 0x24 /****************************************************************************/ /* I2O BSA Block Read Message Frame */ typedef struct _I2O_BSA_READ_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_BSA_READ_FLAGS ControlFlags; U8 TimeMultiplier; U8 FetchAhead; U32 TransferByteCount; U64 LogicalByteAddress; I2O_SG_ELEMENT SGL; } I2O_BSA_READ_MESSAGE, *PI2O_BSA_READ_MESSAGE; /****************************************************************************/ /* I2O BSA Block Reassign Message Frame */ typedef struct _I2O_BSA_BLOCK_REASSIGN_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U16 Reserved1; U8 TimeMultiplier; U8 Reserved2; I2O_SG_ELEMENT SGL; } I2O_BSA_BLOCK_REASSIGN_MESSAGE, *PI2O_BSA_BLOCK_REASSIGN_MESSAGE; /****************************************************************************/ /* I2O BSA Block Write Message Frame */ typedef struct _I2O_BSA_WRITE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_BSA_WRITE_FLAGS ControlFlags; U8 TimeMultiplier; U8 Reserved; U32 TransferByteCount; U64 LogicalByteAddress; I2O_SG_ELEMENT SGL; } I2O_BSA_WRITE_MESSAGE, *PI2O_BSA_WRITE_MESSAGE; /****************************************************************************/ /* I2O BSA Block Write and Verify Message Frame */ typedef struct _I2O_BSA_WRITE_VERIFY_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_BSA_WRITE_FLAGS ControlFlags; U8 TimeMultiplier; U8 Reserved; U32 TransferByteCount; U64 LogicalByteAddress; I2O_SG_ELEMENT SGL; } I2O_BSA_WRITE_VERIFY_MESSAGE, *PI2O_BSA_WRITE_VERIFY_MESSAGE; /****************************************************************************/ /* I2O BSA Cache Flush Message Frame */ typedef struct _I2O_BSA_CACHE_FLUSH_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_BSA_CTL_FLAGS ControlFlags; U8 TimeMultiplier; U8 Reserved; } I2O_BSA_CACHE_FLUSH_MESSAGE, *PI2O_BSA_CACHE_FLUSH_MESSAGE; /****************************************************************************/ /* I2O BSA Device Reset Message Frame */ typedef struct _I2O_BSA_DEVICE_RESET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_BSA_RESET_FLAGS ControlFlags; U8 TimeMultiplier; U8 Reserved; } I2O_BSA_DEVICE_RESET_MESSAGE, *PI2O_BSA_DEVICE_RESET_MESSAGE; /****************************************************************************/ /* I2O BSA Media Eject for Removeable Media Message Frame */ typedef struct _I2O_BSA_MEDIA_EJECT_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_BSA_MEDIA_ID MediaIdentifier; } I2O_BSA_MEDIA_EJECT_MESSAGE, *PI2O_BSA_MEDIA_EJECT_MESSAGE; /****************************************************************************/ /* I2O BSA Media Lock Message Frame */ typedef struct _I2O_BSA_MEDIA_LOCK_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_BSA_MEDIA_ID MediaIdentifier; } I2O_BSA_MEDIA_LOCK_MESSAGE, *PI2O_BSA_MEDIA_LOCK_MESSAGE; /****************************************************************************/ /* I2O BSA Media Mount for Removeable Media Message Frame */ typedef struct _I2O_BSA_MEDIA_MOUNT_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_BSA_MEDIA_ID MediaIdentifier; I2O_BSA_LOAD_FLAGS LoadFlags; U8 Reserved[3]; } I2O_BSA_MEDIA_MOUNT_MESSAGE, *PI2O_BSA_MEDIA_MOUNT_MESSAGE; /****************************************************************************/ /* I2O BSA Media Unlock Message Frame */ typedef struct _I2O_BSA_MEDIA_UNLOCK_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_BSA_MEDIA_ID MediaIdentifier; } I2O_BSA_MEDIA_UNLOCK_MESSAGE, *PI2O_BSA_MEDIA_UNLOCK_MESSAGE; /****************************************************************************/ /* I2O BSA Media Verify Message Frame */ typedef struct _I2O_BSA_MEDIA_VERIFY_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_BSA_VERIFY_FLAGS ControlFlags; U8 TimeMultiplier; U8 Reserved; U32 ByteCount; U64 LogicalByteAddress; } I2O_BSA_MEDIA_VERIFY_MESSAGE, *PI2O_BSA_MEDIA_VERIFY_MESSAGE; /****************************************************************************/ /* I2O BSA Power Management Message Frame */ typedef struct _I2O_BSA_POWER_MANAGEMENT_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; I2O_BSA_CTL_FLAGS ControlFlags; U8 TimeMultiplier; U8 ReplyType; I2O_BSA_OPERATION Operation; } I2O_BSA_POWER_MANAGEMENT_MESSAGE, *PI2O_BSA_POWER_MANAGEMENT_MESSAGE; /****************************************************************************/ /* I2O BSA Status Check Message Frame */ typedef struct _I2O_BSA_STATUS_CHECK_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_BSA_STATUS_CHECK_MESSAGE, *PI2O_BSA_STATUS_CHECK_MESSAGE; PRAGMA_PACK_POP PRAGMA_ALIGN_POP #endif /* I2O_MSTOR_HDR */ raidutils-0.0.6.orig/raideng/i2otypes.h0000664000175000000620000001320010044153310017663 0ustar bapstaff00000000000000/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2otypes.h 13 4/30/01 12:57p Salyzyn $ */ /**************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. * All rights reserved. * * Copyright 1999 I2O Special Interest Group (I2O SIG). All rights reserved. * All rights reserved * * TERMS AND CONDITIONS OF USE * * Redistribution and use in source form, with or without modification, are * permitted provided that redistributions of source code must retain the * above copyright notice, this list of conditions and the following disclaimer. * * This software is provided `as is' by Distributed Processing Technology and * any express or implied warranties, including, but not limited to, the * implied warranties of merchantability and fitness for a particular purpose, * are disclaimed. In no event shall Distributed Processing Technology be * liable for any direct, indirect, incidental, special, exemplary or * consequential damages (including, but not limited to, procurement of * substitute goods or services; loss of use, data, or profits; or business * interruptions) however caused and on any theory of liability, whether in * contract, strict liability, or tort (including negligence or otherwise) * arising in any way out of the use of this driver software, even if advised * of the possibility of such damage. * * This header file, and any modifications of this header file, are provided * contingent upon your agreement and adherence to the here-listed terms and * conditions. By accepting and/or using this header file, you agree to abide * by these terms and conditions and that these terms and conditions will be * construed and governed in accordance with the laws of the State of California, * without reference to conflict-of-law provisions. If you do not agree * to these terms and conditions, please delete this file, and any copies, * permanently, without making any use thereof. * * THIS HEADER FILE IS PROVIDED FREE OF CHARGE ON AN AS-IS BASIS WITHOUT * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE. I2O SIG DOES NOT WARRANT THAT THIS HEADER FILE WILL MEET THE * USER'S REQUIREMENTS OR THAT ITS OPERATION WILL BE UNINTERRUPTED OR * ERROR-FREE. * * I2O SIG DISCLAIMS ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF * ANY PROPRIETARY RIGHTS, RELATING TO THE IMPLEMENTATION OF THE I2O * SPECIFICATIONS. I2O SIG DOES NOT WARRANT OR REPRESENT THAT SUCH * IMPLEMENTATIONS WILL NOT INFRINGE SUCH RIGHTS. * * THE USER OF THIS HEADER FILE SHALL HAVE NO RECOURSE TO I2O SIG FOR ANY * ACTUAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOST DATA * OR LOST PROFITS ARISING OUT OF THE USE OR INABILITY TO USE THIS PROGRAM. * * I2O SIG grants the user of this header file a license to copy, distribute, * and modify it, for any purpose, under the following terms. Any copying, * distribution, or modification of this header file must not delete or alter * the copyright notice of I2O SIG or any of these Terms and Conditions. * * Any distribution of this header file must not include a charge for the * header file (unless such charges are strictly for the physical acts of * copying or transferring copies). However, distribution of a product in * which this header file is embedded may include a charge so long as any * such charge does not include any charge for the header file itself. * * Any modification of this header file constitutes a derivative work based * on this header file. Any distribution of such derivative work: (1) must * include prominent notices that the header file has been changed from the * original, together with the dates of any changes; (2) automatically includes * this same license to the original header file from I2O SIG, without any * restriction thereon from the distributing user; and (3) must include a * grant of license of the modified file under the same terms and conditions * as these Terms and Conditions. * * The I2O SIG Web site can be found at: http://www.i2osig.org * * The I2O SIG encourages you to deposit derivative works based on this * header file at the I2O SIG Web site. Furthermore, to become a Registered * Developer of the I2O SIG, sign up at the Web site or call 415.750.8352 * (United States). ****************************************************************/ #ifndef __INCi2otypesh #define __INCi2otypesh #define I2OTYPES_REV 1_5_4 /* include architecture/compiler dependencies */ #if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__)) # if (KERN_VERSION < 3) # include "i386/pci/i2odep.h" # else # include "dev/asr/i2odep.h" # endif #else # include "i2odep.h" #endif /* 64 bit defines */ typedef struct _S64 { U32 LowPart; S32 HighPart; } S64; typedef struct _U64 { U32 LowPart; U32 HighPart; } U64; /* Pointer to Basics */ typedef VOID *PVOID; typedef S8 *PS8; typedef S16 *PS16; typedef S32 *PS32; typedef S64 *PS64; /* Pointer to Unsigned Basics */ typedef U8 *PU8; typedef U16 *PU16; typedef U32 *PU32; typedef U64 *PU64; /* misc */ typedef S32 I2O_ARG; typedef U32 I2O_COUNT; typedef U32 I2O_USECS; typedef U32 I2O_ADDR32; typedef U32 I2O_SIZE; #endif /* __INCi2otypesh */ raidutils-0.0.6.orig/raideng/i2outil.h0000664000175000000620000004200210044153310017476 0ustar bapstaff00000000000000/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2outil.h 12 4/30/01 12:57p Salyzyn $ */ /**************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. * All rights reserved. * * Copyright 1999 I2O Special Interest Group (I2O SIG). All rights reserved. * All rights reserved * * TERMS AND CONDITIONS OF USE * * Redistribution and use in source form, with or without modification, are * permitted provided that redistributions of source code must retain the * above copyright notice, this list of conditions and the following disclaimer. * * This software is provided `as is' by Distributed Processing Technology and * any express or implied warranties, including, but not limited to, the * implied warranties of merchantability and fitness for a particular purpose, * are disclaimed. In no event shall Distributed Processing Technology be * liable for any direct, indirect, incidental, special, exemplary or * consequential damages (including, but not limited to, procurement of * substitute goods or services; loss of use, data, or profits; or business * interruptions) however caused and on any theory of liability, whether in * contract, strict liability, or tort (including negligence or otherwise) * arising in any way out of the use of this driver software, even if advised * of the possibility of such damage. * * This header file, and any modifications of this header file, are provided * contingent upon your agreement and adherence to the here-listed terms and * conditions. By accepting and/or using this header file, you agree to abide * by these terms and conditions and that these terms and conditions will be * construed and governed in accordance with the laws of the State of California, * without reference to conflict-of-law provisions. If you do not agree * to these terms and conditions, please delete this file, and any copies, * permanently, without making any use thereof. * * THIS HEADER FILE IS PROVIDED FREE OF CHARGE ON AN AS-IS BASIS WITHOUT * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE. I2O SIG DOES NOT WARRANT THAT THIS HEADER FILE WILL MEET THE * USER'S REQUIREMENTS OR THAT ITS OPERATION WILL BE UNINTERRUPTED OR * ERROR-FREE. * * I2O SIG DISCLAIMS ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF * ANY PROPRIETARY RIGHTS, RELATING TO THE IMPLEMENTATION OF THE I2O * SPECIFICATIONS. I2O SIG DOES NOT WARRANT OR REPRESENT THAT SUCH * IMPLEMENTATIONS WILL NOT INFRINGE SUCH RIGHTS. * * THE USER OF THIS HEADER FILE SHALL HAVE NO RECOURSE TO I2O SIG FOR ANY * ACTUAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOST DATA * OR LOST PROFITS ARISING OUT OF THE USE OR INABILITY TO USE THIS PROGRAM. * * I2O SIG grants the user of this header file a license to copy, distribute, * and modify it, for any purpose, under the following terms. Any copying, * distribution, or modification of this header file must not delete or alter * the copyright notice of I2O SIG or any of these Terms and Conditions. * * Any distribution of this header file must not include a charge for the * header file (unless such charges are strictly for the physical acts of * copying or transferring copies). However, distribution of a product in * which this header file is embedded may include a charge so long as any * such charge does not include any charge for the header file itself. * * Any modification of this header file constitutes a derivative work based * on this header file. Any distribution of such derivative work: (1) must * include prominent notices that the header file has been changed from the * original, together with the dates of any changes; (2) automatically includes * this same license to the original header file from I2O SIG, without any * restriction thereon from the distributing user; and (3) must include a * grant of license of the modified file under the same terms and conditions * as these Terms and Conditions. * * The I2O SIG Web site can be found at: http://www.i2osig.org * * The I2O SIG encourages you to deposit derivative works based on this * header file at the I2O SIG Web site. Furthermore, to become a Registered * Developer of the I2O SIG, sign up at the Web site or call 415.750.8352 * (United States). ****************************************************************/ /********************************************************************* * I2OUtil.h -- I2O Utility Class Message defintion file * * This file contains information presented in Chapter 6 of the I2O * Specification. **********************************************************************/ #if !defined(I2O_UTILITY_HDR) #define I2O_UTILITY_HDR #define I2OUTIL_REV 1_5_4 /* I2OUtil header file revision string */ #if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__)) # if (KERN_VERSION < 3) # include "i386/pci/i2omsg.h" /* Include the Base Message file */ # else # include "dev/asr/i2omsg.h" # endif #else # include "i2omsg.h" /* Include the Base Message file */ #endif /* NOTES: Gets, reads, receives, etc. are all even numbered functions. Sets, writes, sends, etc. are all odd numbered functions. Functions that both send and receive data can be either but an attempt is made to use the function number that indicates the greater transfer amount. Functions that do not send or receive data use odd function numbers. Some functions are synonyms like read, receive and send, write. All common functions will have a code of less than 0x80. Unique functions to a class will start at 0x80. Executive Functions start at 0xA0. Utility Message function codes range from 0 - 0x1f Base Message function codes range from 0x20 - 0xfe Private Message function code is 0xff. */ PRAGMA_ALIGN_PUSH PRAGMA_PACK_PUSH /* Utility Message class functions. */ #define I2O_UTIL_NOP 0x00 #define I2O_UTIL_ABORT 0x01 #define I2O_UTIL_CLAIM 0x09 #define I2O_UTIL_CLAIM_RELEASE 0x0B #define I2O_UTIL_CONFIG_DIALOG 0x10 #define I2O_UTIL_DEVICE_RESERVE 0x0D #define I2O_UTIL_DEVICE_RELEASE 0x0F #define I2O_UTIL_EVENT_ACKNOWLEDGE 0x14 #define I2O_UTIL_EVENT_REGISTER 0x13 #define I2O_UTIL_LOCK 0x17 #define I2O_UTIL_LOCK_RELEASE 0x19 #define I2O_UTIL_PARAMS_GET 0x06 #define I2O_UTIL_PARAMS_SET 0x05 #define I2O_UTIL_REPLY_FAULT_NOTIFY 0x15 /****************************************************************************/ /* ABORT Abort type defines. */ #define I2O_ABORT_TYPE_EXACT_ABORT 0x00 #define I2O_ABORT_TYPE_FUNCTION_ABORT 0x01 #define I2O_ABORT_TYPE_TRANSACTION_ABORT 0x02 #define I2O_ABORT_TYPE_WILD_ABORT 0x03 #define I2O_ABORT_TYPE_CLEAN_EXACT_ABORT 0x04 #define I2O_ABORT_TYPE_CLEAN_FUNCTION_ABORT 0x05 #define I2O_ABORT_TYPE_CLEAN_TRANSACTION_ABORT 0x06 #define I2O_ABORT_TYPE_CLEAN_WILD_ABORT 0x07 /* UtilAbort Function Message Frame structure. */ typedef struct _I2O_UTIL_ABORT_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; # if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) U32 reserved; # else U16 reserved; U8 AbortType; U8 FunctionToAbort; # endif I2O_TRANSACTION_CONTEXT TransactionContextToAbort; } I2O_UTIL_ABORT_MESSAGE, *PI2O_UTIL_ABORT_MESSAGE; typedef struct _I2O_UTIL_ABORT_REPLY { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U32 CountOfAbortedMessages; } I2O_UTIL_ABORT_REPLY, *PI2O_UTIL_ABORT_REPLY; /****************************************************************************/ /* Claim Flag defines */ #define I2O_CLAIM_FLAGS_EXCLUSIVE 0x0001 /* Reserved */ #define I2O_CLAIM_FLAGS_RESET_SENSITIVE 0x0002 #define I2O_CLAIM_FLAGS_STATE_SENSITIVE 0x0004 #define I2O_CLAIM_FLAGS_CAPACITY_SENSITIVE 0x0008 #define I2O_CLAIM_FLAGS_PEER_SERVICE_DISABLED 0x0010 #define I2O_CLAIM_FLAGS_MGMT_SERVICE_DISABLED 0x0020 /* Claim Type defines */ #define I2O_CLAIM_TYPE_PRIMARY_USER 0x01 #define I2O_CLAIM_TYPE_AUTHORIZED_USER 0x02 #define I2O_CLAIM_TYPE_SECONDARY_USER 0x03 #define I2O_CLAIM_TYPE_MANAGEMENT_USER 0x04 /* UtilClaim Function Message Frame structure. */ typedef struct _I2O_UTIL_CLAIM_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U16 ClaimFlags; U8 reserved; U8 ClaimType; } I2O_UTIL_CLAIM_MESSAGE, *PI2O_UTIL_CLAIM_MESSAGE; /****************************************************************************/ /* Claim Release Flag defines */ #define I2O_RELEASE_FLAGS_CONDITIONAL 0x0001 /* UtilClaimRelease Function Message Frame structure. */ typedef struct _I2O_UTIL_CLAIM_RELEASE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U16 ReleaseFlags; U8 reserved; U8 ClaimType; } I2O_UTIL_CLAIM_RELEASE_MESSAGE, *PI2O_UTIL_CLAIM_RELEASE_MESSAGE; /****************************************************************************/ /* UtilConfigDialog Function Message Frame structure */ typedef struct _I2O_UTIL_CONFIG_DIALOG_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U32 PageNumber; I2O_SG_ELEMENT SGL; } I2O_UTIL_CONFIG_DIALOG_MESSAGE, *PI2O_UTIL_CONFIG_DIALOG_MESSAGE; /****************************************************************************/ /* Event Acknowledge Function Message Frame structure */ typedef struct _I2O_UTIL_EVENT_ACK_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U32 EventIndicator; U32 EventData[1]; } I2O_UTIL_EVENT_ACK_MESSAGE, *PI2O_UTIL_EVENT_ACK_MESSAGE; /* Event Ack Reply structure */ typedef struct _I2O_UTIL_EVENT_ACK_REPLY { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U32 EventIndicator; U32 EventData[1]; } I2O_UTIL_EVENT_ACK_REPLY, *PI2O_UTIL_EVENT_ACK_REPLY; /****************************************************************************/ /* Event Indicator Mask Flags */ #define I2O_EVENT_IND_STATE_CHANGE 0x80000000 #define I2O_EVENT_IND_GENERAL_WARNING 0x40000000 #define I2O_EVENT_IND_CONFIGURATION_FLAG 0x20000000 /* #define I2O_EVENT_IND_RESERVE_RELEASE 0x10000000 */ #define I2O_EVENT_IND_LOCK_RELEASE 0x10000000 #define I2O_EVENT_IND_CAPABILITY_CHANGE 0x08000000 #define I2O_EVENT_IND_DEVICE_RESET 0x04000000 #define I2O_EVENT_IND_EVENT_MASK_MODIFIED 0x02000000 #define I2O_EVENT_IND_FIELD_MODIFIED 0x01000000 #define I2O_EVENT_IND_VENDOR_EVENT 0x00800000 #define I2O_EVENT_IND_DEVICE_STATE 0x00400000 /* Event Data for generic Events */ #define I2O_EVENT_STATE_CHANGE_NORMAL 0x00 #define I2O_EVENT_STATE_CHANGE_SUSPENDED 0x01 #define I2O_EVENT_STATE_CHANGE_RESTART 0x02 #define I2O_EVENT_STATE_CHANGE_NA_RECOVER 0x03 #define I2O_EVENT_STATE_CHANGE_NA_NO_RECOVER 0x04 #define I2O_EVENT_STATE_CHANGE_QUIESCE_REQUEST 0x05 #define I2O_EVENT_STATE_CHANGE_FAILED 0x10 #define I2O_EVENT_STATE_CHANGE_FAULTED 0x11 #define I2O_EVENT_GEN_WARNING_NORMAL 0x00 #define I2O_EVENT_GEN_WARNING_ERROR_THRESHOLD 0x01 #define I2O_EVENT_GEN_WARNING_MEDIA_FAULT 0x02 #define I2O_EVENT_CAPABILITY_OTHER 0x01 #define I2O_EVENT_CAPABILITY_CHANGED 0x02 #define I2O_EVENT_SENSOR_STATE_CHANGED 0x01 /* UtilEventRegister Function Message Frame structure */ typedef struct _I2O_UTIL_EVENT_REGISTER_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U32 EventMask; } I2O_UTIL_EVENT_REGISTER_MESSAGE, *PI2O_UTIL_EVENT_REGISTER_MESSAGE; /* UtilEventRegister Reply structure */ typedef struct _I2O_UTIL_EVENT_REGISTER_REPLY { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U32 EventIndicator; U32 EventData[1]; } I2O_UTIL_EVENT_REGISTER_REPLY, *PI2O_UTIL_EVENT_REGISTER_REPLY; /****************************************************************************/ /* UtilLock Function Message Frame structure. */ typedef struct _I2O_UTIL_LOCK_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_UTIL_LOCK_MESSAGE, *PI2O_UTIL_LOCK_MESSAGE; /****************************************************************************/ /* UtilLockRelease Function Message Frame structure. */ typedef struct _I2O_UTIL_LOCK_RELEASE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_UTIL_LOCK_RELEASE_MESSAGE, *PI2O_UTIL_LOCK_RELEASE_MESSAGE; /****************************************************************************/ /* UtilNOP Function Message Frame structure. */ typedef struct _I2O_UTIL_NOP_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; } I2O_UTIL_NOP_MESSAGE, *PI2O_UTIL_NOP_MESSAGE; /****************************************************************************/ /* UtilParamsGet Message Frame structure. */ typedef struct _I2O_UTIL_PARAMS_GET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U32 OperationFlags; I2O_SG_ELEMENT SGL; } I2O_UTIL_PARAMS_GET_MESSAGE, *PI2O_UTIL_PARAMS_GET_MESSAGE; /****************************************************************************/ /* UtilParamsSet Message Frame structure. */ typedef struct _I2O_UTIL_PARAMS_SET_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U32 OperationFlags; I2O_SG_ELEMENT SGL; } I2O_UTIL_PARAMS_SET_MESSAGE, *PI2O_UTIL_PARAMS_SET_MESSAGE; /****************************************************************************/ /* UtilReplyFaultNotify Message for Message Failure. */ typedef struct _I2O_UTIL_REPLY_FAULT_NOTIFY_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; U8 LowestVersion; U8 HighestVersion; BF Severity:I2O_FAILCODE_SEVERITY_SZ; BF FailureCode:I2O_FAILCODE_CODE_SZ; BF FailingIOP_ID:I2O_IOP_ID_SZ; BF reserved:I2O_RESERVED_4BITS; BF FailingHostUnitID:I2O_UNIT_ID_SZ; U32 AgeLimit; #if I2O_64BIT_CONTEXT PI2O_MESSAGE_FRAME OriginalMFA; #else PI2O_MESSAGE_FRAME OriginalMFALowPart; U32 OriginalMFAHighPart; /* Always 0000 */ #endif } I2O_UTIL_REPLY_FAULT_NOTIFY_MESSAGE, *PI2O_UTIL_REPLY_FAULT_NOTIFY_MESSAGE; /****************************************************************************/ /* Device Reserve Function Message Frame structure. */ /* NOTE: This was previously called the Reserve Message */ typedef struct _I2O_UTIL_DEVICE_RESERVE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_UTIL_DEVICE_RESERVE_MESSAGE, *PI2O_UTIL_DEVICE_RESERVE_MESSAGE; /****************************************************************************/ /* Device Release Function Message Frame structure. */ /* NOTE: This was previously called the ReserveRelease Message */ typedef struct _I2O_UTIL_DEVICE_RELEASE_MESSAGE { I2O_MESSAGE_FRAME StdMessageFrame; I2O_TRANSACTION_CONTEXT TransactionContext; } I2O_UTIL_DEVICE_RELEASE_MESSAGE, *PI2O_UTIL_DEVICE_RELEASE_MESSAGE; /****************************************************************************/ PRAGMA_PACK_POP PRAGMA_ALIGN_POP #endif /* I2O_UTILITY_HDR */ raidutils-0.0.6.orig/raideng/kill.cpp0000664000175000000620000000366010044153333017411 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ reset(); DEL_TYPE *obj_P = (DEL_TYPE *) reset(); // Delete every object in the list while (obj_P!=(DEL_TYPE *)NULL) { obj_P = (DEL_TYPE *) cur(); // destroy the DPT Object delete obj_P; # if (defined(RESET_ON_DELETE)) obj_P = (DEL_TYPE *) reset(); # else obj_P = (DEL_TYPE *) next(); # endif } // end while // Free all array memory reAlloc(); raidutils-0.0.6.orig/raideng/manager.cpp0000664000175000000620000020661110044153333020071 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - MANAGER.CPP //*************************************************************************** // //Description: // // This file contains function definitions for the dptMgr_C class. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" #if !defined _DPT_UNIX && !defined _DPT_NETWARE && !defined _DPT_DOS extern "C" { void osdTargetOffline(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); void osdResetBus(uLONG HbaNum); } #else void osdTargetOffline(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); void osdResetBus(uLONG HbaNum); #endif // _DPT_UNIX //Function - dptManager_C::newObject() - start //=========================================================================== // //Description: // // This function allocates a new DPT object of the specified type. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptObject_C * dptManager_C::newObject(uSHORT objType) { dptObject_C *obj_P = this; if (objType<=0xff) { // Create a new SCSI device obj_P = new dptDevice_C; // Set the SCSI device type obj_P->engType = objType; } else if (objType==DPT_SCSI_HBA) // Create a new SCSI HBA obj_P = new dptHBA_C; else if (objType==DPT_SCSI_BCD) // Create a new SCSI bridge controller obj_P = new dptBCD_C; else if (objType==DPT_RAID_BCD) // Create a new SCSI bridge controller obj_P = new dptRAIDbcd_C; // If no allocation was attempted... if (obj_P==this) obj_P = NULL; return (obj_P); } //dptManager_C::newObject() - end //Function - dptManager_C::launchCCB() - start //=========================================================================== // //Description: // // This function is the starting point for sending a CCB to hardware. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptManager_C::launchCCB(engCCB_C *ccb_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_ARTIFICIAL_IO; // Only send the CCB if this manager is real if (!isArtificial()) { // Pass the CCB to the next manager if ((retVal = passCCB(ccb_P))==MSG_RTN_COMPLETED) // If the command completed with an error condition... if (!ccb_P->ok()) retVal = MSG_RTN_FAILED | ERR_SCSI_IO; } return (retVal); } //dptManager_C::launchCCB() - end //Function - dptManager_C::passCCB() - start //=========================================================================== // //Description: // // This function makes adjustments to the CCB and then passes //the send CCB request up the attachment chain. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptManager_C::passCCB(engCCB_C *ccb_P) { // Send the CCB to the next level in the attachment chain return (myMgr_P()->passCCB(ccb_P)); } //dptManager_C::passCCB() - end //Function - dptManager_C::scanPhysicals() - start //=========================================================================== // //Description: // // This function finds this manager's physical objects and passes //the command on to all lower level managers. // //Parameters: // //Return Value: // // 1 = OK // 0 = Failure // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptManager_C::scanPhysicals(uSHORT searchType) { #ifdef ENABLE_SCSI_TRACE cout << "Searching for physicals..." << endl; #endif // Find this manager's physical objects uSHORT retVal = findMyPhysicals(); // Initialize all HBAs in the system // (Only the driver actually does initialize the HBAs) initHBAs(); // If not an HBA only search... if (searchType != 3) { // Find all lower level manager's physical objects dptObject_C *obj_P = (dptObject_C *) phyList.reset(); while (obj_P!=NULL) { if (obj_P->isManager()) { // Find all of the sub-manager's physical objects if (!((dptManager_C *)obj_P)->scanPhysicals(searchType)) { retVal = 0; } } // Get the next object obj_P = (dptObject_C *) phyList.next(); } } return (retVal); } //dptManager_C::scanPhysicals() - end //Function - dptManager_C::scanLogicals() - start //=========================================================================== // //Description: // // This function finds this manager's logical devices and passes //the command on to all lower level managers. // //Parameters: // //Return Value: // // 1 = OK // 0 = Failure // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptManager_C::scanLogicals() { dptObject_C *obj_P; uSHORT retVal = 1; // Find all lower level manager's logical devices obj_P = (dptObject_C *) phyList.reset(); while (obj_P!=NULL) { if (obj_P->isManager()) // Find all of the sub-manager's logical devices if (!((dptManager_C *)obj_P)->scanLogicals()) retVal = 0; // Get the next object obj_P = (dptObject_C *) phyList.next(); } #ifdef ENABLE_SCSI_TRACE cout << "Searching for logicals..." << endl; #endif // Find this manager's logical devices if (!findMyLogicals()) retVal = 0; return (retVal); } //dptManager_C::scanLogicals() - end //Function - dptManager_C::scanInit() - start //=========================================================================== // //Description: // // This function initializes all lower level objects, all of this //manager's physical objects, and then all of this manager's logical //objects. // //Parameters: // //Return Value: // // 1 = OK // 0 = Failure // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptManager_C::scanInit(uSHORT searchType) { dptObject_C *obj_P; dptDevice_C *dev_P; // Initialize all lower level objects obj_P = (dptObject_C *) phyList.reset(); while (obj_P!=NULL) { // If the object is real... if (obj_P->isReal()) if (obj_P->isManager()) // Initialize all lower level objects ((dptManager_C *)obj_P)->scanInit(searchType); // Get the next object obj_P = (dptObject_C *) phyList.next(); } // If this isn't the driver && its not a logical device only init... if ((getObjType()!=DPT_SCSI_DRVR) && (searchType!=2)) { #ifdef ENABLE_SCSI_TRACE cout << "Initializing real physicals..." << endl; #endif // Initialize all of this manager's physical objects obj_P = (dptObject_C *) phyList.reset(); while (obj_P!=NULL) { // If the object is real... if (obj_P->isReal()) // Perform real object initialization obj_P->realInit(); // Get the next object obj_P = (dptObject_C *) phyList.next(); } } // If this isn't a physical device only init... if (searchType!=1) { // Update this manager's physical device status setPAPinfo(); #ifdef ENABLE_SCSI_TRACE cout << "Initializing real logicals..." << endl; #endif // Initialize all of this manager's logical devices dev_P = (dptDevice_C *) logList.reset(); while (dev_P!=NULL) { if (dev_P->isReal() && dev_P->isMyObject(this) && dev_P->isLogical()) // Perform real object initialization dev_P->realInit(); // Get the next object dev_P = (dptDevice_C *) logList.next(); } } // Perform post-device initialization scanPostInit(); return (1); } //dptManager_C::scanInit() - end //Function - dptManager_C::initRL() - start //=========================================================================== // //Description: // // This function initializes a real logical device (builds component //list...). // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptManager_C::initRL(dptDevice_C *dev_P,engCCB_C *ccb_P) { // Get the logical array page used by this manager uSHORT method = getLAPpage(); // If NCR logical array page #1... if (method==LAP_NCR1) initLAPncr1(dev_P,ccb_P); // If DPT logical array page #1... else if (method==LAP_DPT1) initLAPdpt1(dev_P,ccb_P); // If DPT logical array page #2... else if (method==LAP_DPT2) initLAPdpt2(dev_P,ccb_P); } //dptManager_C::initRL() - end //Function - dptManager_C::initLAPncr1() - start //=========================================================================== // //Description: // // This function initializes the specified device from NCR logical //array page #1 data. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. If this function is used for SW level arrays, all components are // assumed to be on the same HBA as logical device. To configure // SW level arrays across HBAs use DPT mode page #1. // //--------------------------------------------------------------------------- void dptManager_C::initLAPncr1(dptDevice_C *dev_P,engCCB_C *ccb_P) { dptDevice_C *comp_P; uSHORT devBits; uSHORT dataDevs; uLONG numStripes; dptAddr_S tempAddr; uCHAR chan; // Cast the input pointer as NCR LAP #1 ncrLAP1_S *mode_P = (ncrLAP1_S *) ccb_P->modeParam_P->getData(); // Reverse byte ordering of multi-byte fields mode_P->swapLsuBlockSize(); mode_P->swapCompBlockSize(); mode_P->swapNumBlocks(); mode_P->swapStripeSize(); mode_P->swapRbldAmount(); // Set this manager's RAID build/rebuild/verify rate rbldFrequency = mode_P->getRbldFrequency(); rbldAmount = mode_P->getRbldAmount(); // Set the logical device's RAID type dev_P->raidType = mode_P->getRaidLevel(); // Set the device status dev_P->setLAPstatus(mode_P->getStatus()); // Set the device capacity information dev_P->capacity.blockSize = mode_P->getLsuBlockSize(); dev_P->capacity.maxLBA = dev_P->capacity.maxPhysLBA = mode_P->getNumBlocks() - 1; if (getLevel()==2) dev_P->capacity.maxLBA = dev_P->getLastUserBlk(); // Initialize the component address tempAddr.hba = (uCHAR) dev_P->myHBA_P()->getRAIDid(); tempAddr.lun = 0; // Scan the component bit map for all IDs for (tempAddr.id=0;tempAddr.id<=15;tempAddr.id++) { devBits = getU2(mode_P->getBitMap(),tempAddr.id); if (devBits!=0) { reverseBytes(devBits); // Scan the bit map ID word for all channels for (chan=0;chan<=14;chan++) { // Adjust the channel # tempAddr.chan = chan + phyRange.getMinAddr().chan; // If there is a device at this channel... if (devBits & 0x0001) { // Attempt to find the component device comp_P = findComponent(tempAddr); if (comp_P!=NULL) { // Position the device by SCSI address positionSCSI(dev_P->compList,comp_P->getAddr()); // Add the device to the component list dev_P->compList.add(comp_P); } } // Check the next bit devBits >>= 1; } // end for (tempAddr.chan) } // endif (devBits!=0) } // end for (tempAddr.id) // Get the number of redundant devices dev_P->redundants = getRedundants(dev_P->getRAIDtype(), dev_P->compList.size()); // Compute the number of stripes per component numStripes = dev_P->compList.size() - dev_P->redundants; if (numStripes!=0) numStripes = mode_P->getNumBlocks() / numStripes; if (mode_P->getStripeSize()!=0) numStripes /= mode_P->getStripeSize(); else mode_P->setStripeSize(1); // Add this device to each component's RAID map dataDevs = dev_P->compList.size() - dev_P->redundants; comp_P = (dptDevice_C *) dev_P->compList.reset(); while (comp_P!=NULL) { if (dataDevs>0) { // Set the RAID parent information comp_P->enterParent(dev_P,mode_P->getStripeSize(),numStripes); dataDevs--; } else // Set the RAID parent information // -Indicate that this is a redundant component comp_P->enterParent(dev_P,mode_P->getStripeSize(),numStripes,1); // Get the next component comp_P = (dptDevice_C *) dev_P->compList.next(); } } //dptManager_C::initLAPncr1() - end //Function - dptManager_C::initLAPdpt1() - start //=========================================================================== // //Description: // // This function initializes the specified device from DPT logical //array page #1 data. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptManager_C::initLAPdpt1(dptDevice_C *dev_P,engCCB_C *ccb_P) { dptLAP1_S *mode_P; dptLAP1el_S *compEl_P; dptDevice_C *comp_P; dptAddr_S tempAddr; uSHORT numComponents,i,dataDevs; uLONG numStripes; uLONG masterStripe = 0; DEBUG_BEGIN(7, dptManager_C::initLAPdpt1()); // Cast the input pointer as DPT LAP page #1 data mode_P = (dptLAP1_S *) ccb_P->modeParam_P->getData(); // Convert from big-endian to native endian format mode_P->scsiSwap(); mode_P->andFlags(~0x1); // Set this manager's RAID build/rebuild/verify rate rbldFrequency = mode_P->getRbldFrequency(); rbldAmount = mode_P->getRbldAmount(); // Set the rebuild poll frequency rbldPollFreq = (mode_P->getFlags() & 0x01) ? 60 : 0; // Determine if a rebuild check should be made at boot time if (mode_P->getFlags() & 0x08) raidFlags |= FLG_RBLD_BOOT_CHECK; else raidFlags &= ~FLG_RBLD_BOOT_CHECK; // Set the failed drive spin down time spinDownDelay = mode_P->getSpinDownDelay(); // Set the logical device's RAID type dev_P->raidType = mode_P->getRaidLevel(); // Set the device status dev_P->setLAPstatus(mode_P->getStatus()); // Determine the number of components in the list numComponents = ccb_P->modeParam_P->getLength()+2 - (uSHORT) dptLAP1_S::size() - 1; numComponents /= (uSHORT)dptLAP1el_S::size(); // Get the number of redundant devices dev_P->redundants = getRedundants(dev_P->getRAIDtype(),numComponents); DEBUG(7, PRT_DADDR(dev_P) << "rbld: amount=" << rbldAmount << " freq=" << \ rbldFrequency << " rate=" << rbldFrequency << \ " flags=0x" << hex << (int) mode_P->getFlags()); DEBUG(7, "spin down delay=" << spinDownDelay << " components=" << numComponents \ << " redundants=" << dev_P->redundants); // Get the number of data devices dataDevs = numComponents - dev_P->redundants; // Get a pointer to the first component compEl_P = (dptLAP1el_S *) mode_P->getCompList(); // For all components... for (i=0;inext()) { // Convert the structure to big endian format compEl_P->scsiSwap(); if (dataDevs>0) { // Compute a master stripe size masterStripe += compEl_P->getStripeSize(); dataDevs--; } } if (masterStripe!=0) // Compute the number of stripes numStripes = mode_P->getNumBlocks() / masterStripe; else numStripes = mode_P->getNumBlocks(); // Get the number of data devices dataDevs = numComponents - dev_P->redundants; // Get a pointer to the first component compEl_P = (dptLAP1el_S *) mode_P->getCompList(); // For all components... for (i=0;igetHbaChan() >> 3; tempAddr.chan = compEl_P->getHbaChan() & 0x07; tempAddr.id = compEl_P->getIdLun() >> 4; tempAddr.lun = compEl_P->getIdLun() & 0x0f; // If an invalid HBA #... if (tempAddr.hba==0) // Set default HBA # // (So drivers using LAP_DPT1 can read arrays built with LAP_NCR1) tempAddr.hba = (uCHAR) ccb_P->hba_P->getRAIDid(); // Find the component device comp_P = findComponent(tempAddr); if (comp_P!=NULL) { // Add the device found to the new device's component list dev_P->compList.addEnd(comp_P); if (dataDevs>0) { // Set the RAID parent info comp_P->enterParent(dev_P,numStripes,compEl_P->getStripeSize()); dataDevs--; } else // Set the RAID parent info comp_P->enterParent(dev_P,numStripes,compEl_P->getStripeSize(),1); } } // end for (icapacity.blockSize = mode_P->getLsuBlockSize(); dev_P->capacity.maxLBA = mode_P->getNumBlocks() - 1; dev_P->capacity.maxPhysLBA = dev_P->capacity.maxLBA; if (getLevel()==2) dev_P->capacity.maxLBA = dev_P->getLastUserBlk(); } //dptManager_C::initLAPdpt1() - end //Function - dptManager_C::initLAPdpt2() - start //=========================================================================== // //Description: // // This function initializes the specified device from DPT logical //array page #2 data. // //--------------------------------------------------------------------------- void dptManager_C::initLAPdpt2(dptDevice_C *dev_P,engCCB_C *ccb_P) { dptLAP2_S *mode_P; dptLAP2el_S *compEl_P; dptDevice_C *comp_P; dptAddr_S tempAddr; uSHORT numComponents,i,dataDevs; uLONG numStripes; uLONG masterStripe = 0; DEBUG_BEGIN(7, dptManager_C::initLAPdpt2()); // Cast the input pointer as DPT LAP page #2 data mode_P = (dptLAP2_S *) ccb_P->modeParam_P->getData(); // Convert from big-endian to native endian format mode_P->scsiSwap(); mode_P->andLsuMagicNum(0x7fffffff); // Set this manager's background task rate rbldFrequency = mode_P->getBkgdFreq(); rbldAmount = mode_P->getBkgdAmount(); // Set the rebuild poll frequency rbldPollFreq = (mode_P->getFlags1() & FLG_LAP2_RBLD_MINUTE) ? 60 : 0; // Determine if a rebuild check should be made at boot time if (mode_P->getFlags1() & FLG_LAP2_RBLD_BOOT) raidFlags |= FLG_RBLD_BOOT_CHECK; else raidFlags &= ~FLG_RBLD_BOOT_CHECK; // The failed drive spin down delay is not applicable to LAP #2 spinDownDelay = 0; // Set the logical device's RAID type dev_P->raidType = mode_P->getRaidLevel(); // Set the LSU device's Magic number dev_P->magicNum = mode_P->getLsuMagicNum(); // Determine the number of components in the list numComponents = mode_P->getNumComps(); // Get the number of redundant devices dev_P->redundants = getRedundants(dev_P->getRAIDtype(),numComponents); DEBUG(7, PRT_DADDR(dev_P) << "rbld: amount=" << rbldAmount << " freq=" << \ rbldFrequency << " rate=" << rbldFrequency << \ " flags=0x" << hex << (int) mode_P->getFlags1()); DEBUG(7, "spin down delay=" << spinDownDelay << " components=" << numComponents \ << " redundants=" << dev_P->redundants); // Get the number of data devices dataDevs = numComponents - dev_P->redundants; // Get a pointer to the first component compEl_P = (dptLAP2el_S *) (((char *)mode_P)+ccb_P->modeParam_P->getLength()); // For all components... for (i=0;inext()) { // Convert the structure to big endian format compEl_P->scsiSwap(); compEl_P->andMagicNum(0x7fffffff); if (dataDevs>0) { // Compute a master stripe size masterStripe += compEl_P->getStripeSize(); dataDevs--; } } if (masterStripe!=0) // Compute the number of stripes numStripes = mode_P->getLsuCapacity() / masterStripe; else numStripes = mode_P->getLsuCapacity(); // Get the number of data devices dataDevs = numComponents - dev_P->redundants; // Get a pointer to the first component compEl_P = (dptLAP2el_S *) (((char *)mode_P)+ccb_P->modeParam_P->getLength()); // For all components... for (i=0;inext()) { // Get the component address tempAddr.hba = compEl_P->getHBA(); tempAddr.chan = compEl_P->getChan(); tempAddr.id = (uCHAR) compEl_P->getID(); tempAddr.lun = compEl_P->getLun(); // If an invalid HBA #... if (tempAddr.hba==0) { // Set default HBA # // (So drivers using LAP_DPT1 can read arrays built with LAP_NCR1) tempAddr.hba = (uCHAR) ccb_P->hba_P->getRAIDid(); } if (dev_P->myHBA_P()->isI2O()) { // Find the component device comp_P = findComponent(tempAddr,0,compEl_P->getMagicNum(), &dev_P->myHBA_P()->logList); } else { // Find the component device comp_P = findComponent(tempAddr,0,compEl_P->getMagicNum()); } if (comp_P!=NULL) { // Add the device found to the new device's component list //positionSCSI(dev_P->compList,comp_P->getAddr()); dev_P->compList.addEnd(comp_P); if (dataDevs>0) { // Set the RAID parent info comp_P->enterParent(dev_P,numStripes,compEl_P->getStripeSize()); dataDevs--; } else // Set the RAID parent info comp_P->enterParent(dev_P,numStripes,compEl_P->getStripeSize(),1); } } // end for (imyHBA_P()->isSegSupported()) && (segEl_P->getPageCode() == 0x33)) { if (dev_P->segment_P == NULL) { dev_P->segment_P = new dptLAP2segment_S[8]; dev_P->maxSegments = 8; } memcpy(dev_P->segment_P, segEl_P, dptLAP2segment_S::size() * 8); for (i=0; i < dev_P->maxSegments; i++) { dev_P->segment_P[i].scsiSwap(); } } // Set the device status // ***Note: Setting the status must be done after the component list // is built since the status checking iterates through the component // list. dev_P->setLAPstatus(mode_P->getStatus()); // Set the device capacity information dev_P->capacity.blockSize = mode_P->getLsuBlockSize(); dev_P->capacity.maxLBA = mode_P->getLsuCapacity() - 1; dev_P->capacity.maxPhysLBA = dev_P->capacity.maxLBA; if (getLevel()==2) { dev_P->capacity.maxLBA = dev_P->getLastUserBlk(); } // If a redirected drive and manual JBOD is active... if ((dev_P->raidType == RAID_REDIRECT) && (dev_P->hba_P->isManualJBODactive())) { comp_P = (dptDevice_C *) dev_P->compList.reset(); if (comp_P != NULL) { // If the component ID matches the if (dev_P->getID() == comp_P->getID()) { dev_P->scsiFlags2 |= FLG_DEV_MANUAL_JBOD_CONFIGURED; comp_P->scsiFlags2 |= FLG_DEV_MANUAL_JBOD_CONFIGURED; } } } } //dptManager_C::initLAPdpt2() - end //Function - dptManager_C::newLP36Devices() - start //=========================================================================== // //Description: // // This function creates new logical devices based upon the data //returned in log page 0x36 (logical device list). // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function assumes that a log sense 0x36 has already been issued. // //--------------------------------------------------------------------------- void dptManager_C::newLP36Devices(engCCB_C *ccb_P, dptHBA_C *inHba_P ) { dptDevice_C *dev_P,*conflictingDev_P; uCHAR *data_P; uSHORT byteIndex; dptCoreList_C tempList; // Initialize the log data ccb_P->initLogSense(); if (ccb_P->log.find(0x01)!=NULL) { // Get a pointer to the logical device list data_P = ccb_P->log.data_P(); byteIndex = 0; while ( (byteIndex+1) <= ccb_P->log.length()) { // Create the new device dev_P = (dptDevice_C *) newObject(DPT_SCSI_DASD); if (dev_P!=NULL) { if (inHba_P->isI2OVer2()) { // Get the device's SCSI address dev_P->addr.hba = inHba_P->getHBA(); dev_P->addr.chan = data_P[byteIndex] & 0x07; dev_P->addr.id = (data_P[byteIndex++] << 1) & 0xf0; dev_P->addr.id |= data_P[byteIndex] >> 4; dev_P->addr.lun = data_P[byteIndex++] & 0x0f; } else { // Get the device's SCSI address dev_P->addr.hba = inHba_P->getHBA(); dev_P->addr.chan = data_P[byteIndex++] & 0x07; dev_P->addr.id = data_P[byteIndex] >> 4; dev_P->addr.lun = data_P[byteIndex++] & 0x0f; } // Set the device's pointers so it can perform I/O dev_P->attachedTo_P = this; dev_P->hba_P = inHba_P; dev_P->conn_P = myConn_P(); // Force to logical list origin dev_P->coreFlags |= FLG_ENG_LIST; // Perform logical device initialization dev_P->initRealLogical(); // Hold the new device in the temporary device list tempList.addEnd(dev_P); } // end if (dev_P!=NULL) } // end while(byteIndex<=length) } // end if (logParam_P!=NULL) dev_P = (dptDevice_C *) tempList.reset(); while (dev_P!=NULL) { // Check for an ID conflict conflictingDev_P = (dptDevice_C *) findObjectAt(logList,dev_P->getAddr()); // If there is an existing device at this logical device addr... if (conflictingDev_P!=NULL) // Suppress the existing device (physical device) myConn_P()->suppress(conflictingDev_P,0); // Enter the new device into the logical device list if (enterLog(dev_P) == MSG_RTN_COMPLETED) { // If a Hot Spare... if (dev_P->getRAIDtype()==RAID_HOT_SPARE) // Suppress the Hot Spare myConn_P()->suppress(dev_P); // If a S/W array if (dev_P->getLevel() == 0) dev_P->updateStatus(); } // Get the next device dev_P = (dptDevice_C *) tempList.next(); } } //dptManager_C::newLP36Devices() - end //Function - dptManager_C::enableConfig() - start //=========================================================================== // //Description: // // This function enables the current system configuration. The real //system hardware is configured to match this connection's configuration. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptManager_C::enableConfig() { DPT_RTN_T retVal = MSG_RTN_COMPLETED; // Delete the old RAID devices if (!delOldRAIDs()) retVal = MSG_RTN_FAILED | ERR_DEL_OLD_RAID; // Add the new RAID devices if (!enableNewRAIDs()) retVal = MSG_RTN_FAILED | ERR_ENABLE_NEW_RAID; // Update the status of all real devices updateAllStatus(); // We must update any OS database that tracks attached devices // to keep it in sync. (i.e. the ODM database under AIX) if (retVal == MSG_RTN_COMPLETED) { if (osdUpdateOSConfig()) retVal = MSG_RTN_FAILED | ERR_UPDATE_OS_CONFIG; } return (retVal); } //dptManager_C::enableConfig() - end //Function - dptManager_C::delOldRAIDs() - start //=========================================================================== // //Description: // // This function traverses the configuration performing Delete LUN //operations for all real RAID devices that are no longer a part of the //configuration. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptManager_C::delOldRAIDs() { uSHORT retVal = 1; // Delete this manager's old RAID devices dptDevice_C *dev_P = (dptDevice_C *) exRRlist.reset(); while (dev_P!=NULL) { // If not RAID-1 and not Redirected drive... if ((dev_P->getRAIDtype() != RAID_1) && (dev_P->getRAIDtype() != RAID_REDIRECT) && //Don't zap partition table on failed hot-spares !((dev_P->getRAIDtype() == RAID_HOT_SPARE) && (dev_P->status.main = LAPM_FAILED)) && ((dev_P->getLevel() >= 1) || dev_P->myHBA_P()->isI2O())) // Zap the logical drive's partition table dev_P->zapPartition(); // Indicate that a bus reset is desired for wolfpack support if (dev_P->myHBA_P()) { dev_P->myHBA_P()->setBusResetDesired(); } // Attempt to delete the RAID device from hardware if (dev_P->raidLAPcmd(LAP_CMD_DELETE)!=MSG_RTN_COMPLETED) { retVal = 0; // Get the next RAID device dev_P = (dptDevice_C *) exRRlist.next(); } else dev_P = (dptDevice_C *) exRRlist.del(); } // Delete all old lower level RAID devices dptObject_C *obj_P = (dptObject_C *) phyList.reset(); while (obj_P!=NULL) { // If the object is a SCSI manager... if (obj_P->isManager()) { // Perform sub-manager RAID deletions if (!((dptManager_C *)obj_P)->delOldRAIDs()) retVal = 0; } else { #ifdef _SINIX_ADDON uLONG spaceReserved; DEBUG_BEGIN(1, dptManager_C::delOldRAIDs()); dev_P = (dptDevice_C *) obj_P; if ((dev_P->getObjType()==DPT_SCSI_DASD) && !dev_P->isComponent() && (dev_P->isHWmismatch()==FLG_DEV_ARRAY_COMPONENT)) { // For LSUs, which still exist on HW, we reduce reserved blocks // to initial value. spaceReserved = dev_P->getMaxPhyLBA() - dev_P->getLastLBA(); dev_P->reserveEndOfDisk(spaceReserved); DEBUG(1, PRT_DADDR(dev_P) << " Deleting HWexisting array - res new=" << \ spaceReserved << " ishwmismatch=" << dev_P->isHWmismatch()); } // Clear the hardware mismatch flags on all physical devices ((dptDevice_C *)obj_P)->clrHWmismatch(); #else // Clear the hardware mismatch flags on all physical devices ((dptDevice_C *)obj_P)->clrHWmismatch(); #endif } // Get the next physical object obj_P = (dptObject_C *) phyList.next(); } // Delete former RAID devices exRRlist.kill(); return (retVal); } //dptManager_C::delOldRAIDs() - end //Function - dptManager_C::enableNewRAIDs() - start //=========================================================================== // //Description: // // This function traverses the configuration performing Add LUN //operations for all absent RAID devices. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptManager_C::enableNewRAIDs() { uSHORT retVal = 1; // Perform all lower level RAID configuration dptObject_C *obj_P = (dptObject_C *) phyList.reset(); while (obj_P!=NULL) { // If the object is a SCSI manager... if (obj_P->isManager()) { // Perform sub-manager RAID configuration if (!((dptManager_C *)obj_P)->enableNewRAIDs()) { retVal = 0; } } // Get the next physical object obj_P = (dptObject_C *) phyList.next(); } // Perform this manager's RAID configuration dptDevice_C *dev_P = (dptDevice_C *) logList.reset(); while (dev_P!=NULL) { if ( dev_P->isMyObject(this) && (dev_P->getRAIDtype()!=0xffff) ) { if (dev_P->isAbsent()) { // Indicate that a bus reset is desired for wolfpack support if (dev_P->myHBA_P()) { dev_P->myHBA_P()->setBusResetDesired(); } // Reserve blocks at the end of all HBA physical devices dev_P->enableTempSpace(); // Attempt to add the RAID device to hardware if (dev_P->isExpandedArray()) { if (dev_P->EnableExpandArray()!=MSG_RTN_COMPLETED) retVal = 0; } else if (dev_P->raidLAPcmd(LAP_CMD_ADD)!=MSG_RTN_COMPLETED) retVal = 0; else { // Flag the device as real dev_P->status.flags |= FLG_STAT_REAL; // If not a RAID-1 && not a redirected drive... if ((dev_P->getRAIDtype()!=RAID_1) && (dev_P->getRAIDtype()!=RAID_REDIRECT)) { // Zap the partition table dev_P->setPartitionZap(); } // If we're in cluster mode and a hot-spare was just created... if (dev_P->myHBA_P()) { if (dev_P->myHBA_P()->isClusterMode() && (dev_P->raidType == RAID_HOT_SPARE)) { // SCSI release the hot-spare's component dptDevice_C *comp_P = (dptDevice_C *) dev_P->compList.reset(); if (comp_P != NULL) { comp_P->releaseDevice(); } } } } } // Save the DPT name to hardware if (dev_P->saveDPTname()==MSG_RTN_FAILED) { retVal = 0; } } // Get the next logical device dev_P = (dptDevice_C *) logList.next(); } return (retVal); } //dptManager_C::enableNewRAIDs() - end //Function - dptManager_C::lsuOffline() - start //=========================================================================== //Description: // This function is called prior to taking an OS visible LSU offline. //This function is called at the start of a MSG_RAID_HW_ENABLE. //--------------------------------------------------------------------------- void dptManager_C::lsuOffline() { // For all devices being deleted... dptDevice_C *dev_P = (dptDevice_C *) exRRlist.reset(); while (dev_P!=NULL) { // If the device was visible to the OS // Note: The "isPrevOsVisible()" flag isn't valid for devices in the exRRlist lists if (dev_P->isOsVisible()) { // Prepare the LSU to go offline osdTargetOffline((uLONG)dev_P->myHBA_P()->getDrvrNum(), (uLONG)dev_P->getChan(), (uLONG)dev_P->getID(), (uLONG)dev_P->getLUN()); } // Get the next RAID device dev_P = (dptDevice_C *) exRRlist.next(); } dptManager_C *mgr_P = NULL; // Check all sub-managers dptObject_C *obj_P = (dptObject_C *) phyList.reset(); while (obj_P!=NULL) { // If the object is a SCSI manager... if (obj_P->isManager()) { mgr_P = (dptManager_C *) obj_P; mgr_P->lsuOffline(); } // Get the next physical object obj_P = (dptObject_C *) phyList.next(); } } //dptManager_C::lsuOffline() - end //Function - dptManager_C::buildLAPselect() - start //=========================================================================== // //Description: // // This function builds a logical array page select command to perform //the specified action and sub-action. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uCHAR dptManager_C::buildLAPselect(engCCB_C *ccb_P, dptDevice_C *dev_P, uCHAR action, uCHAR inFlags ) { // Get the logical array page used by this manager uCHAR page = (uCHAR) getLAPpage(); // If NCR logical array page #1 if (page==LAP_NCR1) buildLAPncr1(ccb_P,dev_P,action,inFlags); // If DPT logical array page #1 else if (page==LAP_DPT1) buildLAPdpt1(ccb_P,dev_P,action,inFlags); // If DPT logical array page #2 else if (page==LAP_DPT2) buildLAPdpt2(ccb_P,dev_P,action,inFlags); return (page); } //dptManager_C::buildLAPselect() - end //Function - dptManager_C::buildLAPncr1() - start //=========================================================================== // //Description: // // This function initializes a CCB to perform an NCR logical array page #1 //mode select. This function will perform some action to the target device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptManager_C::buildLAPncr1(engCCB_C *ccb_P, dptDevice_C * dev_P, uCHAR action, uCHAR inFlags ) { dptDevice_C *comp_P; ncrLAP1_S *mode_P; // Zero the data buffer ccb_P->clrData(); // Initialize the CCB to do an NCR LAP #1 ccb_P->modeSelect6(LAP_NCR1,0x82+2); // Cast the mode data as NCR LAP #1 (log. array page data) mode_P = (ncrLAP1_S *) ccb_P->modeParam_P->getData(); // Perform the specified action mode_P->setStatus(action); // Set the RAID-1 copy direction uCHAR tempCopyDir = mode_P->getCopyDir(); dev_P->setLAPcopyDir(tempCopyDir); mode_P->setCopyDir(tempCopyDir); // Set the SCSI LUN number mode_P->setLunNum(dev_P->getLUN()); // Set the flags byte mode_P->setFlags(inFlags); // Set the RAID type mode_P->setRaidLevel((uCHAR) dev_P->getRAIDtype()); // Get the first component comp_P = (dptDevice_C *) dev_P->compList.reset(); if (comp_P!=NULL) { // Set the stripe size mode_P->setStripeSize(comp_P->parent.stripeSize); } // Set the desired block size mode_P->setLsuBlockSize(dev_P->capacity.blockSize); // Set the desired capacity mode_P->setNumBlocks(dev_P->capacity.maxLBA + 1); // Set the rebuild frequency mode_P->setRbldFrequency((uCHAR) rbldFrequency); // Set the rebuild amount mode_P->setRbldAmount(rbldAmount); // Build the bit mapped component table buildNCR1map(dev_P,mode_P->getBitMap()); // Reverse byte ordering of multi-byte fields mode_P->scsiSwap(); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); } //dptManager_C::buildLAPncr1() - end //Function - dptManager_C::buildLAPdpt1() - start //=========================================================================== // //Description: // // This function initializes a CCB to perform a DPT logical array page #1 //mode select. This function will perform some action to the target device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptManager_C::buildLAPdpt1(engCCB_C *ccb_P, dptDevice_C * dev_P, uCHAR action, uCHAR inFlags ) { dptLAP1_S *mode_P; uCHAR pageSize; DEBUG_BEGIN(7, dptManager_C::buildLAPdpt1()); // Zero the data buffer ccb_P->clrData(); // Compute the page size pageSize = (uCHAR) (dptLAP1_S::size() - 1 + dev_P->compList.size() * dptLAP1el_S::size()); // Initialize the CCB to do a DPT LAP page #1 ccb_P->modeSelect(LAP_DPT1,pageSize+2); // Cast the mode data as NCR LAP #1 (log. array page data) mode_P = (dptLAP1_S *) ccb_P->modeParam_P->getData(); // Perform the specified action mode_P->setStatus(action); // Set the RAID-1 copy direction uCHAR tempCopyDir = mode_P->getCopyDir(); dev_P->setLAPcopyDir(tempCopyDir); mode_P->setCopyDir(tempCopyDir); // Set the SCSI LUN number mode_P->setLunNum(dev_P->getLUN()); // Set the flags byte mode_P->setFlags(inFlags); // If check to rebuild at boot time is desired... if (raidFlags & FLG_RBLD_BOOT_CHECK) mode_P->orFlags(0x08); // If the HBA should poll every minute to try to rebuild... if (rbldPollFreq) mode_P->orFlags(0x01); // Set the RAID type mode_P->setRaidLevel((uCHAR) dev_P->getRAIDtype()); // Set the desired capacity mode_P->setNumBlocks(dev_P->capacity.maxLBA + 1); // Set the desired block size mode_P->setLsuBlockSize(dev_P->capacity.blockSize); // Set the rebuild frequency mode_P->setRbldFrequency((uCHAR) rbldFrequency); // Set the rebuild amount mode_P->setRbldAmount(rbldAmount); // Set the device's HBA index # so firmware can sort by HBA # mode_P->setHbaIndex((uCHAR) dev_P->myHBA_P()->getRAIDid()); // Set the desired failed drive spin down delay (in seconds) mode_P->setSpinDownDelay((uCHAR) spinDownDelay); DEBUG(7, PRT_DADDR(dev_P) << "rbld: amount=" << rbldAmount << " freq=" << \ rbldFrequency << " rate=" << rbldFrequency << \ " flags=0x" << hex << (int) mode_P->getFlags()); // Build the component list buildDPT1list(dev_P,mode_P->getCompList()); // Reverse byte ordering of multi-byte fields mode_P->scsiSwap(); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); } //dptManager_C::buildLAPdpt1() - end //Function - dptManager_C::buildLAPdpt2() - start //=========================================================================== // //Description: // // This function initializes a CCB to perform a DPT logical array page #1 //mode select. This function will perform some action to the target device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptManager_C::buildLAPdpt2(engCCB_C *ccb_P, dptDevice_C * dev_P, uCHAR action, uCHAR inFlags ) { dptLAP2_S *mode_P = NULL; uSHORT tempRbldFreq = 0; uSHORT tempRbldAmount = 0; DEBUG_BEGIN(7, dptManager_C::buildLAPdpt2()); // Zero the data buffer ccb_P->clrData(); // Set the "data out" byte count in the SCSI CDB uSHORT numDataOutBytes = (uSHORT) (dptLAP2_S::size() + 2); numDataOutBytes += (uSHORT) (dptLAP2el_S::size() * dev_P->compList.size()); if (dev_P->segment_P) { numDataOutBytes += (uSHORT) (dev_P->maxSegments * dptLAP2segment_S::size()); } // Initialize the CCB to do a DPT LAP page #2 ccb_P->modeSelect(LAP_DPT2, numDataOutBytes); // the size of LAP2 should be 0x1c not the size of everything if (action == LAP_CMD_ASSIGN_MAGIC) ccb_P->modeParam_P->setLength((uCHAR)dptLAP2_S::size()); // Cast the mode data as DPT LAP #2 mode_P = (dptLAP2_S *) ccb_P->modeParam_P->getData(); // Perform the specified action mode_P->setStatus(action); // If an I2O HBA... if (dev_P->myHBA_P()->isI2O()) { // Set the desired channel, id, lun mode_P->setReserved1(dev_P->getChan()); mode_P->setReserved2(dev_P->getID()); mode_P->setReserved3(dev_P->getLUN()); } // Set the flags byte uCHAR tempFlags1 = 0; // Set the RAID-1 copy direction dev_P->setLAPcopyDir(tempFlags1); tempFlags1 >>= 2; // Include the specified flags tempFlags1 |= inFlags & 0xcf; // If check to rebuild at boot time is desired... if (raidFlags & FLG_RBLD_BOOT_CHECK) tempFlags1 |= FLG_LAP2_RBLD_BOOT; // If the HBA should poll every minute to try to rebuild... if (rbldPollFreq) tempFlags1 |= FLG_LAP2_RBLD_MINUTE; // Set the flags byte mode_P->setFlags1(tempFlags1); // Set the RAID type mode_P->setRaidLevel((uCHAR) dev_P->getRAIDtype()); // Set the number of components mode_P->setNumComps((uCHAR)dev_P->compList.size()); // If no magic # has been assigned... if (!dev_P->getMagicNum()) // Assign a magic # to this array dev_P->magicNum = genMagicNum(); // Set the LSU's magic # mode_P->setLsuMagicNum(dev_P->getMagicNum()); // Set the desired capacity mode_P->setLsuCapacity(dev_P->capacity.maxLBA + 1); // Set the desired block size mode_P->setLsuBlockSize((uSHORT)dev_P->capacity.blockSize); // If a top level array use the HBA's rebuild frequency & amount tempRbldFreq = (getLevel() == 0) ? dev_P->myHBA_P()->getRbldFrequency() : rbldFrequency; tempRbldAmount = (getLevel() == 0) ? dev_P->myHBA_P()->getRbldAmount() : rbldAmount; // Set the background task frequency mode_P->setBkgdFreq((uCHAR) tempRbldFreq); // Set the background task amount mode_P->setBkgdAmount(tempRbldAmount); DEBUG(7, PRT_DADDR(dev_P) << "rbld: amount=" << rbldAmount << \ " freq=" << rbldFrequency << " rate=" << rbldFrequency << \ " flags=0x" << hex << (int) mode_P->getFlags1()); // Build the component list buildDPT2list(dev_P,((uCHAR *)mode_P)+dptLAP2_S::size()); // Build the LUN segment list buildDPT2segmentList(dev_P,((uCHAR *)mode_P)+dptLAP2_S::size()+dptLAP2el_S::size()*dev_P->compList.size()); // Reverse byte ordering of multi-byte fields mode_P->scsiSwap(); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); } //dptManager_C::buildLAPdpt2() - end //Function - dptManager_C::buildNCR1map() - start //=========================================================================== // //Description: // // This function builds a logical array page bit map table using the //specified device's components. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptManager_C::buildNCR1map(dptDevice_C *dev_P,uCHAR *bitMap_P) { uCHAR id,chan; uSHORT byteOffset,bitOffset; // For all components... dptDevice_C *comp_P = (dptDevice_C *) dev_P->compList.reset(); while (comp_P!=NULL) { // Position the offset for the components SCSI ID byteOffset = 0; for (id=0;id<(comp_P->getID()&0x0f);id++) byteOffset += 2; // Set the SCSI channel chan = comp_P->getChan() & 0xf; if (comp_P->getChan()>7) // Adjust for bit manipulations chan -= 8; else // Place offset at the lower channel byte byteOffset += 1; // Set the bit offset bitOffset = 0x01; bitOffset <<= chan; // Set the appropriate bit in the appropriate byte bitMap_P[byteOffset] |= bitOffset; // Get the next component comp_P = (dptDevice_C *) dev_P->compList.next(); } } //dptManager_C::buildNCR1map() - end //Function - dptManager_C::buildDPT1list() - start //=========================================================================== // //Description: // // This function builds the alternative logical array page component //list for the specified device's components. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptManager_C::buildDPT1list(dptDevice_C *dev_P,uCHAR *inList_P) { // Get a pointer to the component list dptLAP1el_S *compEl_P = (dptLAP1el_S *) inList_P; // For all components... dptDevice_C *comp_P = (dptDevice_C *) dev_P->compList.reset(); while (comp_P!=NULL) { // Set the component's SCSI address compEl_P->setHbaChan(comp_P->myHBA_P()->getRAIDid() << 3); compEl_P->orHbaChan(comp_P->getChan() & 0x07); compEl_P->setIdLun(comp_P->getID() << 4); compEl_P->orIdLun(comp_P->getLUN() & 0x0f); // Set the components stripe size compEl_P->setStripeSize(comp_P->parent.stripeSize); compEl_P->scsiSwap(); // Get the next component compEl_P = compEl_P->next(); comp_P = (dptDevice_C *) dev_P->compList.next(); } } //dptManager_C::buildDPT1list() - end //Function - dptManager_C::buildDPT2list() - start //=========================================================================== // //Description: // // This function builds the alternative logical array page component //list for the specified device's components. // //--------------------------------------------------------------------------- void dptManager_C::buildDPT2list(dptDevice_C *dev_P,uCHAR *inList_P) { uCHAR compStatus; // Get a pointer to the component list dptLAP2el_S *compEl_P = (dptLAP2el_S *) inList_P; // For all components... dptDevice_C *comp_P = (dptDevice_C *) dev_P->compList.reset(); while (comp_P!=NULL) { // Initialize all fields to zero memset(compEl_P,0,dptLAP2el_S::size()); // Set the mode page code/length compEl_P->setPageCode(0x31); compEl_P->setPageLength(0x18); // If we are trying to change the physical device status... if (comp_P->isNewPhyStatus()) { // Set the desired physical device status compStatus = comp_P->newPhyStatus; // Set the component's status compEl_P->setStatus(compStatus); comp_P->clrNewPhyStatus(); } // Set the component's SCSI address compEl_P->setHBA((uCHAR)comp_P->myHBA_P()->getRAIDid()); compEl_P->setChan(comp_P->getChan()); compEl_P->setLun(comp_P->getLUN()); compEl_P->setID(comp_P->getID()); // If this component has no magic number... if (!comp_P->getMagicNum()) { // Assign a unique magic # comp_P->magicNum = genMagicNum(); // If a physical device located on another HBA... if ((comp_P->getLevel() == 2) && (comp_P->myHBA_P()->getRAIDid() != dev_P->myHBA_P()->getRAIDid())) { // Attempt to set the physical device's magic # if (comp_P->setPhyMagicNum() != MSG_RTN_COMPLETED) // Zero the magic # if unsuccessful so the SCSI addr // can be used comp_P->magicNum = 0; } } // Set the component's magic number compEl_P->setMagicNum(comp_P->getMagicNum()); // Set the striping information compEl_P->setCapacity(comp_P->parent.stripeSize*comp_P->parent.numStripes); compEl_P->setStartBlk(comp_P->parent.startLBA); compEl_P->setStripeSize((uSHORT)comp_P->parent.stripeSize); // Swap to big endian byte ordering compEl_P->scsiSwap(); // Get the next component compEl_P = compEl_P->next(); comp_P = (dptDevice_C *) dev_P->compList.next(); } } //dptManager_C::buildDPT2list() - end //Function - dptManager_C::buildDPT2segmentList() - start //=========================================================================== //Description: // This function builds the LUN segment list for the array. //--------------------------------------------------------------------------- void dptManager_C::buildDPT2segmentList(dptDevice_C *dev_P,uCHAR *inList_P) { if (dev_P->segment_P) { uINT i = 0; // Point to the segment list starting location in the data buffer dptLAP2segment_S *segEl_P = (dptLAP2segment_S *) inList_P; memcpy(segEl_P, dev_P->segment_P, dptLAP2segment_S::size()*dev_P->maxSegments); for (i=0; i < dev_P->maxSegments; i++) { // Swap to big endian byte ordering segEl_P[i].scsiSwap(); } } } //dptManager_C::buildDPT2segmentList() - end //Function - dptManager_C::setPAPinfo() - start //=========================================================================== // //Description: // // If a device is specified, this function sets the physical array //page status for that device. If no device is specified, the status //of all physical devices attached to this manager are updated. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptManager_C::setPAPinfo(dptDevice_C *dev_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (isReal() && isRAIDcapable()) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Target this manager ccb_P->target(this); // Send the PAP command to hardware if ((retVal=getPAP(ccb_P))==MSG_RTN_COMPLETED) { if (dev_P!=NULL) // Set the specified device's PAP status retVal = dev_P->setPAPstatus(ccb_P); else { // Set all physical devices' PAP status setPhyPAP(ccb_P); } } // Free the CCB ccb_P->clrInUse(); } } return (retVal); } //dptManager_C::setPAPinfo() - end //Function - dptManager_C::getPAP() - start //=========================================================================== // //Description: // // This function initializes the specified CCB to get a physical //array page. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. The CCB must be set to target the appropriate object prior to // calling this function. // //--------------------------------------------------------------------------- DPT_RTN_T dptManager_C::getPAP(engCCB_C *ccb_P) { DPT_RTN_T retVal = MSG_RTN_FAILED; // Initialize the CCB to get the physical array page ccb_P->modeSense6(PAP_NCR1); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); // Send the CCB to hardware retVal = launchCCB(ccb_P); return (retVal); } //dptManager_C::getPAP() - end //Function - dptManager_C::updateAllStatus() - start //=========================================================================== // //Description: // // This function updates the status of all devices from this manager's //level down. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptManager_C::updateAllStatus() { dptObject_C *obj_P; dptDevice_C *dev_P; // Update the status of all lower level managers' objects obj_P = (dptObject_C *) phyList.reset(); while (obj_P!=NULL) { if (obj_P->isManager()) // Find all of the sub-manager's physical objects ((dptManager_C *)obj_P)->updateAllStatus(); // Get the next object obj_P = (dptObject_C *) phyList.next(); } // Update the status of all this manager's physical devices setPAPinfo(); // Update the status of all this manager's logical devices dev_P = (dptDevice_C *) logList.reset(); while (dev_P!=NULL) { // If the device is attached to this manager... if (dev_P->isMyObject(this) && !dev_P->isExpandedArray()) // Update the logical array page status dev_P->updateLAPstatus(1); dev_P = (dptDevice_C *) logList.next(); } return (MSG_RTN_COMPLETED); } //dptManager_C::updateAllStatus() - end //Function - dptManager_C::setPhyPAP() - start //=========================================================================== // //Description: // // This function sets the physical array page status for all this //manager's physical device's and any sub-manager's logical devices. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptManager_C::setPhyPAP(engCCB_C *ccb_P) { dptObject_C *obj_P = (dptObject_C *) phyList.reset(); while (obj_P!=NULL) { // If this object is a device... if (obj_P->isDevice()) { // If this device is real... if (obj_P->isReal()) // Set the PAP status for this device ((dptDevice_C *)obj_P)->setPAPstatus(ccb_P); } // If this object is a manager... else // Set the PAP status for all logical devices... ((dptManager_C *)obj_P)->setLogPAP(ccb_P); // Get the next object obj_P = (dptObject_C *) phyList.next(); } } //dptManager_C::setPhyPAP() - end //Function - dptManager_C::setLogPAP() - start //=========================================================================== // //Description: // // This function sets the physical array page status for all this //manager's logical devices. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptManager_C::setLogPAP(engCCB_C *ccb_P) { dptDevice_C *dev_P = (dptDevice_C *) logList.reset(); while (dev_P!=NULL) { // If this device is real... if (dev_P->isReal() && dev_P->isMyObject(this) && dev_P->isLogical()) // Set the PAP status for this device dev_P->setPAPstatus(ccb_P); // Get the next object dev_P = (dptDevice_C *) logList.next(); } } //dptManager_C::setLogPAP() - end //Function - dptManager_C::sendPAPcmd() - start //=========================================================================== // //Description: // // This function sends a physical array page (PAP) select command //to this manager. This function is used to change to status of a //physical device (force failure...). // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptManager_C::sendPAPcmd(dptDevice_C *dev_P,uCHAR cmd) { DPT_RTN_T retVal = MSG_RTN_IGNORED; uSHORT index; if (isReal() && isRAIDcapable()) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { retVal = MSG_RTN_IGNORED; // Get the device's PAP index index = dev_P->getPAPindex(); if (index!=0xffff) { retVal = MSG_RTN_FAILED; // Zero the data buffer ccb_P->clrData(); // Target this manager ccb_P->target(this); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); // If this is the driver... if (getObjType()==DPT_SCSI_DRVR) // Target the device's HBA but set the SW bits ccb_P->target(dev_P->myHBA_P()->getAddr(), dev_P->myHBA_P(),CCB_ORIG_MGR); // If using the new PAP format (device list) if (dev_P->myHBA_P()->isI2OVer2()) { // Set the CCB to do a mode select physical array page ccb_P->modeSelect6(PAP_NCR1,0x08+2); // Set the number of elements to 1 setU4(ccb_P->modeParam_P->getData(),0, 1); #ifndef _DPT_BIG_ENDIAN osdSwap4((uLONG *)ccb_P->modeParam_P->getData()); #endif // Specify the device to be affected ccb_P->modeParam_P->getData()[4] = (dev_P->getChan() << 4) | (dev_P->getLUN() & 0x0f); ccb_P->modeParam_P->getData()[5] = dev_P->getID(); ccb_P->modeParam_P->getData()[6] = cmd | 0x80; ccb_P->modeParam_P->getData()[7] = 0; } else { // Set the CCB to do a mode select physical array page ccb_P->modeSelect6(PAP_NCR1,0xf0+2); // Set the PAP command ccb_P->modeParam_P->getData()[index] = cmd | 0x80; } // If wolfpack cluster mode... DPT_RTN_T reserveStatus = MSG_RTN_COMPLETED; if (dev_P->myHBA_P()->isClusterMode()) { dptDevice_C *topDev_P = dev_P; while (topDev_P->parent.dev_P != NULL) { topDev_P = (dptDevice_C *) topDev_P->parent.dev_P; } // Attempt to SCSI reserve the top level device reserveStatus = topDev_P->reserveDevice(); if (reserveStatus == MSG_RTN_COMPLETED) { // Attempt to SCSI reserve the physical device for safety reserveStatus = dev_P->reserveDevice(); } } if (reserveStatus != MSG_RTN_COMPLETED) { retVal = ERR_RESERVATION_CONFLICT; } else { // Send the CCB to hardware retVal = launchCCB(ccb_P); // Update the device's status dev_P->updateStatus(); // If wolfpack cluster mode... if (dev_P->myHBA_P()->isClusterMode()) { // Reset the controller's SCSI buses osdResetBus(dev_P->myHBA_P()->getDrvrNum()); } } } // end if (index!=0xffff) // Free the CCB ccb_P->clrInUse(); } } // end if (isReal() && isRAIDcapable()) return (retVal); } //dptManager_C::sendPAPcmd() - end //Function - dptManager_C::handleMessage() - start //=========================================================================== // //Description: // // This routine handles DPT events for the dptManager_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptManager_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Update the status of all real devices case MSG_UPDATE_ALL_STATUS: retVal = updateAllStatus(); break; // Set the specified data field to the specified value case MSG_SET_INFO: retVal = setDataField(toEng_P); break; // Set the rebuild frequency and amount case MSG_RAID_SET_RATE: retVal = MSG_RTN_DATA_UNDERFLOW; toEng_P->extract(rbldFrequency); if (toEng_P->extract(rbldAmount)) retVal = updateLAPparams(); break; default: // Call base class event handler retVal = dptRAIDmgr_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return (retVal); } //dptManager_C::handleMessage() - end //Function - dptManager_C::setDataField() - start //=========================================================================== // //Description: // // This function sets the specified data field to the specified //value. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptManager_C::setDataField(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; uSHORT dataField,tempShort; // If a data field was specified... if (toEng_P->extract(dataField)) { switch (dataField) { case DF_RBLD_FREQUENCY: case DF_RBLD_RATE: if (toEng_P->extract(tempShort)) { rbldFrequency = tempShort; if (toEng_P->extract(tempShort)) rbldAmount = tempShort; retVal = updateLAPparams(); } break; case DF_RBLD_AMOUNT: if (toEng_P->extract(tempShort)) { rbldAmount = tempShort; retVal = updateLAPparams(); } break; case DF_DISABLE_PART_ZAP: if (toEng_P->extract(tempShort)) { retVal = MSG_RTN_COMPLETED; if (tempShort) myConn_P()->clrPartZap(); // Disable partition zapping else myConn_P()->setPartZap(); // Enable partition zapping } break; default: retVal = MSG_RTN_IGNORED; break; } // end switch (dataField) } return (retVal); } //dptManager_C::setDataField() - end //Function - dptManager_C::updateLAPparams() - start //=========================================================================== // //Description: // // This function updates this manager's logical array page (LAP) //parameters. All of this manager's arrays get updated with the //current parameters. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptManager_C::updateLAPparams() { DPT_RTN_T retVal = MSG_RTN_IGNORED; DPT_RTN_T tempStatus; dptDevice_C *dev_P; if (isRAIDcapable() && isReal()) { retVal = MSG_RTN_FAILED | ERR_NO_RAID_DEVICES; // Change the rate of all this manager's logical devices dev_P = (dptDevice_C *) logList.reset(); while (dev_P!=NULL) { if ( dev_P->isMyObject(this) && (dev_P->getRAIDtype()!=RAID_NONE) && dev_P->isReal() ) { // Issue the modify command to the device tempStatus = dev_P->raidLAPcmd(LAP_CMD_MODIFY); if ((retVal==(MSG_RTN_FAILED | ERR_NO_RAID_DEVICES)) && (tempStatus != MSG_RTN_IGNORED)) retVal = tempStatus; } dev_P = (dptDevice_C *) logList.next(); } } return (retVal); } //dptManager_C::updateLAPparams() - end //Function - dptManager_C::getRAIDconfig() - start //=========================================================================== // //Description: // // This function returns the current RAID configuration to the //specified output buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- /* void dptManager_C::getRAIDconfig(dptBuffer_S *fromEng_P) { // Return all lower level RAID information dptObject_C *obj_P = (dptObject_C *) phyList.reset(); while (obj_P!=NULL) { // If a manager... if (obj_P->isManager()) // Return the lower level manager's RAID configuration ((dptManager_C *)obj_P)->getRAIDconfig(); // Get the next physical object obj_P = (dptObject_C *) phyList.next(); } // Return this manager's RAID configuration dptDevice_C *dev_P = (dptDevice_C *) logList.reset(); while (dev_P!=NULL) { // If this manager's RAID device... if (dev_P->isMyObject(this) && (dev_P->getRAIDtype()!=RAID_NONE)) { // Return this manager's object type fromEng_P->insert(getObjType()); // Return this manager's permanent address fromEng_P->insert(getPermAddr()); // Return the RAID configuration dev_P->rtnRAIDconfig(fromEng_P); } // Get the next logical device dev_P = (dptDevice_C *) logList.next(); } } //dptManager_C::getRAIDconfig() - end */ //Function - dptManager_C::newConfigLog() - start //=========================================================================== // //Description: // // This function attempts to create a new physical object from //the specified configuration data. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptDevice_C * dptManager_C::newConfigLog(uSHORT objSize, uSHORT objType, dptBuffer_S *toEng_P, uSHORT method, uSHORT dsmFlags) { uSHORT i; uLONG compSize,skipAmount; uLONG numStripes; dptDevice_C *comp_P; raidDef_S *raidDef_P; dptAddr_S specialAddr; uSHORT dataDevs; uLONG stripeSize; uLONG size, minNumStripes = 0xffffffffL; dptDevice_C *dev_P = (dptDevice_C *) newObject(objType); if (dev_P!=NULL) { skipAmount = toEng_P->readIndex; // Set the device information dev_P->setInfo(toEng_P,2); // Skip over any unread data skipAmount = objSize - (toEng_P->readIndex - skipAmount); toEng_P->skip(skipAmount); // Get a pointer to the RAID definition raidDef_P = getRAIDtdef(dev_P->getRAIDtype()); if (raidDef_P!=NULL) { // Get the number of components toEng_P->extract(compSize); compSize >>= 4; // Set the # of redundant drives // Fix for calculating # of redundants on Raid 1 - michiz // see dptRAIDmgr_C::sanityCheck() if (raidDef_P->redundants>0x80) dev_P->redundants = (uSHORT) (compSize / (raidDef_P->redundants - 0x80)); else dev_P->redundants = raidDef_P->redundants; // Get the # of data drives dataDevs = (uSHORT) (compSize - dev_P->redundants); // Build the component list for (i=0;iextract(&specialAddr,sizeof(dptAddr_S)); // Attempt to find the component device comp_P = findComponent(specialAddr,1); if (comp_P!=NULL) { // Skip the start LBA toEng_P->skip(sizeof(uLONG)); // Get the stripe size toEng_P->extract(stripeSize); // If RAID info only load... if (method==1 && !(dsmFlags & FLG_DSM_DONT_RECOMPUTE_ARRAYS)) { // Compute the # of stripes numStripes = 0; toEng_P->skip(sizeof(uLONG)); } else // Get the number of stripes from the config. info toEng_P->extract(numStripes); if (dataDevs) { // Set the RAID parent info comp_P->enterParent(dev_P,numStripes,stripeSize); dataDevs--; } else // Set the RAID parent info comp_P->enterParent(dev_P,numStripes,stripeSize,1); if (method==1 && !(dsmFlags & FLG_DSM_DONT_RECOMPUTE_ARRAYS)) { comp_P->updateMaxRaidLBA(); // ReCompute all zero value # stripes - michiz // see dptRAIDdev_C::computeComps() size = comp_P->calcNumStripes(); if (sizecompList,comp_P->getAddr()); dev_P->compList.add(comp_P); } else toEng_P->skip(12); } // If RAID info only load... if (method==1 && !(dsmFlags & FLG_DSM_DONT_RECOMPUTE_ARRAYS)) { comp_P = (dptDevice_C *) dev_P->compList.reset(); while (comp_P!=NULL) { // Set the # of stripes to minimum on all components - michiz comp_P->parent.numStripes = minNumStripes; comp_P = (dptDevice_C *) dev_P->compList.next(); } // ReCompute the size of this RAID device - michiz // Since every component has same # of stripes and stripe size, // calculation of size is easy. dataDevs = (uSHORT) (compSize - dev_P->redundants); size = minNumStripes * stripeSize * dataDevs; dev_P->capacity.maxLBA = dev_P->capacity.maxPhysLBA = size - 1; } // Flag the RAID device as absent dev_P->status.display = DSPLY_STAT_ABSENT; // Save the specified DPT name to hardware when a // set system config. is performed dev_P->scsiFlags |= FLG_ENG_NEW_NAME; } // end if (raidDef_P!=NULL) } return (dev_P); }//dptManager_C::newConfigLog() - end //Function - dptManager_C::~dptManager_C() - start //=========================================================================== // //Description: // // This function is the destructor for the dptManager_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptManager_C::~dptManager_C() { // Kill the ex-Real RAID list exRRlist.kill(); } //dptManager_C::~dptManager_C() - end raidutils-0.0.6.orig/raideng/manager.hpp0000664000175000000620000004664210044153311020100 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __MANAGER_HPP #define __MANAGER_HPP //File - MANAGER.HPP //*************************************************************************** // //Description: // // This file contains the class definitions for all the DPT manager //classes. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Class - dptCoreMgr_C - start //=========================================================================== // //Description: // // This class is the base class for all manager classes. This class //contains a logical device list and a physical object list. The logical //device list holds dptDeviceBase_C objects. The physical object list //holds dptCoreObj_C objects (which are either dptCoreDev_C or //dptCoreMgr_C objects. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- // flags // 1=This manager does not bubble physical devices up the // attachment chain // 0=This manager does bubble physical devices const uSHORT FLG_MGR_BUBBLER = 0x0001; class dptCoreMgr_C : public dptObject_C { // Friends............................................ friend class dptCoreCon_C; // Data............................................... // Miscellaneous flags - see bit definitions above uSHORT flags; // The at which this manager exists (0=highest level) uSHORT level; // Other Functions.................................... // Remove the specified device from this manager's logical // device list & all higher level manager's logical lists. void remLogical(dptCoreDev_C *); // Remove the specified object from this manager's lists void remFromMgr(dptCoreObj_C *); // Attempts to add a device to this manager's logical device list // and all higher level manager's logical device lists uSHORT bubble(dptCoreDev_C *); protected: // Virtual Functions.................................. // Called prior to entering a device in the logical device list // - Called only for the manager that the device is attached to // - If a zero is returned, the device is not added to the list virtual DPT_RTN_T preEnterLog(dptCoreDev_C *) {return (0);} //PV // Called prior to adding a device to the logical device list // - Can be used to keep a sorted list // - If a zero is returned, the device is not added to the list virtual uSHORT preAddLog(dptCoreDev_C *) {return (0);} //PV // Called prior to entering a device in the physical device list // - Can be used to keep a sorted list // - If a zero is returned, the device is not added to the list virtual DPT_RTN_T preEnterPhy(dptCoreObj_C *) {return (0);} //PV // Called prior to adding an object to the physical object list // - Can be used to keep a sorted list // - If a zero is returned, the device is not added to the list virtual uSHORT preAddPhy(dptCoreObj_C *) {return (0);} //PV // Called after a device has been added to the logical device // list. Can be used to update device flags... virtual void postAddLog(dptCoreDev_C *) {} // Called after a device has been added to the physical device // list. Can be used to update object flags... virtual void postAddPhy(dptCoreObj_C *) {} // Handler for an unsuccessfull add to engine core operation // - The specified device is not in any core lists when // this function is called. virtual void notAddedToCore(dptCoreObj_C *obj_P) { // Free the object from memory delete(obj_P); } // Creates a new DPT object virtual dptObject_C * newObject(uSHORT) {return (NULL);} //PV // Performs post delete operations // (Called prior to the object actually being deleted from memory) virtual void postDelete(dptCoreObj_C *) {} // Set Flags.......................................... // Indicate that this manager does not bubble physical devices // up the attachment chain void setNoBubble() { flags |= FLG_MGR_BUBBLER; } // Indicate that this manager bubbles physical devices up the // attachment chain void setBubble() { flags |= FLG_MGR_BUBBLER; } // Other Functions.................................... // Deletes all objects attached to this manager and all sub-managers void delAllObjects(); public: // Data............................................... // List of all logical devices presented by this manager to the // next level. // - Read only to all classes except this class dptCoreList_C logList; // List of all physical objects attached to this manager // - Read only to all classes except this class dptCoreList_C phyList; // Constructor/Destructor............................. dptCoreMgr_C(); // Return private data................................ // Return this manager's level of operation uSHORT getLevel() { return (level); } // Determine the level of an attached device virtual uSHORT getDevLevel(dptCoreDev_C *); // Boolean Functions.................................. // Determines if physical devices are passed up the attachment chain uSHORT isBubbler() { return (!(flags & FLG_MGR_BUBBLER)); } // Other Functions.................................... // Entry point for adding a device to this manager's logical // device list and all higher level managers' logical device lists DPT_RTN_T enterLog(dptCoreDev_C *); // Entry point for adding an object to this manager's physical // device list. DPT_RTN_T enterPhy(dptCoreObj_C *); }; //dptCoreMgr_C - end //Class - dptSCSImgr_C - start //=========================================================================== // //Description: // // This class defines a SCSI manager. This class contains all data //and functions common to all SCSI managers. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- //rbldFlags - bit definitions #define FLG_RBLD_CHECK_AT_BOOT 0x0001 class dptSCSImgr_C : public dptCoreMgr_C { // Friends............................................ // Needs access to phyRange friend class dptRAIDdrvr_C; friend class dptDriver_C; // Other Functions.................................... // Creates an artificial object DPT_RTN_T createArtificial(dptBuffer_S *,dptBuffer_S *); protected: // Data............................................... // Defines the physical SCSI address range supported dptAddrRange_C phyRange; // Rebuild frequency for this manager // (Delay in tenths of a second between rebuild bursts) uSHORT rbldFrequency; // Rebuild amount for this manager (# blocks per burst) uSHORT rbldAmount; // Flags indicating which RAID levels are supported uSHORT raidSupport; // # seconds to wait to spin down a failed drive uSHORT spinDownDelay; // Poll interval to check for array rebuilding (in seconds) uSHORT rbldPollFreq; // Miscellaneous rebuild flags - see bit definitions above uSHORT raidFlags; // Virtual Functions.................................. // Called prior to entering a device in the logical device list // - Sets the logical device's HBA pointer virtual DPT_RTN_T preEnterLog(dptCoreDev_C *); // Called prior to adding a device to the logical device list virtual uSHORT preAddLog(dptCoreDev_C *); // Called prior to entering a device in the physical object list // - Sets the physical object's HBA pointer virtual DPT_RTN_T preEnterPhy(dptCoreObj_C *); // Called prior to adding an object to the physical object list virtual uSHORT preAddPhy(dptCoreObj_C *); // Return object information in the specified output buffer virtual DPT_RTN_T rtnInfo(dptBuffer_S *); // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); // Set absent object information from the specified input buffer virtual DPT_RTN_T setInfo(dptBuffer_S *,uSHORT); // Enter an absent object into the engine core virtual DPT_RTN_T enterAbs(dptSCSIobj_C *obj_P) { // Enter into the physical object list return (enterPhy(obj_P)); } // Determine if the specified object type can be created virtual uSHORT isValidAbsentObj(uSHORT); // Other Functions.................................... public: // Construstor/Destructor............................. dptSCSImgr_C(); // Return private data................................ // Return the maximum physical address supported dptAddr_S getMaxAddr() { return (phyRange.getMaxAddr()); } // Return the minimum physical address supported dptAddr_S getMinAddr() { return (phyRange.getMinAddr()); } // Determines if array LUN segmenting is supported uSHORT isSegSupported() const { return raidFlags & FLG_SEG_SUPPORTED; } // Virtual Functions.................................. // Return the physical SCSI ID the manager resides on virtual uCHAR getMgrPhyID() { return (getID()); } // Other Functions.................................... // Gets the next available address in the specified list uSHORT getNextAddr(dptCoreList_C &,dptAddr_S &, uCHAR=0xf,uCHAR=0); // Determine if the specified SCSI address exists in the physical // object list. uSHORT isUniquePhy(dptAddr_S _addr,uCHAR mask) { return (isUniqueAddr(phyList,_addr,mask)); } // Determine if the specified SCSI address exists in the logical // device list. uSHORT isUniqueLog(dptAddr_S _addr,uCHAR mask) { return (isUniqueAddr(logList,_addr,mask)); } // Return the rebuild frequency and amount uSHORT getRbldFrequency() const { return rbldFrequency; } uSHORT getRbldAmount() const { return rbldAmount; } // Create a new device from the specified config. data void newConfigPhy(uSHORT,dptBuffer_S *); // Virtual Functions.................................. // Determines if this manager is capable of configuring RAID devices virtual uSHORT isRAIDcapable() { return (0); } }; //dptSCSImgr_C - end //Class - dptRAIDmgr_C - start //=========================================================================== // //Description: // // This class defines a RAID manager. // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This class requires dptSCSImgr_C // //--------------------------------------------------------------------------- class dptRAIDmgr_C : public dptSCSImgr_C { // Perform a preliminary sanity check on the specified RAID // device's components DPT_RTN_T sanityCheck(dptRAIDdev_C *&,dptBuffer_S *&, raidDef_S *&, uCHAR offset = 0); protected: // Data............................................... // Maximum permissible # of arrays (including Hot-Spares) uSHORT maxArrays; // Table of drive size ranges driveSizeTable_S *driveSizeTable_P; // List of RAID definitions dptRAIDdefList_C raidDefList; // Virtual Functions.................................. // Get the next available address for the specified RAID device virtual void getRAIDaddr(dptRAIDdev_C *); // Called prior to removing this object from the engine core. // Return values: // 0 = Take no action // 1 = Remove from engine core and free from memory // 2 = Remove from engine core but do not free from memory // (The object must be maintained at a higher level) virtual uSHORT preDelete(); // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); // Message Handlers................................... // Attempt to create a new RAID drive DPT_RTN_T newRAID(dptBuffer_S *,dptBuffer_S *,uSHORT=0); // expands an array, change the raid type, change the stripe size DPT_RTN_T changeRAID(dptBuffer_S *toEng_P); // Add a RAID definition to the RAID definition list uSHORT enterRAIDdef(raidDef_S *&inDef_P); // Other Functions.................................... // Return a pointer to the RAID definition with the specified // reference number. raidDef_S * getRAIDrdef(uSHORT); // Return a pointer to the first RAID definition with the specified // RAID type. raidDef_S * getRAIDtdef(uSHORT); // Return the # of redundant drives associated with the specified // RAID type. uSHORT getRedundants(uSHORT,uSHORT); // Get a pointer to the RAID device with the specified tag dptRAIDdev_C * getVisible(DPT_TAG_T &); // Determines the # of arrays owned by this manager uSHORT getNumArrays(); DPT_RTN_T ExpandArrayAddDevices(dptRAIDdev_C *array_P, raidCompList_S *list_P, uCHAR numInComponents); DPT_RTN_T ExpandArrayRemoveDevices(dptRAIDdev_C *array_P, raidCompList_S *list_P, uCHAR numInComponents); public: // Return the maximum RAID LBA using this manager's drive size table uLONG getMaxRaidLBA(uLONG inLBA); // Constructor/Desctructor............................ dptRAIDmgr_C(); ~dptRAIDmgr_C(); }; //dptRAIDmgr_C - end //Class - dptManager_C - start //=========================================================================== // //Description: // // This class is the highest level DPT Manager class. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptManager_C : public dptRAIDmgr_C { protected: // Data............................................... // Former real RAID devices associated with this manager dptCoreList_C exRRlist; // Virtual Functions.................................. // Creates a new DPT object virtual dptObject_C * newObject(uSHORT); // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); // Entry point to send a CCB to hardware virtual DPT_RTN_T launchCCB(engCCB_C *); // Finds this manager's physical objects virtual uSHORT findMyPhysicals() { return (1); } // Finds this manager's logical objects virtual uSHORT findMyLogicals() { return (1); } // Finds a component device virtual dptDevice_C * findComponent(dptAddr_S,uSHORT=0,uLONG=0, dptCoreList_C *list_P=NULL) { return (NULL); } // Initializes all HBAs virtual void initHBAs() {} // Perform initialization after all this manager's devices // have been initialized virtual void scanPostInit() {} // Other Functions.................................... // Initialize a logical device with NCR LAP #1 void initLAPncr1(dptDevice_C *,engCCB_C *); // Initialize a logical device with DPT LAP #1 void initLAPdpt1(dptDevice_C *,engCCB_C *); // Initialize a logical device with DPT LAP #2 void initLAPdpt2(dptDevice_C *,engCCB_C *); // Gets a list of logical devices using log page 0x36 void newLP36Devices(engCCB_C *,dptHBA_C *); // Enables the current configuration in hardware DPT_RTN_T enableConfig(); // Deletes old RAID devices from hardware uSHORT delOldRAIDs(); // Enables new RAID devices in hardware uSHORT enableNewRAIDs(); // Perform OS functionality to bring an LSU offline void lsuOffline(); // Build NCR logical array page #1 void buildLAPncr1(engCCB_C *,dptDevice_C *,uCHAR,uCHAR); // Build DPT logical array page #1 void buildLAPdpt1(engCCB_C *,dptDevice_C *,uCHAR,uCHAR); // Build DPT logical array page #2 void buildLAPdpt2(engCCB_C *,dptDevice_C *,uCHAR,uCHAR); // Build the NCR logical array page #1 component bit map void buildNCR1map(dptDevice_C *,uCHAR *); // Build the DPT logical array page #1 component list void buildDPT1list(dptDevice_C *,uCHAR *); // Build the DPT logical array page #2 component list void buildDPT2list(dptDevice_C *,uCHAR *); // Build the LUN segment list void buildDPT2segmentList(dptDevice_C *,uCHAR *); // Set this manager's physical devices' PAP status void setPhyPAP(engCCB_C *); // Updates the logical array page (LAP) parameters virtual DPT_RTN_T updateLAPparams(); // Message Handlers................................... // Set the specified data field to the specified value virtual DPT_RTN_T setDataField(dptBuffer_S *); public: // Constructor/Destructor............................. ~dptManager_C(); // Virtual Functions.................................. // Adjust a CCB as necessary and pass it on to the next manager virtual DPT_RTN_T passCCB(engCCB_C *); // Return the logical array page used virtual uSHORT getLAPpage() { return (0x2b); } // Set device physical array page (PAP) information virtual DPT_RTN_T setPAPinfo(dptDevice_C *dev_P=NULL); // Other Functions.................................... // Build a logical array page select command uCHAR buildLAPselect(engCCB_C *,dptDevice_C *,uCHAR,uCHAR); // Finds all of this manager's physical objects uSHORT scanPhysicals(uSHORT searchType); // Finds all of this manager's logical devices uSHORT scanLogicals(); // Initializes all objects after scanning uSHORT scanInit(uSHORT=0); // Initialize a real logical device void initRL(dptDevice_C *,engCCB_C *); // Enter a device in the ex-Real RAID device list void enterExRR(dptDevice_C *dev_P) { exRRlist.addEnd(dev_P); } // Update the status of all devices from this manager down DPT_RTN_T updateAllStatus(); // Get a physical array page (PAP) DPT_RTN_T getPAP(engCCB_C *); // Sends a physical array page (PAP) command to hardware DPT_RTN_T sendPAPcmd(dptDevice_C *,uCHAR); // Set this manager's logical devices' PAP status void setLogPAP(engCCB_C *); // Create a new logical device from the specified config. info dptDevice_C * newConfigLog(uSHORT,uSHORT,dptBuffer_S *,uSHORT=0, uSHORT=0); }; //dptManager_C - end #endif raidutils-0.0.6.orig/raideng/msg_str.cpp0000664000175000000620000001367010044153333020136 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - MSG_STR.CPP //*************************************************************************** // //Description: // // This file contains the text message strings for the // //Author: Doug Anderson //Date: 3/31/94 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "osd_util.h" //Variables - Global -------------------------------------------------------- char *engMessageArray[] = { NULL,NULL,NULL,NULL, // 0x00 NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL, "CONNECT", // 0x10 "DISCONNECT", "GET_ERROR", "GET_ALL_ERRORS", "IO_SCAN_SYSTEM", "IO_SCAN_PHYSICALS", "IO_SCAN_LOGICALS", "ID_PHYSICALS", "ID_VISIBLES", "ID_ALL_PHYSICALS", "ID_LOGICALS", "ID_ALL_LOGICALS", "ID_COMPONENTS", "ID_ALL_COMPONENTS", "ID_HIDDEN_DEVICES", "ID_BY_VENDOR", "ID_BY_PRODUCT", // 0x20 "ID_BY_REVISION", "ID_BY_VENDOR_EXTRA", "ID_BY_DPT_NAME", "ID_BY_SCSI_ADDR", "ID_BY_STATUS", "RAID_NEW", "RAID_GHOST", "RAID_DEFINE", "RAID_GET_DEF", "RAID_SET_PARAMS", "RAID_GET_PARAMS", "RAID_RESTRICT", "RAID_UNRESTRICT", "RAID_HW_ENABLE", "RAID_GET_MAP", "RAID_BUILD", // 0x30 "RAID_REBUILD", "RAID_VERIFY", "RAID_VERIFY_FIX", "RAID_VERIFY_ABORT", "RAID_ABORT", "RAID_REMAP_ADDR", "RAID_GET_PROGRESS", "RAID_SET_RATE", "ALARM_ON", "ALARM_OFF", "RESET", "RESET_SCSI_BUS", "GET_LOG_PAGE", "GET_MODE_PAGE", "QUIET", "UNQUIET", // 0x40 "RELOCK_DRIVES", "GET_TIME", "SET_TIME", "ABS_NEW_OBJECT", "ABS_SET_INFO", "GET_INFO", "GET_USER_BUFF", "SET_USER_BUFF", "GET_DPT_NAME", "SET_DPT_NAME", "GET_ENGINE_SIG", "GET_DRIVER_SIG", "GET_SYSTEM_INFO", "GET_IO_STATS", "CLEAR_IO_STATS", "GET_HBA_STATS", // 0x50 "CLEAR_HBA_STATS", #ifdef _SINIX // fixed misspell "FORCE_STATE", #else "FORCE_FAILED", #endif "FORCE_WARNING", "FORCE_OPTIMAL", "FORCE_REPLACED", "UPDATE_STATUS", "UPDATE_ALL_STATUS", "SCSI_CMD", "SCSI_READ", "SCSI_WRITE", "SCSI_FORMAT", "SCSI_FORMAT_CERTIFY", "SET_EMULATION", "SET_RB_BUFFER", "GET_RB_BUFFER", "DELETE", // 0x60 "DELETE_ALL", "GET_CONFIG", "SET_CONFIG", "RAID_SET_CONFIG", "LOG_READ", "LOG_CLEAR", "LOG_SET_HBA_FILTER", "LOG_SET_STATUS", "LOG_REGISTER", "LOG_UNREGISTER", "LOG_LOAD", "LOG_UNLOAD", "LOG_START", "LOG_STOP", "LOG_GET_STATUS", "LOG_GET_SIG", // 0x70 "RAID1_SET_TARGET", "DIAGNOSTICS_ON", "DIAGNOSTICS_OFF", "DEL_ALL_EMULATION", "LOG_SAVE_PARMS", "DOWNLOAD_FW", "DEACTIVATE_FW", "RESERVE_BLOCKS", "GET_COMPATABILITY", "UDPATE_ADDR_STAMP", "SET_MODE_PAGE", #ifdef _SINIX "SET_INFO", "GET_NV_INFO", "SET_NV_INFO", "ID_ALL_HIDDEN", "SLOG_REGISTER", // 0x80 "SLOG_UNREGISTER", "SLOG_GET_STATUS", "SLOG_SET_STATUS", "SLOG_READ", "FLASH_SWITCH_INTO", "FLASH_SWITCH_OUT_OF", "FLASH_WRITE", "FLASH_WR_NO_VERIFY", "FLASH_WRITE_DONE", "FLASH_READ", "FLASH_STATUS", "DIAG_SCHEDULE", "DIAG_UNSCHEDULE", "DIAG_STOP", "DIAG_EXCLUDE", "DIAG_GET_SCHEDULE", // 0x90 "RAID_GET_LIMITS", "SMART_EMUL_ON", "SMART_EMUL_OFF", NULL,NULL,NULL,NULL, // 0x94 NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL, // 0x9f #else NULL,NULL,NULL,NULL, // 0x7f NULL,NULL,NULL,NULL, // 0x80 NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL, // 0x8f NULL,NULL,NULL,NULL, // 0x90 NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL, // 0x9f #endif "SCAN_FOR_END_PTS", // 0xa0 "ID_END_PTS", "ID_COMM_MODULES", "SET_MOD_FLAGS", "CLR_MOD_FLAGS", "DISCONNECT_ALL", "LOGIN", "ICRS_REQ_START", "ICRS_REQ_STOP", "ICRS_FULFILL_REQ", "ICRS_START_THREAD", "LINK_ALIVE", "NEW_MASTER", // 0xac NULL, NULL, "DISPLAY_STDOUT" #ifdef _SINIX "ID_ALL_BROADCASTERS", // 0xb0 "ID_BROADCASTERS", "GET_BROADCASTER_INFO", "SET_BROADCASTER_INFO", "LOAD_BROADCAST_MODULE", "UNLOAD_BROADCAST_MODULE", "CREATE_BROADCASTER", "DELETE_BROADCASTER" #endif }; uSHORT MAX_MESSAGE_NUM = sizeof(engMessageArray)/sizeof(char *); char *engStatusArray[] = { "COMPLETED", // 0x0000 "DATA_OVERFLOW", // 0x0001 "DATA_UNDERFLOW", // 0x0002 "WARNING", // 0x0003 "IGNORED", // 0x0004 "NO_OBJECT", // 0x0005 "NOT_ATTACHED", // 0x0006 "NULL_BUFFER", // 0x0007 "DISCONNECT" // 0x0008 }; uSHORT MAX_STATUS_NUM = sizeof(engStatusArray)/sizeof(char *); raidutils-0.0.6.orig/raideng/msg_str.hpp0000664000175000000620000000444410044153311020136 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __MSG_STR_HPP #define __MSG_STR_HPP //File - MSG_STR.HPP //*************************************************************************** // //Description: // // This file contains the external references to the DPT engine //message and engine message return status string arrays. These arrays //can be used to display which messages have been received and their //return status. // //Author: Doug Anderson //Date: 3/31/94 // //Editors: // //Remarks: // // //*************************************************************************** // Variables - External ----------------------------------------------------- extern char *engMessageArray[]; extern char *engStatusArray[]; extern uSHORT MAX_MESSAGE_NUM; extern uSHORT MAX_STATUS_NUM; #endif raidutils-0.0.6.orig/raideng/object.cpp0000664000175000000620000005322710044153311017724 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - OBJECT.CPP //*************************************************************************** // //Description: // // This file contains function definitions for the dptObject_C class. // //Author: Doug Anderson //Date: 4/12/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" // Engine testing specific (RTS) extern "C" { extern int EngineTest; } //Function - dptObject_C::selfInquiry() - start //=========================================================================== // //Description: // // This function performs a SCSI inquiry for this object and //initializes this object's data structures from the inquiry data. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptObject_C::selfInquiry() { uSHORT periphDevType = DPT_SCSI_DASD; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB for a SCSI Inquiry command ccb_P->inquiry(); // Target the CCB for this manager ccb_P->target(this); // Send the CCB to HW if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) // Initialize this object using the SCSI inquiry data periphDevType = inquiryInit((sdInquiry_S *) ccb_P->defData); // Free the CCB ccb_P->clrInUse(); } // Return the peripheral device type return (periphDevType); } //dptObject_C::selfInquiry() - end //Function - dptObject_C::inquiryInit() - start //=========================================================================== // //Description: // // This function initializes this object from the specified SCSI //inquiry structure. // //--------------------------------------------------------------------------- uSHORT dptObject_C::inquiryInit(sdInquiry_S *inq_P) { // Get the peripheral device type uSHORT periphDevType = inq_P->getPeripheral() & 0x1f; // Copy the version byte descr.version = inq_P->getVersion(); // Copy the capabilities flags descr.inqFlag1 = inq_P->getMiscFlag1(); descr.inqFlag2 = inq_P->getMiscFlag2(); // Copy the ASCII description data memcpy(descr.vendorID,inq_P->getVendorID(),8); memcpy(descr.productID,inq_P->getProductID(),16); memcpy(descr.revision,inq_P->getRevision(),4); memcpy(descr.vendorExtra,inq_P->getVendorExtra(),20); descr.terminate(); // Check for removeable media if (inq_P->getDevType() & DEVTYPE_RMB) setRemoveable(); // look for SAF-TE in the vendor extra field or the product ID if (memcmp(inq_P->getVendorExtra()+8, "SAF-TE", 6) == 0) setSAFTE(); if (inq_P->getReserved2() & MISC_ENCSERV) setSES(); char *magicSig_P; uCHAR sigOffset=inq_P->getLength(); if (sigOffset < 0x0c) { sigOffset -= 0x0c; sigOffset += 5; magicSig_P = ((char *) inq_P) + sigOffset; } else sigOffset -= 7; magicSig_P = ((char *) inq_P) + sigOffset; // If there is a DPT magic number... if (memcmp(magicSig_P,"DPTMAGIC",8) == 0) { magicNum = getU4(inq_P,sigOffset + 8); osdSwap4(&magicNum); magicNum &= 0x7fffffff; } /*char *magicSig_P = ((char *) inq_P) + inq_P->getLength() - 7; // If there is a DPT magic number... if (memcmp(magicSig_P,"DPTMAGIC",8) == 0) { magicNum = getU4(inq_P,inq_P->getLength() + 1); osdSwap4(&magicNum); magicNum &= 0x7fffffff; }*/ return (periphDevType); } //dptObject_C::inquiryInit() - end //Function - dptObject_C::handleMessage() - start //=========================================================================== // //Description: // // This routine handles DPT events for this class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptObject_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Get the specified log page from this object case MSG_GET_LOG_PAGE: retVal = modeLogSense(toEng_P,fromEng_P,1); break; // Get the specified mode page from this object case MSG_GET_MODE_PAGE: retVal = modeLogSense(toEng_P,fromEng_P,0); break; // Send the specified mode page to this object case MSG_SET_MODE_PAGE: retVal = doModeSelect(toEng_P); break; // Send the specified SCSI command to this object case MSG_SCSI_CMD: retVal = scsiPassThru(toEng_P,fromEng_P); break; // Issue a SCSI reserve command to this device case MSG_RESERVE_DEVICE: retVal = reserveDevice(); break; // Issue a SCSI release command to this device case MSG_RELEASE_DEVICE: retVal = releaseDevice(); break; default: // Call base class event handler retVal = dptSCSIobj_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return (retVal); } //dptObject_C::handleMessage() - end //Function - dptObject_C::reserveDevice() - start //=========================================================================== //Description: // This function issues a SCSI reserve command to the object to //request the controller gain exclusive access to the object. This //command should target LSUs or the controller itself to reserve //all LSUs on the controller. //--------------------------------------------------------------------------- DPT_RTN_T dptObject_C::reserveDevice() { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Issue a SCSI reserve command ccb_P->reserve(); // Target this object ccb_P->target(this); // Send the CCB to hardware retVal = launchCCB(ccb_P); // If this object is a device... if (isDevice()) { dptDevice_C *dev_P = (dptDevice_C *) this; if (ccb_P->scsiStatus == 0x18) { dev_P->setResConflict(); } else { dev_P->clrResConflict(); } } // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptObject_C::reserveDevice() - end //Function - dptObject_C::releaseDevice() - start //=========================================================================== //Description: // This function issues a SCSI release command to the object to //request the controller release exclusive access to the object. This //command should target LSUs or the controller itself to release //all LSUs on the controller. //--------------------------------------------------------------------------- DPT_RTN_T dptObject_C::releaseDevice() { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Issue a SCSI reserve command ccb_P->release(); // Target this object ccb_P->target(this); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptObject_C::releaseDevice() - end //Function - dptObject_C::scsiPassThru() - start //=========================================================================== // //Description: // // This function sends the specified SCSI command to this object. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptObject_C::scsiPassThru(dptBuffer_S *toEng_P, dptBuffer_S *fromEng_P ) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; uCHAR *data_P = NULL; uSHORT eataFlags; uLONG dataLength; // Insure that all required input data exists if (toEng_P->writeIndex>=18) { // Get the EATA flags toEng_P->extract(eataFlags); // Get the # of data bytes to be transfered toEng_P->extract(dataLength); // If both data input and data output... if ((eataFlags & CP_DATA_IN) && (eataFlags & CP_DATA_OUT)) retVal = MSG_RTN_FAILED | ERR_DATA_IN_OUT; // If data input... else if (eataFlags & CP_DATA_IN) { retVal = MSG_RTN_DATA_OVERFLOW; if (fromEng_P->allocSize>=dataLength) { retVal = MSG_RTN_COMPLETED; data_P = fromEng_P->data; } } // If data output... else if (eataFlags & CP_DATA_OUT) { retVal = MSG_RTN_DATA_UNDERFLOW; if ((toEng_P->allocSize-18)>=dataLength) { retVal = MSG_RTN_COMPLETED; data_P = toEng_P->data+18; } } else retVal = MSG_RTN_COMPLETED; if (retVal==MSG_RTN_COMPLETED) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Set the SCSI CDB toEng_P->extract(ccb_P->eataCP.scsiCDB,12); // Target this object ccb_P->target(this); // Set the EATA CP flags byte ccb_P->eataCP.flags |= eataFlags & 0xe3; // If the physical bit should not be set if (eataFlags & 0x0100) ccb_P->setNoEATAphys(); // If this is a RAID command if (eataFlags & 0x8000) // Set the appropriate RAID bits ccb_P->setRAIDcmd(); // If there is data transfer... if (data_P!=NULL) // Set the data pointer ccb_P->setDataBuff(ptrToLong(data_P),dataLength); // Send the CCB to hardware retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) { // If data was returned if (eataFlags & CP_DATA_IN) { // Set the buffer write index fromEng_P->writeIndex = dataLength; } } // Code specific to testing engine via RTS else if( EngineTest && ( ccb_P->scsiStatus == 2 ) && ( fromEng_P != NULL ) ) { memcpy( fromEng_P->data, ccb_P->defReqSense, DEFAULT_REQ_SENSE_SIZE ); } // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) } // end if (retVal==MSG_RTN_COMPLETED) } // if (toEng_P->writeIndex>=18) return (retVal); } //dptObject_C::scsiPassThru() - end //Function - dptObject_C::modeLogSense() - start //=========================================================================== // //Description: // // This function issues a mode sense or log sense command to this object. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptObject_C::modeLogSense(dptBuffer_S *toEng_P, dptBuffer_S *fromEng_P, uSHORT senseType ) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; uCHAR page,lFlags; uSHORT ppOffset; uCHAR controlByte = 0; uCHAR unused = 0; // Get the log page code toEng_P->extract(page); // Get the flags byte if (toEng_P->extract(lFlags)) { // Get the optional parameter pointer/offset if (!toEng_P->extract(ppOffset)) { ppOffset = 0; } // Get the optional control byte toEng_P->extract(controlByte); // If log sense... if (senseType) { // If the Read & Clear bit is set, ensure the SP bit is cleared if (controlByte & 0x40) { if (lFlags & 0x01) { retVal = ERR_ELOG_NON_ZERO_SP; } else if (ppOffset) { retVal = ERR_ELOG_NON_ZERO_OFFSET; } } // If no other errors... if (retVal == MSG_RTN_DATA_UNDERFLOW) { // Issue the log sense command retVal = doLogSense(fromEng_P,page,lFlags,(uLONG)ppOffset, 0, controlByte); } } else // Issue the mode sense command retVal = doModeSense(fromEng_P,page,lFlags); } // end if (toEng_P->extract(lFlags)) return (retVal); } //dptObject_C::modeLogSense() - end //Function - dptObject_C::doLogSense() - start //=========================================================================== // //Description: // // This function issues a SCSI log sense command to this device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptObject_C::doLogSense(dptBuffer_S *fromEng_P, uCHAR pageCode, uCHAR inFlags, uLONG ppOffset, uSHORT eventLogRequest, uCHAR controlByte ) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Set the data buffer ccb_P->setDataBuff(ptrToLong(fromEng_P->data),fromEng_P->allocSize); // Target this object ccb_P->target(this); // If the physical bit should not be set... if (inFlags & 0x20) { ccb_P->setNoEATAphys(); inFlags &= ~0x20; } // If this is an event log command... if (eventLogRequest) // Indicate that this is an event logger command ccb_P->setLoggerCmd(ppOffset); // Determine the buffer alloc size uSHORT logSenseAlloc = (fromEng_P->allocSize > 0xffffL) ? 0xffff : (uSHORT) fromEng_P->allocSize; // Initialize the CCB to perform a SCSI log sense ccb_P->logSense(pageCode,inFlags,logSenseAlloc,(uSHORT)ppOffset, controlByte); // Send the CCB to hardware retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) { fromEng_P->writeIndex = ccb_P->dataBuff_P[3]; fromEng_P->writeIndex |= ((uSHORT)ccb_P->dataBuff_P[2]) << 8; #ifdef _SINIX // SNI Fix: when no logger data return error to avoid looping dptmgr if (fromEng_P->writeIndex == 0) retVal = MSG_RTN_DATA_UNDERFLOW; #endif fromEng_P->writeIndex += 4; } // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) return (retVal); } //dptObject_C::doLogSense() - end //Function - dptObject_C::doModeSense() - start //=========================================================================== // //Description: // // This function issues a SCSI mode sense command to this device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptObject_C::doModeSense(dptBuffer_S *fromEng_P, uCHAR pageCode, uCHAR inFlags ) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Target this object ccb_P->target(this); // If the physical bit should not be set... if (inFlags & 0x20) { ccb_P->setNoEATAphys(); inFlags &= ~0x20; } // If use a 10 byte if (inFlags & 0x80) // 10 byte mode sense CDB ccb_P->modeSense(pageCode,inFlags,0,DEFAULT_DATA_SIZE); else // 6 byte mode sense CDB ccb_P->modeSense6(pageCode,inFlags,0); // If the interpret bit should be set... if (inFlags & 0x40) ccb_P->setInterpret(); // Send the CCB to hardware retVal = launchCCB(ccb_P); if (retVal == MSG_RTN_COMPLETED) { retVal = MSG_RTN_DATA_OVERFLOW; uSHORT rtnLength = 0; // Return zero in the first 2 bytes for mode select compatability fromEng_P->insert(rtnLength); // If a 10 byte CDB was sent... if (inFlags & 0x80) { rtnLength = *((uSHORT *)ccb_P->defData); reverseBytes(rtnLength); if (fromEng_P->insert(ccb_P->defData+8,rtnLength-6)) retVal = MSG_RTN_COMPLETED; } // If a 6 byte CDB was sent... else if (fromEng_P->insert(ccb_P->defData+4,ccb_P->defData[0]-3)) retVal = MSG_RTN_COMPLETED; } // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) return (retVal); } //dptObject_C::doModeSense() - end //Function - dptObject_C::doModeSelect() - start //=========================================================================== // //Description: // // This function issues a SCSI mode sense command to this device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptObject_C::doModeSelect(dptBuffer_S *toEng_P) { uCHAR inFlags; DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; // Insure that the minimum amount of data was specified... if (toEng_P->writeIndex>=4) { retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Get the flags word toEng_P->extract(inFlags); // Toggle the page format and save page bits inFlags ^= 0x03; // Skip the unused byte toEng_P->skip(1); // Get the amount of valid mode page data uSHORT dataLength = (uSHORT) toEng_P->writeIndex - 2; // Clear the first 8 bytes (mode header) of the output data buffer memset(ccb_P->defData,0,8); // Target this object ccb_P->target(this); // If the physical bit should not be set... if (inFlags & 0x20) { ccb_P->setNoEATAphys(); inFlags &= ~0x20; } // If use a 10 byte... if ((inFlags & 0x80) || (dataLength > (0xff-4))) { // If the data is larger than the output buffer... if (dataLength > (DEFAULT_DATA_SIZE-8)) return (MSG_RTN_DATA_OVERFLOW); // 10 byte mode sense CDB ccb_P->modeSelect(0,dataLength,inFlags & 0x3f); // Copy the mode select data into the output buffer memcpy(ccb_P->defData+8,toEng_P->data+2,dataLength); } else { // 6 byte mode sense CDB ccb_P->modeSelect6(0,dataLength,inFlags & 0x3f); // Copy the mode select data into the output buffer memcpy(ccb_P->defData+4,toEng_P->data+2,dataLength); } // If the interpret bit should be set... if (inFlags & 0x40) ccb_P->setInterpret(); // Send the CCB to hardware retVal = launchCCB(ccb_P); // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) } return (retVal); } //dptObject_C::doModeSelect() - end //Function - dptObject_C::addRWstats() - start //=========================================================================== // //Description: // // This function gets the read/write statistics for this object //and adds them to the stats at the specified buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptObject_C::addRWstats(DPT_UNALIGNED uLONG *statBuff_P,uCHAR savePage) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to get this device's statistics ccb_P->logSense(0x32,savePage); // Target this device ccb_P->target(this); // The HBA should interpret this command ccb_P->setInterpret(); // Send the CCB to hardware retVal = launchCCB(ccb_P); if ((retVal == MSG_RTN_COMPLETED) && (statBuff_P != NULL)) { DPT_UNALIGNED uLONG *newStat_P; uSHORT i,startOffset,numLongs; dptDevStatLog_C devStat; // Initialize the return data (reverse bytes) devStat.initSense(ccb_P->defData,1); // Add this device's statistics to the return data while (devStat.isValidParam()) { // Check for a known parameter code if ((devStat.code() >= 1) && (devStat.code() <= 7)) { switch (devStat.code()) { case 1: numLongs = sizeof(readStats_S)>>2; startOffset = 0; break; case 2: numLongs = sizeof(rwSizeStats_S)>>2; startOffset = sizeof(readStats_S)>>2; break; case 3: numLongs = sizeof(writeStats_S)>>2; startOffset = (sizeof(readStats_S)+ sizeof(rwSizeStats_S))>>2; break; case 4: numLongs = sizeof(rwSizeStats_S)>>2; startOffset = (sizeof(readStats_S)+ sizeof(rwSizeStats_S) + sizeof(writeStats_S))>>2; break; case 5: numLongs = sizeof(miscDevStats_S)>>2; startOffset = (sizeof(readStats_S)+ sizeof(rwSizeStats_S) + sizeof(writeStats_S) + sizeof(rwSizeStats_S))>>2; break; case 6: numLongs = sizeof(rwSizeStat2_S)>>2; startOffset = (sizeof(readStats_S)+ sizeof(rwSizeStats_S) + sizeof(writeStats_S) + sizeof(rwSizeStats_S) + sizeof(miscDevStats_S))>>2; break; case 7: numLongs = sizeof(rwSizeStat2_S)>>2; startOffset = (sizeof(readStats_S)+ sizeof(rwSizeStats_S) + sizeof(writeStats_S) + sizeof(rwSizeStats_S) + sizeof(miscDevStats_S) + sizeof(rwSizeStat2_S))>>2; break; } newStat_P = (uLONG *) devStat.data_P(); // Add the new statistics to the return statistics for (i=0;iclrInUse(); } // end if (ccb_P!=NULL) return (retVal); } //dptObject_C::addRWstats() - end raidutils-0.0.6.orig/raideng/object.hpp0000664000175000000620000003167410044153333017737 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __OBJECT_HPP #define __OBJECT_HPP //File - OBJECT.HPP //*************************************************************************** // //Description: // // This file contains the class definitions for all the DPT object //classes. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Class - dptCoreObj_C - start //=========================================================================== // //Description: // // This class is the base class for all engine manageable classes. // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- //objFlags // 1=The object is a manager, 0=The object is a device const uSHORT FLG_OBJ_TYPE = 0x0001; class dptCoreObj_C : public dptCore_C { // Friends............................................ // The connection's handleMessage must call object handle message friend DPT_RTN_T dptCoreCon_C::handleMessage(DPT_MSG_T,DPT_TAG_T, dptBuffer_S *,dptBuffer_S *,uLONG ); // Needs to set conn_P friend uSHORT dptCoreCon_C::createMgrZero(); // Needs to access attachedTo_P friend class dptCoreMgr_C; // Needs to access conn_P friend class dptRAIDmgr_C; friend class dptManager_C; // Data............................................... // The manager that this object is attached to dptCoreMgr_C *attachedTo_P; // A pointer to the object's connection dptCoreCon_C *conn_P; protected: // Data............................................... // Miscellaneous flags - see bit definitions above uSHORT objFlags; // Virtual Functions.................................. // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *) { return (MSG_RTN_IGNORED); } // Set Flags.......................................... // Indicates that this object is a device void setDevice() { objFlags &= ~FLG_OBJ_TYPE; } // Indicates that this object is a device void setMgr() { objFlags |= FLG_OBJ_TYPE; } public: // Constructor/Destructor............................. dptCoreObj_C(); // Virtual Functions.................................. // Called prior to removing this object from the engine core. // Return values: // 0 = Take no action // 1 = Remove from engine core and free from memory // 2 = Remove from engine core but do not free from memory // (The object must be maintained at a higher level) virtual uSHORT preDelete() { return (1); } // Boolean Functions.................................. // Determines if the object is a device uSHORT isDevice() { return (!(objFlags & FLG_OBJ_TYPE)); } // Determines if the object is a manager uSHORT isManager() { return (objFlags & FLG_OBJ_TYPE); } // Determines if the object is attached to the specified manager uSHORT isMyObject(dptCoreMgr_C *); // Return private data................................ // Returns a pointer to the manager this object is attached to dptManager_C * myMgr_P() { return ((dptManager_C *)attachedTo_P); } // Returns a pointer to this object's connection dptConnection_C * myConn_P() { return ((dptConnection_C *)conn_P); } // Return this object's origin level virtual uSHORT getLevel() {return (0);} //PV }; //dptCoreObj_C - end //Class - dptSCSIobj_C - start //=========================================================================== // //Description: // // This class is the base class for all SCSI classes. The information //contained in this class is common to all SCSI classes. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- // Macros for easy printing scsi address during debug (see debug.h) #define PRT_ADDR "(" << (int)getHBA() << "," \ << (int)getChan() << "," \ << (int)getID() << "," \ << (int)getLUN() << "): " #define PRT_DADDR(dev) "(" << (int)(dev)->getHBA() << "," \ << (int)(dev)->getChan() << "," \ << (int)(dev)->getID() << "," \ << (int)(dev)->getLUN() << "): " #define PRT_SADDR(dev) "(" << (int)(dev)->addr.hba << "," \ << (int)(dev)->addr.chan << "," \ << (int)(dev)->addr.id << "," \ << (int)(dev)->addr.lun << "): " // Macros for easy printing device status during debug (see debug.h) #define PRT_STAT " Dis=" << hex << (int)status.display << \ " Main=" << (int)status.main << \ " Sub=" << (int)status.sub << \ " Flg=" << (int)status.flags << dec << " " #define PRT_DSTAT(dev) " Dis=" << hex << (int)(dev)->status.display << \ " Main=" << (int)(dev)->status.main << \ " Sub=" << (int)(dev)->status.sub << \ " Flg=" << (int)(dev)->status.flags << dec << " " class dptSCSIobj_C : public dptCoreObj_C { // Friends............................................ // Needs access to hba_P friend class dptSCSImgr_C; // Needs to access engType friend class dptManager_C; // Needs access to hba_P friend class dptSCSIdrvr_C; // Needs access to hba_P friend class dptSCSIhba_C; // Needs to access addr friend class dptHBA_C; // Needs to access descr && status friend class dptSCSIcon_C; // Needs to access status friend class dptConnection_C; // Needs to access descr friend class dptDriver_C; // Needs access to addr friend class dptSCSIbcd_C; // Needs access to addr & status friend class dptRAIDmgr_C; // Needs access to addr friend class dptRAIDdrvr_C; // Needs access to addr friend class dptRAIDbcd_C; // Needs access to addr friend class dptRAIDdev_C; // Data............................................... // The object's SCSI address dptAddr_S addr; // Pointer to this object's HBA dptSCSIhba_C *hba_P; // Buffer for externaluser to store information uCHAR userBuff[USER_BUFF_SIZE]; protected: // Data............................................... // Type of engine object uSHORT engType; // The object's status dptStatus_S status; // The object's SCSI Inquiry information dptDescr_S descr; // DPT RAID magic number (only used by devices) uLONG magicNum; // Virtual Functions.................................. // Return object information in the specified output buffer virtual DPT_RTN_T rtnInfo(dptBuffer_S *); // Set removeable media flag virtual void setRemoveable() {} // Set SAFTE flag virtual void setSAFTE() {}; // Set SCSI-3 Enclosure Services flag virtual void setSES() {}; // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); // Set absent object information from the specified input buffer virtual DPT_RTN_T setInfo(dptBuffer_S *,uSHORT); // Set the various object flags virtual void setObjFlags(uSHORT,uSHORT) {} // Message Handlers................................... // Message handler to set artificial object information DPT_RTN_T setInfoHandler(dptBuffer_S *); public: // Constructor/Destructor............................. dptSCSIobj_C(); // Virtual Functions.................................. // Return the size of this object's information structure virtual uLONG infoSize() { return (0); } // Return object info for system config. file virtual DPT_RTN_T rtnConfigInfo(dptBuffer_S *); // Get this object's flags virtual void getObjFlags(uSHORT &) {} // Return private data................................ // Return this object's SCSI address dptAddr_S getAddr() { return (addr); } uLONG getAddrL() { return (addr.getLong()); } uCHAR getHBA() { return (addr.hba); } uCHAR getChan() { return (addr.chan); } uCHAR getID() { return (addr.id); } uCHAR getLUN() { return (addr.lun); } // Return a pointer to this object's HBA dptHBA_C * myHBA_P() { return ((dptHBA_C *)hba_P); } // Return the object type (HBA, BCD, Device...) uSHORT getObjType() { return (engType); } // Return the object's RAID magic # uLONG getMagicNum() { return (magicNum); } // Boolean Functions.................................. // Set/Clear the application level diagnostic flag void setUserDiagFlag() { status.flags |= FLG_STAT_DIAGNOSTICS; } void clrUserDiagFlag() { status.flags &= ~FLG_STAT_DIAGNOSTICS; } // Determines if an object is ready (passed test unit ready) uSHORT isReady() { return (status.flags & FLG_STAT_READY); } // Determines if an object was artificially created uSHORT isArtificial() { return (status.flags & FLG_STAT_ARTIFICIAL); } // Determines if an object really exists in hardware uSHORT isReal() { return (status.flags & FLG_STAT_REAL); } // Determines if this device is an absent device uSHORT isAbsent() { return (status.display==DSPLY_STAT_ABSENT); } // Determines if this device is a missing device uSHORT isMissing() { return (status.display==DSPLY_STAT_MISSING); } // Other Functions.................................... // Generate a unique magic number for a RAID component device uLONG genMagicNum() { return (myConn_P()->genMagicNum()); } // Updates this object's HBA number void updateHBAnum(); // Returns this objects ID DPT_RTN_T returnID(dptBuffer_S *); }; //dptSCSIobj_C - end //Class - dptObject_C - start //=========================================================================== // //Description: // // This class is the highest level DPT object class. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class dptObject_C : public dptSCSIobj_C { protected: // Entry point to send a CCB to hardware virtual DPT_RTN_T launchCCB(engCCB_C *) {return (MSG_RTN_FAILED);} //PV // Get a CCB to perform I/O engCCB_C * getCCB() { return (myConn_P()->acquireCCB()); } // Performs a SCSI inquiry to initialize this device uSHORT selfInquiry(); // Get read/write stats and add them to the specified buffer DPT_RTN_T addRWstats(DPT_UNALIGNED uLONG *,uCHAR); // Handles message processing for this class virtual DPT_RTN_T handleMessage(DPT_MSG_T,dptBuffer_S *,dptBuffer_S *); // Issue a SCSI mode sense or log sense to this object DPT_RTN_T modeLogSense(dptBuffer_S *,dptBuffer_S *,uSHORT); // Issue a SCSI log sense to this object DPT_RTN_T doLogSense(dptBuffer_S *,uCHAR,uCHAR=0,uLONG=0,uSHORT=0,uCHAR=0); // Issue a SCSI mode sense to this object DPT_RTN_T doModeSense(dptBuffer_S *,uCHAR,uCHAR=0); // Issue a SCSI mode select to this object DPT_RTN_T doModeSelect(dptBuffer_S *); // Sends the specified SCSI command to this object DPT_RTN_T scsiPassThru(dptBuffer_S *,dptBuffer_S *); // Sends a SCSI reserve command to this object DPT_RTN_T reserveDevice(); // Sends a SCSI release command to this object DPT_RTN_T releaseDevice(); public: // Initializes this object using the specified SCSI inquiry data uSHORT inquiryInit(sdInquiry_S *); // Performs initialization of a real object (SCSI Inquiry...) virtual void realInit() {} }; //dptObject_C - end #endif raidutils-0.0.6.orig/raideng/osd_unix.cpp0000664000175000000620000065452210175141261020321 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* File - OSD_UNIX.C */ /*****************************************************************************/ /* */ /*Description: */ /* */ /* This file contains DPT engine function definitions that need to */ /* be customized for Unix. */ /* */ /*Autor : Bob Pasteur */ /*Date: 5/28/93 */ /* */ /*Remarks: */ /* */ /*Modification History - */ /* */ /*****************************************************************************/ #ifndef SNI_MIPS #ifdef __cplusplus extern "C" { #endif #endif #include #include #include #include #include #include #include #include #include #include #ifdef _DPT_DGUX #include #include #include #endif #include #include #include #include #include #if (defined(__FreeBSD__) && !defined(_DPT_FREE_BSD)) # define _DPT_FREE_BSD #endif #if (defined(__bsdi__) && !defined(_DPT_BSDI)) # define _DPT_BSDI #endif #if (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) #include #include #else #include #endif #ifndef SNI_MIPS #ifdef __cplusplus } /* extern c */ #endif #endif // SNI_MIPS #include #include #include #include #include #include #include "i2odep.h" #include "dpt_osd.h" #include #include #include #include #include #include "findpath.h" #if defined(_DPT_AIX) #include #ifndef NO_RECONFIG extern "C" reconf_disks(char *); #endif // NO_RECONFIG #endif // aix #include "i2obscsi.h" #include "i2oexec.h" #include "i2omsg.h" #include "i2omstor.h" #include "i2outil.h" #include "i2oadptr.h" #include "i2odpt.h" #include "eata2i2o.h" #ifdef SNI_MIPS #include #include "dpt_scsi.h" #include #include /* * The following typedefs are needed to run engine with interface provided * by driver (see dpt.h) * Note: dpt.h is included via dptsig.h */ typedef struct EATA_PassThrough EATA_CP; typedef struct dpt_scsi_ha HbaInfo; #endif //#ifdef SNI_MIPS #if defined (_DPT_UNIXWARE) #include #include #include #include #ifndef CM_CATEGORY_MAX #define CM_CATEGORY_MAX 32 #endif #define DEC32_MAX 10 /* maximum decimal digits in a 32-bit number */ #define HEX32_MAX 8 /* maximum hexadecimal digits in a 32-bit number */ #define PM_SIZE (CM_CATEGORY_MAX * 3 + 7) #define VB_SIZE (CM_MODNAME_MAX + HEX32_MAX + 1 + DEC32_MAX + 1) #endif /* Definitions - Defines & Constants ----------------------------------------*/ #define TO_LOGGER_BUFFER_SIZE 0x1000 #define FROM_LOGGER_BUFFER_SIZE 0x10000 /* Function Prototypes ------------------------------------------------------*/ DPT_RTN_T osdIOrequest(uSHORT ioMethod); void osdConnected(uSHORT ioMethod); void osdDisconnected(uSHORT ioMethod); DPT_RTN_T osdOpenEngine(void); DPT_RTN_T osdCloseEngine(void); DPT_RTN_T osdGetDrvrSig(uSHORT ioMethod,dpt_sig_S *sig_P, uLONG *numSigs); DPT_RTN_T osdSendCCB(uSHORT ioMethod,dptCCB_S *ccb_P); DPT_RTN_T osdSendMessage(uLONG HbaNum, PI2O_MESSAGE_FRAME UserStdMessageFrame_P, PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME UserReply_P); DPT_RTN_T osdSendMaintenance(uLONG HbaNum, PI2O_MESSAGE_FRAME UserStdMessageFrame_P, PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME UserReply_P); DPT_RTN_T osdRescan(uLONG HbaNum, uLONG Operation); DPT_RTN_T osdIoAccess(uLONG HbaNum, uLONG Operation, uLONG Device, uLONG Map, uLONG Offset, uLONG Size, uCHAR *Buffer); int ProcessEataToI2o(dptCCB_S *ccb_P); int _osdStartI2OCp(Controller_t controller, OutGoing_t packet, Callback_t callback); DPT_RTN_T osdGetCtlrs(uSHORT ioMethod,uSHORT *numCtlrs_P, drvrHBAinfo_S *descr_P); DPT_RTN_T osdGetSysInfo(sysInfo_S *SysInfo_P); int BufferAlloc(uLONG toLoggerSize, char **toLogger_P_P,uLONG fromEngSize, char **fromLogger_P_P, int AllocFlag); DPT_RTN_T DPT_CallLogger(DPT_MSG_T Event, DPT_TAG_T DrvrRefNum, dptData_S *fromLogger_P,dptData_S *toLogger_P); int BufferAlloc(uLONG toLoggerSize, char **toLogger_P_P,uLONG fromEngSize, char **fromLogger_P_P, int AllocFlag); /* //#ifndef NEW_LOGGER //DPT_RTN_T osdLoggerCmd(DPT_MSG_T cmd, void *data_P, uSHORT ioMethod, //uLONG offset, uSHORT hbanum); //#else // //DPT_RTN_T osdLoggerCmd(DPT_MSG_T cmd, void *data_P, void *fromLogger_P, // uSHORT ioMethod, uLONG offset, uLONG hbanum); // #endif */ void *osdAllocIO(uLONG size); void osdFreeIO(void *buff_P); uSHORT BuildNodeNameList(void); uSHORT GetNodeFiles(void); VOID BuildI2oParamsGet(PI2O_UTIL_PARAMS_GET_MESSAGE ParamsGetMsg_P, UINT32 TID, pUINT8 OperationBuffer_P, INT32 OperationBufferSize, pUINT8 DataBuffer_P, INT32 DataBufferSize); int osdSendIoctl(struct NodeFiles_S *NodeFilePtr,int DptCommand, uCHAR *Buffer,EATA_CP *pkt); void PrintMem(uCHAR *Addr,int Count,int Margin,int PrintAddr,int PrintAscii); void osdTargetOffline(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN); void osdResetBus(uLONG HbaNum); #ifdef _SINIX_ADDON void osdConvertCCB(EATA_CP *pkt, dptCCB_S *ccb_P, int direction); void osdPrintCCB(dptCCB_S *ccb_P, int success, int ts); int GetDKStruct(char *device, struct dktype *dkt); #ifdef LEDS DPT_RTN_T osdSampleLEDs(uSHORT ctlrNum, uCHAR *ledSample); #endif #endif #if (defined(DEBUG_PRINT)) void osdPrint(char *String); VOID I2oPrintMem(pUINT8 Addr,INT32 Count); VOID I2oPrintI2oLctEntry(PI2O_LCT_ENTRY I2oLctEntry_P ,INT32 Wait); VOID I2oPrintI2oLctTable(PI2O_LCT I2oLct_P ,INT32 Wait); VOID I2oPrintI2oStdMsgFrame( PI2O_MESSAGE_FRAME I2oStdMsgFrame_P ,INT32 Wait); VOID I2oPrintI2oMsgReply( PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME I2oMsgReply_P, INT32 Wait); VOID I2oPrintI2oSgList(PI2O_SG_ELEMENT I2oSgList_P ,INT32 Wait); VOID I2oPrintPrivateExecScb( PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE PrivateExecScbMsg_P ,INT32 Wait); #endif #define VERBOSE_SCREEN 1 #define VERBOSE_FILE 2 static char *DebugFileName = "EngLog"; // // If you want to create an application with the OSD but not using the // rest of the engine, compile with NO_ENGINE defined // #ifdef NO_ENGINE //int Verbose = VERBOSE_SCREEN + VERBOSE_FILE; int Verbose = 0; int EataHex = 0; int EataInfo = 0; #endif //#ifdef NO_ENGINE #ifndef SNI_MIPS #ifdef __cplusplus extern "C" { #endif #endif void FormatTimeString(char *String,uLONG Time); #if (defined(_DPT_SCO)) __scoinfo(struct scoutsname *uts,int size); #endif #ifndef SNI_MIPS #ifdef __cplusplus } /* extern c */ #endif #endif /* Global Variables ---------------------------------------------------------*/ struct NodeFiles_S { char NodeName[MAX_NAME]; uLONG IoAddress; int IdFlag[3]; uLONG IopNum; uLONG Flags; }; #define NODE_FILE_VALID_HBA_B 0x00000001 #define NODE_FILE_EATA_HBA_B 0x00000002 #define NODE_FILE_I2O_HBA_B 0x00000004 struct NodeFiles_S HbaDevs[MAX_HAS]; int NumHBAs; struct NodeFiles_S *DefaultHbaDev = NULL; /* * Count of system configuration calls made */ static uLONG hwEnableCount = 0; #ifdef _DPT_SOLARIS GetHbaInfo_t GetHbaInfo; #endif /* _DPT_SOLARIS */ /* Variables -------------------------------------------------------*/ #ifdef MESSAGES static int BufferID = -1; uLONG FromLoggerBuffOffset = 0; extern int MsqID; extern int EngineMessageTimeout; extern int Verbose; extern int EataHex; extern int EataInfo; extern dpt_sig_S engineSig; #ifdef _SINIX_ADDON extern int DemoMode; #endif #endif /* MESSAGES */ #ifdef NO_MESSAGES int EngineMessageTimeout = 0; int Verbose = 0; int EataHex = 0; int EataInfo = 0; #endif /* NO_MESSAGES */ static char TimeString[80]; uLONG TimeoutInSeconds = 300; /* Function - osdIOrequest() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function is called each time a connection request is made */ /* to the DPT engine. This function determines if the requested I/O */ /* method can support a connection. For SCO, all we do is try to open */ /* the first HBA device node. */ /* */ /*Parameters: */ /* */ /* ioMethod : Must Be DPT_IO_PASS_THRU For SCO Unix */ /* */ /*Return Data: */ /* */ /* MSG_RTN_COMPLETED - An engine connection can possibly be made */ /* MSG_RTN_FAILED - An engine connection can not possibly be made */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdIOrequest(uSHORT ioMethod) { int FileID; int Index; DPT_RTN_T retVal = MSG_RTN_FAILED; /* If use driver pass thru... */ if(ioMethod==DPT_IO_PASS_THRU) { /* Try To Open The First Adapter Device */ for(Index = 0; Index < 20; ++Index) { FileID = open(DefaultHbaDev->NodeName,O_RDONLY); if((FileID == -1)&&(errno == ENOENT)) { sleep(1); } else { break; } } #ifdef _SINIX_ADDON if (DemoMode) FileID = 99; #endif if(FileID != -1) { retVal = MSG_RTN_COMPLETED; close(FileID); } else printf("\nosdIOrequest : File %s Could Not Be Opened", DefaultHbaDev->NodeName); } if(Verbose) printf("\nosdIOrequest : Return = %x",retVal); return(retVal); } /* osdIOrequest() - end */ /* Function - osdConnected() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function is called each time a connection is made to the DPT */ /* engine. */ /* */ /*Parameters: */ /* */ /* ioMethod : Must Be DPT_IO_PASS_THRU For SCO Unix */ /* */ /*Return Data: NONE */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ void osdConnected(uSHORT ioMethod) { if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdConnected : %s ioMethod = %x",TimeString,ioMethod); fflush(stdout); } } /* osdConnected() - end */ /* Function - osdDisconnected() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function is called each time a connection is removed from */ /* the DPT engine. */ /* */ /*Parameters: */ /* */ /* ioMethod : Must Be DPT_IO_PASS_THRU For SCO Unix */ /* */ /*Return Data: NONE */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ void osdDisconnected(uSHORT ioMethod) { if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdDisconnected : %s ioMethod = %x",TimeString,ioMethod); fflush(stdout); } } /* osdDisonnected() - end */ /* Function - osdOpenEngine() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function is called when the DPT engine is brought into scope. */ /* This function gives the OS dependent layer of the engine a way to */ /* perform initialization required to support the DPT engine. */ /* For SCO Unix, No initalization is required. */ /* */ /*Parameters: NONE */ /* */ /*Return Value: */ /* MSG_RTN_COMPLETED */ /* MSG_RTN_FAILED */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdOpenEngine(void) { DPT_RTN_T retVal = MSG_RTN_FAILED; retVal = MSG_RTN_COMPLETED; NumHBAs = BuildNodeNameList(); if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdOpenEngine : %s Return = %x - %d hbas found", TimeString,retVal,NumHBAs); fflush(stdout); } return (retVal); } /* osdOpenEngine() - end */ /* Function - osdCloseEngine() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function is called when the DPT engine is taken out of scope. */ /* This function gives the OS dependent layer of the engine a way to */ /* perform clean up operations when a DPT engine no longer needs to be */ /* supported. Fof SCO Unix, No cleanup is necessary. */ /* */ /*Parameters: NONE */ /* */ /*Return Value: */ /* MSG_RTN_COMPLETED */ /* MSG_RTN_FAILED */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdCloseEngine(void) { DPT_RTN_T retVal = MSG_RTN_FAILED; #ifdef OLIVETTI for(i = 0; i < NumHBAs; ++i) unlink(HbaDevs[i].NodeName); #endif retVal = MSG_RTN_COMPLETED; if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdCloseEngine : %s Return = %x",TimeString,retVal); fflush(stdout); } return (retVal); } /* osdCloseEngine() - end */ /* Function - osdGetDrvrSig() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function fills in the driver's DPT signature. */ /* */ /*Parameters: */ /* ioMethod : Must Be DPT_IO_PASS_THRU For SCO Unix */ /* sig_P : Pointer to a signature data structure to be filled in. */ /* */ /*Return Value: */ /* MSG_RTN_COMPLETED */ /* MSG_RTN_FAILED */ /* The Signature Structure Is Filled In By This Function. */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdGetDrvrSig(uSHORT ioMethod,dpt_sig_S *sig_P, uLONG *numSigs) { int i; EATA_CP pkt; DPT_RTN_T retVal = MSG_RTN_FAILED; uLONG Count; uLONG SigSpaceAvailable = *numSigs; uLONG EATAFound = 0; uLONG I2OFound = 0; if(ioMethod==DPT_IO_PASS_THRU) { *numSigs = 0; // // Get the miniport sig structure // if(SigSpaceAvailable) { // // We will loop through all of the HBAs in the list. If we have mixed // HBAs (EATA and I2O) we will need to get them both if there is room. // I2O HBAs are set up first so if the first one we find is I2O we will // continue looking for an EATA. Once an EATA is found, exit the loop // for(Count = 0; Count < NumHBAs; ++Count) { if(HbaDevs[Count].Flags & NODE_FILE_VALID_HBA_B) { if((*numSigs)&&(HbaDevs[Count].Flags & NODE_FILE_I2O_HBA_B)&& (I2OFound)) { continue; } if((*numSigs)&&(HbaDevs[Count].Flags & NODE_FILE_EATA_HBA_B)&& (EATAFound)) { continue; } #if defined (_DPT_UNIXWARE) /* * For UnixWare, we have to spoof the sig structure since it * isn't our driver and hense doesn't have a sig. */ if(HbaDevs[Count].Flags & NODE_FILE_I2O_HBA_B) { I2OFound = 1; memset((uCHAR *)sig_P, 0, sizeof(dpt_sig_S)); strncpy(sig_P->dsSignature,engineSig.dsSignature,6); sig_P->dsSigVersion = SIG_VERSION; sig_P->dsProcessorFamily = PROC_INTEL; sig_P->dsProcessor = PROC_PENTIUM; sig_P->dsFiletype = FT_HBADRVR; sig_P->dsOEM = 0; sig_P->dsOS = OS_UNIXWARE; sig_P->dsCapabilities = CAP_PASS+CAP_OVERLAP; sig_P->dsDeviceSupp = DEV_ALL; sig_P->dsAdapterSupp = ADF_SC5_PCI; strcpy(sig_P->dsDescription, "UnixWare I2O OSM Driver"); /* * Set up to move on to the next driver and sig structure */ retVal = MSG_RTN_COMPLETED; ++(*numSigs); --SigSpaceAvailable; ++sig_P; if((!SigSpaceAvailable)||(EATAFound && I2OFound)) { break; } continue; } #endif memset(&pkt, 0, sizeof(EATA_CP)); i = osdSendIoctl(&HbaDevs[Count],DPT_SIGNATURE, (uCHAR *)sig_P,&pkt); // // If the IOCTL succeeds, process the SIG returned // if(!i) { if(HbaDevs[Count].Flags & NODE_FILE_EATA_HBA_B) { EATAFound = 1; } if(HbaDevs[Count].Flags & NODE_FILE_I2O_HBA_B) { I2OFound = 1; #if defined (SNI_MIPS) // Since we have a common driver for I2O and EATA, // we get sig only once - michiz EATAFound = 1; #endif } retVal = MSG_RTN_COMPLETED; ++(*numSigs); --SigSpaceAvailable; ++sig_P; if((!SigSpaceAvailable)||(EATAFound && I2OFound)) { break; } } //if(!i) // // IOCTL failed so print out some info if verbose is set // else { if(Verbose) { if(i == 2) { printf( "\nosdGetDrvrSig : Ioctl Failed, errno = %d", errno); } else { printf( "\nosdGetDrvrSig : File %s Could Not Be Opened", HbaDevs[Count].NodeName); } fflush(stdout); } //if(Verbose) } //if(!i) else } //if(HbaDevs[Count].Flags & NODE_FILE_VALID_HBA_B) } //for(Count = 0; Count < NumHBAs; ++Count) } //if(SigSpaceAvailable) } //if(ioMethod==DPT_IO_PASS_THRU) if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdGetDrvrSig : %s Return = %x",TimeString,retVal); fflush(stdout); } return (retVal); } //DPT_RTN_T osdGetDrvrSig(uSHORT ioMethod,dpt_sig_S *sig_P, uLONG *numSigs) /* Function - osdSendCCB() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This purpose of this function is to send a SCSI CDB to a target */ /* device. This function is responsible for sending the EATA command */ /* packet (CP) to the proper SCSI controller. The controller is responsible*/ /* for sending the SCSI CDB to the target device. This function is also */ /* responsible for returning status information concerning the transaction.*/ /* Status information includes EATA status and SCSI request sense data */ /* when appropriate. */ /* */ /*Parameters: */ /* */ /* ioMethod : Must Be DPT_IO_PASS_THRU For SCO Unix */ /* ccb_P : Pointer to the EATA Command Packet to be executed */ /* */ /*Return Value: */ /* */ /* MSG_RTN_COMPLETED = The EATA CP was sent to the target controller */ /* and has completed. */ /* MSG_RTN_IN_PROGRESS = The EATA CP was sent to the target controller */ /* but has not completed. */ /* MSG_RTN_FAILED = The command packet was not sent to the controller */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdSendCCB(uSHORT ioMethod,dptCCB_S *ccb_P) { DPT_RTN_T retVal = MSG_RTN_FAILED; int i; EATA_CP pkt; uCHAR *Ptr; if(ioMethod==DPT_IO_PASS_THRU) { /* Clear Out Our EATA Packet And Copy Over The Passed In EATA Packet */ memset((uCHAR *)&pkt, 0, sizeof(EATA_CP)); #ifdef _SINIX_ADDON if (HbaDevs[ccb_P->ctlrNum].Flags & NODE_FILE_EATA_HBA_B) { pkt.TimeOut = 10; // Timeout 10 seconds osdConvertCCB(&pkt, ccb_P, 1); alarm(15); } #else Ptr = (uCHAR *)&pkt.cp_Flags1; memcpy(Ptr,ccb_P,sizeof(eataCP_S)); #endif /* Print Out Any Info If The Flags Are Set */ if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdSendCCB : %s (%d,%d,%d,%d) OpCode = %x", TimeString, ccb_P->ctlrNum, (ccb_P->eataCP.devAddr >> 5) & 0x0ff, ccb_P->eataCP.devAddr & 0x01f, (ccb_P->eataCP.scsiCDB[1] >> 5) & 0x0ff, ccb_P->eataCP.scsiCDB[0]); fflush(stdout); } #ifndef SNI_MIPS if(EataHex) { printf("\n Eata Pkt : "); PrintMem(Ptr,sizeof(eataCP_S),17,1,0); } if(EataInfo) { if(ccb_P->eataCP.flags & CP_INTERPRET) i = 1; else i = 0; printf( "\n Eata Info : Flags = %.2x, Intrp = %.2X, FWNest = %.2X, Phys = %.2X", ccb_P->eataCP.flags & 0x0ff,i, ccb_P->eataCP.nestedFW & 0x0ff, ccb_P->eataCP.physical & 0x0ff); printf( "\n ScsiAddr = (%.1x,%.1x,%.1x,%.1x), ReqLen = %.2X, DataLen = %.2X", ccb_P->ctlrNum, (ccb_P->eataCP.devAddr >> 5) & 0x0ff, ccb_P->eataCP.devAddr & 0x01f, (ccb_P->eataCP.scsiCDB[1] >> 5) & 0x0ff, ccb_P->eataCP.reqSenseLen & 0x0ff, ccb_P->eataCP.dataLength); printf("\n CDB : "); for(i = 0; i < 12; ++i) printf("%.2X,",ccb_P->eataCP.scsiCDB[i] & 0x0ff); fflush(stdout); } #endif // sni_mips // // If this is an I2O HBA, send it off to the EATA to I2O converter // to be processed // if(HbaDevs[ccb_P->ctlrNum].Flags & NODE_FILE_I2O_HBA_B) { i = ProcessEataToI2o(ccb_P); } // // This is not an I2O HBA, so send it off to the driver // else { i = osdSendIoctl(&HbaDevs[ccb_P->ctlrNum],EATAUSRCMD, (uCHAR *)&pkt,&pkt); } #ifdef _SINIX_ADDON if (HbaDevs[ccb_P->ctlrNum].Flags & NODE_FILE_EATA_HBA_B) { alarm(0); osdConvertCCB(&pkt, ccb_P, 0); } osdPrintCCB(ccb_P, (i != -1) && !pkt.HostStatus, pkt.TargetStatus); #endif /* sni_mips */ /* If The Ioctl Was Successful, Set Up The Status */ if(!i) { if(!(HbaDevs[ccb_P->ctlrNum].Flags & NODE_FILE_I2O_HBA_B)) { ccb_P->ctlrStatus = pkt.HostStatus; ccb_P->scsiStatus = pkt.TargetStatus; } retVal = MSG_RTN_COMPLETED; if(Verbose) { FormatTimeString(TimeString,time(0)); printf( "\n : %s Host Status = %x, Target Status = %x", TimeString, ccb_P->ctlrStatus, ccb_P->scsiStatus); fflush(stdout); } if(EataInfo) { #if (defined(SPECIFIC_DEBUG)) if(pkt.cp_cdb[0] == 0x4d) { Ptr = (char *)ccb_P->eataCP.dataAddr; printf("\n Data : "); PrintMem(Ptr,ccb_P->eataCP.dataLength,17,1,0); } #endif if(pkt.TargetStatus == 2) { Ptr = (uCHAR *)ccb_P->eataCP.reqSenseAddr; printf("\n Sense : "); PrintMem(Ptr,ccb_P->eataCP.reqSenseLen,17,1,0); } } } /* Ioctl Failed So Err Out */ else { if(Verbose) { FormatTimeString(TimeString,time(0)); #if defined (_SINIX) // SNI Bug Fix: report useful error msg for i20 dev - michiz if (HbaDevs[ccb_P->ctlrNum].Flags & NODE_FILE_I2O_HBA_B) { printf("\n : %s ProcessEataToI2o Failed, errno = %d", TimeString,errno); } else { #endif if(i == 2) printf("\n : %s IOCLT Failed, errno = %d", TimeString,errno); else printf( "\n : %s File %s Could Not Be Opened", TimeString,HbaDevs[ccb_P->ctlrNum].NodeName); fflush(stdout); #ifdef _SINIX } #endif } /* If The Error Was A Memory Allocation Error, Set It Up Specifically */ if(errno == ENOMEM) { retVal = ERR_OSD_MEM_ALLOC; } #ifdef _SINIX_ADDON if (errno == ETIME) { ccb_P->ctlrStatus = pkt.HostStatus; ccb_P->scsiStatus = pkt.TargetStatus; retVal = ERR_SCSI_CMD_FAILED; } #endif /* sni_mips */ } } /* end if (ioMethod==DPT_IO_PASS_THRU) */ else if(Verbose) { printf("\n : ioMethod Bad"); } if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdSendCCB : %s Return = %x",TimeString,retVal); fflush(stdout); } return (retVal); } /* osdSendCCB() - end */ /*---------------------------------------------------------------------------*/ /* Function osdSendMessage */ /*---------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* HbaNum : HBA Number */ /* StdMessageFrame_P : pointer to an I2O message packet */ /* Reply_P : Pointer to an I2O reply packet */ /* */ /* This Function will send off a passed in I2O message packet to the driver */ /* to be sent on to the passed in HBA. The passed in reply packet will be */ /* fllled in and returned to the user. It should be noted that any data */ /* buffer passed in for data out will not be maintained as the driver has */ /* no knowledge of the data direction and as such will copy data in both */ /* directions. This way the passthrough mechanism does not have to have any */ /* knowledge of specific I2O messages. */ /* */ /*Return Value: */ /* */ /* MSG_RTN_COMPLETED for success */ /* MSG_RTN_FAILED for failure */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdSendMessage(uLONG HbaNum, PI2O_MESSAGE_FRAME UserStdMessageFrame_P, PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME UserReply_P) { DPT_RTN_T retVal = MSG_RTN_FAILED; PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE PrivateExecScbMsg_P; int FileID; int i; UINT32 Error = 0; UINT32 MessageSizeInBytes; UINT32 ReplySizeInBytes; PI2O_MESSAGE_FRAME IoctlStdMessageFrame_P; PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME IoctlReply_P; pUINT8 IoctlBuffer_P; pUINT8 Buffer_P; UINT32 Index; UINT32 DataLength; UINT32 SglOffset; UINT32 UserNumSgElements; PI2O_SGE_SIMPLE_ELEMENT UserSimpleSg_P; #if defined (_DPT_UNIXWARE) I2OptUserMsg_t UW_UserMsg; #endif if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdSendMessage : %s Enter, Function = %x",TimeString, I2O_MESSAGE_FRAME_getFunction(UserStdMessageFrame_P)); } #if defined (_DPT_UNIXWARE) osdBzero(&UW_UserMsg,sizeof(I2OptUserMsg_t)); #endif /* Validate some parameters */ if((HbaNum >= NumHBAs) || (!HbaDevs[HbaNum].IoAddress)) { if(Verbose) { if(!HbaDevs[HbaNum].IoAddress) { printf("\nosdSendMessage : IoAddress is zero for HbaNum=%d\n", HbaNum); } } retVal = MSG_RTN_FAILED; } else { /* Get the size of the message and the size of the reply packet */ MessageSizeInBytes = (UINT32)I2O_MESSAGE_FRAME_getMessageSize( UserStdMessageFrame_P) * 4; ReplySizeInBytes = (UINT32)I2O_MESSAGE_FRAME_getMessageSize( &(UserReply_P->StdReplyFrame.StdMessageFrame)) * 4; Buffer_P = (pUINT8)UserStdMessageFrame_P; SglOffset = (UINT32)(I2O_MESSAGE_FRAME_getVersionOffset( UserStdMessageFrame_P) >> 4); SglOffset *= 4; /* If the Scatter Gather offset is set up, grab a pointer to it */ /* and get the data size */ if(SglOffset) { UserSimpleSg_P = (PI2O_SGE_SIMPLE_ELEMENT)(Buffer_P + SglOffset); //DEBUG CODE //I2oPrintMem((pUINT8)UserSimpleSg_P,MessageSizeInBytes); //I2oPrintI2oSgList((PI2O_SG_ELEMENT)UserSimpleSg_P,0); UserNumSgElements = (MessageSizeInBytes - SglOffset) / sizeof(I2O_SGE_SIMPLE_ELEMENT); DataLength = 0; for(Index = 0; Index < UserNumSgElements; ++Index) { DataLength += I2O_FLAGS_COUNT_getCount( &UserSimpleSg_P[Index].FlagsCount); /* * Set up the UnixWare Data Addresses Structure */ #if defined (_DPT_UNIXWARE) /* * If there are too many entries set an error and exit */ if(Index >= MAX_PT_SGL_BUFFERS) { Error = 1; break; } /* * Set up the data address,length and direction flags */ UW_UserMsg.Data[Index].Data = (void *)UserSimpleSg_P[Index].PhysicalAddress; UW_UserMsg.Data[Index].Length = UserSimpleSg_P[Index].FlagsCount.Count; if(UserSimpleSg_P[Index].FlagsCount.Flags & I2O_SGL_FLAGS_DIR) { UW_UserMsg.Data[Index].Flags = I2O_PT_DATA_WRITE; } else { UW_UserMsg.Data[Index].Flags = I2O_PT_DATA_READ; } #endif /*#if defined (_DPT_UNIXWARE) */ } } //if(SglOffset) // // No Scatter Gather so no data to move // else { UserSimpleSg_P = NULL; DataLength = 0; UserNumSgElements = 0; } /* Allocate the Ioctl Buffer For The Command */ #ifdef _DPT_SOLARIS IoctlBuffer_P = (pUINT8)osdAllocIO(sizeof(ulong) + MessageSizeInBytes + ReplySizeInBytes); #else IoctlBuffer_P = (pUINT8)osdAllocIO(MessageSizeInBytes + ReplySizeInBytes); #endif if((!IoctlBuffer_P)||(Error)) { retVal = MSG_RTN_FAILED; /* Free up the IOCTL buffer we allocated */ if(IoctlBuffer_P) { osdFreeIO(IoctlBuffer_P); } } /* Copy the user message into our Ioctl Buffer */ else { memset((uCHAR *)IoctlBuffer_P,0, (unsigned int)(MessageSizeInBytes + ReplySizeInBytes)); #if defined(_DPT_SOLARIS) *(unsigned long *)IoctlBuffer_P = HbaDevs[HbaNum].IoAddress; IoctlStdMessageFrame_P = (PI2O_MESSAGE_FRAME)(IoctlBuffer_P + sizeof(long)); memcpy((void *)IoctlStdMessageFrame_P, (void *)UserStdMessageFrame_P, (unsigned int)MessageSizeInBytes); IoctlReply_P = (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME) (IoctlBuffer_P + sizeof(long) + MessageSizeInBytes); #else IoctlStdMessageFrame_P = (PI2O_MESSAGE_FRAME)IoctlBuffer_P; memcpy((void *)IoctlStdMessageFrame_P, (void *)UserStdMessageFrame_P, (unsigned int)MessageSizeInBytes); /* Grab a pointer to the Reply packet in the Ioctl Buffer and set */ /* up the size in the header */ IoctlReply_P = (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME) (IoctlBuffer_P + MessageSizeInBytes); #endif I2O_MESSAGE_FRAME_setMessageSize( &(IoctlReply_P->StdReplyFrame.StdMessageFrame), (UINT16)ReplySizeInBytes >> 2); /* Open up the device node so we can send off the IOCTL */ for(Index = 0; Index < 20; ++Index) { FileID = open(HbaDevs[HbaNum].NodeName, O_RDONLY); if((FileID == -1)&&(errno == ENOENT)) { sleep(1); } else { break; } } if(FileID > 0) { /* Send off the IOCTL */ #if defined (_DPT_UNIXWARE) UW_UserMsg.IopNum = HbaDevs[HbaNum].IopNum; UW_UserMsg.Version = I2O_VERSION_11; UW_UserMsg.Message = (void *)IoctlStdMessageFrame_P; UW_UserMsg.MessageLength = SglOffset; // // If there was no data to move the SglOffset will // be 0 so we need to get the passed in message size // if(!UW_UserMsg.MessageLength) { UW_UserMsg.MessageLength = MessageSizeInBytes; } UW_UserMsg.Reply = (void *)IoctlReply_P; UW_UserMsg.ReplyLength = ReplySizeInBytes; #ifdef DEBUG_PRINT printf("\nThe UW Structure:"); I2oPrintMem((pUINT8)&UW_UserMsg,sizeof(I2OptUserMsg_t)); printf("\nIopNum = %x, \nVersion = %x, \nMessage = %x \nMessageLength = %x", UW_UserMsg.IopNum,UW_UserMsg.Version, UW_UserMsg.Message, UW_UserMsg.MessageLength); printf("\nReply = %x, \nReplyLength = %x", UW_UserMsg.Reply,UW_UserMsg.ReplyLength); for(Index = 0; Index < UserNumSgElements; ++Index) { printf("\nData[].Data = %x, Data[].Length = %x, Data[].Flags = %x", UW_UserMsg.Data[Index].Data, UW_UserMsg.Data[Index].Length, UW_UserMsg.Data[Index].Flags); } #endif //DEBUG_PRINT i = ioctl(FileID,I2O_PT_MSGTFR,&UW_UserMsg); #ifdef DEBUG_PRINT printf("\nData After Command:"); for(Index = 0; Index < UserNumSgElements; ++Index) { printf("\nData[].Data = %x, Data[].Length = %x, Data[].Flags = %x", UW_UserMsg.Data[Index].Data, UW_UserMsg.Data[Index].Length, UW_UserMsg.Data[Index].Flags); I2oPrintMem((pUINT8)UW_UserMsg.Data[Index].Data, UW_UserMsg.Data[Index].Length); } if(I2O_MESSAGE_FRAME_getFunction(UserStdMessageFrame_P) == 0xa2) { I2oPrintI2oLctTable((PI2O_LCT) UW_UserMsg.Data[0].Data,0); } printf("\nReply :"); I2oPrintMem((pUINT8)IoctlReply_P,ReplySizeInBytes); I2oPrintI2oMsgReply((PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)IoctlReply_P,0); #endif //DEBUG_PRINT #elif defined (_DPT_SCO) || defined (SNI_MIPS) || defined(_DPT_SOLARIS) || defined(_DPT_BSDI) || defined(_DPT_FREE_BSD) || defined(_DPT_LINUX) #if defined(_DPT_LINUX_I2O) if(strcmp(HbaDevs[HbaNum].NodeName, "/dev/i2o/ctl")) i = ioctl(FileID,I2OUSRCMD,IoctlBuffer_P); else { struct i2o_cmd_passthru pt; pt.iop = HbaNum; pt.msg = IoctlBuffer_P; i = ioctl(FileID,I2OPASSTHRU,&pt); } #else i = ioctl(FileID,I2OUSRCMD,IoctlBuffer_P); #endif #ifdef DEBUG_PRINT if(I2O_MESSAGE_FRAME_getFunction(UserStdMessageFrame_P) == 0xa2) { I2oPrintMem((pUINT8)(I2O_SGE_SIMPLE_ELEMENT_getPhysicalAddress( &UserSimpleSg_P[0])),DataLength); I2oPrintI2oLctTable((PI2O_LCT)(I2O_SGE_SIMPLE_ELEMENT_getPhysicalAddress( &UserSimpleSg_P[0])),0); } #endif //#ifdef DEBUG_PRINT #endif close(FileID); /* If the IOCTL failed, print a message if verbose is set */ if(i == -1) { retVal = MSG_RTN_FAILED; if(Verbose) { printf( "\nosdSendMessage: Ioctl Failed, errno = %d", errno); } } /* The ioctl was successful so copy over the reply packet */ else { memcpy((void *)UserReply_P, (void *)IoctlReply_P, (unsigned int)ReplySizeInBytes); retVal = MSG_RTN_COMPLETED; } } /* if(FileID > 0) */ /* The open failed so print a message if verbose is set */ else { if(Verbose) { FormatTimeString(TimeString,time(0)); printf( "\nosdGetLBA : %s Device %s Could Not Be Opened", TimeString, HbaDevs[HbaNum].NodeName); fflush(stdout); } } /* if(FileID > 0) else */ /* Free up the IOCTL buffer we allocated */ osdFreeIO(IoctlBuffer_P); } /* if(!IoctlBuffer_P) else */ } /* if(HbaNum >= NumHBAs) else */ PrivateExecScbMsg_P = (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)UserStdMessageFrame_P; I2O_SINGLE_REPLY_MESSAGE_FRAME_setTransactionContext( &(UserReply_P->StdReplyFrame), I2O_PRIVATE_MESSAGE_FRAME_getTransactionContext( &(PrivateExecScbMsg_P->PrivateMessageFrame))); if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdSendMessage : %s Return = %x",TimeString,retVal); } return(retVal); } /* DPT_RTN_T osdSendMessage(uLONG HbaNum, PI2O_MESSAGE_FRAME */ /*---------------------------------------------------------------------------*/ /* Function osdSendMaintenance */ /*---------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* HbaNum : HBA Number */ /* StdMessageFrame_P : pointer to an I2O message packet */ /* Reply_P : Pointer to an I2O reply packet */ /* */ /* This Function will send off a passed in I2O message packet to the driver */ /* to be sent on to the passed in HBA. The passed in reply packet will be */ /* fllled in and returned to the user. It should be noted that any data */ /* buffer passed in for data out will not be maintained as the driver has */ /* no knowledge of the data direction and as such will copy data in both */ /* directions. This way the passthrough mechanism does not have to have any */ /* knowledge of specific I2O messages. */ /* */ /*Return Value: */ /* */ /* MSG_RTN_COMPLETED for success */ /* MSG_RTN_FAILED for failure */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdSendMaintenance(uLONG HbaNum, PI2O_MESSAGE_FRAME UserStdMessageFrame_P, PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME UserReply_P) { # if (defined(_DPT_SOLARIS)) if(HbaDevs[HbaNum].Flags & NODE_FILE_I2O_HBA_B) { dpt_sig_S sig[MAX_HAS]; unsigned long numSig = HbaNum + 1; if((osdGetDrvrSig(DPT_IO_PASS_THRU,sig,&numSig)==MSG_RTN_COMPLETED) &&(numSig > HbaNum) &&((sig[HbaNum].dsVersion==1) ? ((sig[HbaNum].dsRevision!='0') || (sig[HbaNum].dsSubRevision>'7')) : (sig[HbaNum].dsVersion!=0))) { return (osdSendMessage(HbaNum, UserStdMessageFrame_P, UserReply_P)); } } # elif (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) return (osdSendMessage(HbaNum, UserStdMessageFrame_P, UserReply_P)); # endif // !_DPT_SOLARIS && !_DPT_BSDI && !_DPT_FREE_BSD return (MSG_RTN_FAILED); } /*---------------------------------------------------------------------------*/ /* Function osdRescan */ /*---------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* HbaNum : HBA Number */ /* Operation : Bits indicating depth of the rescan performed in order */ /* 0x01 - Driver reset (simply resets the controller, */ /* assumes LCT remains the same) */ /* 0x02 - Driver rescan (reacquires it's LCT info) */ /* 0x04 - Local rescan (osd layer reacquires LCT info) */ /* 0x08 - OS rescan (Operating System informed of new */ /* devices) */ /* */ /* This Function will cause the controller to issue a Rescan. */ /* */ /*Return Value: */ /* */ /* MSG_RTN_COMPLETED for success */ /* MSG_RTN_FAILED for failure */ /* */ /*---------------------------------------------------------------------------*/ #if (defined(_DPT_SOLARIS) && !defined(DPT_IO_ACCESS)) typedef struct dpt_io_access { ulong io_address; /* Subfunction codes */ # define IO_OP_NOP 0 # define IO_OP_READ 1 # define IO_OP_WRITE 2 # define IO_OP_WRITE_READ 3 # define IO_OP_RESET 4 # define IO_OP_RESCAN 5 ulong io_operation; ulong io_device; ulong io_map; # define IO_MAP_PCI 0 # define IO_MAP_BAR0 1 # define IO_MAP_BAR1 2 # define IO_MAP_BAR2 3 # define IO_MAP_BAR3 4 # define IO_MAP_BAR4 5 ulong io_offset; ulong io_size; unsigned char io_data[8]; } dpt_io_access_t; # define DPT_IO_ACCESS 0x08 #endif // _DPT_SOLARIS DPT_RTN_T osdRescan(uLONG HbaNum, uLONG Operation) { int Successful = 0; int Index; DPT_RTN_T retVal; uLONG Supported; // // Set up a variable of supported commands depending on the OS // # if (defined(_DPT_SOLARIS)) Supported = 0x01 | 0x02 | 0x04 | 0x08; # elif (defined(_DPT_FREE_BSD) || defined(_DPT_BSDI) || defined(_DPT_LINUX)) Supported = 0x01 | 0x02 | 0x04; # else Supported = 0x04; # endif // // Make sure the command is supported before processing it // if(Operation & Supported) { if(HbaDevs[HbaNum].Flags & NODE_FILE_I2O_HBA_B) { # if (defined(_DPT_SOLARIS)) if (Operation & (0x01|0x02)) { int FileID; for(Index = 0; Index < 20; ++Index) { FileID = open(HbaDevs[HbaNum].NodeName,O_RDONLY); if((FileID == -1)&&(errno == ENOENT)) { sleep(1); } else { break; } } /* If The Open Was Successful, Do It */ if (FileID != -1) { dpt_io_access_t Packet; (void)memset ((uCHAR *)&Packet, 0, sizeof(Packet)); Packet.io_address = HbaDevs[HbaNum].IoAddress; if (Operation & 0x01) { Packet.io_operation = IO_OP_RESET; if (ioctl(FileID,DPT_IO_ACCESS,(uCHAR *)&Packet) == 0) { Successful |= 0x01; } } if (Operation & 0x02) { Packet.io_operation = IO_OP_RESCAN; if (ioctl(FileID,DPT_IO_ACCESS,(uCHAR *)&Packet) == 0) { Successful |= 0x02; } } close(FileID); } } # elif (defined(_DPT_FREE_BSD) || defined(_DPT_BSDI) || defined(_DPT_LINUX)) if (Operation & 0x01) { int FileID = open(HbaDevs[HbaNum].NodeName,O_RDONLY); /* If The Open Was Successful, Do It */ if (FileID != -1) { if (ioctl(FileID,I2ORESETCMD,NULL) == 0) { Successful |= 0x01; } close(FileID); } } if (Operation & 0x02) { #if defined( _DPT_BSDI ) // This is a temporary work around to handle deficiency in // the driver (vmt 6/26/01) return( MSG_RTN_IGNORED ); #endif int FileID = open(HbaDevs[HbaNum].NodeName,O_RDONLY); /* If The Open Was Successful, Do It */ if (FileID != -1) { if (ioctl(FileID,I2ORESCANCMD,NULL) == 0) { Successful |= 0x02; } close(FileID); } } # endif // _DPT_SOLARIS _DPT_FREE_BSD _DPT_BSDI _DPT_LINUX if (Operation & 0x04) { // Success is blind DPTI_rescan (HbaNum); Successful |= 0x04; } } # if (defined(_DPT_SOLARIS)) if (Operation & 0x08) { // Success is blind (void)system ( "/usr/sbin/drvconfig -i sd >/dev/null 2>&1 ; /usr/sbin/disks -C ; /usr/sbin/disks"); Successful |= 0x08; } # endif // _DPT_SOLARIS // // Set up the return value, only successful if all passed in // commands succeeded. // if(Operation != Successful) { retVal = MSG_RTN_FAILED; } else { retVal = MSG_RTN_COMPLETED; } } // // The command is not supported, so return an IGNORED value // else { retVal = MSG_RTN_IGNORED; } return (retVal); } /*---------------------------------------------------------------------------*/ /* Function osdTargetBusy */ /*---------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* HbaNum : HBA Number */ /* Channel : HBA SCSI/FCA Bus number */ /* TargetId : Target Id */ /* LUN : Logical Unit Number */ /* */ /* This Function will check if the OS has marked the drive as busy (mounted) */ /* */ /*Return Value: */ /* */ /* negative value for failure */ /* 0 for success/not busy */ /* 1 for success/busy */ /* 2 for failure because of no OS support */ /* */ /*---------------------------------------------------------------------------*/ # if (defined(_DPT_SOLARIS)) #include "drv_busy.hpp" # endif DPT_RTN_T osdTargetBusy(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN) { # if (defined(_DPT_SOLARIS)) return (drv_busy(HbaNum, Channel, TargetId, LUN)); # elif defined _DPT_LINUX int FileID, i; TARGET_BUSY_T Busy; FileID = open(HbaDevs[HbaNum].NodeName,O_RDONLY); if (-1 == FileID) { return -errno; } Busy.channel = Channel; Busy.id = TargetId; Busy.lun = LUN; i = ioctl(FileID, DPT_TARGET_BUSY, &Busy); close (FileID); if (-1 == i) { return -errno; } return Busy.isBusy; # else return (2); # endif } /*---------------------------------------------------------------------------*/ /* Function osdTargetCheck */ /*---------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* HbaNum : HBA Number */ /* Channel : HBA SCSI/FCA Bus number */ /* TargetId : Target Id */ /* LUN : Logical Unit Number */ /* */ /* This Function will make OS dependant checks or initializations required */ /* of a target after a set system config is performed. osdTargetCheck may */ /* be called with targets unaffected by the Set System Config, but will */ /* Guarantee that all affected targets are referenced. */ /* */ /*Return Value: */ /* */ /* none */ /* */ /*---------------------------------------------------------------------------*/ #if (defined(_DPT_SOLARIS)) # include "ctlr_map.hpp" class DPTDriveCheck : public DPTControllerMap { private: // The complement to the SafePopenRead method FILE * SafePopenWrite(char * commands) { int fildes[2], pid; FILE * fp = (FILE *)NULL; // This is considered the `safe' path locations for our environment static char path[] = "PATH=/usr/bin:/usr/sbin:/usr/ucb:/etc:/sbin;export PATH;%s"; char * cp; if ( pipe( fildes ) ) { return ( fp ) ; } fcntl ( fildes[1], F_SETFD, O_WRONLY ); fcntl ( fildes[0], F_SETFD, O_RDONLY ); // The other security measure is completely eliminate environment. const char * env[1] = { (char *)NULL }; switch ( pid = fork() ) { case (pid_t)0: // Child process (void)close ( fildes[1] ); (void)close ( 0 ); // Close standard input (void)dup2 ( fildes[0], 0 ); (void)close ( fildes[0] ); // Change user to the real user id, not the effective. setuid (getuid()); setgid (getgid()); cp = new char[sizeof(path) + strlen (commands) - 1]; sprintf (cp, path, commands); // now, call the shelled out programs at the user level. execle( "/bin/sh", "sh", "-c", cp, 0, env ); delete cp; _exit (1); case (pid_t)-1: // Failed (void)close ( fildes[0] ); (void)close ( fildes[1] ); break; default: // Parent process popen_pid [ fildes[1] ] = pid; (void)close ( fildes[0] ); fp = fdopen ( fildes[1], "w" ); if ( fp == (FILE *)NULL ) { close ( fildes[1] ); } break; } return ( fp ); } public: void drvCheck(int hba, int bus, int target, int lun) { char * name = (char *)NULL; char * command = (char *)NULL; FILE * fp; int retVal; static char CheckLabel[] = "/usr/sbin/prtvtoc /dev/rdsk/%ss0 >/dev/null 2>/dev/null"; static char Format[] = "/usr/sbin/format %s >/dev/null 2>/dev/null"; static char SetLabel[] = "label\ny\nq\n"; // Acquire the target's system name if (((name = DPTControllerMap:: getTargetString(hba, bus, target, lun)) != (char *)NULL) && (*name != 'd') // Call to see if the label is present on the drive && ((command = new char[sizeof(CheckLabel) - 1 + strlen(name)]) != (char *)NULL) && (sprintf(command, CheckLabel, name), ((fp = SafePopenRead(command)) != (FILE *)NULL)) && ((retVal = DPTControllerMap:: SafePclose(fp)) != 0) && (retVal != -1) // Label is present, lets set the label && (delete command, (command = new char[sizeof(Format) - 1 + strlen(name)]) != (char *)NULL) && (sprintf(command, Format, name), ((fp = SafePopenWrite(command)) != (FILE *)NULL))) { // Write the commands to the `format' utility (void)fwrite((void *)SetLabel, (size_t)sizeof(SetLabel) - 1, (size_t)1, fp); (void)DPTControllerMap::SafePclose(fp); } if (command) { delete command; } if (name) { delete name; } } }; #endif // _DPT_SOLARIS void osdTargetCheck(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN) { # if (defined(_DPT_SOLARIS)) DPTDriveCheck * obj = new DPTDriveCheck(); if (obj != (DPTDriveCheck *)NULL) { obj->drvCheck(HbaNum, Channel, TargetId, LUN); delete obj; } # endif } /*---------------------------------------------------------------------------*/ /* Function osdIoAccess */ /*---------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* HbaNum : HBA Number */ /* Operation : Function to perform on IO */ /* Device : Device sub index to perform function on */ /* Map : Device register space index */ /* Offset : Offset within register space */ /* Size : Size of access to perform */ /* Buffer : Buffer to transfer (input and output) */ /* */ /* This Function is used to provide a means for diagnostic programs to */ /* access the hardware directly. */ /* */ /*Return Value: */ /* */ /* MSG_RTN_COMPLETED for success */ /* MSG_RTN_FAILED for failure */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdIoAccess(uLONG HbaNum, uLONG Operation, uLONG Device, uLONG Map, uLONG Offset, uLONG Size, uCHAR *Buffer) { int Index; # if (defined(_DPT_SOLARIS)) if(HbaDevs[HbaNum].Flags & NODE_FILE_I2O_HBA_B) { int FileID; DPT_RTN_T retVal = MSG_RTN_FAILED; for(Index = 0; Index < 20; ++Index) { FileID = open(HbaDevs[HbaNum].NodeName,O_RDONLY); if((FileID == -1)&&(errno == ENOENT)) { sleep(1); } else { break; } } /* If The Open Was Successful, Do It */ if (FileID != -1) { dpt_io_access_t * Packet; if ((Packet = (dpt_io_access_t *)osdAllocIO (sizeof(*Packet) - sizeof(Packet->io_data) + Size)) != (dpt_io_access_t *)NULL) { Packet->io_address = HbaDevs[HbaNum].IoAddress; Packet->io_operation = Operation; Packet->io_device = Device; Packet->io_map = Map; Packet->io_offset = Offset; Packet->io_size = Size; (void)memcpy (Packet->io_data, Buffer, Size); if (ioctl(FileID, DPT_IO_ACCESS, (uCHAR *)&Packet) == 0) { retVal = MSG_RTN_COMPLETED; (void)memcpy (Buffer, Packet->io_data, Size); } osdFreeIO ((void *)Packet); } close (FileID); } return (retVal); } # endif // !_DPT_SOLARIS return (MSG_RTN_FAILED); } /*---------------------------------------------------------------------------*/ /* Function ProcessEataToI2o */ /*---------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* ccb_P : pointer to an eata packet */ /* */ /* This Function will do some setup work and call the EATA to I2O converter */ /* */ /* Return : 0 for success, error code otherwise */ /*---------------------------------------------------------------------------*/ int ProcessEataToI2o(dptCCB_S *ccb_P) { int Rtnval = 1; int Value; eataSP_S EataSp; if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nProcessEataToI2o:%s Enter",TimeString); fflush(stdout); } /* Set up a status packet in the EATA packet so we don't have to supply a */ /* callback routine. When the function returns, the command will be */ /* completed */ memset((uCHAR *)&EataSp,0,sizeof(eataSP_S)); ccb_P->eataCP.spAddr = (uLONG)&EataSp; /* Call the EATA to I2O handler */ Value = DPTI_startEataCp((uCHAR)ccb_P->ctlrNum,&ccb_P->eataCP,0); /* If the command made it through the EATA to I2O handler successfully, */ /* Set up the status values for the command. */ if(Value >= 0) { Rtnval = 0; ccb_P->ctlrStatus = EataSp.ctlrStatus & SP_STATUS; ccb_P->scsiStatus = EataSp.scsiStatus; } if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nProcessEataToI2o:%s Return = %x",TimeString,Rtnval); fflush(stdout); } return(Rtnval); } /* DPT_RTN_T ProcessEataToI2o(dptCCB_S *ccb_P) */ /*---------------------------------------------------------------------------*/ /* Function _osdStartI2OCp */ /*---------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* packet : pointer to packet to be sent off */ /* callback : callback routine pointer */ /* */ /* This Function is called by the EATA to I2O converter to execute an I2O */ /* message. */ /* */ /* Return : 0 for success, -1 otherwise */ /*---------------------------------------------------------------------------*/ int _osdStartI2OCp(Controller_t controller, OutGoing_t packet, Callback_t callback) { int retVal = -1; I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME Reply; uCHAR *SenseData_P = NULL; PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE PrivateExecScbMsg_P; if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\n_osdStartCp : %s Enter, callback = %x",TimeString,callback); } // // Send off the message to the driver. If it completes sucessfully, // call the callback routine // osdBzero(&Reply,sizeof(Reply)); I2O_MESSAGE_FRAME_setMessageSize( &(Reply.StdReplyFrame.StdMessageFrame), sizeof(Reply) / 4); if(osdSendMessage((uLONG)controller,(PI2O_MESSAGE_FRAME)packet,&Reply) == MSG_RTN_COMPLETED) { SenseData_P = NULL; PrivateExecScbMsg_P = (PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)packet; // // If this is one of our private SCB Exec commands, set up the Sense // data pointer if it is set up in the reply packet. // if ((I2O_MESSAGE_FRAME_getFunction( &(PrivateExecScbMsg_P->PrivateMessageFrame.StdMessageFrame)) == I2O_PRIVATE_MESSAGE) && (I2O_PRIVATE_MESSAGE_FRAME_getXFunctionCode( &(PrivateExecScbMsg_P->PrivateMessageFrame)) == I2O_SCSI_SCB_EXEC)) { if ((PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getSCBFlags(PrivateExecScbMsg_P) & I2O_SCB_FLAG_AUTOSENSE_MASK) == I2O_SCB_FLAG_SENSE_DATA_IN_MESSAGE) { SenseData_P = &Reply.SenseData[0]; } } // // Issue the callback // (*callback)(controller,(Status_t)&Reply,(Sense_t)SenseData_P); retVal = 0; } if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\n_osdStartCp : %s Return = %x",TimeString,retVal); fflush (stdout); } return(retVal); } /* int _osdStartCp(Controller_t controller, */ /* Function - osdGetCtlrs() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function returns a list of all controllers visible utilizing */ /* the requested method of I/O. The controller list is returned in the */ /* ctlrList_P pointer. The calling source is responsible for allocating */ /* a 2k buffer to contain the controller description list. The first */ /* word in the controller list is the number of controllers found. The */ /* controller descriptions follow the controller count word. */ /* */ /*Parameters: */ /* */ /* ioMethod : Must Be DPT_IO_PASS_THRU For SCO Unix */ /* numCtlrs_P : Pointer to a variable to set to the number of controllers */ /* descr_P : Array of Controller Description Structures To Be Filled Out */ /* */ /*Return Data: */ /* */ /* descrList_P */ /* */ /*Return Value: */ /* */ /* MSG_RTN_COMPLETED = The controller search was successful */ /* (even if no controllers were found). */ /* MSG_RTN_FAILED = The controller search failed */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdGetCtlrs(uSHORT ioMethod,uSHORT *numCtlrs_P, drvrHBAinfo_S *descr_P) { DPT_RTN_T retVal = MSG_RTN_FAILED; int i,NumCtrls,Count,New; CtrlInfo *Ctrl_P; HbaInfo *HbaInfo_P; uCHAR DataBuff[200]; EATA_CP pkt; #ifdef _DPT_SCO dpt_sig_S *Sig_P; uLONG numSigs; #endif #ifdef _DPT_SOLARIS GetHbaInfo_t GetHbaInfo; #endif /* _DPT_SOLARIS */ #ifdef _DPT_AIX DptCfg_t *cfg_p; #endif if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdGetCtlrs : %s Enter ",TimeString,retVal); fflush(stdout); } New = 0; memset(&pkt, 0, sizeof(EATA_CP)); /* Insure that space has been allocated */ if((descr_P!=NULL) && (numCtlrs_P!=NULL)) { if(ioMethod==DPT_IO_PASS_THRU) { NumCtrls = NumHBAs; *numCtlrs_P = 0; /* Get The Number Of HBAs Out There */ #if defined ( _DPT_SOLARIS ) i = osdSendIoctl(DefaultHbaDev,DPT_NUMCTRLS, (uCHAR *)&GetHbaInfo,&pkt); if(i) { if(Verbose) { FormatTimeString(TimeString,time(0)); if(i == 2) printf("\nosdGetCtlrs: %s IOCLT Failed, errno = %d", TimeString,errno); else printf("\nosdGetCtlrs: %s File %s Could Not Be Opened", TimeString,DefaultHbaDev->NodeName); fflush(stdout); } NumCtrls = 0; } else { NumCtrls = GetHbaInfo.NumHBAs; } #endif #if (defined(_DPT_SCO)) /* Get The Signature To See If This Is The Old Controller Structure */ /* Or The New Structure, This Only Applise For SCO 3.2.4.x */ if(NumCtrls) { numSigs = 3; if(osdGetDrvrSig(ioMethod,(dpt_sig_S *)DataBuff,&numSigs) == MSG_RTN_COMPLETED) { Sig_P = (dpt_sig_S *)DataBuff; for(Count = 0; Count < numSigs; ++Count, ++Sig_P) { if(HbaDevs[Count].Flags & NODE_FILE_EATA_HBA_B) { if((Sig_P->dsVersion > 2)|| (tolower(Sig_P->dsRevision) >= 'c')) { New = 1; } break; } } } } #else #ifndef _DPT_DGUX New = 1; #endif #endif /* Loop Through All Controllers And Send Off The Get Controller Info */ /* Ioctl. If Successful, Copy The Pertinant Info Into The Callers Structure */ for(Count = 0; Count < NumCtrls; ++Count) { #ifdef _DPT_SOLARIS for(i = 0; i < sizeof(drvrHBAinfo_S); ++i) ((uCHAR *)descr_P)[i] = 0; descr_P->length = sizeof(drvrHBAinfo_S) - 2; descr_P->drvrHBAnum = Count; descr_P->hbaFlags = FLG_OSD_DMA | FLG_OSD_I2O; descr_P->baseAddr = GetHbaInfo.IOAddrs[Count]; HbaDevs[Count].IoAddress = GetHbaInfo.IOAddrs[Count]; if (osdCheckBLED(Count, (uSHORT *)&i)) descr_P->blinkState = i; retVal = MSG_RTN_COMPLETED; ++*numCtlrs_P; ++descr_P; #else #if defined (_DPT_UNIXWARE) /* * If this is UnixWare, and it is an I2O HBA, we won't send * down the IOCTL because it is the OS supplied OSM and it * doesent support that call. We will spoof the data down * further where the other I2O adapters are handled. */ if(HbaDevs[Count].Flags & NODE_FILE_EATA_HBA_B) { i = osdSendIoctl(&HbaDevs[Count],DPT_CTRLINFO,DataBuff,&pkt); } else { i = 0; } #elif defined(_DPT_LINUX_I2O) if(strcmp(HbaDevs[Count].NodeName, "/dev/i2o/ctl")) i = osdSendIoctl(&HbaDevs[Count],DPT_CTRLINFO,DataBuff,&pkt); else { /* * For the I2O Linux Driver, spoof the data */ for(i = 0; i < sizeof(drvrHBAinfo_S); ++i) ((uCHAR *)DataBuff)[i] = 0; drvrHBAinfo_S *tmp_P = (drvrHBAinfo_S *)DataBuff; tmp_P->length = sizeof(drvrHBAinfo_S) - 2; tmp_P->hbaFlags = FLG_OSD_DMA | FLG_OSD_I2O; if(HbaDevs[Count].IoAddress != 0xffffffff) tmp_P->baseAddr = HbaDevs[Count].IoAddress; i= 0; } #else i = osdSendIoctl(&HbaDevs[Count],DPT_CTRLINFO,DataBuff,&pkt); #endif #ifdef _SINIX_ADDON if (Verbose && DataBuff) { HbaInfo_P = (HbaInfo *)DataBuff; FormatTimeString(TimeString,time(0)); printf( "\n%s: HBA %d at %x FW %s intr=%d state=%x nbus=%d cache=%x", TimeString, Count, HbaInfo_P->base, HbaInfo_P->ha_fw_version, HbaInfo_P->ha_vect, HbaInfo_P->ha_state, HbaInfo_P->ha_nbus, HbaInfo_P->ha_cache); fflush(stdout); } #endif /*#ifdef _SINIX_ADDON*/ /* If The Ioctl Is Successful, Fill Out The Users Structure */ if(!i) { if(HbaDevs[Count].Flags & NODE_FILE_EATA_HBA_B) { retVal = MSG_RTN_COMPLETED; for(i = 0; i < sizeof(drvrHBAinfo_S); ++i) ((uCHAR *)descr_P)[i] = 0; descr_P->length = sizeof(drvrHBAinfo_S) - 2; descr_P->drvrHBAnum = Count; descr_P->hbaFlags = FLG_OSD_DMA; /* This Is The New Structure So Get The Values Accordingly */ if(New) { #ifdef _DPT_AIX cfg_p = (DptCfg_t *)DataBuff; descr_P->baseAddr = cfg_p->base_addr; #else HbaInfo_P = (HbaInfo *)DataBuff; descr_P->baseAddr = HbaInfo_P->base; HbaDevs[Count].IoAddress = HbaInfo_P->base; #endif /* Get The BlinkLED State */ if (osdCheckBLED(Count, (uSHORT *)&i)) descr_P->blinkState = i; } /* This Is The Old Structure So Get The Values Accordingly */ else { Ctrl_P = (CtrlInfo *)DataBuff; descr_P->baseAddr = Ctrl_P->base; HbaDevs[Count].IoAddress = Ctrl_P->base; if(Ctrl_P->state & CTLR_BLINKLED) descr_P->blinkState = Ctrl_P->idPAL[3] & 0x0ff; } } /* if(HbaDevs[Count].Flags & NODE_FILE_EATA_HBA_B) */ else { #if defined (_DPT_UNIXWARE) /* * For the UnixWare OSM Driver, spoof the data */ for(i = 0; i < sizeof(drvrHBAinfo_S); ++i) { ((uCHAR *)descr_P)[i] = 0; } descr_P->length = sizeof(drvrHBAinfo_S) - 2; descr_P->drvrHBAnum = Count; descr_P->hbaFlags = FLG_OSD_DMA | FLG_OSD_I2O; if(HbaDevs[Count].IoAddress != 0xffffffff) descr_P->baseAddr = HbaDevs[Count].IoAddress; #else //#if defined (_DPT_UNIXWARE) /* * This is our I2O driver, so the driver should * return the correct data. Copy it over */ HbaInfo_P = (HbaInfo *)DataBuff; memcpy(descr_P, DataBuff, sizeof(drvrHBAinfo_S)); descr_P->drvrHBAnum = Count; /* * Save off the Io Address */ HbaDevs[Count].IoAddress = HbaInfo_P->base; #endif //#if defined (_DPT_UNIXWARE) else retVal = MSG_RTN_COMPLETED; } /* Bump The # Of Controllers Returned, And Move On To The Next Structure */ ++*numCtlrs_P; ++descr_P; } else if(Verbose) { FormatTimeString(TimeString,time(0)); if(i == 2) printf("\nosdGetCtlrs: %s IOCLT Failed, errno = %d", TimeString,errno); else printf( "\nosdGetCtlrs: %s File %s Could Not Be Opened", TimeString,HbaDevs[Count].NodeName); fflush(stdout); retVal = MSG_RTN_FAILED; break; } #endif /* _DPT_SOLARIS */ } } } if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdGetCtlrs : %s Return = %x",TimeString,retVal); fflush(stdout); } return (retVal); } /* osdGetCtlrs() - end */ /* Function - osdGetSysInfo() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function gets the system info from the driver and fills in some */ /* of the fields the driver could not, and returns the structure to the */ /* caller */ /* */ /*Parameters: */ /* */ /* Ptr : a void pointer to a 512 byte buffer */ /* */ /*Return Data: the filled out sysInfo_S structure */ /* */ /* */ /*Return Value: */ /* */ /* MSG_RTN_COMPLETED = If the structure is returned */ /* */ /* MSG_RTN_FAILED = If the structure could not be obtained */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdGetSysInfo(sysInfo_S *SysInfo_P) { DPT_RTN_T retVal = 0; int i; EATA_CP pkt; #ifdef _DPT_DGUX char *buffer_ptr; long buffer_size,status; #endif #if (defined (_DPT_SCO)) struct scoutsname uts; #endif #if defined (_DPT_UNIXWARE) || defined (_DPT_AIX) || defined (SNI_MIPS) struct utsname uts; #endif /* Insure that space has been allocated */ if(SysInfo_P != NULL) { #if (defined(_DPT_SOLARIS)) SysInfo_P->flags = 0; SysInfo_P->flags |= SI_OSspecificValid; SysInfo_P->osType = OS_SOLARIS; SysInfo_P->flags |= SI_BusTypeValid; SysInfo_P->busType = SI_PCI_BUS; SysInfo_P->processorFamily = PROC_ULTRASPARC; retVal = sizeof(sysInfo_S); #elif (defined(_DPT_DGUX)) SysInfo_P->flags = 0; SysInfo_P->flags |= SI_OSspecificValid; SysInfo_P->osType = OS_DGUX_UNIX; SysInfo_P->flags |= SI_BusTypeValid; SysInfo_P->busType = SI_PCI_BUS; SysInfo_P->processorFamily = PROC_INTEL; buffer_size = sysinfo(SI_ARCHITECTURE, buffer_ptr, 0); buffer_ptr = (char *)malloc((int)buffer_size); status = sysinfo(SI_ARCHITECTURE, buffer_ptr, buffer_size); if (status != -1) { SysInfo_P->flags |= SI_ProcessorValid; if (!strcmp(buffer_ptr, "Pentium")) { SysInfo_P->processorType = PROC_PENTIUM; } else { SysInfo_P->processorType = PROC_SEXIUM; } } else { SysInfo_P->processorType = 0x00; } retVal = sizeof(sysInfo_S); #else /* else _DPT_DGUX */ memset(&pkt, 0, sizeof(EATA_CP)); /* Send It Off */ i = osdSendIoctl(DefaultHbaDev,DPT_SYSINFO,(uCHAR *)SysInfo_P,&pkt); /* If The Ioctl Was Successful, Set Up The Status */ #if defined (_DPT_AIX) /* we need to force it to go through until the driver supports DPT_SYSINFO */ if (1) #else if(!i) #endif { retVal = sizeof(sysInfo_S); /* Get The OS Info Structure And Fill In The Fields That The Driver */ /* Could Not */ #if (defined(_DPT_SCO)) if(__scoinfo(&uts,sizeof(struct scoutsname)) != -1) { /* Fill In The Processor We Are Currently Running On */ if(uts.machine[3] == '3') SysInfo_P->processorType = PROC_386; else if(uts.machine[3] == '4') SysInfo_P->processorType = PROC_486; else if(!strncmp(uts.machine,"Pentium",7)) SysInfo_P->processorType = PROC_PENTIUM; /* Fill In The OS Type And Version Fields */ SysInfo_P->osType = OS_SCO_UNIX; SysInfo_P->osMajorVersion = uts.release[0] - '0'; SysInfo_P->osMinorVersion = uts.release[2] - '0'; SysInfo_P->osRevision = uts.release[4] - '0'; SysInfo_P->osSubRevision = uts.release[6] - '0'; SysInfo_P->flags |= SI_OSversionValid; /* Fill In The Machine Bus Type Field */ switch(uts.bustype[0]) { case 'E' : SysInfo_P->busType |= SI_EISA_BUS; SysInfo_P->flags |= SI_BusTypeValid; break; case 'I' : SysInfo_P->busType |= SI_ISA_BUS; SysInfo_P->flags |= SI_BusTypeValid; break; case 'M' : SysInfo_P->busType |= SI_MCA_BUS; SysInfo_P->flags |= SI_BusTypeValid; break; case 'P' : SysInfo_P->busType |= SI_PCI_BUS; SysInfo_P->flags |= SI_BusTypeValid; break; } } #elif defined ( _DPT_UNIXWARE ) SysInfo_P->osType = OS_UNIXWARE; /* Get The OS Info Structure And Fill In The Fields That The Driver */ /* Could Not */ if(uname(&uts) != -1) { /* Fill In The OS Type And Version Fields */ SysInfo_P->osMajorVersion = uts.release[0] - '0'; SysInfo_P->osMinorVersion = uts.release[2] - '0'; SysInfo_P->osRevision = uts.version[0] - '0'; if(strlen(uts.version) > 2) SysInfo_P->osSubRevision = uts.version[2] - '0'; else SysInfo_P->osSubRevision = 0; SysInfo_P->flags |= SI_OSversionValid; } /* If The Bus Type Is Set Up, Convert Fron HBA Bus Types To System Info */ /* Bus Types To Fix A Bug In The Driver. */ if(SysInfo_P->flags & SI_BusTypeValid) { i = SysInfo_P->busType; SysInfo_P->busType = 0; if(i & HBA_BUS_EISA) SysInfo_P->busType |= SI_EISA_BUS; if(i & HBA_BUS_PCI) SysInfo_P->busType |= SI_PCI_BUS; } #elif defined ( _DPT_AIX ) /* Fill in the info we can */ SysInfo_P->osType = OS_AIX_UNIX; /* the following is information that doesn't pertain to AIX */ SysInfo_P->drive0CMOS = 0; SysInfo_P->drive1CMOS = 0; SysInfo_P->numDrives = 0; SysInfo_P->flags &= ~SI_SmartROMverValid; SysInfo_P->flags &= SI_NO_SmartROM; /* we don't know this info so we force it */ SysInfo_P->conventionalMemSize = 0; SysInfo_P->extendedMemSize = 0; SysInfo_P->busType = SI_PCI_BUS; /* Get The OS Info Structure And Fill In The Fields That The Driver */ /* Could Not */ if(uname(&uts) != -1) { /* Fill In The OS Type And Version Fields */ SysInfo_P->osMajorVersion = uts.version[0] - '0'; SysInfo_P->osMinorVersion = uts.release[0] - '0'; SysInfo_P->osRevision = 0; SysInfo_P->osSubRevision = 0; SysInfo_P->flags |= SI_OSversionValid; } #elif defined ( SNI_MIPS ) SysInfo_P->osType = OS_SINIX_N; /* * Get The OS Info Structure And Fill In The Fields * That The Driver Could Not */ if (uname(&uts) != -1) { /* * Fill In The OS Type And Version Fields */ SysInfo_P->osMajorVersion = uts.release[0] - '0'; SysInfo_P->osMinorVersion = (uts.release[2] - '0') * 10 + uts.release[3] - '0'; /* uts.version is valid */ if (strlen(uts.version) == 5) { /* * Note: on Sinix uts.version[0] is a character * see dptmgr file sysinfo.C */ SysInfo_P->osRevision = uts.version[0]; SysInfo_P->osSubRevision = (uts.version[1] - '0') * 1000 + (uts.version[2] - '0') * 100 + (uts.version[3] - '0') * 10 + uts.version[4] - '0'; /* else uts.version contains garbage */ } else { SysInfo_P->osRevision = '0'; SysInfo_P->osSubRevision = 0; } SysInfo_P->flags |= SI_OSversionValid; if (Verbose) printf("\nosdGetSysInfo: OS=%d.%d%c%d uP=%x\n", SysInfo_P->osMajorVersion, SysInfo_P->osMinorVersion, SysInfo_P->osRevision, SysInfo_P->osSubRevision, SysInfo_P->processorType); } #endif /* sni_mips */ } else if(Verbose) { FormatTimeString(TimeString,time(0)); if(i == 2) printf("\nosdGetSysInfo : %s IOCLT Failed, errno = %d", TimeString,errno); else printf("\nosdGetSysInf : %s File %s Could Not Be Opened", TimeString,DefaultHbaDev->NodeName); fflush(stdout); } #endif /* _DPT_DGUX */ } if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdGetSysInfo : %s Return = %d",TimeString,retVal); fflush(stdout); } return (retVal); } /* osdGetSysInfo() - end */ #ifndef NO_ENGINE #ifdef MESSAGES /*-------------------------------------------------------------------------*/ /* Function BufferAlloc */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* toLoggerSize : Size Of The To Logger Data Buffer */ /* toLogger_P_P : Pointer To The To Logger Buffer Pointer */ /* fromLoggerSize : Size Of The from Logger Data Buff */ /* fromLogger_P_P : Pointer To The From Logger Buffer Pointer */ /* AllocFlag : Allocate The Buffers Flag */ /* */ /* This Function Will Allocate The Shared Memory Buffers */ /* */ /* Return : 0 For Allocated OK, 1 Otherwise */ /*-------------------------------------------------------------------------*/ int BufferAlloc(uLONG toLoggerSize, char **toLogger_P_P,uLONG fromEngSize, char **fromLogger_P_P, int AllocFlag) { static char *SharedMemoryPtr = NULL; uLONG toLoggerTotalSize = 0; uLONG fromLoggerTotalSize = 0; struct shmid_ds shm_buff; int Rtnval; /* If There Is Currently A Shared Memory Segment Set Up, DeAllocate It */ Rtnval = 0; if(BufferID != -1) { if(SharedMemoryPtr != NULL) shmdt(SharedMemoryPtr); shmctl(BufferID,IPC_RMID,&shm_buff); } SharedMemoryPtr = NULL; /* Set Up The New inBuff And outBuff Sizes */ if(AllocFlag) { toLoggerTotalSize = toLoggerSize + sizeof(dptBuffer_S); fromLoggerTotalSize = fromEngSize + sizeof(dptBuffer_S); FromLoggerBuffOffset = toLoggerTotalSize; /* Get The Shared Memory Segment */ BufferID = shmget(IPC_PRIVATE,(int)(toLoggerTotalSize + fromLoggerTotalSize), SHM_ALLRD | SHM_ALLWR | IPC_CREAT); /* If We Got The Segment, Try To Attach To It */ if(BufferID != -1) { SharedMemoryPtr = (char *)shmat(BufferID,0,0); /* The Attach Failed, So DeAllocate The Shared Memory */ if((int)SharedMemoryPtr == -1) { Rtnval = 1; shmctl(BufferID,IPC_RMID,&shm_buff); SharedMemoryPtr = NULL; } else { *toLogger_P_P = SharedMemoryPtr; *fromLogger_P_P = SharedMemoryPtr + FromLoggerBuffOffset; } } /* Could Not Get The Segment */ else Rtnval = 1; } return(Rtnval); } /*-------------------------------------------------------------------------*/ /* Function DPT_CallLogger */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* event : Event Message To Pass to The Engine */ /* DrvrRefNum : Driver ReferenceNumber */ /* */ /* This Function */ /* */ /* Return 0 For All Is Well, Error Code Otherwise */ /*-------------------------------------------------------------------------*/ DPT_RTN_T DPT_CallLogger(DPT_MSG_T Event, DPT_TAG_T DrvrRefNum, dptData_S *fromLogger_P,dptData_S *toLogger_P) { int P_ID; MsgHdr HdrBuff; DPT_RTN_T retVal = MSG_RTN_FAILED; P_ID = (int)getpid(); HdrBuff.MsgID = DPT_LoggerKey; HdrBuff.engEvent = Event; HdrBuff.targetTag = DrvrRefNum; HdrBuff.callerID = P_ID; HdrBuff.BufferID = BufferID; HdrBuff.FromEngBuffOffset = FromLoggerBuffOffset; /* Send It Out */ if(msgsnd(MsqID,&HdrBuff,MsgDataSize,0) != -1) { /* Set Up An Alarm, And Wait For It To Return */ alarm((int)TimeoutInSeconds); if(msgrcv(MsqID,&HdrBuff,MsgDataSize,P_ID,0) != -1) { /* Message Received, So Process The Returned Message */ retVal = HdrBuff.result; } /* We Had An Error Receiving The Message, So Remove The Message That */ /* We Originally Sent Out (If It Is There) */ else { msgrcv(MsqID,&HdrBuff,MsgDataSize,DPT_LoggerKey,IPC_NOWAIT); if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nDPT_CallLogger : %s Error Receiving Message = %d", TimeString,errno); fflush(stdout); } } } /* We Had An Error Sending The Message */ else { if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nDPT_CallLogger : %s Error Sending Message = %d", TimeString,errno); fflush(stdout); } } return(retVal); } #endif /* MESSAGES */ #ifdef NO_MESSAGES /*-------------------------------------------------------------------------*/ /* Function BufferAlloc */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* toLoggerSize : Size Of The To Logger Data Buffer */ /* toLogger_P_P : Pointer To The To Logger Buffer Pointer */ /* fromLoggerSize : Size Of The from Logger Data Buff */ /* fromLogger_P_P : Pointer To The From Logger Buffer Pointer */ /* AllocFlag : Allocate The Buffers Flag */ /* */ /* This Function Will Allocate The Shared Memory Buffers */ /* */ /* Return : 0 For Allocated OK, 1 Otherwise */ /*-------------------------------------------------------------------------*/ int BufferAlloc(uLONG toLoggerSize, char **toLogger_P_P,uLONG fromEngSize, char **fromLogger_P_P, int AllocFlag) { uLONG toLoggerTotalSize = 0; uLONG fromLoggerTotalSize = 0; uLONG FromLoggerBuffOffset = 0; char *Ptr; int Rtnval; Rtnval = 0; Ptr = *toLogger_P_P; if(Ptr != NULL) { free((void *)Ptr); *toLogger_P_P = NULL; *fromLogger_P_P = NULL; } /* Set Up The New inBuff And outBuff Sizes */ if(AllocFlag) { toLoggerTotalSize = toLoggerSize + sizeof(dptBuffer_S); fromLoggerTotalSize = fromEngSize + sizeof(dptBuffer_S); FromLoggerBuffOffset = toLoggerTotalSize; Ptr = (char *)malloc((uINT)(toLoggerTotalSize + fromLoggerTotalSize)); if(Ptr != NULL) { *toLogger_P_P = Ptr; *fromLogger_P_P = Ptr + FromLoggerBuffOffset; } else Rtnval = 1; } return(Rtnval); } #ifndef LOGGER /*-------------------------------------------------------------------------*/ /* Function DPT_CallLogger */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* event : Event Message To Pass to The Engine */ /* DrvrRefNum : Driver ReferenceNumber */ /* */ /* This Function */ /* */ /* Return 0 For All Is Well, Error Code Otherwise */ /*-------------------------------------------------------------------------*/ DPT_RTN_T DPT_CallLogger(DPT_MSG_T Event, DPT_TAG_T DrvrRefNum, dptData_S *fromLogger_P,dptData_S *toLogger_P) { DPT_RTN_T Rtnval; Rtnval = MSG_RTN_FAILED; return(Rtnval); } #endif /* LOGGER */ #endif /* NO_MESSAGES */ /* Function - osdLoggerCmd() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function implements the event logging commands. Some of these */ /* commands are directed to the logger and will fail if the the logger */ /* is not loaded, while others will be sent to the logger if loaded or */ /* will be sent directly to the HBA If the logger is not loaded. */ /* */ /*Parameters: */ /* */ /* Cmd : The Logger Command To Be Processed */ /* data_P : A Data Pointer Pointing To A Command Specific Data Structure */ /* ioMethod : Must Be DPT_IO_PASS_THRU For SCO Unix */ /* offset : Offset Into The Event Data To Start From */ /* */ /* */ /*Return Value: */ /* */ /* MSG_RTN_COMPLETED = Command Completed Successfully */ /* */ /* MSG_RTN_IGNORED = Logger Loaded But Not Registered, Try Again */ /* */ /* MSG_RTN_FAILED = Command failed */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdLoggerCmd( DPT_MSG_T cmd, void *data_P, void *fromLoggerData_P, uSHORT ioMethod, uLONG offset, uLONG hbanum) { static long LoggerID = 0; static long StatsLoggerID = 0; static int LoggerLoad = 0; DPT_RTN_T retVal = MSG_RTN_FAILED; uLONG SendToLogger = 0; uLONG DataToLogger = 0; uLONG DataFromLogger = 0; long i,j; char Str[180]; char *LoggerPath; static dptData_S *toLogger_P = NULL; static dptData_S *fromLogger_P = NULL; DPT_TAG_T DrvrRefNum = hbanum; int releaseSem = 0; #ifdef _SINIX dptBuffer_S *bp = (dptBuffer_S *)data_P; #define data_P bp #endif // _SINIX static dptData_S *toLoggerBuffer_P = (dptData_S *) data_P; //#ifdef NEW_LOGGER dptData_S *fromLoggerBuffer_P = (dptData_S *) fromLoggerData_P; SEMAPHORE_T loggerAccessSem = NULL; if (!(loggerAccessSem = osdCreateNamedSemaphore("DPTELOG.SEM"))) { return(MSG_RTN_FAILED); } if (LoggerID) { releaseSem = 1; if (osdRequestSemaphore(loggerAccessSem, (uLONG) 1000)) { osdDestroySemaphore(loggerAccessSem); return(MSG_RTN_FAILED); } } //#endif if(Verbose) { FormatTimeString(TimeString,time(0)); printf( "\nosdLoggerCmd : %s Cmd = %x,ioMethod = %x,LoggerID = %x,Hba = %x", TimeString,cmd,ioMethod,LoggerID,hbanum); fflush(stdout); } /* If We Had A Logger Load But Not A Logger Register And We Had A Timeout, */ /* The Logger Did Not Load So Reset The Logger Load Flag */ if((!LoggerID)&&(LoggerLoad)&&(EngineMessageTimeout)) LoggerLoad = 0; if(toLogger_P != NULL) BufferReset(toLogger_P); if(fromLogger_P != NULL) BufferReset(fromLogger_P); /* Handle The Command */ switch(cmd) { /* Read Log Events Page */ case MSG_LOG_READ : /* If The Logger Is Loaded, Set Up To Send It Off To Him */ if(LoggerID) { SendToLogger = 1; /* Get The Driver Reference Number, And Put The Data File */ /* Offset Into The Event Data In The InBufferOffset Field */ BufferInsertULONG(toLogger_P,offset); DrvrRefNum = ((dptCCB_S *)data_P)->ctlrNum; DataFromLogger = ((dptCCB_S *)data_P)->eataCP.dataLength; fromLogger_P->writeIndex = DataFromLogger; } /* The Logger Has Not Registered, But Was Loaded, So Return A Ignored */ /* Error So The Caller Can Try Again */ else if(LoggerLoad) retVal = MSG_RTN_IGNORED; /* Logger Is Not Loaded So Send It Off To The Passthrough */ else if(ioMethod==DPT_IO_PASS_THRU) retVal = osdSendCCB(ioMethod,(dptCCB_S *)data_P); break; /* Clear Log Events Page */ case MSG_LOG_CLEAR : /* If The Logger Is Loaded, Set Up To Send It Off To Him */ if(LoggerID) { SendToLogger = 1; /* Get The Driver Reference Number Into The Target Tag Field To Pass */ /* To The Logger */ DrvrRefNum = ((dptCCB_S *)data_P)->ctlrNum; } /* The Logger Has Not Registered, But Was Loaded, So Return A Ignored */ /* Error So The Caller Can Try Again */ else if(LoggerLoad) retVal = MSG_RTN_IGNORED; /* Logger Is Not Loaded So Send It Off To The Passthrough */ else if(ioMethod==DPT_IO_PASS_THRU) retVal = osdSendCCB(ioMethod,(dptCCB_S *)data_P); break; /* Register Logger */ case MSG_LOG_REGISTER : /* If The Logger Is Not Already Registered, Register Him */ if(!LoggerID) { if(!BufferAlloc(TO_LOGGER_BUFFER_SIZE, (char **)&toLogger_P, FROM_LOGGER_BUFFER_SIZE, (char **)&fromLogger_P,1)) { /* Initalize The Buffer */ #ifdef _SINIX BufferSetAllocSize(toLogger_P, TO_LOGGER_BUFFER_SIZE); BufferClear(toLogger_P); BufferReset(toLogger_P); BufferSetAllocSize(fromLogger_P, FROM_LOGGER_BUFFER_SIZE); BufferClear(fromLogger_P); BufferReset(fromLogger_P); #else BufferSetAllocSize((void *)toLogger_P, TO_LOGGER_BUFFER_SIZE - 1); BufferClear((void *)toLogger_P); BufferReset((void *)toLogger_P); BufferSetAllocSize((void *)fromLogger_P, FROM_LOGGER_BUFFER_SIZE - 1); BufferClear((void *)fromLogger_P); BufferReset((void *)fromLogger_P); #endif /* Pull The Logger ID Out Of The Passed In Buffer */ BufferExtract((char *)data_P,(char *)&LoggerID,4); /* Pull out the force load value so the timeout will be left */ BufferExtract((char *)data_P,(char *)&i,4); retVal = MSG_RTN_COMPLETED; } } /* Logger Is Already Active (Or So We Think), But If They Pass In A */ /* 0x1234 Value As The Second Parameter In The Passed In Buffer, That */ /* Means To Force A Load, So Change The Logger ID To The New Value */ else { BufferExtract((char *)data_P,(char *)&j,4); BufferExtract((char *)data_P,(char *)&i,4); if(i == 0x1234) { retVal = MSG_RTN_COMPLETED; LoggerID = j; } } /* If the regestration is a success, pull out the Timeout value */ if(retVal == MSG_RTN_COMPLETED) { BufferExtract((char *)data_P,(char *)&TimeoutInSeconds,4); } break; /* UnRegister The Logger */ case MSG_LOG_UNREGISTER : /* If The Logger Is Currently Registered, Unallocate The Shared Memory */ /* And UnRegister Him */ if(LoggerID) { BufferAlloc(0,(char **)&toLogger_P, 0,(char **)&fromLogger_P,0); toLogger_P = NULL; fromLogger_P = NULL; LoggerID = 0; retVal = MSG_RTN_COMPLETED; } break; /* Load The Logger */ case MSG_LOG_LOAD : /* If The Logger Is Not Currently Registered, Try To Load Him */ if((!LoggerID)&&(!LoggerLoad)) { /* Set Up The Logger Path */ strcpy(Str,"dptelog"); LoggerPath = FindPath ((CONST char *)Str, X_OK); if(LoggerPath == NULL) { #if defined (_DPT_UNIXWARE) strcpy(Str,"/var/dpt/dptelog "); #elif defined (_DPT_AIX) strcpy(Str,"/usr/lpp/dpt/dptelog "); #elif defined (SNI_MIPS) strcpy(Str,"/opt/dpt/bin/dptelog "); #elif defined (_DPT_SOLARIS) strcpy(Str,"/opt/SUNWhwrdg/bin/dptelog "); #else strcpy(Str,"/usr/dpt/dptelog "); #endif // unixware } else { strcpy(Str,LoggerPath); free(LoggerPath); strcat(Str," "); } i = ((dptData_S *)data_P)->writeIndex; /* If The Caller Passed In Any Data, Tack It On As Command Line Params */ if(i) { j = strlen(Str); BufferExtract((char *)data_P,(char *)&Str[j], (unsigned short)i); Str[j + i] = '\0'; } /* We Will Fire It Off As A Background Process */ strcat(Str," &"); i = system(Str); /* For some reason (unknown!) the system() call returns -1 and */ /* errno = EINTR. We will ignore this error */ if ( (i != -1) || ((i == -1) && (errno == EINTR)) ) { retVal = MSG_RTN_STARTED; LoggerLoad = 1; /* Set Up A TimeOut Alarm */ EngineMessageTimeout = 0; /* Use the new timeout value */ alarm((int)TimeoutInSeconds); } } break; /* Unload The Logger */ case MSG_LOG_UNLOAD : /* If The Logger Is Loaded, Set Up To Send The Unload Off To The Logger */ if(LoggerID) SendToLogger = 1; LoggerLoad = 0; //#ifdef NEW_LOGGER osdReleaseSemaphore(loggerAccessSem); //#endif break; /* Start/Stop Logging Events */ case MSG_LOG_START : case MSG_LOG_STOP : /* If The Logger Is Loaded, Set Up To Send The Command To The Logger */ if(LoggerID) SendToLogger = 1; /* The Logger Has Not Registered, But Was Loaded, So Return A Ignored */ /* Error So The Caller Can Try Again */ else if(LoggerLoad) retVal = MSG_RTN_IGNORED; break; /* Set The Logger Filter */ case MSG_LOG_SET_STATUS : /* If The Logger Is Loaded, Set Up To Send The Command To The Logger */ if(LoggerID) { SendToLogger = 1; DataToLogger = ((dptData_S *)data_P)->writeIndex; } /* The Logger Has Not Registered, But Was Loaded, So Return A Ignored */ /* Error So The Caller Can Try Again */ else if(LoggerLoad) retVal = MSG_RTN_IGNORED; break; /* Get Logger Status */ case MSG_LOG_GET_STATUS : /* If The Logger Is Loaded, Set Up To Send The Command To The Logger */ if(LoggerID) { SendToLogger = 1; DataFromLogger = 1; } /* The Logger Has Not Registered, But Was Loaded, So Return A Ignored */ /* Error So The Caller Can Try Again */ else if(LoggerLoad) retVal = MSG_RTN_IGNORED; break; /* Get Logger Signature */ case MSG_LOG_GET_SIG : /* If The Logger Is Loaded, Set Up To Send The Command To The Logger */ if(LoggerID) { SendToLogger = 1; DataFromLogger = 1; } /* The Logger Has Not Registered, But Was Loaded, So Return A Ignored */ /* Error So The Caller Can Try Again */ else if(LoggerLoad) retVal = MSG_RTN_IGNORED; break; /* Save Logger Parameters */ case MSG_LOG_SAVE_PARMS : /* If The Logger Is Loaded, Set Up To Send The Command To The Logger */ if(LoggerID) SendToLogger = 1; /* The Logger Has Not Registered, But Was Loaded, So Return A Ignored */ /* Error So The Caller Can Try Again */ else if(LoggerLoad) retVal = MSG_RTN_IGNORED; break; case MSG_ID_ALL_BROADCASTERS: if (LoggerID) { DataFromLogger = 1; SendToLogger = 1; } else if (LoggerLoad) retVal = MSG_RTN_IGNORED; break; case MSG_LOAD_BROADCAST_MODULE: case MSG_UNLOAD_BROADCAST_MODULE: case MSG_CREATE_BROADCASTER: case MSG_DELETE_BROADCASTER: case MSG_SET_BROADCASTER_INFO: if (LoggerID) { DataToLogger = toLoggerBuffer_P->writeIndex - toLoggerBuffer_P->readIndex; SendToLogger = 1; } else if (LoggerLoad) retVal = MSG_RTN_IGNORED; break; case MSG_GET_BROADCASTER_INFO: case MSG_ID_BROADCASTERS: if (LoggerID) { DataToLogger = toLoggerBuffer_P->writeIndex - toLoggerBuffer_P->readIndex; SendToLogger = 1; DataFromLogger = 1; } else if (LoggerLoad) retVal = MSG_RTN_IGNORED; break; case MSG_STATS_LOG_REGISTER: if (!StatsLoggerID) { StatsLoggerID = LoggerID; retVal = MSG_RTN_COMPLETED; } break; case MSG_STATS_LOG_UNREGISTER: if (StatsLoggerID) { StatsLoggerID = 0; retVal = MSG_RTN_COMPLETED; } break; case MSG_STATS_LOG_READ: if (StatsLoggerID) { DataToLogger = toLoggerBuffer_P->writeIndex - toLoggerBuffer_P->readIndex; DataFromLogger = 1; SendToLogger = 1; } else if (LoggerLoad) retVal = MSG_RTN_IGNORED; break; case MSG_STATS_LOG_CLEAR: if (StatsLoggerID) { DataToLogger = 0; DataFromLogger = 0; SendToLogger = 1; } else if (LoggerLoad) retVal = MSG_RTN_IGNORED; break; case MSG_STATS_LOG_GET_STATUS: if (StatsLoggerID) { DataToLogger = 0; DataFromLogger = 1; SendToLogger = 1; } else if (LoggerLoad) retVal = MSG_RTN_IGNORED; break; case MSG_STATS_LOG_SET_STATUS: if (StatsLoggerID) { DataToLogger = toLoggerBuffer_P->writeIndex - toLoggerBuffer_P->readIndex; DataFromLogger = 0; SendToLogger = 1; } else if (LoggerLoad) retVal = MSG_RTN_IGNORED; break; } /* If We Are Sending This One Off To The Logger, Set It Up And Send it Out */ if(SendToLogger) { /* If We Have data To Send To the Logger, Copy It Over Into Our Shared */ /* Memory So We Can Pass It To The Logger */ if(DataToLogger) { memcpy(toLogger_P->data,((dptData_S *)data_P)->data, (unsigned int)DataToLogger); toLogger_P->writeIndex = DataToLogger; } retVal = DPT_CallLogger(cmd,DrvrRefNum,fromLogger_P,toLogger_P); /* If Data Was Returned, We Have to Copy It From Our Shared Memory Into */ /* The Original Buffer Passed In */ if((retVal == MSG_RTN_COMPLETED)&&(DataFromLogger)) { /* For A Read Log Command, We Have To Get The Buffer Address From The */ /* Passed In EATA Packet */ if(cmd == MSG_LOG_READ) memcpy((char *)((dptCCB_S *)data_P)->eataCP.dataAddr, fromLogger_P->data,(unsigned int)DataFromLogger); /* All Other Commands Have A Normal Buffer To Copy Into */ else { BufferReset(data_P); if(fromLogger_P->writeIndex) { /*#ifndef NEW_LOGGER memcpy(((dptData_S *)data_P)->data,fromLogger_P->data, (uINT)(fromLogger_P->writeIndex)); ((dptData_S *)data_P)->writeIndex = fromLogger_P->writeIndex; #else */ memcpy(fromLoggerBuffer_P->data,fromLogger_P->data, (uINT)(fromLogger_P->writeIndex)); fromLoggerBuffer_P->writeIndex = fromLogger_P->writeIndex; //#endif } } } } #ifdef _SINIX #undef data_P #endif // _SINIX //#ifdef NEW_LOGGER if (releaseSem) osdReleaseSemaphore(loggerAccessSem); if (loggerAccessSem != NULL) osdDestroySemaphore(loggerAccessSem); //#endif if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\n : %s Return = %x",TimeString,retVal); fflush(stdout); } return (retVal); } /* osdLoggerCmd() - end */ #endif /* #ifndef NO_ENGINE */ /* Function - osdAllocIO() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function allocates I/O memory. */ /* */ /*Parameters: */ /* */ /* size : Number of bytes to allocate */ /* */ /*Return Value : */ /* */ /* Pointer to the allocated memory, NULL if no memory allocated */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ void *osdAllocIO(uLONG size) { void *Rtnval; Rtnval = (void *)malloc((uINT)size); if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdAllocIO : %s Return = %x",TimeString,Rtnval); fflush(stdout); } return(Rtnval); } /* osdAlloc() - end */ /* Function - osdFreeIO() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function frees previously allocated I/O memory. */ /* */ /*Parameters: */ /* */ /* buff_P : Pointer to the memory block to be freed */ /* */ /*Return Value: NONE */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ void osdFreeIO(void *buff_P) { if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdFreeIO : %s Buf = %x",TimeString,buff_P); fflush(stdout); } free(buff_P); } /* osdFree() - end */ /* Function - osdCheckBLED() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function determines if the controller is in a blink LED condition. */ /* If the HBA is in a blink LED condition, the LED pattern code is returned*/ /* in ledPattern. */ /* */ /*Parameters: */ /* */ /* ctrlNum : */ /* ledPattern : */ /* */ /*Return Value: */ /* */ /* 0 = The HBA is not in a blink LED state. */ /* Non-Zero = The HBA is in a blink LED state. */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdCheckBLED(uSHORT ctlrNum, uSHORT *ledPattern) { DPT_RTN_T retVal = 0; int i,BlinkCode = 0; EATA_CP pkt; dptCCB_S Ccb; dptFlashStatus_S FlashStatus; # ifdef _DPT_SOLARIS dpt_sig_S sig[MAX_HAS]; unsigned long numSig = ctlrNum + 1; if((HbaDevs[ctlrNum].Flags & NODE_FILE_I2O_HBA_B) &&(osdGetDrvrSig(DPT_IO_PASS_THRU,sig,&numSig) == MSG_RTN_COMPLETED) &&(numSig > ctlrNum) &&((sig[ctlrNum].dsVersion==1) ? ((sig[ctlrNum].dsRevision=='0') && (sig[ctlrNum].dsSubRevision<='3')) : (sig[ctlrNum].dsVersion==0))) { return (retVal); } # endif memset(&pkt, 0, sizeof(EATA_CP)); /* Insure that space has been allocated */ if(ledPattern != NULL) { *ledPattern = 0; /* Get The BlinkLED code */ /* if this is an I2O HBA, we will have to send off an EATA Get Flash Status command so it */ /* will go through the eata2i2o converter. If the card is in flash mode the status */ /* returned will reflect it. */ if(HbaDevs[ctlrNum].Flags & NODE_FILE_I2O_HBA_B) { /* Set uip the EATA ccb packet */ memset(&Ccb,0,sizeof(dptCCB_S)); memset(&FlashStatus,0,sizeof(dptFlashStatus_S)); eataCP_setFlags(&Ccb.eataCP, CP_REQ_SENSE | CP_INTERPRET); eataCP_setMessage(&Ccb.eataCP, CP_DISCONNECT | CP_IDENTIFY); eataCP_setDataAddr(&Ccb.eataCP,&FlashStatus); eataCP_setDataLength(&Ccb.eataCP,sizeof(dptFlashStatus_S)); scFlash_setOpCode(eataCP_getCDB(&Ccb.eataCP),0xC1); scFlash_setAction(eataCP_getCDB(&Ccb.eataCP),FLASH_CMD_STATUS); Ccb.ctlrNum = ctlrNum; /* Send it off, and if we get a good return, check the status value returned and set */ /* the blink LED code to FLASH MODE if the status indicates it. */ if(osdSendCCB(DPT_IO_PASS_THRU,&Ccb) == MSG_RTN_COMPLETED) { if(dptFlashStatus_getFlags1(&FlashStatus) & FLASH_FLG_FLASH_MODE) { *ledPattern = 0x69; // For `Flash' compatibility retVal = 1; } } } //if(HbaDevs[ctlrNum].Flags & NODE_FILE_I2O_HBA_B) /* This is an EATA HBA so send off the IOCTL to get the blink LED code */ if (retVal == 0) { #ifdef SNI_MIPS i = osdSendIoctl(&HbaDevs[ctlrNum],SNI_GETBLINKLED, (uCHAR *)&BlinkCode,&pkt); #else i = osdSendIoctl(&HbaDevs[ctlrNum],DPT_BLINKLED, (uCHAR *)&BlinkCode,&pkt); #endif //SNI_MIPS if(i) { if(Verbose) { FormatTimeString(TimeString,time(0)); if(i == 2) printf("\nosdCheckBLED : %s IOCLT Failed, errno = %d", TimeString,errno); else printf("\nosdCheckBLED : %s File %s Could Not Be Opened", TimeString,HbaDevs[ctlrNum]); fflush(stdout); } } else { #ifdef SNI_MIPS if ((BlinkCode & ~0xff) == 0x77777700) { // Blink Mode *ledPattern = BlinkCode & 0xff; retVal =1; } if (Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdCheckBLED : %s %s mode BlinkCode=0x%x => LedPattern=0x%x\n", TimeString, retVal?"blink":"op", BlinkCode, *ledPattern); fflush(stdout); } #else if(BlinkCode) { *ledPattern = BlinkCode; retVal = 1; } #endif } //if(i) else } //if(HbaDevs[ctlrNum].Flags & NODE_FILE_I2O_HBA_B) else } //if(ledPattern != NULL) if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdCheckBLED : %s Return = %d",TimeString,retVal); fflush(stdout); } return (retVal); } /* osdCheckBLED() - end */ /* Function - BuildNodeNameList() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function */ /* */ /*Parameters: */ /* */ /* NONE */ /* */ /*Return Value: */ /* */ /* Number Of Entries In The HBA Node List */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ uSHORT BuildNodeNameList(void) { int NumEntries; #if defined (Olivetti) || defined (_DPT_UNIXWARE) || defined (_DPT_AIX ) || defined ( _DPT_DGUX ) || defined (SNI_MIPS) NumEntries = GetNodeFiles(); #ifdef _SINIX_ADDON if (DemoMode) NumEntries = 2; #endif #endif /* OLIVETTI or _DPT_UNIXWARE or _DPT_AIX or _DPT_DGUX or SNI_MIPS */ #if defined (_DPT_SOLARIS) FILE *fp = popen ( "if /usr/bin/test -z \"`/usr/sbin/mount | /usr/bin/grep '/devices on /tmp/devices '`\";" "then " "find /devices -print | grep ':controli2o' | xargs rm -f 2>/dev/null;" "fi;" "/usr/sbin/drvconfig -i dpti2o >/dev/null 2>&1;" "find /devices -name '*:controli2o' -print", "r"); char *Nodes[MAX_HAS]; uCHAR DataBuff[MAX_NAME]; int NumNodes = 0; memset (Nodes, 0, sizeof(Nodes)); while (fgets ((char *)DataBuff, sizeof(DataBuff), fp)) { char * allocated; DataBuff[strcspn((const char *)DataBuff, " \t\r\n")] = '\0'; allocated = (char *)malloc(strlen((const char *)DataBuff) + 1); Nodes[NumNodes] = strcpy (allocated, (const char *)DataBuff); if (++NumNodes >= MAX_HAS) { break; } } pclose (fp); NumEntries = 0; for (NumNodes = 0; Nodes[NumNodes] && (NumNodes < MAX_HAS); ++NumNodes) { EATA_CP pkt; int IoctlRtn; HbaDevs[NumEntries].Flags = 0; strcpy (HbaDevs[NumEntries].NodeName, Nodes[NumNodes]); memset(&pkt, 0, sizeof(EATA_CP)); IoctlRtn = osdSendIoctl(&HbaDevs[NumEntries], DPT_SIGNATURE, DataBuff, &pkt); // // If the IOCTL succeeds, process the SIG returned // if(!IoctlRtn) { HbaDevs[NumEntries].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_I2O_HBA_B; HbaDevs[NumEntries].IoAddress = 0xffffffff; ++NumEntries; } if (NumEntries >= MAX_HAS) { break; } } if (NumEntries) while (NumEntries < MAX_HAS) { HbaDevs[NumEntries].Flags = 0; strcpy (HbaDevs[NumEntries].NodeName, (const char *)HbaDevs[NumEntries-1].NodeName); HbaDevs[NumEntries].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_I2O_HBA_B; HbaDevs[NumEntries].IoAddress = 0xffffffff; ++NumEntries; } #endif /* _DPT_SOLARIS */ #if defined (_DPT_SCO) || defined (_DPT_BSDI) || defined(_DPT_FREE_BSD) || defined (_DPT_LINUX) uSHORT i; char Tmp[80]; uCHAR DataBuff[100]; EATA_CP pkt; int IoctlRtn; # if (defined(_DPT_FREE_BSD)) int c; int i2oMajorNode = 0; FILE *fp = popen ( "/sbin/dmesg | /usr/bin/sed -n -e 's/^dpti0: major=\\([0-9]*\\)$/\\1/p' -e 's/^asr0: major=\\([0-9]*\\)$/\\1/p'", "r"); while (('0' <= (c = fgetc(fp))) && (c <= '9')) { i2oMajorNode *= 10; i2oMajorNode += c - '0'; } pclose(fp); if (i2oMajorNode <= 0) { i2oMajorNode = 154; /* Last best guess */ } # endif NumEntries = 0; # if (defined(_DPT_LINUX_I2O)) memset(&pkt, 0, sizeof(EATA_CP)); HbaDevs[NumEntries].Flags = 0; strcpy(HbaDevs[NumEntries].NodeName, "/dev/i2o/ctl"); IoctlRtn = osdSendIoctl(&HbaDevs[NumEntries], I2OGETIOPS, (uCHAR *)&NumEntries, &pkt); if(!IoctlRtn) { for(i = 0; i < NumEntries; i ++) { HbaDevs[i].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_I2O_HBA_B; HbaDevs[i].IoAddress = UINTPTR_MAX; strcpy(HbaDevs[i].NodeName, "/dev/i2o/ctl"); } } # endif for(i = 0; i < MAX_HAS; ++i) { # if (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) int created = 0; # endif HbaDevs[NumEntries].Flags = 0; strcpy(HbaDevs[NumEntries].NodeName,"/dev/dpti"); /* First we will get the I2O adapters */ strcat(HbaDevs[NumEntries].NodeName,LongToAscii((uLONG)i,Tmp,10)); memset(&pkt, 0, sizeof(EATA_CP)); IoctlRtn = osdSendIoctl(&HbaDevs[NumEntries],DPT_SIGNATURE, DataBuff,&pkt); # if (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) /* * Use Alternate access. */ if(IoctlRtn) { strcpy(HbaDevs[NumEntries].NodeName,"/dev/rdpti"); strcat(HbaDevs[NumEntries].NodeName,LongToAscii((uLONG)i,Tmp,10)); memset(&pkt, 0, sizeof(EATA_CP)); IoctlRtn = osdSendIoctl(&HbaDevs[NumEntries],DPT_SIGNATURE, DataBuff,&pkt); } /* * Create Alternate access if primary and alternate fail. Mark * This one for deletion if it should fail. */ if(IoctlRtn) { # if (defined(_DPT_BSDI)) # define MAJOR_NODE 59 mknod(HbaDevs[NumEntries].NodeName, S_IFCHR|S_IRUSR|S_IWUSR, (MAJOR_NODE << 20) + (i << 10) + 0); # elif (defined(_DPT_FREE_BSD)) # define MAJOR_NODE i2oMajorNode mknod(HbaDevs[NumEntries].NodeName, S_IFCHR|S_IRUSR|S_IWUSR, (MAJOR_NODE << 8) + i); # endif created = 1; # undef MAJOR_NODE memset(&pkt, 0, sizeof(EATA_CP)); IoctlRtn = osdSendIoctl(&HbaDevs[NumEntries],DPT_SIGNATURE, DataBuff,&pkt); } # endif // // If the IOCTL succeeds, process the SIG returned // if(!IoctlRtn) { HbaDevs[NumEntries].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_I2O_HBA_B; HbaDevs[NumEntries].IoAddress = 0xffffffff; ++NumEntries; } # if (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) else if (created) { unlink (HbaDevs[NumEntries].NodeName); } # endif } #if !defined(_DPT_LINUX) /* Now get the EATA adapters */ for(i = 0; i < MAX_HAS; ++i) { if(NumEntries >= MAX_HAS) { break; } HbaDevs[NumEntries].Flags = 0; strcpy(HbaDevs[NumEntries].NodeName,"/dev"); # if (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) strcat(HbaDevs[NumEntries].NodeName,"/rdptr"); # else strcat(HbaDevs[NumEntries].NodeName,"/dptr"); # endif strcat(HbaDevs[NumEntries].NodeName,LongToAscii((uLONG)i,Tmp,10)); # if (defined(_DPT_BSDI)) # define MAJOR_NODE 38 mknod(HbaDevs[NumEntries].NodeName, S_IFCHR|S_IRUSR|S_IWUSR, (MAJOR_NODE << 20) + (i << 10) + 0); # undef MAJOR_NODE # elif (defined(_DPT_FREE_BSD)) # define MAJOR_NODE 88 mknod(HbaDevs[NumEntries].NodeName, S_IFCHR|S_IRUSR|S_IWUSR, (MAJOR_NODE << 8) + i); # undef MAJOR_NODE # endif memset(&pkt, 0, sizeof(EATA_CP)); IoctlRtn = osdSendIoctl(&HbaDevs[NumEntries],DPT_SIGNATURE, DataBuff,&pkt); // // If the IOCTL succeeds, process the SIG returned // if(!IoctlRtn) { HbaDevs[NumEntries].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_EATA_HBA_B; ++NumEntries; } # if (defined(_DPT_BSDI) || defined(_DPT_FREE_BSD)) else { unlink (HbaDevs[NumEntries].NodeName); } # endif } #endif /* !defined(_DPT_LINUX) */ #endif /* _DPT_SCO */ DefaultHbaDev = &HbaDevs[0]; return(NumEntries); } #if defined (Olivetti) || defined ( _DPT_AIX ) || defined (SNI_MIPS) /* Function - GetNodeFiles() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function */ /* */ /*Parameters: */ /* */ /* NONE */ /* */ /*Return Value: */ /* */ /* Number Of Entries In The HBA Node List */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ uSHORT GetNodeFiles() { uSHORT NumEntries,i,j; uLONG Num; char Buffer[100]; char Tmp[80]; int FileID; #if defined (SNI_MIPS) int I2O_device, eata_offset = MAX_HAS / 2; struct stat stat_buf; #endif // SNI_MIPS HbaInfo *HbaInfo_P; EATA_CP pkt; #ifdef _DPT_AIX DptCfg_t *cfg_p; #endif NumEntries = 0; for(i = 0; i < MAX_HAS; ++i) { HbaDevs[NumEntries].Flags = 0; #if defined ( _DPT_AIX ) Num = (ulong)i; strcpy(HbaDevs[NumEntries].NodeName,"/dev/sra"); #elif defined ( SNI_MIPS ) // Get I2O adapters first. if (i < eata_offset) { // I2O Devices look like /dev/hba/dpti0 ... /dev/hba/dpti7 I2O_device = 1; Num = (ulong) i; strcpy(HbaDevs[NumEntries].NodeName,"/dev/hba/dpti"); } else { // EATA Devices look like /dev/hba/dpt0 ... /dev/hba/dpt7 I2O_device = 0; Num = (ulong) i - eata_offset; strcpy(HbaDevs[NumEntries].NodeName,"/dev/hba/dpt"); } #else #error Define Your OS Here #endif LongToAscii(Num,Tmp,10); strcat(HbaDevs[NumEntries].NodeName,Tmp); #if defined (SNI_MIPS) if (stat(HbaDevs[NumEntries].NodeName, &stat_buf)) { if(Verbose && (i<4 || i>=eata_offset && i 0) { for(j = 0; j < 80; ++j) Buffer[j] = 0; if(!((ioctl(FileID,SDI_HBANAME,Buffer) >= 0 ) && #ifdef SNI_MIPS (Buffer[0] == 'd')&&(Buffer[1] == 'p')&&(Buffer[2] == 't'))) #else (Buffer[1] == 'd')&&(Buffer[2] == 'p')&&(Buffer[3] == 't'))) #endif { close(FileID); continue; } else close(FileID); } else { if(Verbose && !NumEntries) { FormatTimeString(TimeString,time(0)); printf("\nGetNodeFiles : %s Open failed on %s\n", TimeString, HbaDevs[NumEntries].NodeName); fflush(stdout); } continue; } #endif memset(&pkt, 0, sizeof(EATA_CP)); #if defined (SNI_MIPS) if (I2O_device) HbaDevs[NumEntries].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_I2O_HBA_B; else HbaDevs[NumEntries].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_EATA_HBA_B; #endif /* Send It Off */ j = osdSendIoctl(&HbaDevs[NumEntries],DPT_CTRLINFO, (uCHAR *)&Buffer,&pkt); /* If The Ioctl Was Successful, Set Up The Status */ if(!j) { /* If The Ioctl Is Successful, Save Off The IO Address */ #if defined ( SNI_MIPS ) HbaInfo_P = (HbaInfo *)Buffer; HbaDevs[NumEntries].IoAddress = HbaInfo_P->base; #elif defined ( _DPT_AIX ) cfg_p = (DptCfg_t *)Buffer; HbaDevs[NumEntries].IdFlag[0] = cfg_p->id[0]; HbaDevs[NumEntries].IdFlag[1] = cfg_p->id[1]; HbaDevs[NumEntries].IdFlag[2] = cfg_p->id[2]; HbaDevs[NumEntries].IoAddress = cfg_p->base_addr; #endif #if !defined (SNI_MIPS) HbaDevs[NumEntries].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_EATA_HBA_B; #endif /* If This Isn't The First HBA, Check The Base Address With The Previous */ /* One. If It Is The Same, This Is A Node For An Additional Bus On An */ /* Adapter That We Already Have In The List So Skip It */ if(NumEntries) { if(HbaDevs[NumEntries].IoAddress != HbaDevs[NumEntries - 1].IoAddress) { ++NumEntries; } } /* This is The First HBA So Add It To The List */ else { DefaultHbaDev = &HbaDevs[NumEntries]; ++NumEntries; } } } return(NumEntries); } #endif /* #if defined (Olivetti) || defined ( _DPT_AIX ) */ #ifdef _DPT_DGUX /* Function - GetNodeFiles() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function */ /* */ /*Parameters: */ /* */ /* NONE */ /* */ /*Return Value: */ /* */ /* Number Of Entries In The HBA Node List */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ uSHORT GetNodeFiles() { uSHORT NumEntries; char DirName[80],NodeName[80]; DIR * dirp; struct dirent * direntp; int FileID; NumEntries = 0; strcpy(DirName, "/dev/fru/"); dirp = opendir(DirName); if (dirp != NULL) { direntp = readdir(dirp); while (direntp != NULL) { /* if (strstr(direntp->d_name, "dpsc") != NULL) */ if (strncmp("dpsc",direntp->d_name,4) == 0) { HbaDevs[NumEntries].Flags = 0; strcpy(NodeName, DirName); strcat(NodeName, direntp->d_name); FileID = open(NodeName, O_RDWR); if (FileID > 0) { strcpy(HbaDevs[NumEntries].NodeName, NodeName); if(!NumEntries) { DefaultHbaDev = &HbaDevs[NumEntries]; } HbaDevs[NumEntries].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_EATA_HBA_B; ++NumEntries; close(FileID); } } direntp = readdir(dirp); } closedir(dirp); } return(NumEntries); } #endif /* _DPT_DGUX */ #if defined (_DPT_UNIXWARE) /*===========================================================================*/ /* */ /* Description: */ /* */ /* This function scans the resmgr database and attempts to get memory base */ /* addresses for the I2O adapters. */ /* */ /* Parameters: */ /* */ /* numAdapters - how many adapters we have found */ /* */ /* Return Value: */ /* */ /* Number Of Entries In The HBA Node List */ /* */ /* Global Variables Affected: */ /* */ /* Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /* This routine uses an undocumented interface to libresmgr and internal */ /* database fields .PARENT and .INSTNUM. So this may need adjustment in */ /* future versions of UnixWare. But if we fail to get the address, we'll */ /* leave it as it was, so we are no worse off. */ /* */ /* Because of that last (no worse off), any error or unexpected value we */ /* encounter simply causes us to skip and continue. */ /* */ /* This approach is UnixWare specific. */ /* */ /*---------------------------------------------------------------------------*/ extern "C" { extern int RMopen(int); extern int RMnextkey(rm_key_t *); extern int RMgetvals(rm_key_t, char *, int, char *, int); extern int RMclose(); }; void GetAddressesFromRM(uSHORT numAdapters) { char *name; char *token; uLONG addresses[MAX_HAS] = { 0 }; rm_key_t itorKey; rm_key_t parentKey; unsigned long memAddr; int instance; int i; int numFound = 0; char param_list[PM_SIZE]; char val_buf[VB_SIZE]; /* Open the resmgr database */ if (RMopen(O_RDONLY) != 0) return; /* * Loop through all resmgr entries trying to find the ones we're * interested in */ itorKey = RM_NULL_KEY; while (!RMnextkey(&itorKey)) { /* Get resmgr information we need about an i2oOSM entry */ (void)sprintf(param_list, "%s %s,n %s,n", CM_MODNAME, CM_INSTNUM, CM_PARENT); if (RMgetvals(itorKey, param_list, 0, val_buf, VB_SIZE) != 0) continue; /* if this entry for i2oOSM? */ name = strtok(val_buf, " "); if (strcmp(name, "i2oOSM") != 0) continue; /* parse out the returned values */ token = strtok(NULL, " "); if (strcmp(token, "-") == 0) continue; instance = atoi(token); if (instance >= numAdapters) continue; token = strtok(NULL, " "); if (strcmp(token, "-") == 0) continue; parentKey = atoi(token); /* * Prepare to get all memory address ranges in resmgr for the * parent entry of the i2oOSM entry (the associated i2otrans entry) */ (void)sprintf(param_list, "%s", CM_MEMADDR); i = 0; memAddr = 0; /* * The address we're looking for is above 1 MB (even above 4GB), * so the other address must be the BIOS */ while (memAddr < (1024 * 1024) && RMgetvals(parentKey, param_list, i, val_buf, VB_SIZE) == 0 && strcmp(val_buf, "- -") != 0) { sscanf(val_buf, "%lx", &memAddr); i++; } /* Remember our results if we got it else the database isn't reliable */ if (memAddr != 0) { addresses[instance] = memAddr; numFound++; } else break; } /* if we found all the adapters, record the results */ if (numFound == numAdapters) for (i = 0; i < numAdapters; i++) HbaDevs[i].IoAddress = addresses[i]; else if (Verbose) printf("\nGetAddressesFromRM : All adapters not found!"); /* Close the resmgr database */ RMclose(); } /*===========================================================================*/ /* */ /* Description: */ /* */ /* This function */ /* */ /* Parameters: */ /* */ /* NONE */ /* */ /* Return Value: */ /* */ /* Number Of Entries In The HBA Node List */ /* */ /* Global Variables Affected: */ /* */ /* Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ uSHORT GetNodeFiles() { uSHORT NumEntries,i,j; uLONG Num; char Buffer[100]; char Tmp[80]; int FileID; HbaInfo *HbaInfo_P; EATA_CP pkt; I2O_UTIL_PARAMS_GET_MESSAGE ParamsGetMsg; I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME I2oReply; pUINT8 OperationBuffer_P; UINT32 OperationBufferSize; pUINT8 DataBuffer_P; UINT32 DataBufferSize; PI2O_PARAM_OPERATIONS_LIST_HEADER OperationHeader_P; PI2O_PARAM_OPERATION_ALL_TEMPLATE OperationBlock_P; PI2O_PARAM_RESULTS_LIST_HEADER ResultHeader_P; PI2O_PARAM_READ_OPERATION_RESULT ResultOperation_P; PI2O_EXEC_IOP_HARDWARE_SCALAR IopHardwareParams_P; uLONG NumI2oIOPs = MAX_HAS; /* * First we will look for I2O adapters controlled by the OS supplied OSM */ NumEntries = 0; for(i = 0; i < MAX_HAS; ++i) { /* * The UnixWare OSM driver has a node named ptosm */ HbaDevs[NumEntries].Flags = 0; strcpy(HbaDevs[NumEntries].NodeName,"/dev/ptosm"); HbaDevs[NumEntries].IopNum = i; HbaDevs[NumEntries].IoAddress = 0xffffffff; FileID = open(HbaDevs[NumEntries].NodeName, O_RDWR); /* * If The Open Succeeds we will try to send off a params get message * to get the IOP Hardware Scaler. Once we have this we can look at * the vendor ID field to determine if it is a DPT I2O adapter. */ if(FileID > 0) { if(i == 0) { ioctl(FileID,I2O_PT_NUMIOPS, &NumI2oIOPs); } close(FileID); if(i >= NumI2oIOPs) { break; } /* * Set up the ParamsGet structure pointers into the buffer */ memset(Buffer, 0, 100); memset((pUINT8)&I2oReply, 0, sizeof(I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)); DataBuffer_P = (pUINT8)Buffer; OperationBuffer_P = DataBuffer_P; OperationHeader_P = (PI2O_PARAM_OPERATIONS_LIST_HEADER)DataBuffer_P; DataBuffer_P += sizeof(I2O_PARAM_OPERATIONS_LIST_HEADER); OperationBlock_P = (PI2O_PARAM_OPERATION_ALL_TEMPLATE)DataBuffer_P; DataBuffer_P += sizeof(I2O_PARAM_OPERATION_ALL_TEMPLATE); OperationBufferSize = sizeof(I2O_PARAM_OPERATIONS_LIST_HEADER) + sizeof(I2O_PARAM_OPERATION_ALL_TEMPLATE); ResultHeader_P = (PI2O_PARAM_RESULTS_LIST_HEADER)DataBuffer_P; DataBuffer_P += sizeof(I2O_PARAM_RESULTS_LIST_HEADER); ResultOperation_P = (PI2O_PARAM_READ_OPERATION_RESULT )DataBuffer_P; DataBuffer_P += sizeof(I2O_PARAM_READ_OPERATION_RESULT); IopHardwareParams_P = (PI2O_EXEC_IOP_HARDWARE_SCALAR)DataBuffer_P; DataBufferSize = sizeof(I2O_PARAM_RESULTS_LIST_HEADER) + sizeof(I2O_PARAM_READ_OPERATION_RESULT) + sizeof(I2O_EXEC_IOP_HARDWARE_SCALAR); I2O_PARAM_OPERATIONS_LIST_HEADER_setOperationCount( OperationHeader_P, 1); I2O_PARAM_OPERATIONS_LIST_HEADER_setReserved( OperationHeader_P, 0); I2O_PARAM_OPERATION_ALL_TEMPLATE_setOperation( OperationBlock_P, I2O_PARAMS_OPERATION_FIELD_GET); I2O_PARAM_OPERATION_ALL_TEMPLATE_setGroupNumber( OperationBlock_P, I2O_EXEC_IOP_HARDWARE_GROUP_NO); I2O_PARAM_OPERATION_ALL_TEMPLATE_setFieldCount( OperationBlock_P, 0xffff); BuildI2oParamsGet(&ParamsGetMsg,0, OperationBuffer_P, OperationBufferSize, (pUINT8)ResultHeader_P, DataBufferSize); I2O_MESSAGE_FRAME_setMessageSize( &I2oReply.StdReplyFrame.StdMessageFrame, sizeof(I2oReply) / 4); NumHBAs = NumEntries + 1; if(osdSendMessage(NumEntries,(PI2O_MESSAGE_FRAME)&ParamsGetMsg, &I2oReply) == MSG_RTN_COMPLETED) { #ifdef DEBUG_PRINT printf("\nI2oVendorID = %x,DPT_ORGANIZATION_ID = %x,IopHardwareParams_P = %x", I2O_EXEC_IOP_HARDWARE_SCALAR_getI2oVendorID(IopHardwareParams_P), DPT_ORGANIZATION_ID, IopHardwareParams_P); I2oPrintMem((pUINT8)IopHardwareParams_P,sizeof(I2O_EXEC_IOP_HARDWARE_SCALAR)); printf("\nBlockStatus = %d", I2O_PARAM_RESULTS_LIST_HEADER_getBlockStatus(ResultOperation_P)); #endif //DEBUG_PRINT if((I2O_PARAM_RESULTS_LIST_HEADER_getResultCount(ResultHeader_P))&& (I2O_PARAM_READ_OPERATION_RESULT_getBlockStatus( ResultOperation_P) == I2O_PARAMS_STATUS_SUCCESS)&& (I2O_EXEC_IOP_HARDWARE_SCALAR_getI2oVendorID( IopHardwareParams_P) == DPT_ORGANIZATION_ID)) { HbaDevs[NumEntries].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_I2O_HBA_B; if(!NumEntries) { DefaultHbaDev = &HbaDevs[NumEntries]; } ++NumEntries; } } /* if(osdSendMessage(NumEntries,(PI2O_MESSAGE_FRAME)&ParamsGetMsg */ NumHBAs = 0; } /* if(FileID > 0) */ else { if(Verbose && !NumEntries) { FormatTimeString(TimeString,time(0)); printf("\nGetNodeFiles : %s Open failed on %s\n", TimeString, HbaDevs[NumEntries].NodeName); fflush(stdout); } continue; } /* if(FileID > 0) else */ } /* for(i = 0; i < MAX_HAS; ++i) */ if (NumEntries > 0) { GetAddressesFromRM(NumEntries); } /* * Now let's get the EATA HBAs */ for(i = 0; i < MAX_HAS; ++i) { /* * Due to the I2O search, we may reach our HBA limit before the * loop does so check here */ if(NumEntries >= MAX_HAS) { break; } HbaDevs[NumEntries].Flags = 0; Num = (ulong)(i + 1); strcpy(HbaDevs[NumEntries].NodeName,"/dev/hba/hba"); LongToAscii(Num,Tmp,10); strcat(HbaDevs[NumEntries].NodeName,Tmp); FileID = open(HbaDevs[NumEntries].NodeName, O_RDWR); /* If The Open Succeeds, We Need To Do A Get HBA Name Ioctl To See */ /* If This Is A DPT */ if(FileID > 0) { for(j = 0; j < 80; ++j) Buffer[j] = 0; if(!((ioctl(FileID,SDI_HBANAME,Buffer) >= 0 ) && ((Buffer[1] == 'd')&&(Buffer[2] == 'p')&&(Buffer[3] == 't'))|| ((Buffer[0] == 'd')&&(Buffer[1] == 'p')&&(Buffer[2] == 't')))) { close(FileID); continue; } else close(FileID); } else { if(Verbose && !NumEntries) { FormatTimeString(TimeString,time(0)); printf("\nGetNodeFiles : %s Open failed on %s\n", TimeString, HbaDevs[NumEntries].NodeName); fflush(stdout); } continue; } memset(&pkt, 0, sizeof(EATA_CP)); /* Send It Off */ j = osdSendIoctl(&HbaDevs[NumEntries],DPT_CTRLINFO, (uCHAR *)&Buffer,&pkt); /* If The Ioctl Was Successful, Set Up The Status */ if(!j) { /* If The Ioctl Is Successful, Save Off The IO Address */ HbaInfo_P = (HbaInfo *)Buffer; HbaDevs[NumEntries].IoAddress = HbaInfo_P->base; HbaDevs[NumEntries].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_EATA_HBA_B; /* If This Isn't The First HBA, Check The Base Address With The Previous */ /* One. If It Is The Same, This Is A Node For An Additional Bus On An */ /* Adapter That We Already Have In The List So Skip It */ if(NumEntries) { if(HbaDevs[NumEntries].IoAddress != HbaDevs[NumEntries - 1].IoAddress) { ++NumEntries; } } /* This is The First HBA So Add It To The List */ else { DefaultHbaDev = &HbaDevs[NumEntries]; ++NumEntries; } } } return(NumEntries); } /* uSHORT GetNodeFiles() */ /*-------------------------------------------------------------------------*/ /* Function BuildI2oParamsGet */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* ParamsGetMsg_P : Pointer to a params get message */ /* TID : TID of the device to send the command to */ /* OperationBuffer_P : Buffer for the params information */ /* OperationBufferSize : Size of the passed in buffer */ /* DataBuffer_P : Buffer for the params information */ /* DataBufferSize : Size of the passed in buffer */ /* */ /* This Function */ /* */ /* Return : NONE */ /*-------------------------------------------------------------------------*/ VOID BuildI2oParamsGet(PI2O_UTIL_PARAMS_GET_MESSAGE ParamsGetMsg_P, UINT32 TID, pUINT8 OperationBuffer_P, INT32 OperationBufferSize, pUINT8 DataBuffer_P, INT32 DataBufferSize) { UINT16 MessageSize = (sizeof(I2O_UTIL_PARAMS_GET_MESSAGE) - sizeof(I2O_SG_ELEMENT)) >> 2; UINT8 SglOffset = (UINT8)(MessageSize << 4); /* Fill out the standard header */ I2O_MESSAGE_FRAME_setVersionOffset(&(ParamsGetMsg_P->StdMessageFrame), SglOffset | I2O_VERSION_11); I2O_MESSAGE_FRAME_setMsgFlags(&(ParamsGetMsg_P->StdMessageFrame), 0); /* Add 4 to the Message size to account for the 2 Scatter Gather Entries */ I2O_MESSAGE_FRAME_setMessageSize(&(ParamsGetMsg_P->StdMessageFrame), MessageSize); I2O_MESSAGE_FRAME_setTargetAddress(&(ParamsGetMsg_P->StdMessageFrame), TID); I2O_MESSAGE_FRAME_setInitiatorAddress(&(ParamsGetMsg_P->StdMessageFrame), 1); I2O_MESSAGE_FRAME_setFunction(&(ParamsGetMsg_P->StdMessageFrame), I2O_UTIL_PARAMS_GET); I2O_MESSAGE_FRAME_setInitiatorContext(&(ParamsGetMsg_P->StdMessageFrame), 0); I2O_UTIL_PARAMS_GET_MESSAGE_setTransactionContext(ParamsGetMsg_P, 0); I2O_FLAGS_COUNT_setCount(&(ParamsGetMsg_P->SGL.u.Simple[0].FlagsCount), OperationBufferSize); I2O_FLAGS_COUNT_setFlags(&(ParamsGetMsg_P->SGL.u.Simple[0].FlagsCount), I2O_SGL_FLAGS_DIR | I2O_SGL_FLAGS_END_OF_BUFFER | I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress(&(ParamsGetMsg_P->SGL.u.Simple[0]), (UINT32)OperationBuffer_P); I2O_FLAGS_COUNT_setCount(&(ParamsGetMsg_P->SGL.u.Simple[1].FlagsCount), DataBufferSize); I2O_FLAGS_COUNT_setFlags(&(ParamsGetMsg_P->SGL.u.Simple[1].FlagsCount), I2O_SGL_FLAGS_LAST_ELEMENT | I2O_SGL_FLAGS_END_OF_BUFFER | I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT); I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress(&(ParamsGetMsg_P->SGL.u.Simple[1]), (UINT32)DataBuffer_P); /* Bump the message size by four to allow for the Scatter Gather entries */ I2O_MESSAGE_FRAME_setMessageSize(&(ParamsGetMsg_P->StdMessageFrame), I2O_MESSAGE_FRAME_getMessageSize(&(ParamsGetMsg_P->StdMessageFrame)) + 4); return; } /* VOID BuildI2oParamsGet(PI2O_UTIL_PARAMS_GET_MESSAGE ParamsGetMsg_P */ #endif /* #if defined (_DPT_UNIXWARE) */ /*-------------------------------------------------------------------------*/ /* Function FormatTimeString */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed To This Function Are : */ /* String : Pointer To A String To Put Formatted Data Into */ /* Time : Number Of Seconds Since 1970 */ /* */ /* This Function Formats The Time String */ /* */ /* Return : None */ /*-------------------------------------------------------------------------*/ void FormatTimeString(char *String,uLONG Time) { struct tm *ts; ts = localtime((time_t *)&Time); #ifdef _SINIX_ADDON sprintf(String,"%.2d.%.2d.%.2d %.2d:%.2d:%.2d ",ts->tm_mday, ts->tm_mon + 1, ts->tm_year % 100,ts->tm_hour,ts->tm_min,ts->tm_sec); #else sprintf(String,"%.2d/%.2d/%.2d-%.2d:%.2d:%.2d ",ts->tm_mon + 1, ts->tm_mday,ts->tm_year,ts->tm_hour,ts->tm_min,ts->tm_sec); #endif } /* Function - osdSendIoctl() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This purpose of this function is to send */ /* */ /*Parameters: */ /* */ /* NodeFilePtr : Pointer To A Node File Entry */ /* DptCommand : DPT IOCTL Command */ /* Buffer : Command Buffer */ /* pkt : Pointer to the EATA Command Packet */ /* */ /*Return Value: */ /* */ /* 0 For IOCTL Success */ /* 1 For Node File could Not Be Opened */ /* 2 For IOCTL Command Failed */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ int osdSendIoctl(struct NodeFiles_S *NodeFilePtr,int DptCommand, uCHAR *Buffer,EATA_CP *pkt) { int retVal = 0; int FileID,i,j; char FileName[80]; int Index; #ifdef _DPT_AIX int Stop; #endif strcpy(FileName,NodeFilePtr->NodeName); for(Index = 0; Index < 5; ++Index) { FileID = open(FileName,O_RDONLY); #if defined _DPT_SOLARIS if((FileID == -1)&&(errno == ENOENT)) { sleep(1); } else { break; } #else break; #endif // _DPT_SOLARIS } /* If The Open Was Successful, Do It */ if(FileID != -1) { /* For Some Reason The IOCTL Is Failing Sometimes Under A Heavy Load So */ /* Now Let's Retry 3 Times */ for(j = 0; j < 3; ++j) { pkt->HostStatus = 0; pkt->TargetStatus = 0; /* Solaris Needs The IO Address In The Packet */ #ifdef _DPT_SOLARIS unsigned long BlinkCode = NodeFilePtr->IoAddress; pkt->IOAddress = BlinkCode; #endif /* _DPT_SOLARIS */ /* UnixWare Needs An EATA Signature In The Packet Along With The DPT */ /* Command And Command Buffer. */ #if defined (_DPT_UNIXWARE) pkt->EataID[0] = 'E'; pkt->EataID[1] = 'A'; pkt->EataID[2] = 'T'; pkt->EataID[3] = 'A'; pkt->EataCmd = DptCommand; pkt->CmdBuffer = Buffer; i = ioctl(FileID, SDI_SEND,pkt); #elif defined (SNI_MIPS) if (NodeFilePtr->Flags & NODE_FILE_EATA_HBA_B) { pkt->EataID[0] = 'E'; pkt->EataID[1] = 'A'; pkt->EataID[2] = 'T'; pkt->EataID[3] = 'A'; pkt->EataCmd = DptCommand; pkt->CmdBuffer = Buffer; if (DptCommand == SNI_GETBLINKLED) { i = ioctl(FileID, DptCommand, Buffer); } else i = ioctl(FileID, SDI_SEND,pkt); } else { i = ioctl(FileID, DptCommand, Buffer); } #else /* AIX Needs The HBA Channels Target ID And Lun In The Packet */ #ifdef _DPT_AIX pkt->HbaTargetID = NodeFilePtr->IdFlag[pkt->cp_ScsiAddr >> 5]; pkt->HbaLUN = 0; pkt->TimeOut = 0; pkt->Retries = 1; /* We Also Need To Send Down A Passthrough Ioctl Start And Stop For AIX */ /* When Sending An EATAUSRCMD. */ if(DptCommand == EATAUSRCMD) { if(ioctl(FileID, SCIOSTART, NodeFilePtr->IdFlag[pkt->cp_ScsiAddr >> 5] << 8)) Stop = 0; else Stop = 1; } #endif #ifdef _DPT_SOLARIS if (DptCommand == DPT_BLINKLED) { i = ioctl(FileID,DPT_BLINKLED,&BlinkCode); if (i == 0) { Buffer[0] = BlinkCode; } } else #endif i = ioctl(FileID,DptCommand,Buffer); #ifdef _DPT_AIX if(DptCommand == EATAUSRCMD) { if(Stop) { ioctl(FileID, SCIOSTOP, NodeFilePtr->IdFlag[pkt->cp_ScsiAddr >> 5] << 8); } } #endif #endif #ifdef _SINIX_ADDON if (DemoMode) i = 0; #endif if(i >= 0) break; } close(FileID); if(i != -1) retVal = 0; else retVal = 2; } else retVal = 1; return(retVal); } /* Function - PrintMem() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This purpose of this function is to send */ /* */ /*Parameters: */ /* */ /* Addr : Buffer Address To Be Printed */ /* Count : Number Of Bytes To Print */ /* Margin : Number Of Bytes To Pad With Blanks */ /* PrintAddr : Flag To Print The Offset In The Left Column */ /* PrintAscii : Flag To Print The Ascii Values In The Right Columns */ /* */ /*Return Value: */ /* */ /* NONE */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ void PrintMem(uCHAR *Addr,int Count,int Margin,int PrintAddr,int PrintAscii) { int Offset,i,NumLines; Offset = 0; NumLines = 0; /* Loop For Count Bytes */ while(Offset < Count) { printf("\n"); for(i = 0; i < Margin; ++i) printf("%c",' '); /* Print Out The Address In HEX */ if(PrintAddr) printf("%.4X ",Offset); /* Now Print Out 16 Bytes In HEX Format */ for(i = 0; i < 16; ++i) { if(Offset + i >= Count) printf(" "); else printf("%.2X ",Addr[Offset + i]); if(i == 7) printf("- "); } /* Print Out The Same 16 Bytes In ASCII Format */ if(PrintAscii) { printf(" "); for(i = 0; i < 16; ++i) { if(Offset + i >= Count) break; if((Addr[Offset + i] > 0x1F)&&(Addr[Offset + i] < 0x7F)) printf("%c",Addr[Offset + i]); else printf("."); } } /* Bump The Offset By 16 And Check For Scrolling Past Screen */ Offset += 16; ++NumLines; if(NumLines >= 20) { getchar(); NumLines = 0; } } fflush(stdout); } /* Function - osdUpdateOSConfig() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* The purpose of this function is to reflect the current drive */ /* configuration in any OS database. */ /* (i.e. the AIX ODM database. Typing lsdev -C at the command prompt */ /* should show you the same info as you see in Storage Manager.) */ /* */ /* Returns: 0 for success, other for failure */ /* */ /*---------------------------------------------------------------------------*/ uSHORT osdUpdateOSConfig(void) { uSHORT retVal = 0; #if defined(_DPT_AIX) && !defined(NO_RECONFIG) int i, j, numCtrls; EATA_CP pkt; char nameBuf[50]; // Get the number of controllers in the system memset(&pkt, 0, sizeof(EATA_CP)); i = osdSendIoctl(DefaultHbaDev, DPT_NUMCTRLS, (uCHAR *) &numCtrls, &pkt); // For each controller we must call the update routine for (j = 0; j < numCtrls; j++) { sprintf(nameBuf, "sra%d", j); i= reconf_disks(nameBuf); if (i) retVal = i; } #else uLONG numHbas = 0; for (numHbas=0; numHbas < MAX_HAS; numHbas++) { (void)osdRescan(numHbas, 0x02); // Sync the driver } (void)osdRescan(0, 0x08); // Sync the OS device nodes // Inform Drive Busy that things could have changed (void)osdTargetBusy((unsigned long)-1, (unsigned long)-1, (unsigned long)-1, (unsigned long)-1); // Special case for reset (void)osdTargetBusy(0,0,0,0); // Any target will do to recache info #endif // aix return retVal; } /* Function - osdIncrementEnableCount() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* The purpose of this function is to keep track of the number of times */ /* that the system configuration has changed so that applications will */ /* know when to rescan the system. */ /* */ /* Returns: NONE */ /* */ /*---------------------------------------------------------------------------*/ void osdIncrementEnableCount() { hwEnableCount++; } /* Function - osdGetEnableCount() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* The purpose of this function is to return the number of times that the */ /* system configuration has changed so that applications will know when to */ /* rescan the system. */ /* */ /* Returns: The number of system configuration changes */ /* */ /*---------------------------------------------------------------------------*/ uLONG osdGetEnableCount() { return hwEnableCount; } #ifdef _SINIX_ADDON #ifdef LEDS /* Function - osdSampleLEDs() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function determines if the controller is in a blink LED condition. */ /* If the HBA is in a blink LED condition, the LED pattern code is returned*/ /* in ledPattern. */ /* */ /*Parameters: */ /* */ /* ctrlNum : */ /* ledPattern : */ /* */ /*Return Value: */ /* */ /* 0 = The HBA is not in a blink LED state. */ /* Non-Zero = The HBA is in a blink LED state. */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdSampleLEDs(uSHORT ctlrNum, uCHAR *ledSample) { DPT_RTN_T retVal = 0; struct tms time_buf; int FileID, i; int sample_time, sample_rate, leds, display = 0; long t_start, t_stop; sample_time = 1; sample_rate = 20; uCHAR led; /* Open The Adapters File And Send Off The Ioctl */ FileID = open(HbaDevs[ctlrNum],O_RDONLY); if (FileID == -1) { if (Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdSampleLEDs : %s File %s Could Not Be Opened", TimeString, HbaDevs[ctlrNum]); fflush(stdout); } retVal = MSG_RTN_FAILED; return(retVal); } if (display) { printf(" LEDS \n"); printf("87654321\n"); } t_start = times(&time_buf); for (i=0; i<(sample_rate * sample_time); i++) { if (ioctl(FileID, SNI_GETLEDS, &leds) < 0) { if(Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdSampleLEDs : %s ioctl SNI_GETLEDS on HBA%d Failed!", TimeString, ctlrNum+1); fflush(stdout); } retVal = MSG_RTN_FAILED; break; } *(ledSample+i) = ~(leds & 0xff); t_stop = times(&time_buf); if (display) { led = *(ledSample+i); printf("%c%c%c%c%c%c%c%c", led & 0x80 ? 'X' : '.', led & 0x40 ? 'X' : '.', led & 0x20 ? 'X' : '.', led & 0x10 ? 'X' : '.', led & 0x08 ? 'X' : '.', led & 0x04 ? 'X' : '.', led & 0x02 ? 'X' : '.', led & 0x01 ? 'X' : '.'); fflush(stdout); printf("\b\b\b\b\b\b\b\b"); } while (((t_stop - t_start) / (float) HZ) < ((i+1.0)/sample_rate)) { t_stop = times(&time_buf); } } close(FileID); if (Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdSampleLEDs : %s elapsed time = %2.2f sec\n", TimeString, (t_stop - t_start) / (float) HZ); fflush(stdout); } return(retVal); } /* osdSampleLEDs() - end */ #endif // LEDS /* Function - osdGetLBA() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function returns the maxLBA, which is used by the Sinix System. */ /* */ /* First the mapping scsi address to sdi name (device entry for sdi) is */ /* calculated by the driver. */ /* Then the dktype structure for this device is retrieved from sdi. */ /* */ /* On success maxLBA is returned in *lba */ /* and dkname (e.g. "MP12") is copied to userBuff. */ /* */ /*Parameters: */ /* Input: ctrlNum, bus, target (= scsi address) */ /* Output: *lba, userBuff */ /* */ /*Return Value: */ /* */ /* 0 = No valid disk io info found in the system. */ /* 1 = Valid disk io info found in the system. */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ DPT_RTN_T osdGetLBA(uSHORT ctlrNum, uSHORT bus, uSHORT target, uLONG *lba, uCHAR *userBuff, uLONG MaxLBA) { DPT_RTN_T retVal = 0; struct dktype *dkt = (struct dktype *) malloc(sizeof(struct dktype)); struct utsname uts; int FileID, i, err; int scsi_addr_to_sdinum = 0; char sdi_device[50], sdi_num[3]; uCHAR osMinorVersion; /* Open The Adapters File And Send Off The Ioctl */ FileID = open(HbaDevs[ctlrNum].NodeName,O_RDONLY); if(FileID != -1) { scsi_addr_to_sdinum = bus << 4 | target; i = ioctl(FileID, SNI_GETDEVNAME, &scsi_addr_to_sdinum); if ((i != -1) && (uname(&uts) != -1)) { /* * From OS Version 5.44A0 and later, we use device name ios0 * instead of ios1. - michiz. */ osMinorVersion = (uts.release[2] - '0') * 10 + uts.release[3] - '0'; if (osMinorVersion >= (uCHAR) 44) strcpy((char *)sdi_device, "/dev/ios0/rsdisk"); else strcpy((char *)sdi_device, "/dev/ios1/rsdisk"); sprintf(sdi_num, "%3.3d", (scsi_addr_to_sdinum & 0xff) + (scsi_addr_to_sdinum >> 8 & 0xff) * 10 + (scsi_addr_to_sdinum >> 16 & 0xff) * 100 ); sdi_num[3] = '\0'; strcat((char *)sdi_device, sdi_num); strcat((char *)sdi_device, "s7"); if (err = GetDKStruct(sdi_device, dkt)) { if (Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdGetLBA : %s GetDKStruct() on %s failed - error = %d", TimeString, sdi_device, err); fflush(stdout); } *lba = 0; } else { *lba = dkt->dkt_cylinders * dkt->dkt_heads * dkt->dkt_sectors; if ((*lba < (0.8 * MaxLBA)) || (*lba > (1.2 * MaxLBA))) { /* * Safety check: If the SDI capacity differs more than 20%, * something went wrong (e.g. disk replaced without iosreprobe) * so we cannot rely on SDI, return error. */ if (Verbose) printf("\nosdGetLBA : %s device(%d,%d,%d,0) SDI=%d LBA=%d SDI failed", TimeString, ctlrNum+1, bus, target, *lba, MaxLBA); *lba = 0; } else { if (userBuff) strncpy((char *)userBuff, dkt->dkt_name, USER_BUFF_SIZE); retVal = 1; } if (Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdGetLBA : %s device(%d,%d,%d,0) disk%s %s: %d MB", TimeString, ctlrNum+1, bus, target, sdi_num, dkt->dkt_name, *lba * dkt->dkt_bsize / 0x100000); fflush(stdout); } } } else if (Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdGetLBA : %s ioctl SNI_GETDEVNAME Failed! errno=%d", TimeString, errno); fflush(stdout); } close(FileID); } else if (Verbose) { FormatTimeString(TimeString,time(0)); printf("\nosdGetLBA : %s Device %s Could Not Be Opened", TimeString, HbaDevs[ctlrNum]); fflush(stdout); } return (retVal); } /* osdGetLBA() - end */ /* Function - GetDKStruct() - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function returns the dktype struct from sdi module. */ /* It is done by ioctl DKIOCGETTYPE on the given sdi device. */ /* */ /*Parameters: */ /* Input: *device (sdi device) */ /* Output: *dkt (pointer to struct dktype) */ /* */ /*Return Value: */ /* */ /* 0 = Valid struct dktype found */ /* !0 = Failed - errno returned by ioctl DKIOCGETTYPE */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /*---------------------------------------------------------------------------*/ int GetDKStruct(char *device, struct dktype *dkt) { int FileID, i; FileID = open(device,O_RDONLY); if(FileID != -1) { i = ioctl(FileID, DKIOCGETTYPE, dkt); if (i != -1) errno = 0; else if (Verbose) { FormatTimeString(TimeString,time(0)); printf("\nGetDKStruct : %s ioctl DKIOCGETTYPE on %s failed", TimeString, device); fflush(stdout); } close(FileID); } else if (Verbose) { FormatTimeString(TimeString,time(0)); printf("\nGetDKStruct : %s open %s failed", TimeString, device); fflush(stdout); } return(errno); } /* GetDKStruct() - end */ #define TO_HBA 1 #define FROM_HBA 0 void osdConvertCCB(EATA_CP *pkt, dptCCB_S *ccb_P, int direction) { long addr, x; int i; if (direction == TO_HBA) { pkt->EataCP.fixed_byte = ccb_P->eataCP.flags; pkt->EataCP.ReqLen = ccb_P->eataCP.reqSenseLen; pkt->EataCP.CPfwnest = ccb_P->eataCP.nestedFW & 0x1; pkt->EataCP.CPphsunit = ccb_P->eataCP.physical & 0x1; pkt->EataCP.CPbus = ccb_P->eataCP.devAddr >> 5; pkt->EataCP.CPID = ccb_P->eataCP.devAddr & 0x1F; pkt->EataCP.CPmsg0 = ccb_P->eataCP.message[0]; pkt->EataCP.CPmsg1 = ccb_P->eataCP.message[1]; pkt->EataCP.CPmsg2 = ccb_P->eataCP.message[2]; pkt->EataCP.CPmsg3 = ccb_P->eataCP.message[3]; memcpy(pkt->EataCP.CPcdb, ccb_P->eataCP.scsiCDB, 12); pkt->EataCP.CPdataLen = ccb_P->eataCP.dataLength; pkt->EataCP.CPaddr.vp = 0; // pkt->EataCP.CPaddr.vp = (DptCcb_t*) ccb_P->eataCP.vCPaddr; pkt->EataCP.CPdataDMA = ccb_P->eataCP.dataAddr; pkt->EataCP.CPstatDMA = ccb_P->eataCP.spAddr; pkt->EataCP.CP_ReqDMA = ccb_P->eataCP.reqSenseAddr; } else { ccb_P->eataCP.flags = pkt->EataCP.fixed_byte; ccb_P->eataCP.reqSenseLen = pkt->EataCP.ReqLen; ccb_P->eataCP.nestedFW = pkt->EataCP.CPfwnest & 0x01; ccb_P->eataCP.physical = pkt->EataCP.CPphsunit & 0x01; ccb_P->eataCP.devAddr = (uCHAR) ((pkt->EataCP.CPbus << 5) | pkt->EataCP.CPID); ccb_P->eataCP.message[0] = pkt->EataCP.CPmsg0; ccb_P->eataCP.message[1] = pkt->EataCP.CPmsg1; ccb_P->eataCP.message[2] = pkt->EataCP.CPmsg2; ccb_P->eataCP.message[3] = pkt->EataCP.CPmsg3; memcpy(ccb_P->eataCP.scsiCDB, pkt->EataCP.CPcdb, 12); ccb_P->eataCP.dataLength = pkt->EataCP.CPdataLen; ccb_P->eataCP.vCPaddr = 0; // ccb_P->eataCP.vCPaddr = (uLONG) pkt->EataCP.CPaddr.vp; ccb_P->eataCP.dataAddr = pkt->EataCP.CPdataDMA; ccb_P->eataCP.spAddr = pkt->EataCP.CPstatDMA; ccb_P->eataCP.reqSenseAddr = pkt->EataCP.CP_ReqDMA; } } void osdPrintCCB(dptCCB_S *ccb_P, int success, int ts) { long addr, x; int i; EATA_CP ccb; EATA_CP *pkt = &ccb; char *buf; unsigned char flags; pkt->EataCP.fixed_byte = ccb_P->eataCP.flags; pkt->EataCP.ReqLen = ccb_P->eataCP.reqSenseLen; pkt->EataCP.CPfwnest = ccb_P->eataCP.nestedFW & 0x1; pkt->EataCP.CPphsunit = ccb_P->eataCP.physical & 0x1; pkt->EataCP.CPbus = ccb_P->eataCP.devAddr >> 5; pkt->EataCP.CPID = ccb_P->eataCP.devAddr & 0x1F; pkt->EataCP.CPmsg0 = ccb_P->eataCP.message[0]; pkt->EataCP.CPmsg1 = ccb_P->eataCP.message[1]; pkt->EataCP.CPmsg2 = ccb_P->eataCP.message[2]; pkt->EataCP.CPmsg3 = ccb_P->eataCP.message[3]; memcpy(pkt->EataCP.CPcdb, ccb_P->eataCP.scsiCDB, 12); pkt->EataCP.CPdataLen = ccb_P->eataCP.dataLength; pkt->EataCP.CPaddr.vp = (DptCcb_t*) ccb_P->eataCP.vCPaddr; pkt->EataCP.CPdataDMA = ccb_P->eataCP.dataAddr; pkt->EataCP.CPstatDMA = ccb_P->eataCP.spAddr; pkt->EataCP.CP_ReqDMA = ccb_P->eataCP.reqSenseAddr; flags = pkt->EataCP.fixed_byte; if (EataInfo) { printf("\n\nEATA CMD: (%d,%d,%d,%d) ", ccb_P->ctlrNum, pkt->EataCP.CPbus, pkt->EataCP.CPID, pkt->EataCP.CPmsg0 & 0x7); if (flags & CP_DATA_IN) printf("DATA_IN "); if (flags & CP_DATA_OUT) printf("DATA_OUT "); if (flags & CP_INTERPRET) printf("INTERPRET "); if (flags & CP_QUICK) printf("QUICK "); if (flags & CP_SG_ADDR) printf("SCATTER_GATHER "); if (pkt->EataCP.CPphsunit) printf("PHYSICAL "); if (pkt->EataCP.CPfwnest) printf("NFW "); if (flags & CP_REQ_SENSE) printf("REQ_SENSE "); if (flags & CP_INIT) printf("INIT "); if (flags & CP_SCSI_RESET) printf("RESET "); printf("flgs=%.2X RQSLen=%d ", flags, pkt->EataCP.ReqLen); printf("\nSCSI MSG: "); if (pkt->EataCP.CPmsg0 == 0) printf("NOP "); else { int ok = 0; if (pkt->EataCP.CPmsg0 & CP_DISCONNECT) { printf("DISCONNECT "); ok = 1; } if (pkt->EataCP.CPmsg0 & CP_IDENTIFY) { printf("IDENTIFY "); ok = 1; } if (!ok) printf("UNKNOWN "); } printf("msg={%.2X,%.2X,%.2X,%.2X}", pkt->EataCP.CPmsg0, pkt->EataCP.CPmsg1, pkt->EataCP.CPmsg2, pkt->EataCP.CPmsg3); if (!success) printf(" FAILED"); else { if ((ts==0x0) || (ts==0x4) || (ts==0x10) || (ts==0x14)) printf(" OK"); else printf(" WRONG TARGET STATE %.2X", ts); } printf("\nSCSI CMD: "); #define SC(cmd) case (cmd): printf("%s ", #cmd); break switch (pkt->EataCP.CPcdb[0]) { SC(SC_TEST_READY); SC(SC_REQ_SENSE); SC(SC_INQUIRY); SC(SC_SEND_DIAG); SC(SC_COPY); SC(SC_RCVE_DIAG); SC(SC_COMPARE); SC(SC_COPY_VERIFY); SC(SC_WRITE_BUFFER); SC(SC_READ_BUFFER); SC(SC_LOG_SENSE); SC(SC_LOG_SELECT); SC(SC_MODE_SELECT); SC(SC_MODE_SENSE); SC(SC_READ_LOG); SC(SC_FORMAT); SC(SC_READ0); SC(SC_WRITE0); SC(SC_RESERVE0); SC(SC_RELEASE0); SC(SC_REZERO); SC(SC_REASSIGN); SC(SC_SEEK0); SC(SC_MODE_SELECT0); SC(SC_MODE_SENSE0); SC(SC_START_STOP); SC(SC_MEDIA); SC(SC_READ_CAPACITY); SC(SC_READ); SC(SC_WRITE); SC(SC_SEEK); SC(SC_WRITE_VERIFY); SC(SC_VERIFY); SC(SC_SEARCH_HIGH); SC(SC_SEARCH_EQUAL); SC(SC_SEARCH_LOW); SC(SC_SET_LIMITS); SC(SC_PREFETCH); SC(SC_FLUSH_CACHE); SC(SC_LOCK_CACHE); SC(SC_READ_DEFECT); SC(SC_READ_LONG); SC(SC_WRITE_LONG); SC(SC_RUN); SC(SC_DPT_MFC); default: printf("Cmd=0x%x ", pkt->EataCP.CPcdb[0] & 0xff); } printf(" CDB={"); for(i = 0; i < 12; ++i) printf("%.2X,",pkt->EataCP.CPcdb[i] & 0x0ff); printf("}\ndlen=%d vptr=%.2X data=%.2X req=%.2X stat=%.2X\n", pkt->EataCP.CPdataLen, pkt->EataCP.CPaddr.vp, pkt->EataCP.CPdataDMA, pkt->EataCP.CPstatDMA, pkt->EataCP.CP_ReqDMA); } if (EataHex) { int len; addr = (long) &(pkt->EataCP); printf("pkt hex dump: "); PrintMem((uCHAR *)addr,sizeof(EataCP_t),3,1,1); printf("\nccb hex dump: "); addr = (long) &(ccb_P->eataCP); PrintMem((uCHAR *)addr,sizeof(eataCP_S),3,1,1); buf = (char *) pkt->EataCP.CPdataDMA; len = pkt->EataCP.CPdataLen; printf("\ndata buffer: (whole length = %d)", len); if (len > 256) len = 256; PrintMem((uCHAR *)buf,len,3,1,1); printf("\n"); } } #endif #if (defined(DEBUG_PRINT)) //------------------------------------------------------------------------- // Function osdPrint //------------------------------------------------------------------------- // The Parameters Passed To This Function Are : // String : Pointer To A String To Put Formatted Data Into // // This Function // // Return : None //------------------------------------------------------------------------- void osdPrint(char *String) { FILE *DebugFileHandle; if(Verbose & VERBOSE_SCREEN) { printf(String); } if(Verbose & VERBOSE_FILE) { DebugFileHandle = fopen(DebugFileName, "a+"); if(DebugFileHandle != NULL) { fwrite(String,1,strlen(String),DebugFileHandle); fclose(DebugFileHandle); } } } //------------------------------------------------------------------------- // Function I2oPrintMem //------------------------------------------------------------------------- // The Parameters Passed To This Function Are : // Addr : Far Address To Be Dumped // Count : Number Of Bytes To Dump // // This Function Dumps Memory To The Screen For Debug Purposes // // Return : NONE //------------------------------------------------------------------------- VOID I2oPrintMem(pUINT8 Addr,INT32 Count) { INT32 Offset,i; Offset = 0; // Loop For Count Bytes while(Offset < Count) { // Print Out The Address In HEX printf("\n%.4x ",Offset); // Now Print Out 16 Bytes In HEX Format for(i = 0; i < 16; ++i) { if(Offset + i >= Count) { printf(" "); } else { printf("%.2x ",Addr[Offset + i]); } if(i == 7) { printf("- "); } } // Print Out The Same 16 Bytes In ASCII Format printf(" "); for(i = 0; i < 16; ++i) { if(Offset + i >= Count) { break; } if((Addr[Offset + i] > 0x1F)&&(Addr[Offset + i] < 0x7F)) { printf("%c",Addr[Offset + i]); } else { printf("."); } } // Bump The Offset By 16 And Check For Scrolling Past Screen Offset += 16; } } //------------------------------------------------------------------------- // Function I2oPrintI2oLctEntry //------------------------------------------------------------------------- // The Parameters Passed To This Function Are : // I2oLctEntry_P : Pointer To An I2O LCT Entry // Wait : Wait Flag // // This Function Prints Out The Passed In I2O LCT Entry Structure // // Return : NONE //------------------------------------------------------------------------- VOID I2oPrintI2oLctEntry(PI2O_LCT_ENTRY I2oLctEntry_P ,INT32 Wait) { UINT32 i; printf("\nTableEntrySize = %x", I2O_LCT_ENTRY_getTableEntrySize(I2oLctEntry_P)); printf("\nLocalTID = %x", I2O_LCT_ENTRY_getLocalTID(I2oLctEntry_P)); // printf("\nreserved = %x",I2oLctEntry_P->reserved); printf("\nChangeIndicator = %x", I2O_LCT_ENTRY_getChangeIndicator(I2oLctEntry_P)); printf("\nDeviceFlags = %x", I2O_LCT_ENTRY_getDeviceFlags(I2oLctEntry_P)); printf("\nClassID.Class = %x",I2O_CLASS_ID_getClass(I2O_LCT_ENTRY_getClassIDPtr(I2oLctEntry_P))); printf("\nClassID.Version = %x",I2O_CLASS_ID_getVersion(I2O_LCT_ENTRY_getClassIDPtr(I2oLctEntry_P))); printf("\nClassID.OrganizationID = %x",I2O_CLASS_ID_getOrganizationID(I2O_LCT_ENTRY_getClassIDPtr(I2oLctEntry_P))); printf("\nSubClassInfo = %x", I2O_LCT_ENTRY_getSubClassInfo(I2oLctEntry_P)); printf("\nUserTID = %x",I2O_LCT_ENTRY_getUserTID(I2oLctEntry_P)); printf("\nParentTID = %x",I2O_LCT_ENTRY_getParentTID(I2oLctEntry_P)); printf("\nBiosInfo = %x",I2O_LCT_ENTRY_getBiosInfo(I2oLctEntry_P)); printf("\nIdentifyTag : "); for(i = 0; i < I2O_IDENTITY_TAG_SZ; ++i) { printf("%.2x ",I2oLctEntry_P->IdentityTag[i]); } printf("\nEventCapabilities = %x", I2O_LCT_ENTRY_getEventCapabilities(I2oLctEntry_P)); if(Wait) { printf("\n "); getchar(); } } //------------------------------------------------------------------------- // Function I2oPrintI2oLctTable //------------------------------------------------------------------------- // The Parameters Passed To This Function Are : // I2oLct_P : Pointer To An I2O LCT Table // Wait : Wait Flag // // This Function Prints Out The Passed In I2O LCT Table // // Return : NONE //------------------------------------------------------------------------- VOID I2oPrintI2oLctTable(PI2O_LCT I2oLct_P ,INT32 Wait) { INT32 NumEntries,i; printf("\nTableSize = %x (%x Bytes)", I2O_LCT_getTableSize(I2oLct_P), I2O_LCT_getTableSize(I2oLct_P) * 4); printf("\nBootDeviceTID = %x", I2O_LCT_getBootDeviceTID(I2oLct_P)); printf("\nLctVer = %x",I2O_LCT_getLctVer(I2oLct_P)); printf("\nIopFlags = %x",I2O_LCT_getIopFlags(I2oLct_P)); printf("\nCurrentChangeIndicator = %x", I2O_LCT_getCurrentChangeIndicator(I2oLct_P)); // // Calculate the number of device entries in the table // NumEntries = ((I2O_LCT_getTableSize(I2oLct_P) - 3) * 4) / sizeof(I2O_LCT_ENTRY); printf("\nNumber Of LCT Entries = %x",NumEntries); printf("\n-----------------------"); printf("\nLctEntries : "); printf("\n-----------------------"); if(Wait) { printf("\n "); getchar(); } for(i = 0; i < NumEntries; ++i) { I2oPrintI2oLctEntry(I2O_LCT_getLCTEntryPtr(I2oLct_P,i) ,Wait); printf("\n-----------------------"); if(Wait) { printf("\n "); getchar(); } } } //------------------------------------------------------------------------- // Function I2oPrintI2oStdMsgFrame //------------------------------------------------------------------------- // The Parameters Passed To This Function Are : // I2oStdMsgiFrame_P : Pointer To An I2O Standard Message Frame // Wait : Wait Flag // // This Function Prints Out The Passed In I2O Standard Message frame // // Return : NONE //------------------------------------------------------------------------- VOID I2oPrintI2oStdMsgFrame( PI2O_MESSAGE_FRAME I2oStdMsgFrame_P ,INT32 Wait) { printf("\nVersionOffset = %x", I2O_MESSAGE_FRAME_getVersionOffset(I2oStdMsgFrame_P)); printf("\nMsgFlags = %x", I2O_MESSAGE_FRAME_getMsgFlags(I2oStdMsgFrame_P)); printf("\nMessageSize = %x", I2O_MESSAGE_FRAME_getMessageSize(I2oStdMsgFrame_P)); printf("\nTargetAddress = %x", I2O_MESSAGE_FRAME_getTargetAddress(I2oStdMsgFrame_P)); printf("\nInitiatorAddress = %x", I2O_MESSAGE_FRAME_getInitiatorAddress(I2oStdMsgFrame_P)); printf("\nFunction = %x", I2O_MESSAGE_FRAME_getFunction(I2oStdMsgFrame_P)); printf("\nInitiatorContext = %x", I2O_MESSAGE_FRAME_getInitiatorContext(I2oStdMsgFrame_P)); if(Wait) { printf("\n "); getchar(); } } //------------------------------------------------------------------------- // Function I2oPrintI2oMsgReply //------------------------------------------------------------------------- // The Parameters Passed To This Function Are : // I2oMsgReply_P : Pointer To An I2O Message Reply Packet // Wait : Wait Flag // // This Function Prints Out The Passed In I2O Message Reply Packet // // Return : NONE //------------------------------------------------------------------------- VOID I2oPrintI2oMsgReply( PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME I2oMsgReply_P, INT32 Wait) { INT32 i; printf("\nStdReplyFrame:"); printf("\nStdMessageFrame:"); I2oPrintI2oStdMsgFrame(&I2oMsgReply_P->StdReplyFrame.StdMessageFrame,0); printf("\n-----------------------"); printf("\nTransactionContext = %x", I2oMsgReply_P->StdReplyFrame.TransactionContext); printf("\nDetailedStatusCode = %x", I2oMsgReply_P->StdReplyFrame.DetailedStatusCode); printf("\nreserved = %x",I2oMsgReply_P->StdReplyFrame.reserved); printf("\nReqStatus = %x",I2oMsgReply_P->StdReplyFrame.ReqStatus); printf("\nTransferCount = %x",I2oMsgReply_P->TransferCount); printf("\nAutoSenseTransferCount = %x",I2oMsgReply_P->AutoSenseTransferCount); printf("\nSenseData = "); for(i = 0; i < I2O_SCSI_SENSE_DATA_SZ; ++i) { printf("%.2x ",I2oMsgReply_P->SenseData[i]); } if(Wait) { printf("\n "); getchar(); } } //------------------------------------------------------------------------- // Function I2oPrintI2oSgList //------------------------------------------------------------------------- // The Parameters Passed To This Function Are : // I2oSgList_P : Pointer To An I2O Device Structure // Wait : Wait Flag // // This Function Prints Out The Passed In I2O Scatter Gather Table // // Return : NONE //------------------------------------------------------------------------- VOID I2oPrintI2oSgList( PI2O_SG_ELEMENT I2oSgList_P ,INT32 Wait) { // INT32 i,Done; //BEN printf("\nSgList commented out by BEN\n"); #if 0 //TODO: Add the access macros (on _DPT_BIG_ENDIAN) Done = 0; i = 0; if(!I2oSgList_P->u.Simple[i].FlagsCount.Count) { Done = 1; } while(!Done) { if(!I2oSgList_P->u.Simple[i].FlagsCount.Flags) { break; } printf("\nCount = %x, Flags = %x, Address = %x", I2oSgList_P->u.Simple[i].FlagsCount.Count, I2oSgList_P->u.Simple[i].FlagsCount.Flags, I2oSgList_P->u.Simple[i].PhysicalAddress); if(I2oSgList_P->u.Simple[i].FlagsCount.Flags & I2O_SGL_FLAGS_LAST_ELEMENT) { Done = 1; } ++i; } #endif // ben if(Wait) { printf("\n "); getchar(); } } //------------------------------------------------------------------------- // Function I2oPrintPrivateExecScb //------------------------------------------------------------------------- // The Parameters Passed To This Function Are : // PrivateExecScbMsg_P : Pointer To An I2O Device Structure // Wait : Wait Flag // // This Function Prints Out The Passed In I2O ExecScb Structure // // Return : NONE //------------------------------------------------------------------------- VOID I2oPrintPrivateExecScb( PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE PrivateExecScbMsg_P ,INT32 Wait) { INT32 i; printf("\nStdMessageFrame:"); I2oPrintI2oStdMsgFrame( &PrivateExecScbMsg_P->PrivateMessageFrame.StdMessageFrame,Wait); printf("\n-----------------------"); printf("\nTransactionContext = %x", PrivateExecScbMsg_P->PrivateMessageFrame.TransactionContext); printf("\nXFunctionCode = %x, OrganizationID = %x", PrivateExecScbMsg_P->PrivateMessageFrame.XFunctionCode, PrivateExecScbMsg_P->PrivateMessageFrame.OrganizationID); printf("\nCDBLength = %x",PrivateExecScbMsg_P->CDBLength); printf("\nReserved = %x",PrivateExecScbMsg_P->Reserved); printf("\nSCBFlags = %x",PrivateExecScbMsg_P->SCBFlags); printf("\nCDB = "); for(i = 0; i < I2O_SCSI_CDB_LENGTH; ++i) { printf("%.2x ",PrivateExecScbMsg_P->CDB[i]); } printf("\nByteCount = %x",PrivateExecScbMsg_P->ByteCount); printf("\n-----------------------"); printf("\nSG List :"); I2oPrintI2oSgList(&PrivateExecScbMsg_P->SGL,Wait); } #endif // DEBUG_PRINT void osdTargetOffline(uLONG HbaNum, uLONG Channel, uLONG TargetId, uLONG LUN) { UNREFERENCED_PARAMETER(HbaNum); UNREFERENCED_PARAMETER(Channel); UNREFERENCED_PARAMETER(TargetId); UNREFERENCED_PARAMETER(LUN); } // Reset the buses on the specified controller void osdResetBus(uLONG HbaNum) { DPTI_resetBus((Controller_t)HbaNum); } raidutils-0.0.6.orig/raideng/ptrarray.cpp0000664000175000000620000002330710044153307020323 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - PTRARRAY.CPP //*************************************************************************** // //Description: // // This file contains function definitions for the ptrArrayList_C //class. // //Author: Doug Anderson //Date: 6/29/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "ptrarray.hpp" //Function - ptrArrayList_C::ptrArrayList_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptArrayList_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- ptrArrayList_C::ptrArrayList_C() { curIndex = 0; setObjSize(sizeof(void *)); expandBy = 4; } //ptrArrayList_C::ptrArrayList_C() - end //Function - ptrArrayList_C::cur() - start //=========================================================================== // //Description: // // This function returns a pointer to the current object. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void * ptrArrayList_C::cur() { void *void_P = (void *)NULL; if (curIndex= getNumObjs()) rtnVal = 0; // find it else { reset(); for (uSHORT x = 0; x < newCur; x++) next(); } return rtnVal; } #endif raidutils-0.0.6.orig/raideng/ptrarray.hpp0000664000175000000620000001154010044153332020322 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __PTRARRAY_HPP #define __PTRARRAY_HPP //File - PTRARRAY.CPP //*************************************************************************** // //Description: // // This file contains the class definition for an array that holds a //list of pointers. The pointers can point to any type of object, thus //this class cannot delete the objects held in the list. // //Author: Doug Anderson //Date: 10/6/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "array.hpp" //Class - ptrArrayList_C - start //=========================================================================== // //Description: // // This class defines an array of pointers. Functions are provided //tp make the array act like a linked list of pointers. // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class ptrArrayList_C : public baseArray_C { public: // Current object index uSHORT curIndex; #if (!defined(MINIMAL_BUILD)) uSHORT reserved; #endif protected: public: // Constructor/Destructor............................. ptrArrayList_C(); // List Management Functions.......................... // Point to the end of the list void * end(); // Point to one beyond the end of the list void nullIt() { curIndex = getNumObjs(); } // Returns a pointer to the current object void * cur(); // Makes the first list object the current object and returns a // pointer to the first object in the list. void * reset(); // Returns a pointer to the next object in the list. void * next(); // Returns a pointer to the previous object in the list. void * previous(); // sets the current items in the list to the one specifed, if it fails the current is unchanged uCHAR setCur(uSHORT); // Determines if the specified object is in the list. If the // specified object is in the list, it is made the current object. uSHORT exists(void *); // Add the specified pointer in front of the current object uSHORT add(void *obj_P) { return (addAt((void *) &obj_P,curIndex)); } // Add the specified pointer to the front of the list uSHORT addFront(void *obj_P) { return (baseArray_C::addFront((void *) &obj_P)); } // Add the specified pointer to the end of the list uSHORT addEnd(void *obj_P) { return (baseArray_C::addEnd((void *) &obj_P)); } // Removes the list element associated with the current object // (The object itself is not deleted, just removed from the list) void * remove(); // Removes the list element associated with the current object // (The object itself is not deleted, just removed from the list) void * remove(void *obj_P); // Remove all objects from the array void flush() { remAll(); } // uSHORT swap(void * obj1_P, void * obj2_P); // Return List Info................................... // Return the # of objects currently in the list uSHORT size() { return (getNumObjs()); } }; //ptrArrayList_C - end #endif raidutils-0.0.6.orig/raideng/raid.cpp0000664000175000000620000000761410044153311017374 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - RAID.CPP //*************************************************************************** // //Description: // // This file contains function definitions for RAID related data //structures. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" //Function - raidParent_S::raidParent_S() - start //=========================================================================== //Description: // This function is the constructor for the raidParent_S structure. //--------------------------------------------------------------------------- raidParent_S::raidParent_S() { startLBA = 0; stripeSize = 0; numStripes = 0; dev_P = NULL; flags = 0; } //raidParent_S::raidParent_S() - end //Function - raidParent_S::reset() - start //=========================================================================== // //Description: // // This function is resets the RAID parent structure. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void raidParent_S::reset() { if (dev_P) { dev_P->decCompCount(); // Decrement the parent device's component count if (dev_P->myHBA_P()) { dev_P->myHBA_P()->decRaidEntries(); // Decrement the HBA's RAID table entry count if (dev_P->getCompCount() == 0) dev_P->myHBA_P()->decRaidEntries(); // Decrement the RAID table entry count for the array itself } } startLBA = 0; stripeSize = 0; numStripes = 0; dev_P = NULL; flags = 0; } //raidParent_S::reset() - end //Function - raidDef_S::raidDef_S - start //=========================================================================== // //Description: // // This function is the constructor for the raidDef_S structure. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- raidDef_S::raidDef_S() { // Initialize the RAID definition data refNum = 0; type = 0; minDrives = 2; maxDrives = 2; redundants = 1; minStripe = 1; maxStripe = 0xffffffffL; chanCount = 0xffff; required = 0; devType = 0; permit = 0; } //raidDef_S::raidDef_S() - end raidutils-0.0.6.orig/raideng/raid.h0000664000175000000620000002050210044153310017027 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __RAID_H #define __RAID_H //File - RAID.H //*************************************************************************** // //Description: // // This file contains data structure definitions for use in RAID //systems. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Definitions - Defines & Constants ----------------------------------------- // The maximum number of drive size entries supported in the engine #define MAX_DRIVE_SIZE_ENTRIES 126 // Supported Logical Array Pages #define LAP_NCR1 0x2b #define LAP_DPT1 0x3B #define LAP_DPT2 0x30 // Supported Physical Array Pages #define PAP_NCR1 0x2a // Mode Page to Get/Set an array's DPT name #define DPT_NAME_PAGE 0x3C // Logical Array Page Commands #define LAP_CMD_ADD 0x80 #define LAP_CMD_DELETE 0x81 #define LAP_CMD_MODIFY 0x82 #define LAP_CMD_REPLACE 0x83 #define LAP_CMD_ABORT 0x84 #define LAP_CMD_SEGMENT 0x85 #define LAP_CMD_BUILD 0x88 #define LAP_CMD_REBUILD 0x89 #define LAP_CMD_VERIFY 0x8a #define LAP_CMD_VERIFY_FIX 0x8b #define LAP_CMD_VERIFY_ABORT 0x8c #define LAP_CMD_ASSIGN_MAGIC 0x8c // Physical Array Page Commands #define PAP_CMD_OPTIMAL 0x00 #define PAP_CMD_FAIL 0x03 #define PAP_CMD_WARN 0x05 #define PAP_CMD_REPLACED 0x24 // Reserve #define RAID_TABLE_SIZE 0x21 #define GEN5_RAID_TABLE_SIZE 0x11 //Definitions - Structure & Typedef ----------------------------------------- //------------------------------------------------------------------- #ifdef __cplusplus struct raidRange_S { #else typedef struct { #endif uLONG startLBA; // First LBA uLONG stripeSize; // # blocks per stripe uLONG numStripes; // total number of stripes #ifdef __cplusplus //---------- Portability Additions ----------- in sp_raid.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #else } raidRange_S; #endif // c++ #ifdef __cplusplus //flags - bit definitions // 1=This device is redundant const uSHORT FLG_PAR_REDUNDANT = 0x0001; struct raidParent_S : public raidRange_S { // Data............................................... // Pointer to the parent RAID device dptRAIDdev_C *dev_P; // Miscellaneous flags - see bit definitions above uSHORT flags; // Constructor/Destructor............................. raidParent_S(); // Other Functions.................................... void reset(); //---------- Portability Additions ----------- in sp_raid.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #endif // c++ //------------------------------------------------------------------- #ifdef __cplusplus struct raidParentMap_S { #else typedef struct { #endif raidRange_S range; // Address range occupied DPT_TAG_T tag; // Tag of parent device #ifdef __cplusplus //---------- Portability Additions ----------- in sp_raid.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #else } raidParentMap_S; #endif // c++ //------------------------------------------------------------------- //require - bit definitions // An even # of drives are required #define FLG_REQ_EVEN_DRIVES 0x0001 // An odd # of drives are required #define FLG_REQ_ODD_DRIVES 0x0002 // The number of drives must be a power of 2 plus the number // of parity drives. #define FLG_REQ_POWER_2_PLUS 0x0004 // 1=Use the channel count field // (Allows for unique channel requirement...) #define FLG_REQ_CHAN_COUNT 0x0020 // The first component in the list must be located on the first channel #define FLG_REQ_MIN_CHAN 0x0040 // The component devices must be located on sequential channels #define FLG_REQ_SEQ_CHAN 0x0080 // The components must have the same stripe size #define FLG_REQ_SAME_STRIPE_SZ 0x0100 // The components must have the same number of stripes #define FLG_REQ_SAME_NUM_STRIPE 0x0200 // The component devices must have a stripe size that is an even // multiple of the underlying stripe size #define FLG_REQ_UNDER_MULTIPLE 0x0400 // 1=Prevent the RAID device from being a component device // (ex.- Hot Spares) #define FLG_REQ_RESTRICT 0x4000 // 1=Force the RAID device to be suppressed after it is created // (ex.- Hot Spares) #define FLG_REQ_SUPPRESS 0x8000 //permit - bit definitions // 1=Components can have removeable media #define FLG_COMP_REMOVEABLE 0x0001 // 1=Components can be emulated drives #define FLG_COMP_EMULATED 0x0002 // 1=Components must be from the same vendor #define FLG_COMP_SAME_VENDOR 0x0008 // 1=Components must be the same product #define FLG_COMP_SAME_PRODUCT 0x0010 // 1=Components must have the same revision level #define FLG_COMP_SAME_REVISION 0x0020 // 1=Don't use devType field, 0=Only devType devices permitted #define FLG_COMP_ANY_TYPE 0x0040 // 1=Components can have non-512 byte block sizes #define FLG_COMP_NON_512 0x0100 // 1=Components can have varying block sizes #define FLG_COMP_DIFF_BLOCKS 0x0200 // 1=Components must all have the same capacity #define FLG_COMP_SAME_CAPACITY 0x0400 #ifdef __cplusplus struct raidDefinition_S { #else typedef struct { #endif uSHORT refNum; // RAID reference # uSHORT type; // RAID Type (Level) (0,1,3,5...) uSHORT minDrives; // Minimum # of drives required uSHORT maxDrives; // Maximum # of drives required uSHORT redundants; // Number of redundant drives // (0x82 = 1/2 drives redundant) uLONG minStripe; // Minimum stripe size (blocks) uLONG maxStripe; // Maximum stripe size (blocks) uSHORT chanCount; // Determine the # of times a channel // can appear in the component list uSHORT required; // Additional requirements // (see bit definitions above) uSHORT devType; // Device type supported uSHORT permit; // Component flags #ifdef __cplusplus //---------- Portability Additions ----------- in sp_raid.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #else } raidDefinition_S; #endif // c++ #ifdef __cplusplus struct raidDef_S : public raidDefinition_S { // Constructor/Destructor............................. raidDef_S::raidDef_S(); }; #endif // c++ //------------------------------------------------------------------- //------------------------------------------------------------------- //------------------------------------------------------------------- #endif // __RAID_H raidutils-0.0.6.orig/raideng/raid_bcd.cpp0000664000175000000620000004460410044153311020204 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - RAID_BCD.CPP //************************************************************************** // //Description: // // This file contains the function definitions for the dptRAIDbcd_C //class. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files //Function - dptRAIDbcd_C::dptRAIDbcd_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptRAIDbcd_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptRAIDbcd_C::dptRAIDbcd_C() { // RAID BCDs do not bubble there physical devices setNoBubble(); // Set the engine object type engType = DPT_RAID_BCD; // Set the default physical address limits phyRange.setMaxChan(5); phyRange.setMinChan(1); for (uINT i=1; i<=5; i++) { phyRange.setMaxId(i, 15); phyRange.setMaxLun(i, 0); } addr = phyRange.getMaxAddr(); addr.lun = 0; // Physical ID this controller appears on phyID = 6; // Logical LUN to access controller logLUN = 0; // Initialize the NCR information memset(boardID,0,5); memset(boardRevision,0,3); memset(boardDate,0,10); memset(fwVerDate,0,6); memset(swVerDate,0,6); // Create the default RAID definitions setDefRAID(); } //dptRAIDbcd_C::dptRAIDbcd_C() - end //Function - dptRAIDbcd_C::getRAIDaddr() - start //=========================================================================== // //Description: // // This function gets the next available SCSI address for the //specified RAID device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDbcd_C::getRAIDaddr(dptRAIDdev_C *dev_P) { // Attempt to use one of the component's SCSI address getLogAddr(dev_P->addr); } //dptRAIDbcd_C::getRAIDaddr() - end //Function - dptRAIDbcd_C::realInit() - start //=========================================================================== // //Description: // // This function initializes a real device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDbcd_C::realInit() { // Get the SCSI inquiry information selfInquiry(); // Get the device's DPT name getNCRinfo(); } //dptRAIDbcd_C::realInit() - end //Function - dptRAIDbcd_C::getNCRinfo() - start //=========================================================================== // //Description: // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDbcd_C::getNCRinfo() { engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { ccb_P->target(this); // Get the hardware information page ccb_P->inquiry(0xc0); if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { if (ccb_P->ok()) { memcpy(boardID,&ccb_P->defData[154],4); boardID[4] = 0; memcpy(boardDate,&ccb_P->defData[144],8); boardDate[8] = 0; boardRevision[0] = ccb_P->defData[152]; boardRevision[1] = ccb_P->defData[153]; boardRevision[2] = 0; } } ccb_P->target(this); // Get the firmware information page ccb_P->inquiry(0xc1); if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { if (ccb_P->ok()) { // Copy the firmware information memcpy(fwVerDate,&ccb_P->defData[8],6); } } ccb_P->target(this); // Get the software information page ccb_P->inquiry(0xc2); if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { if (ccb_P->ok()) { // Copy the software information memcpy(swVerDate,&ccb_P->defData[8],6); } } // Free the CCB ccb_P->clrInUse(); } } //dptRAIDbcd_C::getNCRinfo() - end //Function - dptRAIDbcd_C::rtnInfo() - start //=========================================================================== // //Description: // // This function returns SCSI HBA information to the specified //output buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDbcd_C::rtnInfo(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; #if defined (_DPT_STRICT_ALIGN) uSHORT tempShort = 0; #endif // Return base class information dptSCSImgr_C::rtnInfo(fromEng_P); // Return the BCD's board ID fromEng_P->insert(boardID,5); // Return the BCD's board revision fromEng_P->insert(boardRevision,3); // Return the board date of manufacture fromEng_P->insert(boardDate,10); // Return the firmware version and date fromEng_P->insert(fwVerDate,6); // Return the software version and date #ifdef SNI_MIPS fromEng_P->insert(tempShort); #endif if (fromEng_P->insert(swVerDate,6)) retVal = MSG_RTN_COMPLETED; return (retVal); } //dptRAIDbcd_C::rtnInfo() - end //Function - dptRAIDbcd_C::handleMessage() - start //=========================================================================== // //Description: // // This routine handles DPT events for the dptRAIDmgr_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDbcd_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Create a new RAID device case MSG_RAID_NEW: retVal = newRAID(fromEng_P,toEng_P,0); break; // Create an invalid (ghosted) RAID device case MSG_RAID_GHOST: retVal = newRAID(fromEng_P,toEng_P,1); break; default: // Call base class event handler retVal = dptManager_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return (retVal); } //dptRAIDbcd_C::handleMessage() - end //Function - dptRAIDbcd_C::setDefRAID() - start //=========================================================================== // //Description: // // This function sets up default RAID definitions. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDbcd_C::setDefRAID() { raidDef_S *def_P; // Define RAID 0 def_P = new raidDef_S; if (def_P!=NULL) { // Initialize the RAID definition data // def_P->refNum = 0; // def_P->type = 0; // def_P->minDrives = 2; def_P->maxDrives = 10; def_P->redundants = 0; // def_P->minStripe = 1; def_P->maxStripe = 32 * 2048L; // def_P->chanCount = 0xffff; def_P->required |= FLG_REQ_SAME_STRIPE_SZ | FLG_REQ_SAME_NUM_STRIPE | FLG_REQ_UNDER_MULTIPLE; // def_P->devType = DPT_SCSI_DASD; def_P->permit |= FLG_COMP_SAME_VENDOR | FLG_COMP_SAME_PRODUCT | FLG_COMP_SAME_CAPACITY; // Add to the RAID definition list enterRAIDdef(def_P); // Set the RAID support flag raidSupport |= FLG_RAID_0; } // Define RAID 1 def_P = new raidDef_S; if (def_P!=NULL) { // Initialize the RAID definition data def_P->refNum = 1; def_P->type = 1; def_P->minDrives = 2; def_P->maxDrives = 10; def_P->redundants = 0x82; // def_P->minStripe = 1; // def_P->maxStripe = 0xffffffffL; def_P->chanCount = 2; def_P->required |= FLG_REQ_SAME_STRIPE_SZ | FLG_REQ_SAME_NUM_STRIPE | FLG_REQ_UNDER_MULTIPLE | FLG_REQ_CHAN_COUNT | FLG_REQ_EVEN_DRIVES; // def_P->devType = DPT_SCSI_DASD; def_P->permit |= FLG_COMP_SAME_VENDOR | FLG_COMP_SAME_PRODUCT | FLG_COMP_SAME_CAPACITY; // Add to the RAID definition list enterRAIDdef(def_P); // Set the RAID support flag raidSupport |= FLG_RAID_1; } // Define RAID 3 def_P = new raidDef_S; if (def_P!=NULL) { // Initialize the RAID definition data def_P->refNum = 3; def_P->type = 3; def_P->minDrives = 3; def_P->maxDrives = 5; // def_P->redundants = 1; def_P->minStripe = 1; def_P->maxStripe = 1; // def_P->chanCount = 0xffff; def_P->required |= FLG_REQ_SAME_STRIPE_SZ | FLG_REQ_SAME_NUM_STRIPE | FLG_REQ_UNDER_MULTIPLE | FLG_REQ_MIN_CHAN | FLG_REQ_SEQ_CHAN | FLG_REQ_POWER_2_PLUS; // def_P->devType = DPT_SCSI_DASD; def_P->permit |= FLG_COMP_SAME_VENDOR | FLG_COMP_SAME_PRODUCT | FLG_COMP_SAME_CAPACITY; // Add to the RAID definition list enterRAIDdef(def_P); // Set the RAID support flag raidSupport |= FLG_RAID_3; } // Define RAID 5 def_P = new raidDef_S; if (def_P!=NULL) { // Initialize the RAID definition data def_P->refNum = 5; def_P->type = 5; def_P->minDrives = 3; def_P->maxDrives = 5; // def_P->redundants = 1; def_P->minStripe = 4 * 2; def_P->maxStripe = 32 * 2048L; def_P->chanCount = 1; def_P->required |= FLG_REQ_SAME_STRIPE_SZ | FLG_REQ_SAME_NUM_STRIPE | FLG_REQ_UNDER_MULTIPLE | FLG_REQ_CHAN_COUNT; // def_P->devType = DPT_SCSI_DASD; def_P->permit |= FLG_COMP_SAME_VENDOR | FLG_COMP_SAME_PRODUCT | FLG_COMP_SAME_CAPACITY; // Add to the RAID definition list enterRAIDdef(def_P); // Set the RAID support flag raidSupport |= FLG_RAID_5; } } //dptRAIDbcd_C::setDefRAID() - end //Function - dptRAIDbcd_C::passCCB() - start //=========================================================================== // //Description: // // This function makes adjustments to the CCB and then passes //the send CCB request up the attachment chain. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDbcd_C::passCCB(engCCB_C *ccb_P) { DPT_RTN_T retVal; // If the command came from a physical device... if (ccb_P->isPhy()) { // Send a pass thru command if ((retVal=sendPassThru(ccb_P))==MSG_RTN_COMPLETED) { // Change the CCB to target the bridge controller ccb_P->target(this); // Communicate thru the logical LUN ccb_P->setLUN(logLUN); // Always physical origin to the next level ccb_P->setPhy(); // Send the CCB to the next level in the attachment chain retVal = myMgr_P()->passCCB(ccb_P); } } else { // Always physical origin to the next level ccb_P->setPhy(); // Send the CCB to the next level in the attachment chain retVal = myMgr_P()->passCCB(ccb_P); } return (retVal); } //dptRAIDbcd_C::passCCB() - end //Function - dptRAIDbcd_C::sendPassThru() - start //=========================================================================== // //Description: // // This function issues a pass thru command to the specified //channel & ID. The pass through command enables an external //source to communicate directly with a RAID BCD physical device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // This command should be followed immediately by the SCSI command //to be passed directly through to the SCSI device. // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDbcd_C::sendPassThru(engCCB_C *ccb_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_GET_CCB; // Get a CCB engCCB_C *passCCB_P = getCCB(); if (passCCB_P!=NULL) { // Initialize the SCSI CDB passCCB_P->ncrPassThru(ccb_P); // Target the bridge controller passCCB_P->target(this); // Communicate thru the logical LUN passCCB_P->setLUN(logLUN); // This device is physical to the next level passCCB_P->setPhy(); // Send the pass thru CCB retVal = myMgr_P()->passCCB(passCCB_P); // Free the pass thru CCB passCCB_P->clrInUse(); } return (retVal); } //dptRAIDbcd_C::sendPassThru() - end //Function - dptRAIDbcd_C::findMyPhysicals() - start //=========================================================================== // //Description: // // This function finds all the physical devices attached to this //RAID bridge controller. // //Parameters: // //Return Value: // // 1 = OK // 0 = Failed // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptRAIDbcd_C::findMyPhysicals() { uCHAR chan,id; uCHAR maxID,maxChan; uCHAR mainStatus,subStatus; uSHORT index; dptDevice_C * newDev_P; uSHORT retVal = 0; engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // Initialize the CCB to get the physical array page ccb_P->modeSense6(PAP_NCR1); // Target this RAID BCD ccb_P->target(this); // Indicate that this is a RAID command ccb_P->setRAIDcmd(); // Send the CCB to hardware if (launchCCB(ccb_P)==MSG_RTN_COMPLETED) { // Insure the proper mode page was returned if ((ccb_P->modeParam_P->getPageCode() & 0x3f)==0x2a) { retVal = 1; index = 0; maxID = maxChan = 0; // Check all IDs for (id=0;id<=15;id++) { // Check all channels for (chan=1;chan<=15;chan++) { mainStatus = ccb_P->modeParam_P->getData()[index] & 0x0f; subStatus = ccb_P->modeParam_P->getData()[index] & 0x70; if (mainStatus==0x07) // Set the BCD's physical ID phyID = id; else if (mainStatus!=0x01) { // Create a new device newDev_P = (dptDevice_C *) newObject(DPT_SCSI_DASD); if (newDev_P!=NULL) { // Initialize the new object's SCSI address newDev_P->addr.chan = chan; newDev_P->addr.id = id; newDev_P->addr.lun = 0; // Indicate that this is a real object newDev_P->status.flags |= FLG_STAT_REAL; // Enter into the physical device list enterPhy(newDev_P); } } // If this channel is supported... else if (!(subStatus & 0x10)) if (chan>maxChan) maxChan = chan; index++; } // end for (chan) // If this ID is supported... if ((mainStatus==1) && !(subStatus & 0x20)) maxID = id; } // end for (id) // Set the maximum channel supported phyRange.setMaxChan(maxChan); } // end if (pageCode==0x2a) } // end if (launchCCB() == MSG_RTN_COMPLETED) // Free the CCB ccb_P->clrInUse(); } return (retVal); } //dptRAIDbcd_C::findMyPhysicals() - end //Function - dptRAIDbcd_C::findMyLogicals() - start //=========================================================================== // //Description: // // This function finds all FW logical devices associated with this HBA. // //Parameters: // //Return Value: // // 1 = OK // 0 = Failed // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptRAIDbcd_C::findMyLogicals() { dptDevice_C *dev_P; // Note: The RAID BCD's logical devices have already been found by the // HBA's physical device scan. // Initialize all RAID devices dev_P = (dptDevice_C *) logList.reset(); while (dev_P!=NULL) { // Initialize the RAID device dev_P->initRealLogical(); // Get the next logical device dev_P = (dptDevice_C *) logList.next(); } return (1); } //dptRAIDbcd_C::findMyLogicals() - end //Function - dptRAIDbcd_C::findComponent() - start //=========================================================================== // //Description: // // This function finds a component device with the specified SCSI //address. The HBA field of the SCSI address is assumed to be set to //the HBA's index #. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptDevice_C * dptRAIDbcd_C::findComponent(dptAddr_S addr,uSHORT,uLONG, dptCoreList_C *) { dptDevice_C *comp_P; // Update the BCD's HBA # updateHBAnum(); // Assume the component is attached to this manager's HBA addr.hba = getHBA(); // Attempt to find the component comp_P = (dptDevice_C *) findObjectAt(phyList,addr); if (comp_P==NULL) { // Create an absent device comp_P = (dptDevice_C *) newObject(DPT_SCSI_DASD); if (comp_P!=NULL) { // Set the device's SCSI address comp_P->addr = addr; // Set the device's status to missing comp_P->status.display = DSPLY_STAT_MISSING; // Add the device to the BCD's physical object list enterPhy(comp_P); } } return (comp_P); } //dptRAIDbcd_C::findComponent() - end raidutils-0.0.6.orig/raideng/raid_dev.cpp0000664000175000000620000014772010044153310020234 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - RAID_DEV.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptRAIDdev_C //class. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files //Function - dptRAIDdev_C::dptRAIDdev_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptRAIDdev_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptRAIDdev_C::dptRAIDdev_C() { raidFlags = 0; raidType = RAID_NONE; redundants = 0; scheduledDiag = 0; newPhyStatus = 0; compCount = 0; maxRaidLBA = 0; osVisible = 0; udmaModeSupported = 0; udmaModeSelected = 0; minReservedSpace = RESERVED_SPACE_RAID; segment_P = NULL; maxSegments = 0; } //dptRAIDdev_C::dptRAIDdev_C() - end //Function - dptRAIDdev_C::okRAIDdevice() - start //=========================================================================== // //Description: // // This function verifies this RAID device against the specified //RAID definition. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDdev_C::okRAIDdevice(raidHeader_S *&header_P, raidDef_S *&def_P ) { DPT_RTN_T retVal; // Save the optimization flags if (header_P->control & FLG_RCTL_SS_MULTIPLE) raidFlags |= FLG_RDEV_SS_MULTIPLE; if (header_P->control & FLG_RCTL_CAPACITY_OPT) raidFlags |= FLG_RDEV_CAPACITY_OPT; // Compute the component data (stripe size, # stripes...) computeComps(header_P,def_P); // Determine if all RAID requirements are met retVal = okRequired(def_P); if (retVal == MSG_RTN_COMPLETED) // Determine if any permissions are violated retVal = okPermission(def_P); return (retVal); } //dptSCSImgr_C::okRAIDparams() - end //Function - dptRAIDdev_C::okRequired() - start //=========================================================================== // //Description: // // This function determines if this RAID device meets the criteria //in the specified RAID definition's "required" flags. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDdev_C::okRequired(raidDef_S *&def_P) { uSHORT minChan,maxChan,chanCount,chan; uSHORT dataDrives; dptRAIDdev_C *comp_P; uLONG stripeSize,numStripes; uCHAR bitCount; // Verify the component drive count if (compList.size()minDrives) // Not enough component drives specified return (MSG_RTN_FAILED | ERR_RAID_TOO_FEW); if (compList.size()>def_P->maxDrives) // Too many component drives specified return (MSG_RTN_FAILED | ERR_RAID_TOO_MANY); if ((def_P->required & FLG_REQ_EVEN_DRIVES) && (compList.size() & 0x1)) // An even number of components are required return (MSG_RTN_FAILED | ERR_RAID_EVEN); if ((def_P->required & FLG_REQ_ODD_DRIVES) && !(compList.size() & 0x0001)) // An odd number of components are required return (MSG_RTN_FAILED | ERR_RAID_ODD); if (def_P->required & FLG_REQ_POWER_2_PLUS) { bitCount = 0; // Get the number of drives minus the number of redundant drives dataDrives = compList.size() - def_P->redundants; // Bit #0 cannot be the only bit set if (dataDrives>1) { // There should only be 1 bit set if the number is a power of 2 while ( (dataDrives!=0) && (bitCount<=1) ) { if (dataDrives & 0x0001) bitCount++; dataDrives >>= 1; } } if (bitCount!=1) // The number of component drives must be a power of 2 plus // the number of parity drives return (MSG_RTN_FAILED | ERR_RAID_POWER_2_PLUS); } // If there is a limit to the number of times a single // channel can appear in the component list... minChan = myMgr_P()->getMinAddr().chan; if (def_P->required & FLG_REQ_CHAN_COUNT) { maxChan = myMgr_P()->getMaxAddr().chan; for (chan=minChan;chan<=maxChan;chan++) { chanCount = 0; comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { if (comp_P->getChan()==chan) chanCount++; comp_P = (dptRAIDdev_C *) compList.next(); } if (chanCount>def_P->chanCount) return (MSG_RTN_FAILED | ERR_RAID_CHAN_COUNT); } } // Check stripe size/capacity limits comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { if (comp_P->parent.stripeSizeminStripe) // The component's stripe size is below the minimum return (MSG_RTN_FAILED | ERR_RAID_MIN_STRIPE); if (comp_P->parent.stripeSize>def_P->maxStripe) // The component's stripe size is above the maximum return (MSG_RTN_FAILED | ERR_RAID_MAX_STRIPE); if (comp_P->parent.numStripes==0) // There must be at least 1 stripe return (MSG_RTN_FAILED | ERR_RAID_ZERO_STRIPES); if (comp_P->getLastParentLBA() > comp_P->capacity.maxLBA) // use maxRaidLBA here? // The component capacity can not exceed the device capacity return (MSG_RTN_FAILED | ERR_RAID_TOO_LARGE); if ((comp_P->getLevel()==2) && ((comp_P->getMaxPhyLBA()-comp_P->getLastLBA())<0x11)) // There isn't enough room for a RAID table return (MSG_RTN_FAILED | ERR_RAID_TABLE_REQUIRED); // Get the next component comp_P = (dptRAIDdev_C *) compList.next(); } comp_P = (dptRAIDdev_C *) compList.reset(); if (comp_P!=NULL) { // Initialize test data with the first component's data stripeSize = comp_P->parent.stripeSize; numStripes = comp_P->parent.numStripes; chanCount = comp_P->getChan(); if ((def_P->required & FLG_REQ_MIN_CHAN) && (chanCount!=minChan)) // The first component does not appear on the first channel return (MSG_RTN_FAILED | ERR_RAID_START_CHAN); } while (comp_P!=NULL) { if (def_P->required & FLG_REQ_SEQ_CHAN) if (comp_P->getChan()!=chanCount) // The components do not appear on sequential channels return (MSG_RTN_FAILED | ERR_RAID_SEQ_CHAN); if (def_P->required & FLG_REQ_SAME_STRIPE_SZ) if (comp_P->parent.stripeSize!=stripeSize) // The components have different stripe sizes return (MSG_RTN_FAILED | ERR_RAID_DIFF_STRIPES); if (def_P->required & FLG_REQ_SAME_NUM_STRIPE) if (comp_P->parent.numStripes!=numStripes) // The components have different # of stripes return (MSG_RTN_FAILED | ERR_RAID_DIFF_NUM_STR); if (def_P->required & FLG_REQ_UNDER_MULTIPLE) if ((comp_P->parent.stripeSize % comp_P->getMaxCompStripe())!=0) // The stripe size is not a multiple of the underlying // stripe size. return (MSG_RTN_FAILED | ERR_RAID_OVER_STRIPE); comp_P = (dptRAIDdev_C *) compList.next(); chanCount++; } // end while (comp_P!=NULL) return (MSG_RTN_COMPLETED); } //dptRAIDdev_C::okRequired() - end //Function - dptRAIDdev_C::okPermission() - start //=========================================================================== // //Description: // // This function determines if this RAID device meets the criteria //in the specified RAID definition's "permit" flags. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDdev_C::okPermission(raidDef_S *&def_P) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; dptRAIDdev_C *comp_P,*comp1_P; comp_P = comp1_P = (dptRAIDdev_C *) compList.reset(); while ((comp_P!=NULL) && (retVal==MSG_RTN_COMPLETED)) { if (!(def_P->permit & FLG_COMP_REMOVEABLE)) if (comp_P->isRemoveable()) // Removeable media devices not permitted retVal = MSG_RTN_FAILED | ERR_RAID_COMP_REMOVE; if (!(def_P->permit & FLG_COMP_EMULATED)) if (comp_P->isEmulated()) // Removeable media devices not permitted retVal = MSG_RTN_FAILED | ERR_RAID_COMP_EMULATED; if (!(def_P->permit & FLG_COMP_ANY_TYPE)) if (comp_P->getObjType()!=def_P->devType) // Invalid device type retVal = MSG_RTN_FAILED | ERR_RAID_COMP_DEVTYPE; if (!(def_P->permit & FLG_COMP_NON_512)) if (comp_P->capacity.blockSize!=512) // Non-512 byte block size retVal = MSG_RTN_FAILED | ERR_RAID_COMP_NON_512; if (!(def_P->permit & FLG_COMP_DIFF_BLOCKS)) if (comp_P->capacity.blockSize!=comp1_P->capacity.blockSize) // Components have different block sizes retVal = MSG_RTN_FAILED | ERR_RAID_COMP_NON_512; if (def_P->permit & FLG_COMP_SAME_CAPACITY) if (comp_P->capacity.maxLBA!=comp1_P->capacity.maxLBA) // Components have different capacities retVal = MSG_RTN_FAILED | ERR_RAID_DIFF_CAPACITY; if (def_P->permit & FLG_COMP_SAME_VENDOR) if (!findSubString((uCHAR *)comp_P->descr.vendorID, (uCHAR *)comp1_P->descr.vendorID,8,8,0)) // Components have different vendor IDs retVal = MSG_RTN_FAILED | ERR_RAID_DIFF_VENDOR; if (def_P->permit & FLG_COMP_SAME_PRODUCT) if (!findSubString((uCHAR *)comp_P->descr.productID, (uCHAR *)comp1_P->descr.productID,16,16,0)) // Components have different product IDs retVal = MSG_RTN_FAILED | ERR_RAID_DIFF_PRODUCT; if (def_P->permit & FLG_COMP_SAME_REVISION) if (!findSubString((uCHAR *)comp_P->descr.revision, (uCHAR *)comp1_P->descr.revision,4,4,0)) // Components have different revisions retVal = MSG_RTN_FAILED | ERR_RAID_DIFF_REVISION; // Get the next component comp_P = (dptRAIDdev_C *) compList.next(); } return (retVal); } //dptRAIDdev_C::okPermission() - end //Function - dptRAIDdev_C::freeComponents() - start //=========================================================================== // //Description: // // This function frees all component device's from any association //with this device as a parent RAID device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDdev_C::freeComponents() { DEBUG_BEGIN(1, dptRAIDdev_C::freeComponents()); dptRAIDdev_C *comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Clear the RAID parent structure comp_P->parent.reset(); // Clear the suppression desired status comp_P->supNotDesired(); // If space has been temporarily reserved... if (comp_P->prevMaxLBA!=0) { // Restore the logical capacity comp_P->capacity.maxLBA = comp_P->prevMaxLBA; comp_P->prevMaxLBA = 0; } // If a physical device... if (comp_P->isPhysical()) { #ifdef _SINIX_ADDON // If this array exists in hardware... if (isReal()) { DEBUG(1, PRT_DADDR(comp_P) << \ " RESTORE: newlba=" << comp_P->getMaxPhyLBA() - 1 << " oldlba=" << \ comp_P->getLastLBA()); comp_P->capacity.maxLBA = comp_P->getMaxPhyLBA() - 1; // Indicate that the component is in a hardware mismatch state comp_P->setHWmismatch1(); } #else // If this array exists in hardware... if (isReal()) // Indicate that the component is in a hardware mismatch state comp_P->setHWmismatch1(); #endif // Allow PAP status if previously not a component comp_P->clrHWmismatch2(); // Set the physical component's status to unconfigured comp_P->status.display = DSPLY_STAT_OPTIMAL; comp_P->status.main = PAPM_UNCONFIGURED; comp_P->status.sub = PAPS_UNCONFIGURED; } comp_P = (dptRAIDdev_C *) compList.next(); } } //dptRAIDdev_C::freeComponents() - end //Function - dptRAIDdev_C::enterParent() - start //=========================================================================== // //Description: // // This function sets this device's RAID parent. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDdev_C::enterParent(dptRAIDdev_C *parent_P, raidCompList_S *list_P, uSHORT flags ) { // Enter the parent device enterParent(parent_P,list_P->numStripes,list_P->stripeSize,flags); } //dptRAIDdev_C::enterParent() - end //Function - dptRAIDdev_C::enterParent() - start //=========================================================================== // //Description: // // This function sets this device's RAID parent. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDdev_C::enterParent(dptRAIDdev_C *parent_P, uLONG inNumStripes, uLONG inStripeSize, uSHORT flags ) { // Initialize the RAID parent structure parent.dev_P = parent_P; parent.startLBA = 0; parent.stripeSize = inStripeSize; parent.numStripes = inNumStripes; parent.flags = flags; if (parent_P->myHBA_P()) { parent_P->myHBA_P()->incRaidEntries(); // Increment the RAID entry count for the component device // If this is the first component entered... if (parent_P->getCompCount() == 0) { parent_P->myHBA_P()->incRaidEntries(); // Increment the RAID entry count for the array itself } } parent_P->incCompCount(); if (myMgr_P()->isBubbler()) // Suppress this device myConn_P()->suppress(this); } //dptRAIDdev_C::enterParent() - end //Function - dptRAIDdev_C::computeComps() - start //=========================================================================== // //Description: // // This function computes the stripe size size and number of stripes //for each component device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDdev_C::computeComps(raidHeader_S *&header_P, raidDef_S *&def_P ) { dptRAIDdev_C *comp_P; uLONG numStripes,size; uLONG maxStripeSize = 0; uLONG minNumStripes = 0xffffffffL; if (getRAIDtype() == RAID_1) { // Determine if either component has a Solaris partition... int foundSolarisPartition = 0; comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { if (comp_P->isSolarisPartition()) { foundSolarisPartition++; } comp_P = (dptRAIDdev_C *) compList.next(); } // If one of the drives has a Solaris partition if (foundSolarisPartition) { // Ensure all components are flagged as having a Solaris partition // to prevent allocating additional space at the end of the drives comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { comp_P->setSolarisPartition(); comp_P = (dptRAIDdev_C *) compList.next(); } } } // Reserve space at the end of all HBA physical components // and get the max. RAID LBA using this manager's drive size table comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Ensure sufficient space is reserved comp_P->reserveTempSpace(); // Update the max RAID LBA based on the manager's drive size table comp_P->updateMaxRaidLBA(); comp_P = (dptRAIDdev_C *) compList.next(); } // If use global stripe size... if (!(header_P->control & FLG_RCTL_STRIPE)) { comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Set individual stripe sizes to the global stripe size comp_P->parent.stripeSize = header_P->stripeSize; comp_P = (dptRAIDdev_C *) compList.next(); } } // Compute all zero size stripes comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // If stripe size can vary & optimize for performance... if (!(def_P->required & FLG_REQ_SAME_STRIPE_SZ) && !(header_P->control & FLG_RCTL_CAPACITY_OPT)) size = comp_P->calcStripeSize(def_P->minStripe,1); else // Compute the stripe size for this component // (Original method) size = comp_P->calcStripeSize(def_P->minStripe); // Get the maximum stripe size if (size>maxStripeSize) maxStripeSize = size; comp_P = (dptRAIDdev_C *) compList.next(); } // If all stripe sizes must be the same... if ( (def_P->required & FLG_REQ_SAME_STRIPE_SZ) || (!(header_P->control & FLG_RCTL_SIZE) && (header_P->size!=0)) ) { comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Set the stripe size to the largest stripe size comp_P->parent.stripeSize = maxStripeSize; comp_P = (dptRAIDdev_C *) compList.next(); } } // If use global device size... if (!(header_P->control & FLG_RCTL_SIZE)) { size = compList.size() - redundants; if (size!=0) numStripes = header_P->size / size; else numStripes = 0; if (maxStripeSize!=0) numStripes /= maxStripeSize; comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Set individual # stripes to the computed value comp_P->parent.numStripes = numStripes; comp_P = (dptRAIDdev_C *) compList.next(); } } // Compute all zero value # stripes comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Compute the number of stripes for this component size = comp_P->calcNumStripes(); // Get the minimum # of stripes if (sizerequired & FLG_REQ_SAME_NUM_STRIPE) { comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Set the # of stripes to the minimum comp_P->parent.numStripes = minNumStripes; comp_P = (dptRAIDdev_C *) compList.next(); } } // If the stripe sizes can vary... if (!(def_P->required & FLG_REQ_SAME_STRIPE_SZ) && (header_P->control & FLG_RCTL_CAPACITY_OPT)) { comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Try multiples of the current stripe size to access // the devices full capacity comp_P->calcVaryStripe(def_P,header_P); comp_P = (dptRAIDdev_C *) compList.next(); } } // Compute the size of this RAID device size = 0; comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Compute the number of stripes for this component if (!(comp_P->parent.flags & FLG_PAR_REDUNDANT)) size += comp_P->parent.numStripes * comp_P->parent.stripeSize; if (comp_P->capacity.blockSize > capacity.blockSize) capacity.blockSize = comp_P->capacity.blockSize; comp_P = (dptRAIDdev_C *) compList.next(); } capacity.maxLBA = capacity.maxPhysLBA = size - 1; } //dptRAIDdev_C::computeComps() - end //Function - dptRAIDdev_C::reserveTempSpace() - start //=========================================================================== // //Description: // // This function insures that all HBA physical components have blocks //reserved at the end of the disk for use by DPT. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDdev_C::reserveTempSpace() { uLONG spaceReserved = 0; DEBUG_BEGIN(1, dptRAIDdev_C::reserveTempSpace()); uSHORT parentRaidType = (parent.dev_P != NULL) ? parent.dev_P->getRAIDtype() : RAID_NONE; uLONG spaceToReserve = ((parentRaidType == RAID_0) || (parentRaidType == RAID_5) || (parentRaidType == RAID_3)) ? minReservedSpace : RESERVED_SPACE_DISK; // Clear for safety prevMaxLBA = 0; // If an HBA physical DASD device... if ((getObjType()==DPT_SCSI_DASD) && (getLevel()==2) && (getMaxPhyLBA()>=spaceToReserve)) { #ifdef _SINIX_ADDON uLONG used_by_sdi = 0; dptHBA_C *hba_P = myHBA_P(); // Save the last logical block # prevMaxLBA = getLastLBA(); // Determine how much space is currently reserved by SDI int ret = osdGetLBA(hba_P->getDrvrNum(), getChan(), getID(), &used_by_sdi, userBuff, prevMaxLBA); DEBUG(1, PRT_ADDR << "MaxLBA/LBA/SDI= " << getMaxPhyLBA() << " / " << getLastLBA() << " / " << used_by_sdi << " Driver# " << hba_P->getDrvrNum()); if ((parent.dev_P->getRAIDtype() < RAID_HOT_SPARE) && ret && (used_by_sdi <= getMaxPhyLBA())) // Temporarily reserve for Raid 0,1,5 all by SDI not used blocks + 33 blocks. capacity.maxLBA = used_by_sdi - 33; else // For unknown disks or if SDI query failed, reserve only 33 blocks. // For compatibility with old version reserve only 33 blocks for HS & REDIR capacity.maxLBA = getMaxPhyLBA() - 33; DEBUG(1, PRT_ADDR << "RAID-0x" << parent.dev_P->getRAIDtype() << " new spaceReserved=" << \ getMaxPhyLBA() - getLastLBA() << " old=" << getMaxPhyLBA() - prevMaxLBA); #else // Determine how much space is currently reserved spaceReserved = getMaxPhyLBA() - getLastLBA(); // If insufficient blocks have been reserved... if (spaceReserved != spaceToReserve) { // Save the last logical block # prevMaxLBA = getLastLBA(); // Temporarily reserve the desired space capacity.maxLBA = getMaxPhyLBA() - spaceToReserve; } #endif } } //dptRAIDdev_C::reserveTempSpace() - end //Function - dptRAIDdev_C::calcVaryStripe() - start //=========================================================================== // //Description: // // This function attempts to increase the stripe size in even multiples //of the current stripe size. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptRAIDdev_C::calcVaryStripe(raidDef_S *&def_P, raidHeader_S *&header_P ) { uLONG maxCompStripe,idealStripe; if (parent.numStripes!=0) // Compute the ideal stripe size to gain maximum capacity idealStripe = (maxRaidLBA+1) / parent.numStripes; else idealStripe = parent.stripeSize; // Limit the stripe size if (idealStripeminStripe) idealStripe = def_P->minStripe; else if (idealStripe > def_P->maxStripe) idealStripe = def_P->maxStripe; // Get the largest component stripe size; maxCompStripe = getMaxCompStripe(); if (header_P->control & FLG_RCTL_SS_MULTIPLE) // Force the stripe size to be a multiple of the underlying // stripe size idealStripe = (idealStripe/maxCompStripe)*maxCompStripe; else { if (maxCompStripe<8) // Force the stripe size to be a multiple of the underlying // stripe size idealStripe = (idealStripe/maxCompStripe)*maxCompStripe; else // Force the stripe size to be a multiple of 4K idealStripe = (idealStripe/8)*8; } // Set the new stripe size if (idealStripe > 0) parent.stripeSize = idealStripe; return (parent.stripeSize); } //dptRAIDdev_C::calcVaryStripe() - end //Function - dptRAIDdev_C::calcStripeSize() - start //=========================================================================== // //Description: // // This function computes the stripe size for this device if the //current stripe size is zero. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptRAIDdev_C::calcStripeSize(uLONG minStripe,uSHORT method) { // If the stripe size needs to be computed... if (parent.stripeSize==0) { if (method && compList.size()) // SS = underlying stripe size * # data drives parent.stripeSize = getMaxCompStripe() * (compList.size()-redundants); else // Get the largest component stripe size parent.stripeSize = getMaxCompStripe(); // If the minimum stripe size is greater than the underlying... if (minStripe > parent.stripeSize) // Set the stripe size to the minimum parent.stripeSize = minStripe; // Allow no zero size stripe (Safety for bad RAID definition) if (parent.stripeSize==0) parent.stripeSize = 1; } return (parent.stripeSize); } //dptRAIDdev_C::calcStripeSize() - end //Function - dptRAIDdev_C::calcNumStripes() - start //=========================================================================== // //Description: // // This function computes the number of stripes for this device //if current number of stripes is zero. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptRAIDdev_C::calcNumStripes() { // If the # of stripes should be computed... if (parent.numStripes==0) { if (parent.stripeSize!=0) // Compute the # of stripes parent.numStripes = (maxRaidLBA+1 - parent.startLBA) / parent.stripeSize; else parent.numStripes = 1; } return (parent.numStripes); } //dptRAIDdev_C::calcNumStripes() - end //Function - dptRAIDdev_C::getMaxCompStripe() - start //=========================================================================== // //Description: // // This function gets the largest component stripe size. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptRAIDdev_C::getMaxCompStripe() { uLONG maxStripe = 1; dptRAIDdev_C *comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Get the largest component stripe size if (comp_P->parent.stripeSize > maxStripe) maxStripe = comp_P->parent.stripeSize; // Get the next component comp_P = (dptRAIDdev_C *) compList.next(); } return (maxStripe); } //dptRAIDdev_C::getMaxCompStripe() - end //Function - dptRAIDdev_C::getMinCompStripe() - start //=========================================================================== // //Description: // // This function gets the smallest component stripe size. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptRAIDdev_C::getMinCompStripe() { uLONG minStripe = 0xffffffff; dptRAIDdev_C *comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Get the smallest component stripe size if (comp_P->parent.stripeSize < minStripe) minStripe = comp_P->parent.stripeSize; // Get the next component comp_P = (dptRAIDdev_C *) compList.next(); } return (minStripe); } //dptRAIDdev_C::getMinCompStripe() - end //Function - dptRAIDdev_C::getUnderCount() - start //=========================================================================== // //Description: // // This function gets the underlying number of stripes for this device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- /* uLONG dptRAIDdev_C::getUnderCount() { uLONG underCount = 0; dptRAIDdev_C *comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // Get the largest component stripe size if (comp_P->parent.numStripes > underCount) underCount = comp_P->parent.numStripes; // Get the next component comp_P = (dptRAIDdev_C *) compList.next(); } return (underCount); } //dptRAIDdev_C::getUnderCount() - end */ //Function - dptRAIDdev_C::getMasterStripe() - start //=========================================================================== // //Description: // // This function gets the master stripe size for this device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptRAIDdev_C::getMasterStripe() { uLONG masterStripe = 0; dptRAIDdev_C *comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P!=NULL) { // If this is not a redundant drive... if (!(comp_P->parent.flags & FLG_PAR_REDUNDANT)) // Add the stripe size of all component devices masterStripe += comp_P->parent.stripeSize; // Get the next component comp_P = (dptRAIDdev_C *) compList.next(); } return (masterStripe); } //dptRAIDdev_C::getMasterStripe() - end //Function - dptRAIDdev_C::getLastParentLBA() - start //=========================================================================== // //Description: // // This function computes the last LBA used by the parent device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG dptRAIDdev_C::getLastParentLBA() { uLONG lastBlock = 0; if (isComponent()) lastBlock = parent.startLBA + (parent.numStripes * parent.stripeSize - 1); return (lastBlock); } //dptRAIDdev_C::getLastParentLBA() - end //Function - dptRAIDdev_C::setInfo() - start //=========================================================================== // //Description: // // This function sets SCSI device information from the specified //input buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDdev_C::setInfo(dptBuffer_S *toEng_P,uSHORT setAll) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; // Set base class information dptSCSIdev_C::setInfo(toEng_P,setAll); // If loading a configuration... if (setAll>=2) // Set the RAID type toEng_P->extract(raidType); else // Skip the RAID type toEng_P->skip(sizeof(uSHORT)); #if defined (_DPT_STRICT_ALIGN) toEng_P->skip(2); #endif // Skip the rest of the RAID information toEng_P->skip(sizeof(uLONG)); toEng_P->skip(sizeof(uLONG)); toEng_P->skip(sizeof(uLONG)); toEng_P->skip(sizeof(DPT_TAG_T)); toEng_P->skip(sizeof(DPT_TAG_T)); toEng_P->skip(sizeof(uLONG)); toEng_P->skip(sizeof(uLONG)); // Get the supplemental device flags toEng_P->extract(scsiFlags2); // Skip the HBA slot # toEng_P->skip(sizeof(uSHORT)); // Skip the HBA flags toEng_P->skip(sizeof(uSHORT)); #if defined (_DPT_STRICT_ALIGN) toEng_P->skip(2); #endif if (setAll) // Set the RAID magic number toEng_P->extract(magicNum); else toEng_P->skip(sizeof(uLONG)); // Skip the HBA tag toEng_P->skip(sizeof(uLONG)); // Get the flags3 word toEng_P->extract(scsiFlags3); // Get the negotiated bus speed toEng_P->extract(busSpeed); // Get the path2 flags toEng_P->extract(p2Flags); // Skip reserved fields toEng_P->skip(1); toEng_P->skip(4); toEng_P->extract(udmaModeSupported); toEng_P->extract(udmaModeSelected); toEng_P->skip(1); // Get the diagnostic test type toEng_P->extract(scheduledDiag); // Get the device's physical sector size toEng_P->extract(phyBlockSize); // Skip the extra bytes #if defined (_DPT_STRICT_ALIGN) if (toEng_P->skip(10)) #else if (toEng_P->skip(8)) #endif retVal = MSG_RTN_COMPLETED; return (retVal); } //dptRAIDdev_C::setInfo() - end //Function - dptRAIDdev_C::rtnInfo() - start //=========================================================================== // //Description: // // This function returns RAID device information to the specified //output buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDdev_C::rtnInfo(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; dptSCSImgr_C *nextMgr_P; uLONG tempLong = 0; uSHORT tempShort=0; uCHAR tempChar = 0; // Return base class information dptSCSIdev_C::rtnInfo(fromEng_P); // Return the RAID type fromEng_P->insert(raidType); #if defined (_DPT_STRICT_ALIGN) fromEng_P->insert(tempShort); #endif // Return the largest component stripe size fromEng_P->insert(getMaxCompStripe()); // Return the smallest component stripe size fromEng_P->insert(getMinCompStripe()); // Return the master stripe size // Note: This field is only valid for RAID types with no redundancy fromEng_P->insert(getMasterStripe()); // Return the next RAID manager that can use this device as a // RAID component nextMgr_P = nextRAIDmgr(); if (nextMgr_P!=NULL) if (nextMgr_P->myMgr_P()==NULL) fromEng_P->insert((DPT_TAG_T) 0); else fromEng_P->insert(nextMgr_P->tag()); else fromEng_P->insert((DPT_TAG_T) -1); // Return parent device information if (isComponent()) // Return the RAID parent device's tag fromEng_P->insert(parent.dev_P->tag()); else fromEng_P->insert((DPT_TAG_T) -1); // Return the stripe size used by the parent device fromEng_P->insert(parent.stripeSize); // Return the # of stripes used by the parent device fromEng_P->insert(parent.numStripes); // Return the supplemental flags word fromEng_P->insert(scsiFlags2); // Return this device's HBA's slot # tempShort = myHBA_P()->getRAIDid(); fromEng_P->insert(tempShort); // Return this device's HBA's flags tempShort = 0; myHBA_P()->getObjFlags(tempShort); fromEng_P->insert(tempShort); #if defined (_DPT_STRICT_ALIGN) tempShort = 0; fromEng_P->insert(tempShort); #endif // Return this device's RAID magic number fromEng_P->insert(magicNum); // Return the device's HBA tag fromEng_P->insert(myHBA_P()->tag()); // Return SCSI flags fromEng_P->insert(scsiFlags3); // Return the negotiated bus speed fromEng_P->insert(busSpeed); // Return the path2 flags fromEng_P->insert(p2Flags); // Zero the reserved words tempLong = 0; fromEng_P->insert(tempChar); tempLong = (maxRaidLBA) ? maxRaidLBA : capacity.maxLBA; fromEng_P->insert(tempLong); tempLong = 0; fromEng_P->insert(udmaModeSupported); fromEng_P->insert(udmaModeSelected); fromEng_P->insert(tempChar); // Return the diagnostic test type fromEng_P->insert(scheduledDiag); // Return this device's physical sector size fromEng_P->insert(phyBlockSize); // Return extra bytes for future expansion tempShort = 0; #if defined (_DPT_STRICT_ALIGN) fromEng_P->insert(tempShort); fromEng_P->insert(tempShort); fromEng_P->insert(tempShort); fromEng_P->insert(tempShort); #else fromEng_P->insert(tempShort); fromEng_P->insert(tempShort); fromEng_P->insert(tempShort); #endif if (fromEng_P->insert(tempShort)) retVal = MSG_RTN_COMPLETED; return (retVal); } //dptRAIDdev_C::rtnInfo() - end //Function - dptRAIDdev_C::getObjFlags() - start //=========================================================================== // //Description: // // This function sets RAID device flags. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDdev_C::getObjFlags(uSHORT &flg) { // Call base class function dptSCSIdev_C::getObjFlags(flg); // Set the valid RAID info flag flg |= FLG_DEV_RAID_VALID; if (nextRAIDmgr()!=NULL) // Indicate that the next RAID manager field is valid flg |= FLG_DEV_RAID_NEXT_MGR; if (isComponent()) // Indicate that this device is a component of another RAID device flg |= FLG_DEV_RAID_COMPONENT; if (raidFlags & FLG_RDEV_HS_PROTECTED) // Indicate that this device is protected by a Hot Spare flg |= FLG_DEV_HS_PROTECTED; } //dptRAIDdev_C::getObjFlags() - end //Function - dptRAIdev_C::nextRAIDmgr() - start //=========================================================================== // //Description: // // This function returns a pointer to the next manager that can use //this device as a RAID component device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptSCSImgr_C * dptRAIDdev_C::nextRAIDmgr() { dptSCSImgr_C *mgr_P = myMgr_P(); if (isLogical() || (!mgr_P->isRAIDcapable() && !isSuppressed()) ) mgr_P = mgr_P->myMgr_P(); return (mgr_P); } //dptRAIDdev_C::nextRAIDmgr() - end //Function - dptRAIDdev_C::getCompAddr() - start //=========================================================================== // //Description: // // This function uses this devices component addresses to find the //next available address in the specified list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptRAIDdev_C::getCompAddr(dptCoreList_C &list,uSHORT hbaCheck) { uSHORT found = 0; dptRAIDdev_C *comp_P; comp_P = (dptRAIDdev_C *) compList.reset(); while ((comp_P!=NULL) && !found) { // Update the component's HBA # comp_P->updateHBAnum(); addr = comp_P->getAddr(); // If the address is unique && the components HBA is if (isUniqueAddr(list,addr,0xf)) found = 1; // If the components HBA must support RAID... if (hbaCheck) // If this component's HBA can configure RAID devices... if (!comp_P->myHBA_P()->isRAIDready()) found = 0; if (!found) comp_P = (dptRAIDdev_C *) compList.next(); } return (found); } //dptRAIDdev_C::getCompAddr() - end //Function - dptRAIDdev_C::setHScoverage() - start //=========================================================================== // //Description: // // This function sets a flag indicating that this RAID drive is //protected by a Hot Spare drive if no component is larger than the //specified Hot Spare. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDdev_C::setHScoverage(uLONG hsMaxLBA) { if ( (getObjType()==DPT_SCSI_DASD) && (redundants>0) && isLogical() && (getRAIDtype()!=RAID_HOT_SPARE) ) { // Indicate that this device is not protected by a Hot Spare raidFlags &= ~FLG_RDEV_HS_PROTECTED; if (hsMaxLBA>0) { uLONG numDataDrives = compList.getNumObjs() - redundants; uLONG reqMaxLBA = 0xffffffffL; if (numDataDrives) reqMaxLBA = capacity.maxLBA / numDataDrives; if (hsMaxLBA >= reqMaxLBA) raidFlags |= FLG_RDEV_HS_PROTECTED; } } } //dptRAIDdev_C::setHScoverage() - end //Function - dptRAIDdev_C::preDelete() - start //=========================================================================== // //Description: // // This function is called prior to deleting this object from the //engine. // //Parameters: // //Return Value: // // 0 = Take no action // 1 = Remove from engine core and free from memory // 2 = Remove from engine core but do not free from memory // (The object must be maintained at a higher level) // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptRAIDdev_C::preDelete() { uSHORT retVal = 1; if (isComponent()) retVal = 0; return (retVal); } //dptRAIDdev_C::preDelete() - end //Function - dptRAIDdev_C::handleMessage() - start //=========================================================================== // //Description: // // This routine handles DPT events for the dptRAIDdev_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDdev_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Return device IDs from this device's component list case MSG_ID_COMPONENTS: retVal = rtnIDfromList(compList,fromEng_P,toEng_P,0); break; // Return device IDs from this device's component list traversing // each component's component list case MSG_ID_ALL_COMPONENTS: retVal = rtnIDfromList(compList,fromEng_P,toEng_P,OPT_TRAVERSE_COMP); break; // Flag this device as the target device for a RAID-1 rebuild (copy) case MSG_RAID1_SET_TARGET: retVal = handleCopyTarget(); break; case MSG_ASSIGN_NEW_MAGIC_NUM: if (raidType != 0xffff) retVal = remagicNumberArray(); break; default: // Call base class event handler retVal = dptSCSIdev_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return (retVal); } //dptRAIDdev_C::handleMessage() - end //Function - dptRAIDdev_C::handleCopyTarget() - start //=========================================================================== // //Description: // // This function sets this device to be the target of a RAID-1 copy. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDdev_C::handleCopyTarget() { DPT_RTN_T retVal = MSG_RTN_IGNORED; if (parent.dev_P!=NULL) { retVal = parent.dev_P->setCopyTarget(this); } return (retVal); } //dptRAIDdev_C::handleCopyTarget() - end //Function - dptRAIDdev_C::setCopyTarget() - start //=========================================================================== // //Description: // // This function sets the specified device as the target of a RAID-1 //rebuild command and insures that the other component is the source. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDdev_C::setCopyTarget(dptRAIDdev_C *tgt_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; // If this is an HBA level RAID-1 array... if ((getRAIDtype()==1) && (getLevel()==1)) { retVal = MSG_RTN_FAILED | ERR_INVALID_TGT_TAG; dptRAIDdev_C *dev_P = (dptRAIDdev_C *) compList.reset(); while (dev_P!=NULL) { if (dev_P==tgt_P) { dev_P->raidFlags |= FLG_RDEV_RAID1_TARGET; retVal = MSG_RTN_COMPLETED; } else dev_P->raidFlags &= ~FLG_RDEV_RAID1_TARGET; dev_P = (dptRAIDdev_C *) compList.next(); } } return (retVal); } //dptRAIDdev_C::setCopyTarget() - end //Function - dptRAIDdev_C::isValidHotSpare() - start //=========================================================================== // //Description: // // This function determines if this device is a valid Hot-Spare. //A valid Hot-Spare is a Hot-Spare capable of protecting an array. // //--------------------------------------------------------------------------- uSHORT dptRAIDdev_C::isValidHotSpare() { uSHORT retVal = 0; // If an Optimal Hot-Spare... if ((getRAIDtype()==RAID_HOT_SPARE) && (isOptimal() || isAbsent())) { // If the component is not physically missing... dptRAIDdev_C *comp_P = (dptRAIDdev_C *) compList.reset(); if (comp_P != NULL) { if (!comp_P->isMissing()) retVal = 1; } } return (retVal); } //dptRAIDdev_C::isValidHotSpare() - end //Function - dptRAIDdev_C::chkCompDiags() - start //=========================================================================== // //Description: // // This function determines if a firmware based diagnostic is //scheduled on this firmware array or a component of this firmware //array. // //--------------------------------------------------------------------------- uINT dptRAIDdev_C::chkCompDiags() { // If this is a firmware logical device... if (getLevel() != 1) return (0); uINT foundDiag = 1; // If this firmware array doesn't have a diagnostic scheduled... if (!scheduledDiag) { // Check all components for a scheduled diagnostic foundDiag = 0; dptRAIDdev_C *comp_P = (dptRAIDdev_C *) compList.reset(); while (comp_P != NULL) { if (comp_P->getScheduledDiag()) { foundDiag = 1; break; } comp_P = (dptRAIDdev_C *) compList.next(); } } return (foundDiag); } //dptRAIDdev_C::chkCompDiags() - end //Function - dptRAIDdev_C::setNewPhyStatus() - start //=========================================================================== // //Description: // This function sets the proposed status for this physical //device. // //--------------------------------------------------------------------------- void dptRAIDdev_C::setNewPhyStatus(uCHAR inMain,uCHAR inSub) { // If a physical device... if (getLevel() == 2) { // Set the new status newPhyStatus = (inMain & 0x0f) | ((inSub & 0x07) << 4) | 0x80; // Indicate that newPhyStatus is valid raidFlags |= FLG_RDEV_NEWPHYSTATUS; } } //dptRAIDdev_C::setNewPhyStatus() - end //Function - dptRAIDdev_C::~dptRAIDdev_C() - start //=========================================================================== // //Description: // // This function is the destructor for the dptRAIDdev_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptRAIDdev_C::~dptRAIDdev_C() { freeComponents(); if (segment_P != NULL) { delete[] segment_P; segment_P = NULL; } } //dptRAIDdev_C::~dptRAIDdev_C() - end // Function - DPT_RTN_T dptRAIDdev_C::EnableExpandArray() - start //=========================================================================== // //Description: // // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //=========================================================================== DPT_RTN_T dptRAIDdev_C::EnableExpandArray() { DPT_RTN_T rtnVal; rtnVal = MSG_RTN_FAILED | ERR_GET_CCB; // If in wolfpack cluster mode... if (myHBA_P()->isClusterMode()) { // Attempt to reserve this array... if (reserveDevice() != MSG_RTN_COMPLETED) { return ERR_RESERVATION_CONFLICT; } } // Get a CCB engCCB_C *ccb_P = getCCB(); if (ccb_P!=NULL) { // send a synch cache to the array ccb_P->clrData(); ccb_P->eataCP.scsiCDB[0] = 0x35; ccb_P->eataCP.scsiCDB[9] = 0x80; ccb_P->setInterpret(); launchCCB(ccb_P); int numNewComps = 0; rtnVal = MSG_RTN_COMPLETED; // figure out the number if new components there are dptSCSIdev_C *comp_P = (dptSCSIdev_C *) compList.reset(); while(comp_P) { if (comp_P->isNewDeviceToArray()) { numNewComps++; // If in wolfpack cluster mode... if (myHBA_P()->isClusterMode()) { // Attempt to reserve this component... rtnVal = comp_P->reserveDevice(); if (rtnVal != MSG_RTN_COMPLETED) { rtnVal = ERR_RESERVATION_CONFLICT; break; } } } comp_P = (dptSCSIdev_C *) compList.next(); } if (rtnVal == MSG_RTN_COMPLETED) { ccb_P->reInit(); ccb_P->clrData(); // set up the mode page ccb_P->modeSelect(0x39, 2+sizeof(dptExpandArrayPage_S) + (numNewComps * sizeof(dptExpandArrayComp_S)), 0x83); dptExpandArrayPage_S *page_P = (dptExpandArrayPage_S *) ccb_P->modeParam_P->getData(); page_P->setRaidType((uCHAR)raidType); page_P->scsiSwap(); // point to the components section dptExpandArrayComp_S *expComp_P = (dptExpandArrayComp_S *) (((uCHAR *) page_P) + sizeof(dptExpandArrayPage_S)); // add the components to the mode page comp_P = (dptSCSIdev_C *) compList.reset(); for (int x = 0; x < numNewComps;x++) { int found = 0; // find the next new device to the array while(!found) { if (comp_P->isNewDeviceToArray()) found = 1; else comp_P = (dptSCSIdev_C *) compList.next(); } // clear the data //memset(expComp_P, 0, sizeof(dptExpandArrayComp_S)); // fill it in uCHAR chanID = comp_P->addr.chan << 5; chanID |= (comp_P->addr.id & 0x1f); uCHAR extendedId = (comp_P->addr.id > 0x1f) ? comp_P->addr.id : 0; expComp_P->setChanID(chanID); expComp_P->setExtendedId(extendedId); expComp_P->setLUN(comp_P->addr.lun); expComp_P->setMagicNum(comp_P->getMagicNum()); expComp_P->scsiSwap(); // next expComp_P++; // reset the is 'part of expanded array' flags comp_P->clrNewDeviceToArray(); comp_P = (dptSCSIdev_C *) compList.next(); } // clear the expnaded array bit inside here so that // the engine can then do LAP commands clrExpandedArray(); ccb_P->engFlags |= FLG_CCB_ENG_RAID; rtnVal = launchCCB(ccb_P); } // Free the CCB ccb_P->clrInUse(); } // end if (ccb_P!=NULL) return rtnVal; } // end - DPT_RTN_T dptRAIDdev_C::EnableExpandArray() //Function - dptRAIDdev:remagicNumberArray() - start //=========================================================================== // //Description: assigns new magic numbers for the array and its comps // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDdev_C::remagicNumberArray() { DPT_RTN_T rtnVal = MSG_RTN_COMPLETED; // Find all lower level manager's physical objects dptRAIDdev_C *obj_P = (dptRAIDdev_C *) compList.reset(); while (obj_P!=NULL) { if (obj_P->getRAIDtype() != 0xffff) // Find all of the sub-manager's physical objects if ((rtnVal = obj_P->remagicNumberArray())) break; // Get the next object obj_P = (dptRAIDdev_C *) compList.next(); } if (!rtnVal) { // go thru the components and make a new magic number obj_P = (dptRAIDdev_C *) compList.reset(); // go thru all the components and make a new magic number while(obj_P) { obj_P->magicNum = genMagicNum(); compList.exists(obj_P); obj_P = (dptRAIDdev_C *) compList.next(); } // make a new one for me magicNum = genMagicNum(); rtnVal = ((dptDevice_C *) this)->raidLAPcmd(LAP_CMD_ASSIGN_MAGIC); } return rtnVal; } //Function - dptRAIDdev:decCompCount() - start //=========================================================================== //Description: // This function decrements the component count. //--------------------------------------------------------------------------- void dptRAIDdev_C::decCompCount() { if (compCount) --compCount; } //dptRAIDdev_C::decCompCount() - end //Function - dptRAIDdev:updateMaxRaidLBA() - start //=========================================================================== //Description: // This function updates maxRaidLBA from the manager's drive size //table. //--------------------------------------------------------------------------- void dptRAIDdev_C::updateMaxRaidLBA() { // If an HBA physical device if (getLevel() == 2) maxRaidLBA = myMgr_P()->getMaxRaidLBA(capacity.maxLBA); else maxRaidLBA = capacity.maxLBA; } //dptRAIDdev_C::updateMaxRaidLBA() - end raidutils-0.0.6.orig/raideng/raid_fwd.hpp0000664000175000000620000000416110044153310020232 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __RAID_FWD_HPP #define __RAID_FWD_HPP //File - RAID_FWD.HPP //*************************************************************************** // //Description: // // This file contains forward references for the DPT engine RAID //classes. // //Author: Doug Anderson //Date: 3/9/93 // //Editors: // //Remarks: // // //*************************************************************************** //Forward References -------------------------------------------------------- class dptRAIDdev_C; class dptRAIDhba_C; class dptRAIDdrvr_C; class dptRAIDmgr_C; #endif raidutils-0.0.6.orig/raideng/raid_hba.cpp0000664000175000000620000003563110044153310020205 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - RAID_HBA.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptRAIDhba_C //class. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files //Function - dptRAIDhba_C::dptRAIDhba_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptRAIDhba_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptRAIDhba_C::dptRAIDhba_C() { // Default to DPT logical array page #1 (mode page 0x3b) lapPage = LAP_DPT1; privateEngFlags = 0; // Set up the default RAID definitions setDefRAID(); } //dptRAIDhba_C::dptRAIDhba_C() - end //Function - dptRAIDhba_C::postAddLog() - start //=========================================================================== // //Description: // // This function is called after an object has been added to the //logical device list. This function updates the Hot Spare protection //status for all RAID drives attached to this HBA. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDhba_C::postAddLog(dptCoreDev_C *dev_P) { if (dev_P->isMyObject(this) && dev_P->isLogical()) updateHSprotection(); } //dptRAIDhba_C::postAddLog() - end //Function - dptRAIDhba_C::setDefRAID() - start //=========================================================================== // //Description: // // This function sets up default RAID definitions. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDhba_C::setDefRAID() { raidDef_S *def_P; // Define RAID 0 def_P = new raidDef_S; if (def_P!=NULL) { // Initialize the RAID definition data // def_P->refNum = 0; // def_P->type = 0; // def_P->minDrives = 2; def_P->maxDrives = 0xffff; def_P->redundants = 0; // def_P->minStripe = 1; // def_P->maxStripe = 0xffffffffL; // def_P->chanCount = 0xffff; def_P->required |= FLG_REQ_SAME_STRIPE_SZ | FLG_REQ_SAME_NUM_STRIPE | FLG_REQ_UNDER_MULTIPLE; // def_P->devType = DPT_SCSI_DASD; def_P->permit |= FLG_COMP_EMULATED; // Add to the RAID definition list enterRAIDdef(def_P); // Set the RAID support flag raidSupport |= FLG_RAID_0; } // Define RAID 1 def_P = new raidDef_S; if (def_P!=NULL) { // Initialize the RAID definition data def_P->refNum = 1; def_P->type = 1; def_P->minDrives = 2; def_P->maxDrives = 2; def_P->redundants = 0x82; // def_P->minStripe = 1; // def_P->maxStripe = 0xffffffffL; // def_P->chanCount = 0xffff; def_P->required |= FLG_REQ_SAME_STRIPE_SZ | FLG_REQ_SAME_NUM_STRIPE; // def_P->devType = DPT_SCSI_DASD; def_P->permit |= FLG_COMP_EMULATED; // Add to the RAID definition list enterRAIDdef(def_P); // Set the RAID support flag raidSupport |= FLG_RAID_1; } // Define RAID 3 def_P = new raidDef_S; if (def_P!=NULL) { // Initialize the RAID definition data def_P->refNum = 3; def_P->type = 3; def_P->minDrives = 3; def_P->maxDrives = 0xffff; // def_P->redundants = 1; // def_P->minStripe = 1; def_P->maxStripe = 1; // def_P->chanCount = 0xffff; def_P->required |= FLG_REQ_SAME_STRIPE_SZ | FLG_REQ_SAME_NUM_STRIPE | FLG_REQ_UNDER_MULTIPLE | FLG_REQ_POWER_2_PLUS; // def_P->devType = DPT_SCSI_DASD; def_P->permit |= FLG_COMP_EMULATED; // Add to the RAID definition list enterRAIDdef(def_P); // Set the RAID support flag raidSupport |= FLG_RAID_3; } // Define RAID 5 def_P = new raidDef_S; if (def_P!=NULL) { // Initialize the RAID definition data def_P->refNum = 5; def_P->type = 5; def_P->minDrives = 3; def_P->maxDrives = 0xffff; // def_P->redundants = 1; def_P->minStripe = 1; // def_P->maxStripe = 0xffffffffL; // def_P->chanCount = 0xffff; def_P->required |= FLG_REQ_SAME_STRIPE_SZ | FLG_REQ_SAME_NUM_STRIPE | FLG_REQ_UNDER_MULTIPLE; // def_P->devType = DPT_SCSI_DASD; def_P->permit |= FLG_COMP_EMULATED; // Add to the RAID definition list enterRAIDdef(def_P); // Set the RAID support flag raidSupport |= FLG_RAID_5; } // Define an HBA Hot Spare def_P = new raidDef_S; if (def_P!=NULL) { // Initialize the RAID definition data def_P->refNum = RAID_HOT_SPARE; def_P->type = RAID_HOT_SPARE; def_P->minDrives = 1; def_P->maxDrives = 1; def_P->redundants = 0; // def_P->minStripe = 1; // def_P->maxStripe = 0xffffffffL; // def_P->chanCount = 0xffff; def_P->required |= FLG_REQ_SUPPRESS | FLG_REQ_RESTRICT; // def_P->devType = DPT_SCSI_DASD; def_P->permit |= FLG_COMP_EMULATED; // Add to the RAID definition list enterRAIDdef(def_P); // Set the RAID support flag raidSupport |= FLG_RAID_HOT_SPARE; } // Define a re-directed drive def_P = new raidDef_S; if (def_P!=NULL) { // Initialize the RAID definition data def_P->refNum = RAID_REDIRECT; def_P->type = RAID_REDIRECT; def_P->minDrives = 1; def_P->maxDrives = 1; def_P->redundants = 0; // def_P->minStripe = 1; // def_P->maxStripe = 0xffffffffL; // def_P->chanCount = 0xffff; // def_P->required = 0; // def_P->devType = DPT_SCSI_DASD; def_P->permit |= FLG_COMP_EMULATED; // Add to the RAID definition list enterRAIDdef(def_P); // Set the RAID support flag raidSupport |= FLG_RAID_REDIRECT; } } //dptRAIDhba_C::setDefRAID() - end //Function - dptRAIDhba_C::updateHSprotection() - start //=========================================================================== // //Description: // // This function updates the Hot Spare protection status of RAID drives //with at least 1 redundant drive. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDhba_C::updateHSprotection() { uLONG hsMaxLBA = 0; // Find the largest optimal Hot Spare dptRAIDdev_C *dev_P = (dptRAIDdev_C *) logList.reset(); while (dev_P!=NULL) { // If the device is a valid Hot-Spare... if (dev_P->isValidHotSpare()) { // Get the Hot-Spare's physical component dptRAIDdev_C *comp_P = (dptRAIDdev_C *) dev_P->compList.reset(); if (comp_P != NULL) { // If the physical component is ready... // (for IBM drives with a switch to turn off the motor) // (done at Olivetti's request) if (comp_P->isReady()) { // Get the largest optimal Hot Spare if (dev_P->getLastLBA() > hsMaxLBA) hsMaxLBA = dev_P->getLastLBA(); } } } dev_P = (dptRAIDdev_C *) logList.next(); } dev_P = (dptRAIDdev_C *) logList.reset(); while (dev_P!=NULL) { // If the device is attached to this HBA... if (dev_P->isMyObject(this)) // Set the Hot Spare coverage status dev_P->setHScoverage(hsMaxLBA); dev_P = (dptRAIDdev_C *) logList.next(); } /* // clear any old HS protectecion flags dptRAIDdev_C *dev_P = (dptRAIDdev_C *) logList.reset(); while (dev_P!=NULL) { // If the device is attached to this HBA... if (dev_P->isMyObject(this)) // Set the Hot Spare coverage status dev_P->setHScoverage(0); dev_P = (dptRAIDdev_C *) logList.next(); } // look at all the HS's and find arrays it protects dptRAIDdev_C *hs_P = (dptRAIDdev_C *) logList.reset(); while (hs_P!=NULL) { // If the device is a valid Hot-Spare... if (hs_P->isValidHotSpare()) { // Get the Hot-Spare's physical component dptRAIDdev_C *comp_P = (dptRAIDdev_C *) hs_P->compList.reset(); if (comp_P != NULL) { // If the physical component is ready... // (for IBM drives with a switch to turn off the motor) // (done at Olivetti's request) if (comp_P->isReady()) { // get the addr of the HS dptAddr_S hsAddr = hs_P->getAddr(); // now we go thru the list again, finding components that are on the same channel // if they are see if the HS will protect it iff the array is not already protected dptRAIDdev_C *raid_P = (dptRAIDdev_C *) logList.reset(); // look thru all the arrays while(raid_P) { // if the array is attached to this hba and its not already protected if (raid_P->isMyObject(this) && !raid_P->isHSprotected()) { // get the addr of the array dptAddr_S raidAddr = raid_P->getAddr(); // if the channels match, let it determine if it is protected if (hsAddr.chan == raidAddr.chan) raid_P->setHScoverage(hs_P->getLastLBA()); } raid_P = (dptRAIDdev_C *) logList.next(); } // set the logical list back to our hotspare so we can continue the search logList.exists(hs_P); } } } hs_P = (dptRAIDdev_C *) logList.next(); } */ } //dptRAIDhba_C::updateHSprotection() - end //Function - dptRAIDhba_C::postDelete() - start //=========================================================================== // //Description: // // This function is called after an object has been removed from //all core lists and before the object is freed from memory. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDhba_C::postDelete(dptCoreObj_C *obj_P) { if (obj_P->isDevice()) // If the device is a Hot Spare... if (((dptRAIDdev_C *)obj_P)->getRAIDtype()==RAID_HOT_SPARE) // Update the Hot Spare protection status updateHSprotection(); } //dptRAIDhba_C::postDelete() - end //Function - dptRAIDhba_C::isRAIDcapable() - start //=========================================================================== // //Description: // // This function determines if this HBA is capable of configuring //RAID devices. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptRAIDhba_C::isRAIDcapable() { uSHORT capable = 0; // If the device is capable of supportng RAID... if (isI2O()) capable = 1; else if (isRAIDmodule() && is512kCache() && (flags & FLG_HBA_RAID_FW)) capable = 1; return (capable); } //dptRAIDhba_C::isRAIDcapable() - end //Function - dptRAIDhba_C::isRAIDready() - start //=========================================================================== // //Description: // // This function determines if this HBA can configure RAID devices. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptRAIDhba_C::isRAIDready() { uSHORT ready = 0; // If the device is capable of supportng RAID... if (isRAIDcapable()) ready = findDASD(phyList); return (ready); } //dptRAIDhba_C::isRAIDready() - end //Function - dptRAIDhba_C::getObjFlags() - start //=========================================================================== // //Description: // // This function sets RAID HBA flags. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDhba_C::getObjFlags(uSHORT &flg) { // Set base class flags dptSCSIhba_C::getObjFlags(flg); // If this object is capable of supporting RAID... if (isRAIDcapable()) flg |= FLG_HBA_RAID_CAPABLE; // If this object can currently support RAID... if (isRAIDready()) flg |= FLG_HBA_RAID_READY; } //dptRAIDhba_C::getObjFlags() - end //Function - dptRAIDhba_C::handleMessage() - start //=========================================================================== // //Description: // // This routine handles DPT events for the dptRAIDhba_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDhba_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Create a new RAID device case MSG_RAID_NEW: if (isRAIDready()) retVal = newRAID(fromEng_P,toEng_P,0); break; // Create an invalid (ghosted) RAID device case MSG_RAID_GHOST: if (isRAIDready()) retVal = newRAID(fromEng_P,toEng_P,1); break; // Create an invalid (ghosted) RAID device case MSG_GET_MEMBANK_CAPACITIES: retVal = rtnMembankCapacities(fromEng_P); break; default: // Call base class event handler retVal = dptSCSIhba_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return (retVal); } //dptRAIDhba_C::handleMessage() - end raidutils-0.0.6.orig/raideng/raid_mgr.cpp0000664000175000000620000006702510044153310020242 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - RAID_MGR.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptRAIDmgr_C //class. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" //Function - dptRAIDmgr_C::dptRAIDmgr_C() - start //=========================================================================== //Description: // This function is the constructor for the dptRAIDmgr_C class. //--------------------------------------------------------------------------- dptRAIDmgr_C::dptRAIDmgr_C() : maxArrays(0xffff), driveSizeTable_P(NULL) { } //dptRAIDmgr_C::dptRAIDmgr_C() - end //Function - dptRAIDmgr_C::newRAID() - start //=========================================================================== // //Description: // // This function attempts to create a new RAID device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDmgr_C::newRAID(dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P, uSHORT ghost ) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; raidDef_S *def_P; raidHeader_S *header_P; dptRAIDdev_C *raid_P; DEBUG_BEGIN(7, dptRAIDmgr_C::newRAID()); // Get a pointer to the new RAID header data header_P = (raidHeader_S *) toEng_P->data; // Skip over the header (use a pointer to access it) if (toEng_P->skip(sizeof(raidHeader_S))) { // Get the specified RAID definition def_P = getRAIDrdef(header_P->refNum); if (def_P==NULL) // Invalid RAID reference # retVal = MSG_RTN_FAILED | ERR_RAID_REFNUM; else if (getNumArrays() > maxArrays) // Too many arrays on this manager retVal = MSG_RTN_FAILED | ERR_RAID_MAX_ARRAYS; else { // Create a new device raid_P = (dptRAIDdev_C *) newObject(DPT_SCSI_DASD); if (raid_P==NULL) retVal = MSG_RTN_FAILED | ERR_MEM_ALLOC; else { // Set the device's connection pointer so it can report errors raid_P->conn_P = myConn_P(); // Set the device's manager so it can access phyRange... raid_P->attachedTo_P = this; // Set the new device's RAID type raid_P->raidType = def_P->type & 0xff; if (raid_P->raidType == RAID_1) { if (header_P->stripeSize == 0) { header_P->stripeSize = 128; } } if (ghost) // Set the device's status to ghost raid_P->status.display = DSPLY_STAT_GHOST; else // Set the device's status to absent raid_P->status.display = DSPLY_STAT_ABSENT; // Perform a component sanity check retVal = sanityCheck(raid_P,toEng_P,def_P); if ((retVal==MSG_RTN_COMPLETED) && !ghost) // Validate the RAID device retVal = raid_P->okRAIDdevice(header_P,def_P); if (retVal!=MSG_RTN_COMPLETED) // Free the newly created device delete (raid_P); else { if (header_P->control & FLG_RCTL_ADDR) { // Use the specified SCSI address raid_P->addr.hba = header_P->addr.hba; raid_P->addr.chan = header_P->addr.chan; raid_P->addr.id = header_P->addr.id; raid_P->addr.lun = header_P->addr.lun; } else // Compute the new SCSI address getRAIDaddr(raid_P); DEBUG(7, PRT_DADDR(raid_P) << "RAID " << (int) raid_P->raidType << \ (header_P->control & FLG_RCTL_ADDR ? " old" : " new") << \ (ghost?" ghost":" absent") << \ (def_P->required & FLG_REQ_SUPPRESS ? " suppr" : "") << \ (def_P->required & FLG_REQ_RESTRICT ? " restr" : "") << \ " parent " << PRT_SADDR(this)); DEBUG2(9, def_P->minDrives, def_P->maxDrives); DEBUG2(9, def_P->minStripe, def_P->maxStripe); DEBUG3(9, hex, def_P->required, def_P->chanCount); // If the device was successfully entered in the engine... if ((retVal = enterLog(raid_P))==MSG_RTN_COMPLETED) { // If this RAID definition suppresses... if (def_P->required & FLG_REQ_SUPPRESS) { myConn_P()->suppress(raid_P); } // If this RAID definition restricts further RAID... if (def_P->required & FLG_REQ_RESTRICT) { raid_P->raidFlags |= FLG_RDEV_ENG_RESTRICT; } // Return the new object's ID retVal = raid_P->returnID(fromEng_P); } // If a redirected drive and manual JBOD is active... if ((raid_P->raidType == RAID_REDIRECT) && (raid_P->hba_P->isManualJBODactive())) { dptRAIDdev_C *comp_P = (dptRAIDdev_C *) raid_P->compList.reset(); if (comp_P != NULL) { // If the component ID matches the if (raid_P->getID() == comp_P->getID()) { raid_P->scsiFlags2 |= FLG_DEV_MANUAL_JBOD_CONFIGURED; comp_P->scsiFlags2 |= FLG_DEV_MANUAL_JBOD_CONFIGURED; } } } } } // end if (raid_P!=NULL) } } // Attempt to unsuppress all un-intentionally suppressed devices myConn_P()->unSuppress(); return (retVal); } //dptRAIDmgr_C::newRAID() - end //Function - dptRAIDmgr_C::sanityCheck() - start //=========================================================================== // //Description: // // This function performs a preliminary sanity check on the RAID //component devices to insure they are viable component devices. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDmgr_C::sanityCheck(dptRAIDdev_C *&raid_P, dptBuffer_S *&toEng_P, raidDef_S *&def_P, uCHAR offset ) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; uSHORT numComponents = 0; dptRAIDdev_C *comp_P; raidCompList_S *list_P; uSHORT added; // Determine how many components were specified while (toEng_P->skip(sizeof(raidCompList_S))) numComponents++; // Set the number of redundant devices if (def_P->redundants>0x80) raid_P->redundants = numComponents / (def_P->redundants - 0x80); else raid_P->redundants = def_P->redundants; // Get a pointer to the component list list_P = (raidCompList_S *) (toEng_P->data+sizeof(raidHeader_S)+offset); // Perform a sanity check on the component list while ((numComponents>0) && (retVal==MSG_RTN_COMPLETED) && list_P) { comp_P = getVisible(list_P->tag); if (comp_P==NULL) retVal = MSG_RTN_FAILED | ERR_RAID_COMP_TAG; else if (raid_P->compList.exists(comp_P)) // One of the components was specified twice retVal = MSG_RTN_FAILED | ERR_RAID_COMP_DUPLICATE; else if (comp_P->isRestricted()) // One of the components is RAID restricted retVal = MSG_RTN_FAILED | ERR_RAID_COMP_RESTRICT; else if (comp_P->isComponent()) // One of the components is already used as a component retVal = MSG_RTN_FAILED | ERR_RAID_COMP_USED; else if (comp_P->isGhost() && !raid_P->isGhost()) // One of the components is a ghosted drive retVal = MSG_RTN_FAILED | ERR_RAID_COMP_GHOST; else { // Update the HBA # comp_P->updateHBAnum(); // If the components are to be ordered by SCSI address... if (!(((raidHeader_S *)&toEng_P->data[offset])->control & FLG_RCTL_ORDER)) { // Position the device by SCSI address positionSCSI(raid_P->compList,comp_P->getAddr()); // if this is an expanded array then set this comp as a new device if (raid_P->isExpandedArray()) comp_P->setNewDeviceToArray(); // Add the device to the component list added = raid_P->compList.add(comp_P); } else // Add the component in list order added = raid_P->compList.addEnd(comp_P); if (!added) retVal = MSG_RTN_FAILED | ERR_MEM_ALLOC; else { // Set the RAID device type raid_P->engType = comp_P->getObjType(); if (numComponents<=raid_P->redundants) // Add a RAID parent map entry to the component device // -Indicate redundant component comp_P->enterParent(raid_P,list_P,FLG_PAR_REDUNDANT); else // Add a RAID parent map entry to the component device comp_P->enterParent(raid_P,list_P); // if a physical device... if (comp_P->isPhysical()) { // Indicate that a hardware comp_P->setHWmismatch2(); // Set the device status to indicate that it is part of // an unconfigured array comp_P->status.display = DSPLY_STAT_OPTIMAL; comp_P->status.main = PAPM_UNCONFIGURED; comp_P->status.sub = PAPS_NOT_BUILT; } numComponents--; list_P++; } // end if (added) } } // end while (numComponents>0) return (retVal); } //dptRAIDmgr_C::sanityCheck() - end //Function - dptRAIDmgr_C::getRAIDrdef() - start //=========================================================================== // //Description: // // This function returns a pointer to the RAID definition with the //specified reference #. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- raidDef_S * dptRAIDmgr_C::getRAIDrdef(uSHORT refNum) { uSHORT done = 0; raidDef_S *def_P = (raidDef_S *) raidDefList.reset(); while ((def_P!=NULL) && !done) { if (def_P->refNum==refNum) done = 1; else def_P = (raidDef_S *) raidDefList.next(); } return (def_P); } //dptRAIDmgr_C::getRAIDrdef() - end //Function - dptRAIDmgr_C::getRAIDtdef() - start //=========================================================================== // //Description: // // This function returns a pointer to the RAID definition with the //specified RAID type. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- raidDef_S * dptRAIDmgr_C::getRAIDtdef(uSHORT raidType) { uSHORT done = 0; raidDef_S *def_P = (raidDef_S *) raidDefList.reset(); while ((def_P!=NULL) && !done) { if (def_P->type==raidType) done = 1; else def_P = (raidDef_S *) raidDefList.next(); } return (def_P); } //dptRAIDmgr_C::getRAIDtdef() - end //Function - getRedundants() - start //=========================================================================== // //Description: // // This function returns the number of redundant devices associted //with the specified RAID type. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptRAIDmgr_C::getRedundants(uSHORT raidType,uSHORT numComps) { uSHORT redundants = 0; // Get a pointer to the RAID definition raidDef_S *def_P = getRAIDtdef(raidType); if (def_P!=NULL) redundants = def_P->redundants; else { switch (raidType) { case 1: redundants = 0x82; break; case 3: redundants = 1; break; case 5: redundants = 1; break; default: redundants = 0; break; } } // If the # of redundants is a function of the # of components... if (redundants>0x80) redundants = numComps / (redundants - 0x80); return (redundants); } //dptRAIDmgr_C::getRedundants() - end //Function - dptRAIDmgr_C::getVisible() - start //=========================================================================== // //Description: // // This function returns a pointer to the device with the specified //tag. This manager's physical device list and any sub-manager's //logical device lists are searched for a device with the specified tag. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptRAIDdev_C * dptRAIDmgr_C::getVisible(DPT_TAG_T &inTag) { dptSCSImgr_C *mgr_P; dptSCSIobj_C *obj_P; dptRAIDdev_C *raid_P = NULL; uSHORT found = 0; // Check this manager's physical object list obj_P = (dptSCSIobj_C *) phyList.getObject(inTag); if (obj_P==NULL) { // Check all sub-manager's logical device lists obj_P = (dptSCSIobj_C *) phyList.reset(); while ((obj_P!=NULL) && !found) { if (obj_P->isManager()) { // Cast the object as a SCSI manager mgr_P = (dptSCSImgr_C *) obj_P; obj_P = (dptSCSIobj_C *) mgr_P->logList.getObject(inTag); if (obj_P!=NULL) found = 1; } if (!found) obj_P = (dptSCSIobj_C *) phyList.next(); } } if (obj_P != NULL) { if (obj_P->isDevice()) // Cast the object as a RAID device raid_P = (dptRAIDdev_C *) obj_P; } return (raid_P); } //dptRAIDmgr_C::getVisible() - end //Function - dptRAIDmgr_C::getRAIDaddr() - start //=========================================================================== // //Description: // // This function gets the next available SCSI address for the //specified RAID device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDmgr_C::getRAIDaddr(dptRAIDdev_C *dev_P) { // Attempt to use one of the component's SCSI address if (!dev_P->getCompAddr(logList)) // Get the next available SCSI address getNextAddr(logList,dev_P->addr,0xf); } //dptRAIDmgr_C::getRAIDaddr() - end //Function - dptRAIDmgr_C::enterRAIDdef() - start //=========================================================================== // //Description: // // This function adds a RAID definition to the RAID definition list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptRAIDmgr_C::enterRAIDdef(raidDef_S *&inDef_P) { uSHORT retVal = 0; uSHORT duplicate = 0; raidDef_S *def_P = (raidDef_S *) raidDefList.reset(); // Check for a duplicate reference number while (def_P!=NULL) { if (def_P->refNum==inDef_P->refNum) duplicate = 1; // Get the next RAID definition def_P = (raidDef_S *) raidDefList.next(); } if (!duplicate) { // Add the new RAID definition to the list if (raidDefList.addEnd(inDef_P)) retVal = 1; } return (retVal); } //dptRAIDmgr_C::enterRAIDdef() - end //Function - dptRAIDmgr_C::preDelete() - start //=========================================================================== // //Description: // // This function is called prior to deleting this object from the //engine. // //Parameters: // //Return Value: // // 0 = Take no action // 1 = Remove from engine core and free from memory // 2 = Remove from engine core but do not free from memory // (The object must be maintained at a higher level) // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptRAIDmgr_C::preDelete() { uSHORT retVal = 1; dptRAIDdev_C *dev_P = (dptRAIDdev_C *) logList.reset(); while (dev_P!=NULL) { //If the device is a component of a higher level manager... if (dev_P->isComponent()) retVal = 0; dev_P = (dptRAIDdev_C *) logList.next(); } return (retVal); } //dptRAIDmgr_C::preDelete() - end //Function - dptRAIDmgr_C::getNumArrays() - start //=========================================================================== // //Description: // // This function determines the number of arrays (including //Hot-Spares) owned by this manager. // //--------------------------------------------------------------------------- uSHORT dptRAIDmgr_C::getNumArrays() { uSHORT numArrays = 0; dptRAIDdev_C *dev_P = (dptRAIDdev_C *) logList.reset(); while (dev_P != NULL) { if (dev_P->isMyObject(this) && dev_P->isLogical()) numArrays++; dev_P = (dptRAIDdev_C *) logList.next(); } return (numArrays); } //dptRAIDmgr_C::getNumArrays() - end //Function - dptRAIDmgr_C::handleMessage() - start //=========================================================================== // //Description: // // This routine handles DPT events for the dptRAIDmgr_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDmgr_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Return device IDs from this manager's logical device list. // Traverse the component list of each device found. case MSG_ID_ALL_LOGICALS: retVal = rtnIDfromList(logList,fromEng_P,toEng_P,OPT_TRAVERSE_COMP); break; // expand the array, change its raid type, change the stripe size case MSG_RAID_CHANGE: retVal = changeRAID(toEng_P); break; default: // Call base class event handler retVal = dptSCSImgr_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return (retVal); } //dptRAIDmgr_C::handleMessage() - end //Function - - start //=========================================================================== // //Description: // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDmgr_C::changeRAID(dptBuffer_S *toEng_P) { DPT_RTN_T rtnVal = MSG_RTN_COMPLETED; uSHORT oldRAIDType= 0; DPT_TAG_T raidTag; uCHAR numCompsInList = 0; uCHAR optionFlags; uSHORT expandedArray = 0; uLONG oldStripeSize = 0; // get the array tag toEng_P->extract(raidTag); // get the option flags toEng_P->extract(optionFlags); // point to the raid header raidHeader_S *header_P = (raidHeader_S *) &toEng_P->data[toEng_P->readIndex]; // skip to the component list toEng_P->skip(sizeof(raidHeader_S)); // start the comp list list where it needs to be raidCompList_S *list_P = (raidCompList_S *) &toEng_P->data[toEng_P->readIndex]; // get a pointer to the array dptRAIDdev_C *array_P = (dptRAIDdev_C *) logList.getObject(raidTag); if (array_P) { // must be a FW level array if (getLevel() != 1) rtnVal = ERR_RAID_FW_LEVEL; } else rtnVal = ERR_INVALID_TGT_TAG; // we have the array if (rtnVal == MSG_RTN_COMPLETED) { // get the stripe size from this device oldStripeSize = ((dptRAIDdev_C *) array_P->compList.reset())->parent.stripeSize; // if no new stripe size was given, grab it from the array if (!header_P->stripeSize) header_P->stripeSize = oldStripeSize; // save off the raid type and set the new one oldRAIDType = array_P->raidType; array_P->raidType = header_P->refNum; // is this an expanded array already? expandedArray = array_P->isExpandedArray(); array_P->setExpandedArray(); // check the devices that are in the add list (if any) to make sure they // are at least the same size while(toEng_P->skip(sizeof(raidCompList_S))) numCompsInList++; } // add or remove the specified devices if (rtnVal == MSG_RTN_COMPLETED) { if (optionFlags & FLG_EXPAND_ARRAY_REMOVE) { rtnVal = ExpandArrayRemoveDevices(array_P, list_P, numCompsInList); toEng_P->writeIndex -= numCompsInList * sizeof(raidCompList_S); } else rtnVal = ExpandArrayAddDevices(array_P, list_P, numCompsInList); } // perform the sanity checks if (rtnVal == MSG_RTN_COMPLETED) { toEng_P->replay(); toEng_P->skip(sizeof(DPT_TAG_T) + sizeof(raidHeader_S) + sizeof(uCHAR)); // Get the specified RAID definition raidDef_S *def_P = getRAIDrdef(header_P->refNum); // final checks if ((rtnVal = sanityCheck(array_P, toEng_P, def_P, sizeof(DPT_TAG_T) + sizeof(uCHAR))) == MSG_RTN_COMPLETED) { if ((rtnVal = array_P->okRAIDdevice(header_P,def_P)) == MSG_RTN_COMPLETED) { array_P->status.display=DSPLY_STAT_OPTIMAL; // If any component is new flag the array as absent... dptRAIDdev_C *comp_P = (dptRAIDdev_C *) array_P->compList.reset(); while(comp_P) { // If the component is new to the array... if (comp_P->isNewDeviceToArray()) { array_P->status.display = DSPLY_STAT_ABSENT; } comp_P = (dptRAIDdev_C *) array_P->compList.next(); } } } } // copy the raid type BACK to the original if needbe if (rtnVal != MSG_RTN_COMPLETED && array_P) { header_P->refNum = array_P->raidType = oldRAIDType; header_P->stripeSize = oldStripeSize; // remove the devices that we added if (!(optionFlags & FLG_EXPAND_ARRAY_REMOVE)) { ExpandArrayRemoveDevices(array_P, list_P, numCompsInList); toEng_P->writeIndex -= numCompsInList * sizeof(raidCompList_S); } else { ExpandArrayAddDevices(array_P, list_P, numCompsInList); toEng_P->writeIndex += numCompsInList * sizeof(raidCompList_S); } toEng_P->replay(); toEng_P->skip(sizeof(DPT_TAG_T) + sizeof(raidHeader_S) + sizeof(uCHAR)); // Get the specified RAID definition raidDef_S *def_P = getRAIDrdef(header_P->refNum); // reset the array back its original state if (sanityCheck(array_P, toEng_P, def_P, sizeof(DPT_TAG_T) + sizeof(uCHAR)) == MSG_RTN_COMPLETED) array_P->okRAIDdevice(header_P,def_P); if (!expandedArray) array_P->clrExpandedArray(); } return rtnVal; } // - end //Function - - start //=========================================================================== // //Description: // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDmgr_C::ExpandArrayAddDevices(dptRAIDdev_C *array_P, raidCompList_S *list_P, uCHAR numCompsInList) { DPT_RTN_T rtnVal = MSG_RTN_COMPLETED; uLONG minLBAneeded = 0xffffffff; uLONG reservedBlocks = 0; uLONG maxReservedBlocks = 0; // find the smallest drive that is currently in the array dptRAIDdev_C *comp_P = (dptRAIDdev_C *) array_P->compList.reset(); while(comp_P) { // TODO: new stripe size on drive, we have to save off the old ones // first. comp_P->updateMaxRaidLBA(); // find the smallest drive we have if (comp_P->getMaxRaidLBA() < minLBAneeded) { minLBAneeded = comp_P->getMaxRaidLBA(); } reservedBlocks = comp_P->getMaxPhyLBA() - comp_P->getLastLBA(); if (reservedBlocks > maxReservedBlocks) { maxReservedBlocks = reservedBlocks; } comp_P = (dptRAIDdev_C *) array_P->compList.next(); } if (maxReservedBlocks < array_P->minReservedSpace) { array_P->minReservedSpace = (maxReservedBlocks > RESERVED_SPACE_DISK) ? maxReservedBlocks : RESERVED_SPACE_DISK; } // see if all the comps in the list are at least this big for (int x = 0; x < numCompsInList; x++) { // check to see if the device exists on the hba dptRAIDdev_C *dev_P = findDeviceFromTag(phyList, list_P->tag); // make sure the device is large enough if (dev_P) { dev_P->updateMaxRaidLBA(); if (dev_P->getMaxRaidLBA() < minLBAneeded) rtnVal = ERR_RAID_COMP_SIZE; } else rtnVal = ERR_RAID_COMP_TAG; list_P++; } return rtnVal; } //Function - - start //=========================================================================== // //Description: // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDmgr_C::ExpandArrayRemoveDevices(dptRAIDdev_C *array_P, raidCompList_S *list_P, uCHAR numInComponents) { DPT_RTN_T rtnVal = MSG_RTN_COMPLETED; // we can only remove drives if they have been added if (array_P->isExpandedArray()) { // for all the components for (int x = 0; x < numInComponents;x++) { // reset the component list dptRAIDdev_C *comp_P = (dptRAIDdev_C *) array_P->compList.reset(); int found = 0; // look at them all while(comp_P && !found) { // if this is a new device AND if (comp_P->isNewDeviceToArray() && (comp_P->tag() == list_P->tag)) { // remove it from the component list array_P->compList.remove(comp_P); //phyList.addEnd(comp_P); logList.addEnd(comp_P); // reset the raid info on this guy comp_P->parent.reset(); // FREE! comp_P->supNotDesired(); // place it back into the lists myConn_P()->unSuppress(); // clear this stuff comp_P->clrNewDeviceToArray(); // clear the in array bits comp_P->clrHWmismatch(); //logList.addEnd(comp_P); found = 1; } else comp_P = (dptRAIDdev_C *) array_P->compList.next(); } // if we found nothing if (!found) rtnVal = ERR_RAID_COMP_TAG; // next item in the list list_P++; } } else rtnVal = ERR_INVALID_TGT_TAG; return rtnVal; } //Function - dptRAIDmgr_C::getMaxRaidLBA() - start //=========================================================================== //Description: // This function returns the maximum RAID LBA given the specified //LBA. If this manager has a valid drive size range table this //function returns the lower limit of the range in which the specified //capacity falls. //--------------------------------------------------------------------------- uLONG dptRAIDmgr_C::getMaxRaidLBA(uLONG inLBA) { uLONG raidLimit = inLBA; if (driveSizeTable_P != NULL) { uLONG i; uLONG numEntries = driveSizeTable_P->getNumEntries(); for (i = 0; i < numEntries; i++) { if (inLBA < driveSizeTable_P->getEntry(i)) { if (i != 0) { raidLimit = driveSizeTable_P->getEntry(i-1); } break; } else if ((i+1) == numEntries) raidLimit = driveSizeTable_P->getEntry(i); } } return raidLimit; } //dptRAIDmgr_C::getMaxRaidLBA() - end //Function - dptRAIDmgr_C::~dptRAIDmgr_C() - start //=========================================================================== // //Description: // // This function is the destructor for the dptRAIDmgr_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptRAIDmgr_C::~dptRAIDmgr_C() { // Delete the RAID definitions raidDefList.kill(); if (driveSizeTable_P != NULL) { delete[] ((uCHAR *) driveSizeTable_P); } } //dptRAIDmgr_C::~dptRAIDmgr_C() - end raidutils-0.0.6.orig/raideng/raiddrvr.cpp0000664000175000000620000001735510044153311020275 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - RAIDDRVR.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptRAIDdrvr_C //class. // //Author: Doug Anderson //Date: 3/25/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" //Function - dptRAIDdrvr_C::dptRAIDdrvr_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptRAIDdrvr_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptRAIDdrvr_C::dptRAIDdrvr_C() { // Indicate that no HBA RAID IDs are used usedRAIDids = 0; // Create the default RAID definitions setDefRAID(); } //dptRAIDdrvr_C::dptRAIDdrvr_C() - end //Function - dptRAIDdrvr_C::preEnterLog() - start //=========================================================================== // //Description: // // This function is called prior to entering a device in this manager's //logical device list. This function should be used to set any ownership //flags... // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDdrvr_C::preEnterLog(dptCoreDev_C *dev_P) { DPT_RTN_T retVal = MSG_RTN_FAILED | ERR_RAID_INVALID_HBA; uSHORT found = 0; // Find the device's HBA dptRAIDhba_C *hbaIt_P = (dptRAIDhba_C *) phyList.reset(); while ((hbaIt_P!=NULL) && !found) { // If the device's HBA # matches this HBA... if (hbaIt_P->getHBA()==dev_P->getHBA()) found = 1; else hbaIt_P = (dptRAIDhba_C *) phyList.next(); } // If an HBA was found... if (found) { // Set the device's HBA to this manager's HBA dev_P->hba_P = hbaIt_P; retVal = MSG_RTN_COMPLETED; /* old way retVal = MSG_RTN_FAILED | ERR_RAID_NOT_SUPPORTED; // Set the device's HBA to this manager's HBA dev_P->hba_P = hbaIt_P; if (dev_P->isReal()) retVal = MSG_RTN_COMPLETED; // Insure the HBA can configure RAID devices else if (hbaIt_P->isRAIDready()) { dptAddr_S tempAddr = dev_P->getAddr(); // If the address is within the HBA boundaries... if (!hbaIt_P->phyRange.inBounds(tempAddr)) retVal = MSG_RTN_FAILED | ERR_SCSI_ADDR_BOUNDS; else retVal = MSG_RTN_COMPLETED; } */ } return (retVal); } //dptRAIDdrvr_C::preEnterLog() - end //Function - dptRAIDdrvr_C::getRAIDaddr() - start //=========================================================================== // //Description: // // This function gets the next available SCSI address for the //specified RAID device. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDdrvr_C::getRAIDaddr(dptRAIDdev_C *dev_P) { dptRAIDhba_C *hbaIt_P; uSHORT found = 0; // Attempt to use one of the component's SCSI address // (1=Force component HBA to be RAIDable HBA as well) if (!dev_P->getCompAddr(logList,1)) { // Find the next available SCSI address hbaIt_P = (dptRAIDhba_C *) phyList.reset(); while ((hbaIt_P!=NULL) && !found) { // If the HBA can configure RAID devices... if (hbaIt_P->isRAIDready()) // Get the next available SCSI address if (hbaIt_P->getNextAddr(logList,dev_P->addr,0xf)) found = 1; // Get the next HBA hbaIt_P = (dptRAIDhba_C *) phyList.next(); } } } //dptRAIDdrvr_C::getRAIDaddr() - end //Function - dptRAIDdrvr_C::handleMessage() - start //=========================================================================== // //Description: // // This function processes messages for a RAID driver. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptRAIDdrvr_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Return the IDs of all suppressed devices with no RAID parent. case MSG_ID_HIDDEN_DEVICES: retVal = myConn_P()->rtnHidden(fromEng_P); break; // Return the IDs of all suppressed devices with no RAID parent // and all suppressed device components case MSG_ID_ALL_HIDDEN: retVal = myConn_P()->rtnHidden(fromEng_P,1); break; // Create a new RAID device case MSG_RAID_NEW: retVal = newRAID(fromEng_P,toEng_P,0); break; // Create an invalid (ghosted) RAID device case MSG_RAID_GHOST: retVal = newRAID(fromEng_P,toEng_P,1); break; // Call base class message handler default: retVal = dptSCSIdrvr_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return(retVal); } //dptRAIDdrvr_C::handleMessage() - end //Function - dptRAIDdrvr_C::setDefRAID() - start //=========================================================================== // //Description: // // This function sets up default RAID definitions. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptRAIDdrvr_C::setDefRAID() { raidDef_S *def_P; // Define RAID 0 def_P = new raidDef_S; if (def_P!=NULL) { // Initialize the RAID definition data // def_P->refNum = 0; // def_P->type = 0; // def_P->minDrives = 2; def_P->maxDrives = 0xffff; def_P->redundants = 0; // def_P->minStripe = 1; // def_P->maxStripe = 0xffffffffL; // def_P->chanCount = 0xffff; def_P->required |= FLG_REQ_SAME_NUM_STRIPE; // def_P->devType = DPT_SCSI_DASD; def_P->permit |= FLG_COMP_EMULATED; // Add to the RAID definition list enterRAIDdef(def_P); // Set the RAID support flag raidSupport |= FLG_RAID_0; } } //dptRAIDdrvr_C::setDefRAID() - end raidutils-0.0.6.orig/raideng/scsi_bcd.cpp0000664000175000000620000001163210044153332020224 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - SCSI_BCD.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptSCSIbcd_C //class. // //Author: Doug Anderson //Date: 3/9/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" //Function - dptSCSIbcd_C::dptSCSIbcd_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptSCSIbcd_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptSCSIbcd_C::dptSCSIbcd_C() { // Set the engine object type engType = DPT_SCSI_BCD; } //dptSCSIbcd_C::dptSCSIbcd_C() - end //Function - dptSCSIbcd_C::preEnterLog() - start //=========================================================================== // //Description: // // This function is called prior to entering a device in this manager's //logical device list. This function should be used to set any ownership //flags... // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIbcd_C::preEnterLog(dptCoreDev_C *dev_P) { // Force the device's SCSI channel & ID to this BCD's channel & ID dev_P->addr.chan = getChan(); dev_P->addr.id = getID(); // Call base class preEnterLog() DPT_RTN_T retVal = dptSCSImgr_C::preEnterLog(dev_P); if (retVal==MSG_RTN_COMPLETED) { // Insure the LUN falls within the limits if ((dev_P->getLUN() < myMgr_P()->getMinAddr().lun) || (dev_P->getLUN() > myMgr_P()->getMaxAddr().lun) ) retVal = MSG_RTN_FAILED | ERR_SCSI_ADDR_BOUNDS; // Insure the ID & channel match this manager's ID & channel else if ( (dev_P->getID() != getID()) || (dev_P->getChan()!=getChan()) ) retVal = MSG_RTN_FAILED | ERR_SCSI_ADDR_BOUNDS; } return (retVal); } //dptSCSIbcd_C::preEnterLog() - end //Function - dptSCSIbcd_C::getLogAddr() - start //=========================================================================== // //Description: // // This function gets the next available BCD logical device address. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSIbcd_C::getLogAddr(dptAddr_S &inAddr) { uCHAR minLUN; uCHAR maxLUN; uSHORT found = 0; // Set the HBA to this BCD's HBA inAddr.hba = myHBA_P()->getHBA(); // Set the SCSI channel to this BCD's channel inAddr.chan = getChan(); // Set the SCSI ID to this BCD's ID inAddr.id = getID(); // Get the LUN limits maxLUN = myMgr_P()->getMaxAddr().lun; minLUN = myMgr_P()->getMinAddr().lun; for (inAddr.lun=minLUN;((inAddr.lun<=maxLUN) && !found);inAddr.lun++) { // If the LUN is not used by another object... if (isUniqueLog(inAddr,0x7)) found = 1; } inAddr.lun--; if (!found) inAddr.lun = minLUN; return (found); } //dptSCSIbcd_C::getLogAddr() - end raidutils-0.0.6.orig/raideng/scsi_ccb.cpp0000664000175000000620000006777110044153311020237 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - SCSI_CCB.CPP //*************************************************************************** // //Description: // // This file contains function definitions for the scsiCCB_C class. // //Author: Doug Anderson //Date: 4/8/93 // //Editors: // //Remarks: // // //*************************************************************************** #include "allfiles.hpp" //Function - scsiCCB_C::scsiCCB_C() - start //=========================================================================== //Description: // This function is the constructor for the scsiCCB_C class. //--------------------------------------------------------------------------- scsiCCB_C::scsiCCB_C() : modeHeader_P(NULL), modeHeader6_P(NULL), modeParam_P(NULL), log() { } //scsiCCB_C::scsiCCB_C() - end //Function - scsiCCB_C::ok() - start //=========================================================================== // //Description: // // This function determines if the controller & SCSI status bytes are //valid. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT scsiCCB_C::ok() { uSHORT retVal = 0; if (ctlrStatus==0) if ( (scsiStatus==0x00) || (scsiStatus==0x04) || (scsiStatus==0x10) || (scsiStatus==0x14) ) retVal = 1; #ifdef RTN_STATUS_FROM_FW else { FILE *out = fopen("engine.err", "a+"); fprintf(out, "scsi: %x ctlr: %x\n", scsiStatus, ctlrStatus); for (int x = 0; x < DEFAULT_REQ_SENSE_SIZE; ) { for (int y = 0; y < 16; y++) fprintf(out, "%2x ", defReqSense[x*16+y]); fprintf(out, "\n"); x+= 16; } fclose(out); } #endif return (retVal); } //scsiCCB_C::ok() - end //Function - scsiCCB_C::testUnitReady() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI Test Unit Ready command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void scsiCCB_C::testUnitReady() { // Set the SCSI opcode scsiCDB_P[0] = 0x00; } //scsiCCB_C::testUnitReady() - end //Function - scsiCCB_C::allowMediaRemoval() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI Test Unit Ready command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void scsiCCB_C::allowMediaRemoval() { // Set the SCSI opcode scsiCDB_P[0] = 0x1e; } //scsiCCB_C::allowMediaRemoval() - end //Function - scsiCCB_C::readCapacity() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a Read Capacity command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void scsiCCB_C::readCapacity() { // Set the SCSI opcode scsiCDB_P[0] = 0x25; // The transfer involves data input input(); } //scsiCCB_C::readCapacity() - end //Function - scsiCCB_C::inquiry() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI Inquiry command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void scsiCCB_C::inquiry(uCHAR vpdPage) { // Set the SCSI opcode scsiCDB_P[0] = 0x12; // The transfer involves data input input(); if (vpdPage) { // Enable vital product data page scsiCDB_P[1] |= 0x01; // Set the vital product data page scsiCDB_P[2] = vpdPage; } // Set the allocation length scsiCDB_P[4] = (uCHAR) sdInquiry_S::size(); // Set the transfer length in the EATA CP //eataCP.dataLength = sdInquiry_S::size(); eataCP.dataLength = 0x200; // If everything else is already reversed... if (isReversed()) reverseBytes(eataCP.dataLength); } //scsiCCB_C::inquiry() - end //Function - scsiCCB_C::write() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI write command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function assumes no block descriptors. // //--------------------------------------------------------------------------- void scsiCCB_C::write(uLONG startLBA,uSHORT numBlocks, uSHORT blockSize,uLONG dataAddr ) { // The transfer involves data input output(); // Set the SCSI opcode scsiCDB_P[0] = 0x2A; // Set the transfer paramters readWrite(startLBA,numBlocks); // Set the data address setDataBuff(dataAddr,numBlocks*blockSize); } //scsiCCB_C::write() - end //Function - scsiCCB_C::read() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI read command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function assumes no block descriptors. // //--------------------------------------------------------------------------- void scsiCCB_C::read(uLONG startLBA,uSHORT numBlocks, uSHORT blockSize,uLONG dataAddr ) { // The transfer involves data input input(); // Set the SCSI opcode scsiCDB_P[0] = 0x28; // Set the transfer paramters readWrite(startLBA,numBlocks); // Set the data address setDataBuff(dataAddr,numBlocks*blockSize); } //scsiCCB_C::read() - end //Function - scsiCCB_C::readWrite() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI read or write command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function assumes no block descriptors. // //--------------------------------------------------------------------------- void scsiCCB_C::readWrite(uLONG startLBA,uSHORT numBlocks) { scReadWrite_S *scsiRW_P; // Cast the CDB as a SCSI write command scsiRW_P = (scReadWrite_S *) scsiCDB_P; // Set the start LBA scsiRW_P->setLba(startLBA); // Set the write data length (# blocks to xfr) scsiRW_P->setLength(numBlocks); // Put into big endian format scsiRW_P->scsiSwap(); } //scsiCCB_C::readWrite() - end //Function - scsiCCB_C::flashCmd() - start //=========================================================================== // //Description: // // This function initializes a CCB to execute a DPT flash command. // //--------------------------------------------------------------------------- void scsiCCB_C::flashCmd(uCHAR inAction, uLONG inFlashAddr, uLONG inLength, uLONG inDataAddr ) { scFlash_S *flashCmd_P = (scFlash_S *) scsiCDB_P; // If a flash read or write command... if ((inAction == FLASH_CMD_READ) || (inAction == FLASH_CMD_WRITE)) { // Set the flash address to read or write flashCmd_P->setAddress(inFlashAddr); if (inLength==0) inLength = 512; // Set the length in the CDB flashCmd_P->setLength(inLength); } else { // Ignore the flash address and length fields flashCmd_P->setAddress(0L); flashCmd_P->setLength(0L); } // If a read or a status command... if ((inAction==FLASH_CMD_READ) || (inAction==FLASH_CMD_STATUS)) input(); else if (inAction==FLASH_CMD_WRITE) output(); else noData(); flashCmd_P->setOpCode(0xc1); flashCmd_P->setAction(inAction); flashCmd_P->scsiSwap(); // If there is data transfer... if (eataCP.flags & (CP_DATA_IN | CP_DATA_OUT)) { // If no length was specified... if (inLength == 0) inLength = 512; // If no data buffer address was specified... if (inDataAddr == 0) inDataAddr = ptrToLong(defData); // Set the I/O buffer address and size setDataBuff(inDataAddr,inLength); } } //scsiCCB_C::read() - end //Function - scsiCCB_C::format() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI low level format //command. // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function assumes no block descriptors. // //--------------------------------------------------------------------------- void scsiCCB_C::format(uSHORT fmtFlags,uSHORT initPattern,uSHORT interleave) { scFormat_S *format_P; // Cast the CDB as a SCSI write command format_P = (scFormat_S *) scsiCDB_P; // Set the format command SCSI opcode format_P->setOpCode(0x04); // Set the interleave format_P->setInterleave(interleave); // Put into big endian format format_P->scsiSwap(); // If a format flag has been specified... if (fmtFlags) { // Indicate that this command involves data output output(); // Set the transfer length in the EATA CP eataCP.dataLength = 4; // Clear the default data buffer clrData(); // Indicate that there will be a data out phase format_P->orLun(0x10); // Clear the flags defData[1] = 0; // If a disable certify is desired... if (fmtFlags & 0x01) // Set the disable certification bit defData[1] |= 0x20; // If a terminate immediate is desired... if (fmtFlags & 0x02) // Set the terminate immediate bit defData[1] |= 0x02; // If an initialization pattern has been specified if (fmtFlags & 0x04) { // Set the transfer length in the EATA CP eataCP.dataLength = 10; // Indicate that there is an initialization pattern defData[1] |= 0x08; // Repeat the init. pattern to fill the logical block defData[5] = 0x01; // Indicate that a two byte init. pattern was specified defData[7] = 0x02; // Set the initialization pattern setU2(defData,8,initPattern); } // If any of the format option valid bits are set... if (defData[1] & 0x78) // Indicate that the format options are valid defData[1] |= 0x80; // If everything else is already reversed... if (isReversed()) reverseBytes(eataCP.dataLength); } } //scsiCCB_C::format() - end //Function - scsiCCB_C::ncrPassThru() - start //=========================================================================== // //Description: // // This function initializes a CCB to do an NCR type pass thru //command to access physical devices attached to a bridge controller. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void scsiCCB_C::ncrPassThru(scsiCCB_C *inCCB_P) { // Get the data transfer length uLONG dataLen = eataCP.dataLength; // If the length is already reversed... if (isReversed()) // Un-reverse the data length reverseBytes(dataLen); // Set the pass thru opcode scsiCDB_P[0] = 0x14; // Set the destination channel & id scsiCDB_P[2] = inCCB_P->eataCP.devAddr; // Set the MSB of the data length scsiCDB_P[3] = (uCHAR) (dataLen>>8) & 0xff; // Set the MSB of the data length scsiCDB_P[4] = (uCHAR) dataLen & 0xff; // Set the transfer direction if (inCCB_P->eataCP.flags & CP_DATA_OUT) // Data output to the device scsiCDB_P[1] |= 0x2; else if (inCCB_P->eataCP.flags & CP_DATA_IN) // Data input from the device scsiCDB_P[1] |= 0x3; else // No data transfer scsiCDB_P[1] |= 0x1; } //scsiCCB_C::ncrPassThru() - end //Function - scsiCCB_C::mfCmd() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a DPT multi-function command. // //--------------------------------------------------------------------------- void scsiCCB_C::mfCmd(uCHAR inCmd,uCHAR inModifier,uCHAR inParam) { // Set the SCSI opcode scsiCDB_P[0] = 0x0e; // Set the multi-function command scsiCDB_P[2] = inCmd; // Set the multi-function command modifier scsiCDB_P[3] = inModifier; // Set the multi-function command parameter #1 scsiCDB_P[4] = inParam; } //scsiCCB_C::mfCmd() - end //Function - scsiCCB_C::extMfCmd() - start //=========================================================================== // //Description: // // This function initializes a CCB to do an extended DPT multi-function //command. // //--------------------------------------------------------------------------- void scsiCCB_C::extMfCmd(uCHAR inCmd, uCHAR inModifier, uLONG param1, uSHORT param2, uCHAR param3 ) { // Set the SCSI opcode scsiCDB_P[0] = 0xc0; // Set the multi-function command scsiCDB_P[2] = inCmd; // Set the multi-function command modifier scsiCDB_P[3] = inModifier; // Set parameter #1 uLONG *l_P = (uLONG *) scsiCDB_P+4; *l_P = param1; osdSwap4(l_P); // Set parameter #2 uSHORT *s_P = (uSHORT *) scsiCDB_P+8; *s_P = param2; osdSwap2(s_P); // Set parameter #3 scsiCDB_P[10] = param3; } //scsiCCB_C::extMfCmd() - end //Function - scsiCCB_C::reqSense() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a request sense. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void scsiCCB_C::reqSense(uCHAR dataLen) { // The transfer involves data input input(); // Set the SCSI opcode scsiCDB_P[0] = 0x03; // Set the data length scsiCDB_P[4] = dataLen; // Set the transfer length in the EATA CP eataCP.dataLength = dataLen; // If everything else is already reversed... if (isReversed()) reverseBytes(eataCP.dataLength); } //scsiCCB_C::reqSense() - end //Function - scsiCCB_C::modeSense() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI Mode Sense command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void scsiCCB_C::modeSense(uCHAR inPage,uCHAR inPC,uSHORT inBD,uSHORT inLen) { // Set the SCSI opcode scsiCDB_P[0] = 0x5a; // The transfer involves data input input(); // Reset the page code byte scsiCDB_P[2] = inPage & 0x3f; // Set the page control bits scsiCDB_P[2] |= inPC << 6; // Set the allocation length - 512 bytes scsiCDB_P[7] = (uCHAR) (inLen >> 8); scsiCDB_P[8] = (uCHAR) inLen; // Initialize the mode header pointer modeHeader_P = (modeHeader_S *) dataBuff_P; // Initialize the mode header pointer modeHeader6_P = (modeHeader6_S *) dataBuff_P; // Initialize the mode parameter pointer modeParam_P = (modeParam_S *) (dataBuff_P + modeHeader_S::size() + inBD); if (!inBD) // Disable block descriptors scsiCDB_P[1] |= 0x08; else // Set the block descriptor length modeHeader_P->setDescrLength(reverseBytes(inBD)); } //scsiCCB_C::modeSense() - end //Function - scsiCCB_C::modeSense6() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI Mode Sense command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void scsiCCB_C::modeSense6(uCHAR inPage,uCHAR inPC,uCHAR inBD,uSHORT inLen) { // Set the SCSI opcode scsiCDB_P[0] = 0x1a; // The transfer involves data input input(); // Reset the page code byte scsiCDB_P[2] = inPage & 0x3f;; // Set the page control bits scsiCDB_P[2] |= inPC << 6; // Set the allocation length scsiCDB_P[4] = (uCHAR) inLen; // Initialize the mode header pointer modeHeader_P = (modeHeader_S *) dataBuff_P; // Initialize the mode header pointer modeHeader6_P = (modeHeader6_S *) dataBuff_P; // Initialize the mode parameter pointer modeParam_P = (modeParam_S *) (dataBuff_P + modeHeader6_S::size() + inBD); if (!inBD) // Disable block descriptors scsiCDB_P[1] |= 0x08; else // Set the block descriptor length modeHeader6_P->setDescrLength(inBD); } //scsiCCB_C::modeSense6() - end //Function - scsiCCB_C::modeSelect() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI Mode Select command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function assumes no block descriptors. // //--------------------------------------------------------------------------- void scsiCCB_C::modeSelect(uCHAR inPage,uSHORT dataLength,uCHAR inFlags) { uSHORT xfrLength; // Total # bytes to be transfered uSHORT blkDescrLength; // Block descriptor length // Set the SCSI opcode scsiCDB_P[0] = 0x55; // The transfer involves data input output(); if (inFlags & 0x02) // Set the page format (PF) bit to indicate SCSI-2 scsiCDB_P[1] |= 0x10; if (inFlags & 0x01) // Set the save page bit scsiCDB_P[1] |= 0x01; // Initialize the mode header pointer modeHeader_P = (modeHeader_S *) dataBuff_P; // Initialize the mode header pointer modeHeader6_P = (modeHeader6_S *) dataBuff_P; blkDescrLength = modeHeader_P->getDescrLength(); reverseBytes(blkDescrLength); // Add the mode page header & parameter header size to the data length // to get the total transfer size xfrLength = (uSHORT) (dataLength + modeHeader_S::size() + blkDescrLength); // Set the transfer data length scsiCDB_P[7] = (uCHAR) (xfrLength >> 8); // MSB scsiCDB_P[8] = (uCHAR) (xfrLength & 0xff); // LSB // Set the transfer length in the EATA CP eataCP.dataLength = xfrLength; // If everything else is already reversed... if (isReversed()) reverseBytes(eataCP.dataLength); // set the xfer length in the mode header and swap it modeHeader_P->setDataLength(dataLength); modeHeader_P->scsiSwap(); // Initialize the mode parameter pointer modeParam_P = (modeParam_S *) (dataBuff_P + modeHeader_S::size() + blkDescrLength); if (inFlags & 0x80) { // Set the mode page code modeParam_P->setPageCode(inPage); // Set the page data length modeParam_P->setLength(dataLength - 2); } } //scsiCCB_C::modeSelect() - end //Function - scsiCCB_C::modeSelect6() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI Mode Select command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // 1. This function assumes no block descriptors. // //--------------------------------------------------------------------------- void scsiCCB_C::modeSelect6(uCHAR inPage,uSHORT dataLength,uCHAR inFlags) { uCHAR xfrLength; // Total # bytes to be transfered // Set the SCSI opcode scsiCDB_P[0] = 0x15; // The transfer involves data input output(); if (inFlags & 0x02) // Set the page format (PF) bit to indicate SCSI-2 scsiCDB_P[1] |= 0x10; if (inFlags & 0x01) // Set the save page bit scsiCDB_P[1] |= 0x01; // Initialize the mode header pointer modeHeader_P = (modeHeader_S *) dataBuff_P; // Initialize the mode header pointer modeHeader6_P = (modeHeader6_S *) dataBuff_P; // Add the mode page header & parameter header size to the data length // to get the total transfer size xfrLength = (uCHAR) (dataLength + modeHeader6_S::size() + modeHeader6_P->getDescrLength()); // Set the transfer data length scsiCDB_P[4] = xfrLength; // Set the transfer length in the EATA CP eataCP.dataLength = xfrLength; // If everything else is already reversed... if (isReversed()) reverseBytes(eataCP.dataLength); // Initialize the mode parameter pointer modeParam_P = (modeParam_S *) (dataBuff_P + modeHeader6_S::size() + modeHeader6_P->getDescrLength()); if (inFlags & 0x80) { // Set the mode page code modeParam_P->setPageCode(inPage); // Set the page data length modeParam_P->setLength(dataLength - 2); } } //scsiCCB_C::modeSelect6() - end //Function - scsiCCB_C::logSense() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI Log Sense command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void scsiCCB_C::logSense(uCHAR inPage, uCHAR inFlags, uSHORT dataLen, uSHORT ppOffset, uCHAR controlByte ) { // Set the SCSI opcode scsiCDB_P[0] = 0x4d; // The transfer involves data input input(); // Set the save parameters && parameter pointer control bits // 1=Return parameter code values that have changed // 0=Return parameters in ascending order starting with the // parameter specified in the parameter pointer field (bytes 5,6) scsiCDB_P[1] |= inFlags & 0x03; // Set the page scsiCDB_P[2] = inPage & 0x3f; // Set the page control bits scsiCDB_P[2] |= inFlags & 0xc0; // PC if (dataLen!=0) { scsiCDB_P[7] = dataLen >> 8; scsiCDB_P[8] = dataLen & 0xff; eataCP.dataLength = dataLen; // If everything else is already reversed... if (isReversed()) reverseBytes(eataCP.dataLength); } else { // Set the allocation length - 512 bytes scsiCDB_P[7] = DEFAULT_DATA_SIZE >> 8; scsiCDB_P[8] = DEFAULT_DATA_SIZE & 0xff; } if (ppOffset!=0) { // Set the parameter pointer (Index for HBA logging) scsiCDB_P[5] = ppOffset>>8; scsiCDB_P[6] = ppOffset & 0xff; } // Set the SCSI control byte scsiCDB_P[9] = controlByte; } //scsiCCB_C::logSense() - end /* //Function - scsiCCB_C::logSelect() - start //=========================================================================== // //Description: // // This function initializes a CCB to do a SCSI Log Select command. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void scsiCCB_C::logSelect(uSHORT dataLen,uCHAR inFlags) { // Set the SCSI opcode scsiCDB_P[0] = 0x4c; // The transfer involves data output output(); // Set the save parameters && parameter code reset bits scsiCDB_P[1] |= inFlags & 0x03; // Set the page control bits scsiCDB_P[2] |= inFlags & 0xc0; // PC if (dataLen!=0) { scsiCDB_P[7] = dataLen >> 8; scsiCDB_P[8] = dataLen & 0xff; eataCP.dataLength = dataLen; // If everything else is already reversed... if (isReversed()) reverseBytes(eataCP.dataLength); } } //scsiCCB_C::logSelect() - end */ //Function - scsiCCB_C::reserve() - start //=========================================================================== //Description: // This function initializes a CCB to perform a SCSI reserve command. //--------------------------------------------------------------------------- void scsiCCB_C::reserve() { // Set the SCSI opcode scsiCDB_P[0] = 0x16; } //scsiCCB_C::reserve() - end //Function - scsiCCB_C::release() - start //=========================================================================== //Description: // This function initializes a CCB to perform a SCSI release command. //--------------------------------------------------------------------------- void scsiCCB_C::release() { // Set the SCSI opcode scsiCDB_P[0] = 0x17; } //scsiCCB_C::release() - end //Function - scsiCCB_C::readDriveSizeTable() - start //=========================================================================== //Description: // This function gets the drive size table from firmware. //--------------------------------------------------------------------------- void scsiCCB_C::readDriveSizeTable() { // The transfer involves data input input(); // DPT multi-function command scsiCDB_P[0] = 0x0e; // Get drive size table command scsiCDB_P[2] = 0x23; } //scsiCCB_C::readDriveSizeTable() - end //Function - scsiCCB_C::writeDriveSizeTable() - start //=========================================================================== //Description: // This function saves the drive size table to the controller's NVRAM. //--------------------------------------------------------------------------- void scsiCCB_C::writeDriveSizeTable(uLONG dataLen) { // The transfer involves data input output(); // DPT multi-function command scsiCDB_P[0] = 0x0e; // Get drive size table command scsiCDB_P[2] = 0x24; setDataBuff((uLONG)defData, dataLen); } //scsiCCB_C::writeDriveSizeTable() - end //************************************************************************** //Function - driveSizeTable_S::swapToBigEndian() - start //=========================================================================== //Description: // This function swaps the drive size table structure to big endian //byte ordering. //--------------------------------------------------------------------------- void driveSizeTable_S::swapToBigEndian() { #ifndef _DPT_BIG_ENDIAN uLONG i; for (i=0; i MAX_DRIVE_SIZE_ENTRIES) setMaxEntries(MAX_DRIVE_SIZE_ENTRIES); // Limit the current number of entries to the table's limit if (getNumEntries() > getMaxEntries()) setNumEntries(getMaxEntries()); for (i=0; igetAddr()); } //dptSCSIcon_C::preAddSuppress() - end //Function - dptSCSIcon_C::isDupName() - start //=========================================================================== // //Description: // // This function checks for a duplicate DPT name. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSIcon_C::isDupName(uCHAR *inStr_P,uSHORT inLimit) { uSHORT duplicate = 0; dptDevice_C *dev_P; dptObject_C *obj_P = (dptObject_C *) objectList.reset(); while ((obj_P!=NULL) && !duplicate) { if (obj_P->isDevice()) { // Cast the object as a device dev_P = (dptDevice_C *) obj_P; // If the DPT name exists... if (findSubString(inStr_P,dev_P->dptName,inLimit,DPT_NAME_SIZE,0)) duplicate = 1; } obj_P = (dptObject_C *) objectList.next(); } return (duplicate); } //dptSCSIcon_C::isDupName() - end //Function - dptSCSIcon_C::rtnIDfromData() - start //=========================================================================== // //Description: // // This function traverses the master object list returning the IDs //of the objects with data that matches the specified input data. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIcon_C::rtnIDfromData(dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P, uSHORT action ) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; uCHAR mask = 0; uCHAR rtnFlags = 0; uCHAR level = 0xff; uCHAR dataMatch; access_U inData; access_U objData; inData.u32 = 0; // If no data was specified... if (!toEng_P->extract(inData.u8,4)) inData.u32 = 0; if (toEng_P->extract(mask)) { rtnFlags = (mask & 0xc0); mask = (~mask) & 0xf; } if (action!=1) toEng_P->extract(level); dptSCSIobj_C *obj_P = (dptSCSIobj_C *) objectList.reset(); while (obj_P!=NULL) { if (action==1) // Get the object's status objData.u32 = obj_P->status.getLong(); else { // Update the object's HBA # obj_P->updateHBAnum(); // Get the object's SCSI address objData.u32 = obj_P->getAddrL(); #ifdef _DPT_BIG_ENDIAN trueSwap4(&objData.u32); #endif } dataMatch = 0; if (objData.u8[3]==inData.u8[0]) dataMatch |= 0x8; if (objData.u8[2]==inData.u8[1]) dataMatch |= 0x4; if (objData.u8[1]==inData.u8[2]) dataMatch |= 0x2; if (objData.u8[0]==inData.u8[3]) dataMatch |= 0x1; // If a data match was found... if ((dataMatch&mask)==mask) { dataMatch = 0; if (rtnFlags & 0x80) { if (obj_P->isDevice()) { if (rtnFlags==0x80) dataMatch = 1; } else if (rtnFlags==0xc0) dataMatch = 1; } else dataMatch = 1; } else dataMatch = 0; if (dataMatch) { // If all levels are to be returned... if (level==0xff) // Return the object's ID structure retVal = obj_P->returnID(fromEng_P); // If a specific level is to be returned... else if (obj_P->getLevel()==level) // Return the object's ID structure retVal = obj_P->returnID(fromEng_P); } // Get the next object in the list obj_P = (dptSCSIobj_C *) objectList.next(); } return (retVal); } //dptSCSIcon_C::rtnIDfromData() - end //Function - dptSCSIcon_C::rtnIDfromASCII() - start //=========================================================================== // //Description: // // This function traverses the master object list returning the IDs //of the objects with matching ASCII data. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIcon_C::rtnIDfromASCII(dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P, uSHORT action ) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; uSHORT inLimit = 0; uSHORT searchLimit = 0; uCHAR *in_P; uCHAR *search_P; uCHAR searchType = 0; // Determine the # of data bytes input while (toEng_P->extract(searchType)) inLimit++; if (searchType>2) searchType = 0; if (inLimit>0) in_P = (uCHAR *) toEng_P->data; dptSCSIobj_C *obj_P = (dptSCSIobj_C *) objectList.reset(); while (obj_P!=NULL) { search_P = NULL; // Get a pointer to the ASCII field to search switch (action) { case 0: search_P = (uCHAR *) obj_P->descr.vendorID; searchLimit = 8; break; case 1: search_P = (uCHAR *) obj_P->descr.productID; searchLimit = 16; break; case 2: search_P = (uCHAR *) obj_P->descr.revision; searchLimit = 4; break; case 3: search_P = (uCHAR *) obj_P->descr.vendorExtra; searchLimit = 20; break; case 4: if (obj_P->isDevice()) search_P = ((dptSCSIdev_C *)obj_P)->dptName; searchLimit = 16; break; } if (search_P!=NULL) { if (findSubString(in_P,search_P,inLimit,searchLimit,searchType)) retVal = obj_P->returnID(fromEng_P); } // Get the next object in the list obj_P = (dptSCSIobj_C *) objectList.next(); } return (retVal); } //dptSCSIcon_C::rtnIDfromASCII() - end //Function - dptSCSIcon_C::rtnHidden() - start //=========================================================================== // //Description: // // This function returns the IDs of all suppressed devices with no //RAID parent. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIcon_C::rtnHidden(dptBuffer_S *fromEng_P,uSHORT rtnAll) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; dptRAIDdev_C *raid_P; raid_P = (dptRAIDdev_C *) suppressList.reset(); while (raid_P!=NULL) { // If the suppressed device has no RAID parent... if (!raid_P->isComponent()) { retVal = raid_P->returnID(fromEng_P); if (rtnAll) retVal = rtnFromList(raid_P->compList,fromEng_P,DPT_ANY_OBJECT,OPT_TRAVERSE_COMP,0,0xffff); } // Get the next suppressed device raid_P = (dptRAIDdev_C *) suppressList.next(); } return (retVal); } //dptSCSIcon_C::rtnHidden() - end //Function - dptSCSIcon_C::rtnSysConfig() - start //=========================================================================== // //Description: // // This function returns the system configuration to the specified //output buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIcon_C::rtnSysConfig(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal; // Return the information structure for all level 1 managers (HBAs) rtnConfigLevel(DPT_ANY_MANAGER,1,fromEng_P); // Return the information structure for all level 2 managers (BCDs) rtnConfigLevel(DPT_ANY_MANAGER,2,fromEng_P); // Return the information structure for all level 3 devices rtnConfigLevel(DPT_ANY_DEVICE,3,fromEng_P); // Return the information structure for all level 2 devices rtnConfigLevel(DPT_ANY_DEVICE,2,fromEng_P); // Return the information structure for all level 1 devices rtnConfigLevel(DPT_ANY_DEVICE,1,fromEng_P); // Return the information structure for all level 0 devices retVal = rtnConfigLevel(DPT_ANY_DEVICE,0,fromEng_P); return (retVal); } //dptSCSIcon_C::rtnSysConfig() - end //Function - dptSCSIcon_C::rtnConfigLevel() - start //=========================================================================== // //Description: // // This function returns objects of the specified level to the //specified output buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIcon_C::rtnConfigLevel(uSHORT inType, uSHORT inLevel, dptBuffer_S *fromEng_P ) { DEBUG_BEGIN(6, dptSCSIcon_C::rtnConfigLevel()); DPT_RTN_T retVal = MSG_RTN_COMPLETED; dptObject_C *obj_P = (dptObject_C *) objectList.reset(); while (obj_P!=NULL) { if (obj_P->getLevel()==inLevel) { if (obj_P->isManager() && (inType==DPT_ANY_MANAGER)) // Return the manager info retVal = obj_P->rtnConfigInfo(fromEng_P); else if ( obj_P->isDevice() && (inType==DPT_ANY_DEVICE)) // Return the device info retVal = obj_P->rtnConfigInfo(fromEng_P); DEBUG(5, PRT_DADDR(obj_P) << "Returning Level " << (int)inLevel << " Info successful"); } obj_P = (dptObject_C *) objectList.next(); } return (retVal); } //dptSCSIcon_C::rtnConfigLevel() - end //Function - dptSCSIcon_C::findConfigMgr() - start //=========================================================================== // //Description: // // This function attempts to find the specified manager when loading //a configuration file. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptManager_C * dptSCSIcon_C::findConfigMgr(uSHORT inLevel, dptAddr_S inAddr ) { uSHORT done = 0; dptManager_C *mgr_P = (dptManager_C *) objectList.reset(); while ((mgr_P!=NULL) && !done) { if (mgr_P->isManager()) { if (inLevel==1) { if (inAddr.hba==mgr_P->getHBA()) done = 1; } else if (inAddr==mgr_P->getAddr()) done = 1; } if (!done) mgr_P = (dptManager_C *) objectList.next(); } return (mgr_P); } //dptSCSIcon_C::findConfigMgr() - end raidutils-0.0.6.orig/raideng/scsi_dev.cpp0000664000175000000620000002512110044153312020246 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - SCSI_DEV.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptSCSIdev_C //class. // //Author: Doug Anderson //Date: 3/9/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" //Function - dptSCSIdev_C::dptSCSIdev_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptSCSIdev_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptSCSIdev_C::dptSCSIdev_C() { // Clear all flags scsiFlags = 0; scsiFlags2 = 0; scsiFlags3 = 0; p2Flags = 0; // SCSI offset scsiOffset = 0; // Clear the transfer speed xfrSpeed = 0; // Clear the negotiated bus speed busSpeed = 0; // Default = no name dptName[0] = 0; // Default = No partition table lastPartitionBlk = 0; // Default = no previous max logical block prevMaxLBA = 0; phyBlockSize = 0; } //dptSCSIdev_C::dptSCSIdev_C() - end //Function - dptSCSIdev_C::setObjFlags() - start //=========================================================================== // //Description: // // This function sets SCSI object flags. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIdev_C::setObjFlags(uSHORT flg,uSHORT) { scsiFlags = 0; // If emulated... if (flg & FLG_DEV_EMULATED) scsiFlags |= FLG_ENG_EMULATED; // If emulated drive 1 (D:)... if (flg & FLG_DEV_EMU_01) scsiFlags |= FLG_ENG_EMU_01; // If removeable... if (flg & FLG_DEV_REMOVEABLE) scsiFlags |= FLG_ENG_REMOVEABLE; // If a valid partition table exists... if (flg & FLG_DEV_PTABLE) scsiFlags |= FLG_ENG_PTABLE; // If a valid DPT reserve block exists... if (flg & FLG_DEV_RESERVE_BLOCK) scsiFlags |= FLG_ENG_RESERVE_BLOCK; // If downloaded FW exists on this drive... if (flg & FLG_DEV_DFW) scsiFlags |= FLG_ENG_DFW; // If a valid previous SCSI address... if (flg & FLG_DEV_PADDR_VALID) scsiFlags |= FLG_ENG_VALID_PADDR; // If ECC protected... if (flg & FLG_DEV_ECC_PROTECTED) setECCprotected(); } //dptSCSIdev_C::setObjFlags() - end //Function - dptSCSIdev_C::setInfo() - start //=========================================================================== // //Description: // // This function sets SCSI device information from the specified //input buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIdev_C::setInfo(dptBuffer_S *toEng_P,uSHORT setAll) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; // Set base class information dptSCSIobj_C::setInfo(toEng_P,setAll); // Set the device's SCSI offset toEng_P->extract(scsiOffset); // Set the device's transfer speed toEng_P->extract(xfrSpeed); // Set the device's capacity information toEng_P->extract(&capacity,sizeof(dptCapacity_S)); // Set the device's emulation parameters toEng_P->extract(&emulation,dptEmuParam_size); // If loading a configuration... if (setAll>=2) // Set the DPT name toEng_P->extract(dptName,DPT_NAME_SIZE+2); // Skip the DPT name field else toEng_P->skip(DPT_NAME_SIZE+2); // Set the last partition block used if (toEng_P->extract(lastPartitionBlk)) retVal = MSG_RTN_COMPLETED; return (retVal); } //dptSCSIdev_C::setInfo() - end //Function - dptSCSIdev_C::rtnInfo() - start //=========================================================================== // //Description: // // This function returns SCSI device information to the specified //output buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIdev_C::rtnInfo(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; // Return base class information dptSCSIobj_C::rtnInfo(fromEng_P); // Return the device's SCSI offset fromEng_P->insert(scsiOffset); // Return the device's transfer speed fromEng_P->insert(xfrSpeed); // Return the device's capacity information fromEng_P->insert(&capacity,sizeof(dptCapacity_S)); // Return the device's emulation paramters fromEng_P->insert(&emulation,dptEmuParam_size); // Return the device's DPT specific name fromEng_P->insert(dptName,DPT_NAME_SIZE+2); // Return the last block used by a partition if (fromEng_P->insert(lastPartitionBlk)) retVal = MSG_RTN_COMPLETED; return (retVal); } //dptSCSIdev_C::rtnInfo() - end //Function - dptSCSIdev_C::getObjFlags() - start //=========================================================================== // //Description: // // This function sets SCSI device flags. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIdev_C::getObjFlags(uSHORT &flg) { // Set the appropriate flags if (isSuppressed()) flg |= FLG_DEV_SUPPRESSED; if (isSupDesired()) flg |= FLG_DEV_SUP_DESIRED; if (isEmulated()) flg |= FLG_DEV_EMULATED; if (scsiFlags & FLG_ENG_EMU_01) flg |= FLG_DEV_EMU_01; if (isRemoveable()) flg |= FLG_DEV_REMOVEABLE; if (isLogical()) flg |= FLG_DEV_LOGICAL; if (scsiFlags & FLG_ENG_PTABLE) flg |= FLG_DEV_PTABLE; if (scsiFlags & FLG_ENG_RESERVE_BLOCK) flg |= FLG_DEV_RESERVE_BLOCK; if (myHBA_P()->is512kCache()) flg |= FLG_DEV_HBA_CACHE; if (scsiFlags & FLG_ENG_DFW) flg |= FLG_DEV_DFW; if (scsiFlags & FLG_ENG_VALID_PADDR) flg |= FLG_DEV_PADDR_VALID; if (isECCprotected()) flg |= FLG_DEV_ECC_PROTECTED; } //dptSCSIdev_C::getObjFlags() - end //Function - dptSCSIdev_C::handleMessage() - start //=========================================================================== // //Description: // // This routine handles DPT events for the dptRAIDdev_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIdev_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Attempt to set the device's DPT name case MSG_SET_DPT_NAME: retVal = setDPTname(toEng_P); break; // Return the device's DPT name case MSG_GET_DPT_NAME: if (fromEng_P->insert(dptName,DPT_NAME_SIZE+1)) retVal = MSG_RTN_COMPLETED; else retVal = MSG_RTN_DATA_OVERFLOW; break; default: // Call base class event handler retVal = dptObject_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return (retVal); } //dptSCSIdev_C::handleMessage() - end //Function - dptSCSIdev_C::setDPTname() - start //=========================================================================== // //Description: // // This function attempts to set the DPT name field. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIdev_C::setDPTname(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; if ( (getLevel()<=1) && isLogical() ) { retVal = MSG_RTN_DATA_UNDERFLOW; // If any data was placed in the buffer... if (toEng_P->writeIndex>0) { // If the name is used by another device... if ( (toEng_P->data[0]!=0) && myConn_P()->isDupName(toEng_P->data,(uSHORT)toEng_P->writeIndex)) { retVal = MSG_RTN_FAILED | ERR_DUPLICATE_NAME; } else { // Indicate that a new DPT name has been specified scsiFlags |= FLG_ENG_NEW_NAME; // Set the new DPT name if (toEng_P->extract(dptName,DPT_NAME_SIZE)) retVal = MSG_RTN_COMPLETED; } } // Insure that the name is NULL terminated dptName[toEng_P->readIndex] = 0; // Convert to all uppercase upperCase(dptName); } // end if (getLevel<=1)... return (retVal); } //dptSCSIdev_C::setDPTname() - end //Function - dptSCSIdev_C::~dptSCSIdev_C() - start //=========================================================================== // //Description: // // This function is the destructor for the dptSCSIdev_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptSCSIdev_C::~dptSCSIdev_C() { } //dptSCSIdev_C::~dptSCSIdev_C() - end raidutils-0.0.6.orig/raideng/scsi_fwd.hpp0000664000175000000620000000426110044153313020260 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __SCSI_FWD_HPP #define __SCSI_FWD_HPP //File - SCSI_FWD.HPP //*************************************************************************** // //Description: // // This file contains forward references for the DPT engine SCSI //classes. // //Author: Doug Anderson //Date: 3/9/93 // //Editors: // //Remarks: // // //*************************************************************************** //Forward References -------------------------------------------------------- class dptSCSIcon_C; class dptSCSIobj_C; class dptSCSIdev_C; class dptSCSImgr_C; class dptSCSIdrvr_C; class dptSCSIhba_C; class dptSCSIbcd_C; #endif raidutils-0.0.6.orig/raideng/scsi_hba.cpp0000664000175000000620000003674410044153332020241 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - SCSI_HBA.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptSCSIhba_C //class. // //Author: Doug Anderson //Date: 3/9/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files //Function - dptSCSIhba_C::dptSCSIhba_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptSCSIhba_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptSCSIhba_C::dptSCSIhba_C() { hba_P = this; // Set the engine object type engType = DPT_SCSI_HBA; // Clear all flags flags = 0; // Zero all data ioAddr.pci = 0; drvrRefNum = 0; drqNum = 0xffff; irqNum = 0xffff; modules = 0; totalMem = 0; eventLogCtl = 0; for (cpuSpeed=0;cpuSpeed<=3;cpuSpeed++) { busSpeed[cpuSpeed] = 0; memBank[cpuSpeed] = 0; id.eisaPAL[cpuSpeed] = 0; extMemBank[cpuSpeed] = 0; } busType = HBA_BUS_ISA; scsiBusSpeed = 0; cpuSpeed = 0; cpuType = 0; // Set the default SCSI ID, Channel, & LUN addr.id = 7; addr.chan = 0; addr.lun = 0; // Initialize the flash write counter flashWriteCnt = 0; // Initialize the FW type to zero fwType = 0; // Initialize the flags hbaFlags2 = 0; // Initialize the PCI bus and device # busNum = 0; devFnNum = 0; // Initialize the HBA's RAID and Slot ID #s raidSWid = 0; raidSlotID = 0; // Initialize the SCSI channel information memset(chanInfo,0,sizeof(chanInfo)); // Initialize the HBA's background task exclusion period excludeStart = 0; excludeEnd = 0; // Initialize the current voltage and temperature currVoltage = 0; currTemperature = 0; // Initialize the maximum major stripe size maxMajorStripe = 0; // Initialize the maximum number of components per array maxRaidComponents = 64; // Initialize the maximum number of objects per array (includes physical & logical objects) maxRaidDiskEntries = 127; // Initialize the maximum number of RAID entries maxRaidMemEntries = 128; // Initialize the number of RAID entries currently used numRaidEntriesUsed = 0; // Initialize the battery status info batteryStatus = 0; batteryFlags = 0; batteryReserved = 0; // Flags from log page 0x33 parameter code 0x02 fwFlags = 0; // Host bus info from log page 0x33 parameter code 0x07 hostBusInfo = 0; } //dptSCSIhba_C::dptSCSIhba_C() - end //Function - dptSCSIhba_C::setBaseFromRAIDid() - start //=========================================================================== // //Description: // // This function sets this HBA's base address using the specified //RAID ID #. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIhba_C::setBaseFromRAIDid(uSHORT inID) { // If the index is an EISA slot #... if ((inID>=1) && (inID<=0xf)) // Set the EISA slot # ioAddr.std.eisa = (inID << 12) + 0xc88; // Check for known ISA addresses else if (inID==0x10) ioAddr.std.isa = 0x1f0; else if (inID==0x11) ioAddr.std.isa = 0x170; else if (inID==0x12) ioAddr.std.isa = 0x330; else if (inID==0x13) ioAddr.std.isa = 0x230; else ioAddr.pci = (0xfff0 - inID) << 8; } //dptSCSIhba_C::setBaseFromRAIDid() - end //Function - dptSCSIhba_C::isValidAbsentObj() - start //=========================================================================== // //Description: // // This function determines if an artificial engine object of the //specified type can be added to this manager's device list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSIhba_C::isValidAbsentObj(uSHORT objType) { uSHORT isValid = 0; // If a SCSI device or bridge controller... if ((objType<=0xff) || (objType==DPT_SCSI_BCD) || (objType!=DPT_RAID_BCD)) // Indicate a valid artificial object type isValid = 1; return (isValid); } //dptSCSIhba_C::isValidAbsentObj() - end //Function - dptSCSIhba_C::setObjFlags() - start //=========================================================================== // //Description: // // This function sets SCSI object flags. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIhba_C::setObjFlags(uSHORT flg,uSHORT setAll) { if (!setAll) { // Don't allow the primary status to be set flg &= ~FLG_HBA_PRIMARY; // Clear everything except... flags &= FLG_HBA_PRIMARY; } else flags = 0; flags |= flg; // Never allow to be set... flags &= ~(FLG_HBA_RAID_CAPABLE | FLG_HBA_RAID_READY); } //dptSCSIhba_C::setObjFlags() - end //Function - dptSCSIhba_C::setInfo() - start //=========================================================================== // //Description: // // This function sets SCSI HBA information from the specified //input buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIhba_C::setInfo(dptBuffer_S *toEng_P, uSHORT setAll ) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; #ifdef _SINIX uSHORT extractStart = toEng_P->readIndex; #endif // _SINIX // Set base class information dptSCSImgr_C::setInfo(toEng_P,setAll); if (setAll) { // Set the HBA's I/O address toEng_P->extract(ioAddr.pci); } else toEng_P->skip(4); // Set the # by which the driver references this HBA toEng_P->extract(drvrRefNum); #if defined (_DPT_STRICT_ALIGN) toEng_P->skip(2); #endif // Set the HBA's ID bytes toEng_P->extract(id.eisaPAL,4); // Set the HBA's DRQ # toEng_P->extract(drqNum); // Set the HBA's IRQ # toEng_P->extract(irqNum); // Set the modules attached to this HBA toEng_P->extract(modules); #if defined (_DPT_STRICT_ALIGN) toEng_P->skip(2); #endif // Set the total amount of memory on the HBA (in bytes) toEng_P->extract(totalMem); // Set the event log control word toEng_P->extract(eventLogCtl); // Set the Host to HBA bus speed toEng_P->extract(busSpeed,4); busSpeed[3] = 0; // Set the Host to HBA bus type toEng_P->extract(busType); // Set the maximum SCSI bus speed supported toEng_P->extract(scsiBusSpeed); // Set the HBA's CPU speed toEng_P->extract(cpuSpeed); // Set the CPU type toEng_P->extract(cpuType); // Set the size of each memory bank toEng_P->extract(memBank,4); // Set the FW type toEng_P->extract(fwType); #if defined (_DPT_STRICT_ALIGN) toEng_P->skip(2); #endif // Set the flags toEng_P->extract(hbaFlags2); // Set the PCI bus # toEng_P->extract(busNum); // Set the PCI slot # toEng_P->extract(devFnNum); // Set the HBA #s used by S/W arrays toEng_P->extract(raidSWid); toEng_P->extract(raidSlotID); // Set the SCSI channel information toEng_P->extract(chanInfo,18); // Set the HBA's background task exclusion period toEng_P->extract(excludeStart); toEng_P->extract(excludeEnd); // Set the current voltage and temperature toEng_P->extract(currVoltage); toEng_P->extract(currTemperature); // Set the maximum major stripe size toEng_P->extract(maxMajorStripe); // Skip the number of available RAID entries for array creation // since this number is not stored directly in the engine toEng_P->skip(2); // Set the battery status toEng_P->extract(batteryStatus); toEng_P->extract(batteryFlags); toEng_P->extract(batteryReserved); // Return the maximum number of components per array toEng_P->extract(maxRaidComponents); // Return info for channel #4 toEng_P->extract(chanInfo+3,6); // Skip channel #5 info toEng_P->skip(6); toEng_P->extract(hostBusInfo); // Host bus info from log page 0x33 parameter code 0x07 toEng_P->extract(fwFlags); // Flags from log page 0x33 parameter code 0x02 // Skip the extra bytes if (toEng_P->skip(4)) retVal = MSG_RTN_COMPLETED; return (retVal); } //dptSCSIhba_C::setInfo() - end //Function - dptSCSIhba_C::rtnInfo() - start //=========================================================================== // //Description: // // This function returns SCSI HBA information to the specified //output buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIhba_C::rtnInfo(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; uLONG insertStart = fromEng_P->writeIndex; uSHORT tempShort = 0; uSHORT availableRaidEntries = 0; // Return base class information dptSCSImgr_C::rtnInfo(fromEng_P); // Return the HBA's I/O address(es) fromEng_P->insert(ioAddr.pci); // Return the # by which the driver references this HBA fromEng_P->insert(drvrRefNum); #if defined (_DPT_STRICT_ALIGN) fromEng_P->insert(tempShort); #endif // Return the HBA's ID bytes fromEng_P->insert(id.eisaPAL,4); // Return the HBA's DRQ # fromEng_P->insert(drqNum); // Return the HBA's IRQ # fromEng_P->insert(irqNum); // Return the modules attached to this HBA fromEng_P->insert(modules); #if defined (_DPT_STRICT_ALIGN) fromEng_P->insert(tempShort); #endif // Return the total amount of memory on the HBA (in bytes) fromEng_P->insert(totalMem); // Return the event log control word fromEng_P->insert(eventLogCtl); // Return the Host to HBA bus speed fromEng_P->insert(busSpeed,4); // Return the Host to HBA bus type fromEng_P->insert(busType); // Return the maximum SCSI bus speed supported fromEng_P->insert(scsiBusSpeed); // Return the HBA's CPU speed fromEng_P->insert(cpuSpeed); // Return the CPU type fromEng_P->insert(cpuType); // Return the size of each memory bank fromEng_P->insert(memBank,4); // Return the FW type fromEng_P->insert(fwType); #if defined (_DPT_STRICT_ALIGN) fromEng_P->insert(tempShort); #endif // Return more flags fromEng_P->insert(hbaFlags2); // Return the PCI bus # fromEng_P->insert(busNum); // Return the PCI slot # fromEng_P->insert(devFnNum); // Return the HBA #s used by S/W arrays fromEng_P->insert(raidSWid); fromEng_P->insert(raidSlotID); // Return the SCSI channel information for the first three channels fromEng_P->insert(chanInfo,18); // Return the HBA's background task exclusion period fromEng_P->insert(excludeStart); fromEng_P->insert(excludeEnd); // Return the current voltage and temperature fromEng_P->insert(currVoltage); fromEng_P->insert(currTemperature); // Return the maximum major stripe size fromEng_P->insert(maxMajorStripe); // Return the current number of available RAID entries availableRaidEntries = maxRaidMemEntries - numRaidEntriesUsed; if (availableRaidEntries > maxRaidDiskEntries) availableRaidEntries = maxRaidDiskEntries; fromEng_P->insert(availableRaidEntries); // Return the battery status fromEng_P->insert(batteryStatus); fromEng_P->insert(batteryFlags); fromEng_P->insert(batteryReserved); // Return the maximum number of components per array fromEng_P->insert(maxRaidComponents); // Return info for channel #4 fromEng_P->insert(chanInfo+3,6); // Channel #5 info (extra bytes) fromEng_P->insert(tempShort); fromEng_P->insert(tempShort); fromEng_P->insert(tempShort); fromEng_P->insert(hostBusInfo); // Host bus info from log page 0x33 parameter code 0x07 fromEng_P->insert(fwFlags); // Flags from log page 0x33 parameter code 0x02 // The extra bytes fromEng_P->insert(tempShort); if (fromEng_P->insert(tempShort)) retVal = MSG_RTN_COMPLETED; return (retVal); } //dptSCSIhba_C::rtnInfo() - end //Function - dptSCSIhba_C::getObjFlags() - start //=========================================================================== // //Description: // // This function sets SCSI object flags. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIhba_C::getObjFlags(uSHORT &flg) { // Set the appropriate flags flg |= flags; } //dptSCSIhba_C::getObjFlags() - end //Function - dptSCSIhba_C::rtnMembankCapacities() - start //=========================================================================== //Description: // This function returns the extended memory bank capacity information. //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIhba_C::rtnMembankCapacities(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; fromEng_P->insert(extMemBank[0]); fromEng_P->insert(extMemBank[1]); fromEng_P->insert(extMemBank[2]); if (fromEng_P->insert(extMemBank[3])) { retVal = MSG_RTN_COMPLETED; } return retVal; } //dptSCSIhba_C::rtnMembankCapacities() - end //Function - dptSCSIhba_C::decRaidEntries() - start //=========================================================================== //Description: // This decrements the number of RAID entries used. //--------------------------------------------------------------------------- void dptSCSIhba_C::decRaidEntries() { if (numRaidEntriesUsed) --numRaidEntriesUsed; } //dptSCSIhba_C::decRaidEntries() - end //Function - dptSCSIhba_C::incRaidEntries() - start //=========================================================================== //Description: // This increments the number of RAID entries used. //--------------------------------------------------------------------------- void dptSCSIhba_C::incRaidEntries() { ++numRaidEntriesUsed; } //dptSCSIhba_C::incRaidEntries() - end raidutils-0.0.6.orig/raideng/scsi_mgr.cpp0000664000175000000620000003714410044153313020266 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - SCSI_MGR.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptSCSImgr_C //class. // //Author: Doug Anderson //Date: 3/9/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files //Function - dptSCSImgr_C::dptSCSImgr_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptSCSImgr_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptSCSImgr_C::dptSCSImgr_C() { // Every second rbldFrequency = 90; // 256k per burst rbldAmount = 256 * 2; // Clear the RAID support flags raidSupport = 0; // Default = 6 second delay spinDownDelay = 6; // Default = Do not poll for rebuilding rbldPollFreq = 0; // Clear the RAID rebuild flags raidFlags = 0; } //dptSCSImgr_C::dptSCSImgr_C() - end //Function - dptSCSImgr_C::preEnterLog() - start //=========================================================================== // //Description: // // This function is called prior to entering a device in this manager's //logical device list. This function should be used to set any ownership //flags... // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSImgr_C::preEnterLog(dptCoreDev_C *dev_P) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; // Set the device's HBA to this manager's HBA dev_P->hba_P = myHBA_P(); // Update the device's HBA # dev_P->updateHBAnum(); // Insure the device's SCSI ID is unique //if (!isUniqueLog(dev_P->getAddr(),0x7)) // retVal = MSG_RTN_FAILED | ERR_SCSI_ADDR_CONFLICT; return (retVal); } //dptSCSImgr_C::preEnterLog() - end //Function - dptSCSImgr_C::preEnterPhy() - start //=========================================================================== // //Description: // // This function is called prior to entering an object in this manager's //physical object list. This function should be used to set any ownership //flags... // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSImgr_C::preEnterPhy(dptCoreObj_C *obj_P) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; dptAddr_S tempAddr; // Cast the core object as a SCSI object dptSCSIobj_C *scsi_P = (dptSCSIobj_C *) obj_P; // Set the device's HBA to this manager's HBA scsi_P->hba_P = myHBA_P(); // Update the object's HBA # scsi_P->updateHBAnum(); tempAddr = scsi_P->getAddr(); // Insure the object's address is within the minimum bounds //if (!phyRange.inBounds(tempAddr)) // retVal = MSG_RTN_FAILED | ERR_SCSI_ADDR_BOUNDS; // Insure the object's SCSI ID is not equal to this manager's SCSI ID //else if (scsi_P->getID()==getMgrPhyID()) //if (scsi_P->getID()==getMgrPhyID()) // retVal = MSG_RTN_FAILED | ERR_SCSI_ADDR_CONFLICT; // Insure the object's SCSI ID is unique //else if (!isUniquePhy(tempAddr,0x6)) // retVal = MSG_RTN_FAILED | ERR_SCSI_ADDR_CONFLICT; return (retVal); } //dptSCSImgr_C::preEnterPhy() - end //Function - dptSCSImgr_C::preAddLog() - start //=========================================================================== // //Description: // // This function is called prior to adding a device to this manager's //logical device list. This function insures that the device has a //unique SCSI address and positions the logical device list to enter //the device in SCSI address order. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSImgr_C::preAddLog(dptCoreDev_C *dev_P) { uSHORT unique = positionSCSI(logList,dev_P->getAddr()); return (unique); } //dptSCSImgr_C::preAddLog() - end //Function - dptSCSImgr_C::preAddPhy() - start //=========================================================================== // //Description: // // This function is called prior to adding an object to this manager's //physical device list. This function insures that the device has a //unique SCSI address and positions the physical object list to enter //the object in SCSI address order. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSImgr_C::preAddPhy(dptCoreObj_C *obj_P) { uSHORT unique = positionSCSI(phyList,((dptSCSIobj_C *)obj_P)->getAddr()); return (unique); } //dptSCSImgr_C::preAddPhy() - end //Function - dptSCSImgr_C::getNextAddr() - start //=========================================================================== // //Description: // // This function attempts to find the next available address in the //specified list. The entire physical address range is checked. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSImgr_C::getNextAddr(dptCoreList_C &list, dptAddr_S &inAddr, uCHAR mask, uCHAR notMyID ) { uSHORT found = 0; for (phyRange.reset();!phyRange.maxedOut() && !found; phyRange.incTopDown()) { // Set the SCSI address inAddr = phyRange.cur(); inAddr.hba = getHBA(); // If the address is unique... if (isUniqueAddr(list,inAddr,mask)) if (!notMyID || (inAddr.id!=getMgrPhyID())) found = 1; } // end for (phyRange) // If a unique address was not found... if (!found) { // Set the address to the minimum address inAddr = phyRange.getMinAddr(); inAddr.hba = getHBA(); } return (found); } //dptSCSImgr_C::getAddr() - end //Function - dptSCSImgr_C::createArtificial() - start //=========================================================================== // //Description: // // This function creates an absent object and enters the object into //the engine core. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSImgr_C::createArtificial(dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; uSHORT objType; dptSCSIobj_C *obj_P; // Skip the tag field toEng_P->skip(sizeof(DPT_TAG_T)); // Read the object type if (toEng_P->extract(&objType,sizeof(uSHORT))) { retVal = MSG_RTN_FAILED | ERR_NEW_ARTIFICIAL; if (isValidAbsentObj(objType)) { // Create a new object obj_P = (dptSCSIobj_C *) newObject(objType); if (obj_P != NULL) { // Reset the input buffer toEng_P->replay(); // Attempt to set the object's data obj_P->setInfo(toEng_P,1); // Flag the object as artificial obj_P->status.flags |= FLG_STAT_ARTIFICIAL; // Add the object to this manager's list if (enterAbs(obj_P)==MSG_RTN_COMPLETED) // Return the new object's ID retVal = obj_P->returnID(fromEng_P); } } } return (retVal); } //dptSCSImgr_C::createArtificial() - end //Function - dptSCSImgr_C::setInfo() - start //=========================================================================== // //Description: // // This function sets SCSI manager information from the specified //input buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSImgr_C::setInfo(dptBuffer_S *toEng_P,uSHORT setAll) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; // Set base class information dptSCSIobj_C::setInfo(toEng_P,setAll); // Skip the maximum physical address supported toEng_P->skip(sizeof(dptAddr_S)); // Skip the minimum physical address supported toEng_P->skip(sizeof(dptAddr_S)); if (!setAll) { // Skip the rebuild frequency toEng_P->skip(sizeof(uSHORT)); // Skip the rebuild amount toEng_P->skip(sizeof(uSHORT)); // Skip the RAID support flags toEng_P->skip(sizeof(uSHORT)); // Skip the polling interval for RAID rebuilds toEng_P->skip(sizeof(uSHORT)); // Skip the miscellaneous RAID flags toEng_P->skip(sizeof(uSHORT)); // Skip the spinDownTime if (toEng_P->skip(sizeof(uSHORT))) retVal = MSG_RTN_COMPLETED; } else { // Set the rebuild frequency toEng_P->extract(rbldFrequency); // Set the rebuild amount toEng_P->extract(rbldAmount); // Set the RAID support flags toEng_P->extract(raidSupport); // Set the polling interval for RAID rebuilds toEng_P->extract(rbldPollFreq); // Set the miscellaneous RAID flags toEng_P->extract(raidFlags); // Set the spinDownTime if (toEng_P->extract(spinDownDelay)) retVal = MSG_RTN_COMPLETED; } return (retVal); } //dptSCSImgr_C::setInfo() - end //Function - dptSCSImgr_C::rtnInfo() - start //=========================================================================== // //Description: // // This function returns SCSI manager information to the specified //output buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSImgr_C::rtnInfo(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; // Return base class information dptSCSIobj_C::rtnInfo(fromEng_P); // Return the maximum physical address supported fromEng_P->insert((void *)&phyRange.getMaxAddr(),sizeof(dptAddr_S)); // Return the minimum physical address supported fromEng_P->insert((void *)&phyRange.getMinAddr(),sizeof(dptAddr_S)); // Return the rebuild freqency fromEng_P->insert(rbldFrequency); // Return the rebuild amount fromEng_P->insert(rbldAmount); // Return the RAID type support flags fromEng_P->insert(raidSupport); // Return the polling interval to check for rebuilds fromEng_P->insert(rbldPollFreq); // If partition table zapping is enabled if (myConn_P()->isPartZap()) raidFlags &= ~FLG_PART_ZAP_DISABLED; else raidFlags |= FLG_PART_ZAP_DISABLED; // Return the miscellaneous RAID flags fromEng_P->insert(raidFlags); // Return the failed drive spin down delay time if (fromEng_P->insert(spinDownDelay)) retVal = MSG_RTN_COMPLETED; return (retVal); } //dptSCSImgr_C::rtnInfo() - end //Function - dptSCSImgr_C::isValidAbsentObj() - start //=========================================================================== // //Description: // // This function determines if an artificial engine object of the //specified type can be added to this manager's device list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSImgr_C::isValidAbsentObj(uSHORT objType) { uSHORT isValid = 0; // If a SCSI device... if (objType<=0xff) // Indicate a valid artificial object type isValid = 1; return (isValid); } //dptSCSImgr_C::isValidAbsentObj() - end //Function - dptSCSImgr_C::handleMessage() - start //=========================================================================== // //Description: // // This routine handles DPT events for the dptSCSImgr_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSImgr_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Return object IDs from this manager's physical object list case MSG_ID_PHYSICALS: retVal = rtnIDfromList(phyList,fromEng_P,toEng_P,0); break; // Return object IDs from this manager's physical object list // and any sub-manager's logical device lists case MSG_ID_VISIBLES: retVal = rtnIDfromList(phyList,fromEng_P,toEng_P,OPT_TRAVERSE_LOG); break; // Return object IDs from this manager's physical object list // and any sub-manager's physical object lists case MSG_ID_ALL_PHYSICALS: retVal = rtnIDfromList(phyList,fromEng_P,toEng_P,OPT_TRAVERSE_PHY); break; // Return object IDs from this manager's physical object list // and any sub-manager's physical object lists case MSG_ID_LOGICALS: retVal = rtnIDfromList(logList,fromEng_P,toEng_P,0); break; // Create a new absent object case MSG_ABS_NEW_OBJECT: retVal = createArtificial(fromEng_P,toEng_P); break; default: // Call base class event handler retVal = dptObject_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return (retVal); } //dptSCSImgr_C::handleMessage() - end //Function - dptSCSImgr_C::newConfigPhy() - start //=========================================================================== // //Description: // // This function attempts to create a new physical object from //the specified configuration data. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSImgr_C::newConfigPhy(uSHORT objType,dptBuffer_S *toEng_P) { dptObject_C *obj_P = (dptObject_C *) newObject(objType); if (obj_P!=NULL) { obj_P->setInfo(toEng_P,1); enterPhy(obj_P); } } //dptSCSImgr_C::newConfigPhy() - end raidutils-0.0.6.orig/raideng/scsi_obj.cpp0000664000175000000620000002750110175141261020253 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - SCSI_OBJ.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptSCSIobj_C //class. // //Author: Doug Anderson //Date: 3/9/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files //Function - dptSCSIobj_C::dptSCSIobj_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptSCSIobj_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptSCSIobj_C::dptSCSIobj_C() { // Initialize the pointer to this object's HBA hba_P = NULL; // Clear the engine object type engType = DPT_SCSI_DASD; memcpy(descr.vendorID,"UNKNOWN",8); memcpy(descr.productID,"--UNKNOWN--",12); memcpy(descr.revision,"NONE",5); memset(userBuff,0,USER_BUFF_SIZE); magicNum = 0; } //dptSCSIobj_C::dptSCSIobj_C() - end //Function - dptSCSIobj_C::updateHBAnum() - start //=========================================================================== // //Description: // // This function updates this objets HBA number. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIobj_C::updateHBAnum() { if (hba_P!=NULL) // Set this object's HBA number addr.hba = hba_P->getHBA(); } //dptSCSIobj_C::updateHBAnum() - end //Function - dptSCSIobj_C::setInfo() - start //=========================================================================== // //Description: // // This function sets SCSI object information from data in the //specified input buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIobj_C::setInfo(dptBuffer_S *toEng_P,uSHORT setAll) { DPT_RTN_T retVal = MSG_RTN_DATA_UNDERFLOW; uSHORT suggestedFlags; uCHAR statFlags; // Skip this object's tag toEng_P->skip(sizeof(DPT_TAG_T)); // Skip the object type (already set) toEng_P->skip(sizeof(uSHORT)); // Set the object's flags if (toEng_P->extract(suggestedFlags)) setObjFlags(suggestedFlags,setAll); // Set the object's display status toEng_P->extract(status.display); if (status.display>3) status.display = DSPLY_STAT_OPTIMAL; // Set the object's status flags toEng_P->extract(statFlags); // Only allow READY, LAP, and PAP flags to be set status.flags = statFlags & (FLG_STAT_READY | FLG_STAT_LAP | FLG_STAT_PAP); // Set the object's main status toEng_P->extract(status.main); // Set the object's sub status toEng_P->extract(status.sub); if (setAll) // Set the object's SCSI address toEng_P->extract(&addr,sizeof(dptAddr_S)); // Skip the object's origin level toEng_P->skip(sizeof(uSHORT)); #if defined (_DPT_STRICT_ALIGN) toEng_P->skip(2); #endif // Skip the manager that this object is attached to toEng_P->skip(sizeof(DPT_TAG_T)); // Set the ASCII description information toEng_P->extract(&descr,sizeof(dptDescr_S)); descr.terminate(); descr.toUpper(); // Set the user buffer data if (toEng_P->extract(userBuff,USER_BUFF_SIZE)) retVal = MSG_RTN_COMPLETED; return (retVal); } //dptSCSIobj_C::setInfo() - end //Function - dptSCSIobj_C::setInfoHandler() - start //=========================================================================== // //Description: // // This function sets information for artificial objects. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIobj_C::setInfoHandler(dptBuffer_S *toEng_P) { DPT_RTN_T retVal = MSG_RTN_IGNORED; // Insure the object was created artificially if (isArtificial()) // Set object information retVal = setInfo(toEng_P,1); return (retVal); } //dptSCSIobj_C::setInfoHandler() - end //Function - dptSCSIobj_C::rtnInfo() - start //=========================================================================== // //Description: // // This function returns SCSI object information to the specified //output buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIobj_C::rtnInfo(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; uSHORT myFlags; #if defined (_DPT_STRICT_ALIGN) uSHORT shortFill = 0; #endif // Return this object's tag fromEng_P->insert(tag()); // Return the engine object type fromEng_P->insert(engType); // Return the object flags myFlags = 0; getObjFlags(myFlags); fromEng_P->insert(myFlags); // Return the object status fromEng_P->insert(&status,sizeof(dptStatus_S)); // Update this object's HBA # updateHBAnum(); // Return the object's SCSI address fromEng_P->insert(&addr,sizeof(dptAddr_S)); // Return the object's origin level fromEng_P->insert(getLevel()); #if defined (_DPT_STRICT_ALIGN) fromEng_P->insert(shortFill); #endif // Return the manager that this object is attached to if (myMgr_P()==NULL) fromEng_P->insert((DPT_TAG_T)0); else if (myMgr_P()->myMgr_P()==NULL) { // If a dual level array on an I2O board... if (isDevice() && myHBA_P()->isI2O()) fromEng_P->insert(myHBA_P()->tag()); else fromEng_P->insert((DPT_TAG_T)0); } else fromEng_P->insert(myMgr_P()->tag()); // Return the ASCII description information fromEng_P->insert(&descr,sizeof(dptDescr_S)); // Return the user buffer data if (fromEng_P->insert(userBuff,USER_BUFF_SIZE)) retVal = MSG_RTN_COMPLETED; return (retVal); } //dptSCSIobj_C::rtnInfo() - end //Function - dptSCSIobj_C::returnID() - start //=========================================================================== // //Description: // // This function returns this object's ID information in the specified //output buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIobj_C::returnID(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; // Return this object's tag fromEng_P->insert(tag()); // Return the engine object type if (fromEng_P->insert(engType)) retVal = MSG_RTN_COMPLETED; return (retVal); } //dptSCSIobj_C::returnID() - end //Function - dptSCSIobj_C::handleMessage() - start //=========================================================================== // //Description: // // This routine handles DPT events for this class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIobj_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Set absent object information case MSG_ABS_SET_INFO: retVal = setInfoHandler(toEng_P); break; // Return object information case MSG_GET_INFO: retVal = rtnInfo(fromEng_P); break; // Set the user buffer with the specified input data case MSG_SET_USER_BUFF: if (toEng_P->extract(userBuff,USER_BUFF_SIZE)) retVal = MSG_RTN_COMPLETED; else retVal = MSG_RTN_DATA_UNDERFLOW; break; // Return the user buffer to the specified output buffer case MSG_GET_USER_BUFF: if (fromEng_P->insert(userBuff,USER_BUFF_SIZE)) retVal = MSG_RTN_COMPLETED; else retVal = MSG_RTN_DATA_OVERFLOW; break; default: // Call base class event handler retVal = dptCoreObj_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return (retVal); } //dptSCSIobj_C::handleMessage() - end //Function - dptSCSIobj_C::rtnConfigInfo() - start //=========================================================================== // //Description: // // This function returns this object's configuration information. //This information is stored in the system configuration file. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIobj_C::rtnConfigInfo(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; uLONG bytesLeft; dptBasic_S *basic_P; int oldidx; DEBUG_BEGIN(6, dptSCSIobj_C::rtnConfigInfo()); // Get the # of bytes remaining in the buffer bytesLeft = fromEng_P->allocSize - fromEng_P->writeIndex; // If there is enough space to return this object's information... if (bytesLeft >= (infoSize()+sizeof(uLONG))) { // Return the size of the object info fromEng_P->insert(infoSize()); DEBUG(6, "infoSize=" << (int)infoSize() << " data addr=0x" << hex << \ fromEng_P->data << " writeIndex=" << dec << fromEng_P->writeIndex << \ " left=" << (int)bytesLeft); // Get a pointer to this object's config. info basic_P = (dptBasic_S *) (fromEng_P->data+fromEng_P->writeIndex); if (basic_P->attachedTo!=0) { // Return this object's manager SCSI ID instead of tag basic_P->attachedTo = myMgr_P()->getAddrL(); // Reverse the SCSI address bytes reverseBytes((uLONG &)basic_P->attachedTo); DEBUG(6, PRT_SADDR(basic_P) << "new attachedTo=0x" << hex << \ basic_P->attachedTo << " is set"); } oldidx = fromEng_P->writeIndex; // Return this object's information retVal = rtnInfo(fromEng_P); DEBUG(6, PRT_SADDR(basic_P) << "rtnInfo() returned " << \ (int)fromEng_P->writeIndex-oldidx << "Byte Tag=" \ << (int)basic_P->myTag << " attachedTo=0x" << hex \ << basic_P->attachedTo); } return (retVal); } //dptSCSIobj_C::rtnConfigInfo() - end raidutils-0.0.6.orig/raideng/scsidrvr.cpp0000664000175000000620000003535210044153332020317 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - SCSIDRVR.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptSCSIdrvr_C //class. // //Author: Doug Anderson //Date: 3/10/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "allfiles.hpp" // All engine include files //Function - dptSCSIdrvr_C::dptSCSIdrvr_C() - start //=========================================================================== // //Description: // // This function is the constructor for the dptSCSIdrvr_C class. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptSCSIdrvr_C::dptSCSIdrvr_C() { // Set the engine object type engType = DPT_SCSI_DRVR; } //dptSCSIdrvr_C::dptSCSIdrvr_C() - end //Function - dptSCSIdrvr_C::preEnterPhy() - start //=========================================================================== // //Description: // // This function is called prior to entering an object in this manager's //physical object list. This function should be used to set any ownership //flags... // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- #if (!defined(UNREFERENCED_PARAMETER)) # if defined(__UNIX__) # define UNREFERENCED_PARAMETER(x) # else # define UNREFERENCED_PARAMETER(x) (x) # endif #endif DPT_RTN_T dptSCSIdrvr_C::preEnterPhy(dptCoreObj_C *obj_P) { UNREFERENCED_PARAMETER(obj_P); return (MSG_RTN_COMPLETED); } //dptSCSIdrvr_C::preEnterPhy() - end //Function - dptSCSIdrvr_C::preAddPhy() - start //=========================================================================== // //Description: // // This function is called prior to adding an HBA to the physical //device list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSIdrvr_C::preAddPhy(dptCoreObj_C *obj_P) { // Cast the input object as a SCSI HBA dptSCSIhba_C *inHBA_P = (dptSCSIhba_C *) obj_P; // If primary... if (inHBA_P->getISAaddr() == 0x1f0) // Add to the front of the list phyList.reset(); else // Add to the end of the list phyList.nullIt(); return (1); } //dptSCSIdrvr_C::preAddPhy() - end //Function - dptSCSIdrvr_C::postAddPhy() - start //=========================================================================== // //Description: // // This function is called after an HBA has been added to the driver's //physical device list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIdrvr_C::postAddPhy(dptCoreObj_C *) { uCHAR cntr = 0; hba_P = (dptSCSIhba_C *) phyList.reset(); while (hba_P!=NULL) { // Set the HBA's sequence # hba_P->addr.hba = cntr++; // Get the next HBA hba_P = (dptSCSIhba_C *) phyList.next(); } } //dptSCSIdrvr_C::postAddPhy() - end //Function - dptSCSIdrvr_C::postDelete() - start //=========================================================================== // //Description: // // This function is called after an object has been removed from //all core lists and before the object is freed from memory. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptSCSIdrvr_C::postDelete(dptCoreObj_C *obj_P) { // Update the HBA sequence numbers postAddPhy(obj_P); } //dptSCSIdrvr_C::postDelete() - end //Function - dptSCSIdrvr_C::isValidAbsentObj() - start //=========================================================================== // //Description: // // This function determines if an artificial engine object of the //specified type can be added to this manager's device list. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT dptSCSIdrvr_C::isValidAbsentObj(uSHORT objType) { uSHORT isValid = 0; // Only permit HBA's to be added to the driver if (objType==DPT_SCSI_HBA) // Indicate a valid artificial object type isValid = 1; return (isValid); } //dptSCSIdrvr_C::isValidAbsentObj() - end //Function - dptSCSIdrvr_C::handleMessage() - start //=========================================================================== // //Description: // // This function processes messages for a SCSI driver. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIdrvr_C::handleMessage(DPT_MSG_T message, dptBuffer_S *fromEng_P, dptBuffer_S *toEng_P ) { DPT_RTN_T retVal = MSG_RTN_IGNORED; switch (message) { // Return the IDs of all objects with the specified SCSI address case MSG_ID_BY_SCSI_ADDR: retVal = myConn_P()->rtnIDfromData(fromEng_P,toEng_P,0); break; // Return the IDs of all objects with the specified status case MSG_ID_BY_STATUS: retVal = myConn_P()->rtnIDfromData(fromEng_P,toEng_P,1); break; // Return the IDs of all objects wit the specified string // in the vendor ID field. case MSG_ID_BY_VENDOR: retVal = myConn_P()->rtnIDfromASCII(fromEng_P,toEng_P,0); break; // Return the IDs of all objects wit the specified string // in the product ID field. case MSG_ID_BY_PRODUCT: retVal = myConn_P()->rtnIDfromASCII(fromEng_P,toEng_P,1); break; // Return the IDs of all objects wit the specified string // in the revision field. case MSG_ID_BY_REVISION: retVal = myConn_P()->rtnIDfromASCII(fromEng_P,toEng_P,2); break; // Return the IDs of all objects wit the specified string // in the vendor extra field. case MSG_ID_BY_VENDOR_EXTRA: retVal = myConn_P()->rtnIDfromASCII(fromEng_P,toEng_P,3); break; // Return the IDs of all objects wit the specified string // in the DPT name field. case MSG_ID_BY_DPT_NAME: retVal = myConn_P()->rtnIDfromASCII(fromEng_P,toEng_P,4); break; // Return the driver's DPT signature structure case MSG_GET_DRIVER_SIG: retVal = rtnDrvrSig(fromEng_P); break; // Return the system configuration case MSG_GET_CONFIG: retVal = myConn_P()->rtnSysConfig(fromEng_P); break; // Set the system configuration case MSG_SET_CONFIG: retVal = setSysConfig(toEng_P); break; // Set the RAID configuration to the current hardware case MSG_RAID_SET_CONFIG: retVal = setSysConfig(toEng_P,1); break; // Get system information case MSG_GET_SYSTEM_INFO: retVal = rtnSysInfo(fromEng_P); break; // Call base class message handler default: retVal = dptManager_C::handleMessage(message,fromEng_P,toEng_P); break; } // end switch return(retVal); } //dptSCSIdrvr_C::handleMessage() - end //Function - dptSCSIdrvr_C::rtnDrvrSig() - start //=========================================================================== // //Description: // // This function returns the engine's DPT signature structure. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIdrvr_C::rtnDrvrSig(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; // If the output buffer is larger than the signature structure... if (fromEng_P->allocSize>=sizeof(dpt_sig_S)) { uLONG numSigs; // how many sig structs will fit into this buffer numSigs = fromEng_P->allocSize / sizeof(dpt_sig_S); // Return the driver's signature structure retVal = osdGetDrvrSig(myConn_P()->getIOmethod(),(dpt_sig_S *) fromEng_P->data, &numSigs); // If successful... if (retVal == MSG_RTN_COMPLETED) // Set the write size variables fromEng_P->writeIndex = sizeof(dpt_sig_S) * numSigs; } return (retVal); } //dptSCSIdrvr_C::rtnDrvrSig() - end //Function - dptSCSIdrvr_C::rtnSysInfo() - start //=========================================================================== // //Description: // // This function returns the system information structure. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIdrvr_C::rtnSysInfo(dptBuffer_S *fromEng_P) { DPT_RTN_T retVal = MSG_RTN_DATA_OVERFLOW; uLONG numBytes; // If the output buffer is larger than the signature structure... if (fromEng_P->allocSize>=512) { // Return the system information structure numBytes = osdGetSysInfo((sysInfo_S *)fromEng_P->data); // Set the write size variables fromEng_P->writeIndex = numBytes; retVal = MSG_RTN_COMPLETED; } return (retVal); } //dptSCSIdrvr_C::rtnSysInfo() - end //Function - dptSCSIdrvr_C::setSysConfig() - start //=========================================================================== // //Description: // // This function sets the system configuration using the data in the //specified input buffer. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T dptSCSIdrvr_C::setSysConfig(dptBuffer_S *toEng_P, uSHORT method ) { DPT_RTN_T retVal = MSG_RTN_COMPLETED; dptBasic_S *basic_P; uLONG objSize,compSize; uSHORT mgrLevel=0; uSHORT oldMgrLevel; dptManager_C *mgr_P; dptDevice_C *dev_P; dptAddr_S *mgrAddr_P; uLONG skipAmount; dptCoreList_C tempList; uSHORT *beef_P = (uSHORT *) &toEng_P->data[toEng_P->writeIndex-2]; uSHORT dsmFlags = 0; if (*beef_P == FLG_DSM_FLAGS_VALID) memcpy(&dsmFlags, &toEng_P->data[toEng_P->writeIndex-4], 2); // If loading an entire configuration if (method==0) // Delete all objects delAllObjects(); // Read the object size information while (toEng_P->extract(objSize)) { // Get a pointer to the object's info basic_P = (dptBasic_S *) (toEng_P->data + toEng_P->readIndex); // Get a pointer to the object's manager SCSI address mgrAddr_P = (dptAddr_S *) &basic_P->attachedTo; // Save the old manager level oldMgrLevel = mgrLevel; // Get this object's manager level mgrLevel = basic_P->level; // If a manager or a physical device... if ((basic_P->objType>0xff) || !(basic_P->flags & FLG_DEV_LOGICAL)) { // Get the current read index skipAmount = toEng_P->readIndex; if (method==0) { // The object's manager level is one less than the object mgrLevel--; if (mgrLevel==0) mgr_P = this; else // Find the object's manager mgr_P = myConn_P()->findConfigMgr(mgrLevel,*mgrAddr_P); if (mgr_P!=NULL) // Create a new physical object mgr_P->newConfigPhy(basic_P->objType,toEng_P); } // Skip over any unread data skipAmount = objSize - (toEng_P->readIndex - skipAmount); if (!toEng_P->skip(skipAmount)) retVal = MSG_RTN_DATA_UNDERFLOW; // If a device... if (basic_P->objType<=0xff) { // Skip the component list info toEng_P->extract(compSize); if (!toEng_P->skip(compSize)) retVal = MSG_RTN_DATA_UNDERFLOW; } } else { // If a logical level change... if (oldMgrLevel!=mgrLevel) { // Add all logical devices into the configuration mgr_P = (dptManager_C *) tempList.reset(); dev_P = (dptDevice_C *) tempList.next(); while ((mgr_P!=NULL) && (dev_P!=NULL)) { mgr_P->enterLog(dev_P); // If this RAID definition suppresses... if (dev_P->getRAIDtype() == RAID_HOT_SPARE) myConn_P()->suppress(dev_P); mgr_P = (dptManager_C *) tempList.next(); dev_P = (dptDevice_C *) tempList.next(); } // Clear the mgr/device list tempList.flush(); } if (mgrLevel==0) mgr_P = this; else mgr_P = myConn_P()->findConfigMgr(mgrLevel,*mgrAddr_P); if (mgr_P!=NULL) { // Create a new logical device dev_P = mgr_P->newConfigLog((uSHORT)objSize,basic_P->objType,toEng_P,method, dsmFlags); if (dev_P!=NULL) { // Save the manager and device for later entry tempList.addEnd(mgr_P); tempList.addEnd(dev_P); } } } } // Add all logical devices into the configuration mgr_P = (dptManager_C *) tempList.reset(); dev_P = (dptDevice_C *) tempList.next(); while ((mgr_P!=NULL) && (dev_P!=NULL)) { mgr_P->enterLog(dev_P); if (dev_P->getRAIDtype() == RAID_HOT_SPARE) myConn_P()->suppress(dev_P); mgr_P = (dptManager_C *) tempList.next(); dev_P = (dptDevice_C *) tempList.next(); } return (retVal); } //dptSCSIdrvr_C::setSysConfig() - end raidutils-0.0.6.orig/raideng/semaphor.c0000664000175000000620000006003110175141261017731 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - SEMAPHOR.C //*************************************************************************** // //Description: // // This file contains function definitions to work with mutually //exclusive semaphors in an OS independent manner. // //Author: //Date: // //Editors: // //Remarks: // // NOTE NOTE! // // The method of using file read and write locks to know if you are the // only one who has the semaphore open will not work if multiple threads // in a single process open the same named semaphore. This is because a // file lock is per process not per thread. So, one thread could change // another thread's read lock to a write lock and not know it. // // Currently at DPT, threads share the same semaphore handle, so it is // not a problem. // //*************************************************************************** /* Include Files ------------------------------------------------------------*/ #include #include #include #include #include #include #include #include #include #include #include #include "osd_util.h" /* * Some Unixes require a fourth parameter to semctl of type 'union semun', * while other variants are more flexible but also don't define that type. * * To make matters even more interesting, SCO UNIX 3.2.4.2 defines it, but SCO * OpenServer doesn't. Since we still need to support 3.2.4.2, if compiling * on OpenServer add -D_DPT_DEFINE_SEMUN=1 to your makefile. * * Also, for new operating systems, it is preferrable to add the above define * in your makefile rather than add the OS-define below in the code. */ #if !defined(_DPT_DEFINE_SEMUN) #if defined(_DPT_FREE_BSD) || defined(_DPT_BSDI) #define _DPT_DEFINE_SEMUN 0 #else #define _DPT_DEFINE_SEMUN 1 #endif #endif /* Definitions - Defines & Constants ----------------------------------------*/ #define MAX_LOCAL_SEM 10 #define MAX_SEM_NAME_LEN 80 /* including 5 characters added here "/tmp/" */ /* Definitions - Structures -------------------------------------------------*/ typedef struct { char semName[MAX_SEM_NAME_LEN]; int handle; int semID; int index; } DPT_Semaphore_S; #if _DPT_DEFINE_SEMUN != 0 union semun { int val; }; #endif /* Global Variables ---------------------------------------------------------*/ static char LocalSemaphoreName[MAX_SEM_NAME_LEN] = ""; static int LocalSemaphoreInUse[MAX_LOCAL_SEM]; static int LocalSemID = -1; extern int Verbose; /* Function Prototypes ------------------------------------------------------*/ //Function - privateCreateNamedSemaphore() - start //=========================================================================== // //Description: // // This function creates a semaphore to provide mutually exclusive //or event-type access to an application resource. // //Parameters: // //Return Value: // // NULL = Failure, unable to create a new semaphore // Non-zero = Success, handle to the newly created semaphore // //Remarks: (Side effects, Assumptions, Warnings...) // // A helper function for other routines in this file. It is internal to // this file and should not be called from outside. // //--------------------------------------------------------------------------- static SEMAPHORE_T privateCreateNamedSemaphore(char *name, int initialValue) { DPT_Semaphore_S *rtnVal; int iAmFirst = 0; key_t key; union semun arg; struct flock lock; rtnVal = (DPT_Semaphore_S *) malloc(sizeof(DPT_Semaphore_S)); if (rtnVal != NULL) { // Open the file so we can get file lock on it and create if it // doesn't exist rtnVal->handle = open(name, O_CREAT | O_RDWR, S_IRWXU | S_IRWXG); if (rtnVal->handle < 0) { free(rtnVal); rtnVal = NULL; } } if (rtnVal != NULL) { strcpy(rtnVal->semName, name); rtnVal->index = 0; // See if anyone else is using the semaphore. If anyone else is using // it, they will have a read lock and I wouldn't be able to get the // write lock without waiting. If someone else is using it, wait for // them and get a read lock. If I exit this code block without error, // I'll have some kind of lock lock.l_type = F_WRLCK; lock.l_whence = SEEK_SET; lock.l_start = 0; lock.l_len = 0; // till end-of-file if (fcntl(rtnVal->handle, F_SETLK, &lock) != 0) { if (errno != EACCES && errno != EAGAIN) { close(rtnVal->handle); free(rtnVal); rtnVal = NULL; } else { // Let others know I'm using the semaphore lock.l_type = F_RDLCK; if (fcntl(rtnVal->handle, F_SETLKW, &lock) != 0) { close(rtnVal->handle); free(rtnVal); rtnVal = NULL; } } } else { iAmFirst = 1; } } lock.l_type = F_UNLCK; // if anything goes wrong I need to unlock if (rtnVal != NULL) { // Get the key for the file to use to get the actual semaphore key = ftok(rtnVal->semName, 'D'); if (key == (key_t) -1) { fcntl(rtnVal->handle, F_SETLKW, &lock); close(rtnVal->handle); free(rtnVal); rtnVal = NULL; } } if (rtnVal != NULL) { // Get the semaphore handle and create it if it isn't already there. // Let other processes access it as well rtnVal->semID = semget(key, 1, IPC_CREAT | S_IRWXU | S_IRWXG); if (rtnVal->semID == -1) { if (Verbose) perror("\nprivateCreateNamedSemaphore"); fcntl(rtnVal->handle, F_SETLKW, &lock); close(rtnVal->handle); free(rtnVal); rtnVal = NULL; } } // At this point, if we are the first (and only) person to get the // semaphore, initialize its start value if (rtnVal != NULL && iAmFirst) { arg.val = initialValue; if (semctl(rtnVal->semID, rtnVal->index, SETVAL, arg) != 0) { // note arg is unused for IPC_RMID semctl(rtnVal->semID, 0, IPC_RMID, arg); fcntl(rtnVal->handle, F_SETLKW, &lock); close(rtnVal->handle); free(rtnVal); rtnVal = NULL; } else { // Release the Write lock and change to a read lock lock.l_type = F_RDLCK; if (fcntl(rtnVal->handle, F_SETLK, &lock) != 0) { // note arg is unused for IPC_RMID semctl(rtnVal->semID, 0, IPC_RMID, arg); close(rtnVal->handle); free(rtnVal); rtnVal = NULL; } } } return((SEMAPHORE_T) rtnVal); } //privateCreateNamedSemaphore() - end //Function - privateCreateUnnamedSemaphore() - start //=========================================================================== // //Description: // // This function creates a semaphore to provide mutually exclusive //or event-type access to an application resource. // //Parameters: // //Return Value: // // NULL = Failure, unable to create a new semaphore // Non-zero = Success, handle to the newly created semaphore // //Remarks: (Side effects, Assumptions, Warnings...) // // A helper function for other routines in this file. It is internal to // this file and should not be called from outside. // //--------------------------------------------------------------------------- static SEMAPHORE_T privateCreateUnnamedSemaphore(int initialValue) { DPT_Semaphore_S *rtnVal; union semun arg; int i; if (LocalSemID == -1) { // If we can't get the program name or create the file, go with the // private semaphore instead of a key based on ftok() key_t key = IPC_PRIVATE; if (LocalSemaphoreName[0] == '\0') { extern char **Argv; char *name; int handle; name = Argv[0]; if (name != NULL) { name = strrchr(name, '/'); if (name != NULL) name++; else name = Argv[0]; } if (name != NULL) { strcpy(LocalSemaphoreName, "/tmp/"); strcat(LocalSemaphoreName, name); strcat(LocalSemaphoreName,"_unnamed"); handle = open(LocalSemaphoreName, O_CREAT | O_RDWR, 0); if (handle < 0) LocalSemaphoreName[0] = '\0'; else { close(handle); key = ftok(LocalSemaphoreName, 'D'); if (key == (key_t) -1) { LocalSemaphoreName[0] = '\0'; key = IPC_PRIVATE; } } } } // Get the semaphore ID for the block of unnamed semaphores LocalSemID = semget(key, MAX_LOCAL_SEM, IPC_CREAT); if (LocalSemID == -1) { if (Verbose) perror("\nprivateCreateUnnamedSemaphore"); return NULL; } for (i = 0; i < MAX_LOCAL_SEM; i++) LocalSemaphoreInUse[i] = 0; } for (i = 0; i < MAX_LOCAL_SEM && LocalSemaphoreInUse[i]; i++) { // Nothing } if (i == MAX_LOCAL_SEM) { if (Verbose) printf("\nToo many unnamed semaphores!"); return NULL; } rtnVal = (DPT_Semaphore_S *) malloc(sizeof(DPT_Semaphore_S)); if (rtnVal != NULL) { LocalSemaphoreInUse[i] = 1; rtnVal->semName[0] = '\0'; rtnVal->semID = LocalSemID; rtnVal->handle = -1; rtnVal->index = i; } // Initialize the semaphore's start value if (rtnVal != NULL) { arg.val = initialValue; if (semctl(LocalSemID, rtnVal->index, SETVAL, arg) != 0) { LocalSemaphoreInUse[rtnVal->index] = 0; free(rtnVal); rtnVal = NULL; } } return((SEMAPHORE_T) rtnVal); } //privateCreateUnnamedSemaphore() - end //Function - osdCreateSemaphore() - start //=========================================================================== // //Description: // // This function creates a semaphore to provide mutually exclusive //access to an application resource. // //Parameters: // //Return Value: // // NULL = Failure, unable to create a new semaphore // Non-zero = Success, handle to the newly created semaphore // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- SEMAPHORE_T osdCreateSemaphore() { SEMAPHORE_T rtnVal; rtnVal = privateCreateUnnamedSemaphore(0); if (Verbose) printf("\nosdCreateSemaphore : Rtn = %x", rtnVal); return(rtnVal); } //osdCreateSemaphore() - end //Function - osdCreateNamedSemaphore - start //=========================================================================== // //Description: creates a named semaphore so outside processes can gain access // to it // // //Parameters: // //Return Value: // // NULL = Failure, unable to create a new semaphore // Non-zero = Success, handle to the newly created semaphore // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- SEMAPHORE_T osdCreateNamedSemaphore(char *name) { char temp[MAX_SEM_NAME_LEN]; SEMAPHORE_T rtnVal; strcpy(temp, "/tmp/"); strcat(temp, name); rtnVal = privateCreateNamedSemaphore(temp, 0); if (Verbose) printf("\nosdCreateNamedSemaphore : Rtn = %x", rtnVal); return(rtnVal); } //osdCreateNamedSemaphore() - end //Function - osdDestroySemaphore() - start //=========================================================================== // //Description: // // This function destroys the specified mutually exclusive //semaphore. // //Parameters: // // semHandle = Handle to the semaphore to be destroyed // //Return Value: // // 0 = Success, semaphore destroyed // non-zero = Failure, semaphore not destroyed // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- uSHORT osdDestroySemaphore(SEMAPHORE_T semHandle) { DPT_Semaphore_S *sem = (DPT_Semaphore_S *) semHandle; uSHORT rtnVal = 0; if (sem->semName[0] == '\0') { int i; // It's an unnamed semaphore, set the index in the block to not-in-use if (sem->index < MAX_LOCAL_SEM) LocalSemaphoreInUse[sem->index] = 0; // If all unnamed semaphores are now not-in-use, give back the // semaphore block for (i = 0; i < MAX_LOCAL_SEM && !LocalSemaphoreInUse[i]; i++) { // Nothing } if (i == MAX_LOCAL_SEM) { union semun arg; // note arg is unused for IPC_RMID arg.val = 0; rtnVal = semctl(LocalSemID, 0, IPC_RMID, arg) != 0; if (rtnVal == 0) { LocalSemID = -1; unlink(LocalSemaphoreName); } } } else { // It's a nammed semaphore struct flock lock; // See if anyone else is using the semaphore. If anyone else is using // it, they will have a read lock and I wouldn't be able to change my // lock to a write lock without waiting. lock.l_type = F_WRLCK; lock.l_whence = SEEK_SET; lock.l_start = 0; lock.l_len = 0; // till end-of-file if (fcntl(sem->handle, F_SETLK, &lock) == 0) { union semun arg; // I got the write lock; I must be the last one using the // semaphore. Delete it and the file associated with it. // note arg is unused for IPC_RMID arg.val = 0; semctl(sem->semID, 0, IPC_RMID, arg); unlink(sem->semName); } else { // I didn't get the write lock; someone else has the semaphore // open. Release my read lock now that I'm not using the // semaphore any more. lock.l_type = F_UNLCK; rtnVal = fcntl(sem->handle, F_SETLKW, &lock) != 0; } close(sem->handle); } if (rtnVal == 0) free(sem); if (Verbose) printf("\nosdDestroySemaphore : Rtn = %x", rtnVal); return(rtnVal); } //osdDestroySemaphore() - end //Function - osdRequestSemaphore() - start //=========================================================================== // //Description: // // This function requests access to the specified mutually //exclusive semaphore. // //Parameters: // // semHandle = Handle to the semaphore to request access // timeout = # of milliseconds to wait for the semaphore // //Return Value: // // 0 = Access granted // Non-zero = Access denied (timed out) // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- static void semaphoreSignalHandler(int sig) { // do nothing, we'll get an error back from semop() sig = sig; } uLONG osdRequestSemaphore(SEMAPHORE_T semHandle, uLONG timeout) { DPT_Semaphore_S *sem = (DPT_Semaphore_S *) semHandle; uLONG rtnVal = 0; int resetAction = 0; unsigned int oldAlarm; unsigned int waited; struct sembuf semOps[2]; struct sigaction newSig; struct sigaction oldSig; // Set up for two operations on this semaphore. First wait for it to // go to 0, and then set it to 1 semOps[0].sem_num = sem->index; semOps[0].sem_op = 0; semOps[0].sem_flg = 0; semOps[1].sem_num = sem->index; semOps[1].sem_op = 1; semOps[1].sem_flg = 0; // If they don't want to wait, set the appropriate flag and change the // timeout variable as a signal to code below not to set an alarm if (timeout == 0) { semOps[0].sem_flg |= IPC_NOWAIT; semOps[1].sem_flg |= IPC_NOWAIT; timeout = 0xffffffff; } // Set up an alarm signal to timeout our semop() call unless the user // asked for an "infinite" timeout by sending FFFFFFFF or we are asked // not to wait at all. // // Remember how much time was remaining on old Alarm, if any, and reset // signal handler to point to ours for the duration of our wait. Then // set an alarm for our timeout. // if (timeout != 0xffffffff) { // Convert timeout to seconds and round up timeout = (timeout + 999) / 1000; memset(&newSig, 0, sizeof(newSig)); newSig.sa_handler = semaphoreSignalHandler; oldAlarm = alarm(0); rtnVal = (sigaction (SIGALRM, &newSig, &oldSig) != 0); if (rtnVal == 0) { resetAction = 1; alarm((unsigned int) timeout); } else { // try to set back to their original alarm value remaining alarm(oldAlarm); } } // Now wait for the semaphore if (rtnVal == 0) { rtnVal = (semop(sem->semID, semOps, 2) != 0); } // If we set an alarm above, adjust things if (timeout != 0xffffffff) { // Calculate how much time we were waiting and if necessary, restart // the Alarm for the remaining time from the caller's original alarm. // If we waited longer than they had remaining when we started, raise // the signal after replacing their handler so they'll get it // immediately waited = (unsigned int) timeout - alarm(0); if (resetAction) { sigaction (SIGALRM, &oldSig, NULL); } if (oldAlarm != 0) { if (oldAlarm > waited) { alarm(oldAlarm - waited); } else { raise(SIGALRM); } } } if (Verbose) printf("\nosdRequestSemaphore : Rtn = %x\n", rtnVal); return(rtnVal); } //osdRequestSemaphore() - end //Function - osdReleaseSemaphore() - start //=========================================================================== // //Description: // // This function relinquishes control of the specified mutually //exclusive semaphore. // //Parameters: // // semHandle = Handle to the semaphore to be released. // //Return Value: // // 0 = Success, the semaphore has been released // Non-zero = Failure, unable to release the semaphore // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- uSHORT osdReleaseSemaphore(SEMAPHORE_T semHandle) { DPT_Semaphore_S *sem = (DPT_Semaphore_S *) semHandle; uSHORT rtnVal = 1; struct sembuf semOp; // Set Up To Decrement The Semaphore Value By 1 semOp.sem_num = sem->index; semOp.sem_op = -1; semOp.sem_flg = IPC_NOWAIT; rtnVal = semop(sem->semID, &semOp, 1) != 0; if (rtnVal && errno == EAGAIN) { // Ignore errors caused by releasing the semaphore too many times. // This can happen legitimately through osdSignalEventSemaphore(). rtnVal = 0; } if (Verbose) printf("\nosdReleaseSemaphore : Rtn = %x\n", rtnVal); return(rtnVal); } //osdReleaseSemaphore() - end //Function - osdResetEventSemaphore - start //=========================================================================== // //Description: resets the event to the unhappened state // // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG osdResetEventSemaphore(SEMAPHORE_T semHandle) { semHandle = semHandle; return 0; } //osdResetEventSemaphore() - end //Function - osdSignalEventSemaphore - start //=========================================================================== // //Description: set this event to happened // // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG osdSignalEventSemaphore(SEMAPHORE_T semHandle) { return (uLONG) osdReleaseSemaphore(semHandle); } //osdSignalEventSemaphore() - end //Function - osdWaitForEventSemaphore - start //=========================================================================== // //Description: waits for an event semaphore to be signaled either forever // or until the number of milliseconds has expired // // // //Parameters: // //Return Value: 0 success // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG osdWaitForEventSemaphore(SEMAPHORE_T semHandle, uLONG timeout) { return osdRequestSemaphore(semHandle, timeout); } //osdWaitForEventSemaphore() - end //Function - osdCreateEventSemaphore() - start //=========================================================================== // //Description: // // This function creates an event semaphore to allow synchronization between // threads // // //Parameters: // //Return Value: // // NULL = Failure, unable to create a new semaphore // Non-zero = Success, handle to the newly created semaphore // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- SEMAPHORE_T osdCreateEventSemaphore() { SEMAPHORE_T rtnVal; rtnVal = privateCreateUnnamedSemaphore(1); if (Verbose) printf("\nosdCreateEventSemaphore : Rtn = %x", rtnVal); return(rtnVal); } //osdCreateEventSemaphore() - end //Function - osdCreateNamedEventSemaphore - start //=========================================================================== // // This function creates a named event semaphore to allow synchronization // between threads and processes // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- SEMAPHORE_T osdCreateNamedEventSemaphore(char *name) { char temp[MAX_SEM_NAME_LEN]; SEMAPHORE_T rtnVal; strcpy(temp, "/tmp/"); strcat(temp, name); rtnVal = privateCreateNamedSemaphore(temp, 1); if (Verbose) printf("\nosdCreateNamedEventSemaphore : Rtn = %x", rtnVal); return(rtnVal); } //osdCreateNamedEventSemaphore() - end raidutils-0.0.6.orig/raideng/sharmem.c0000664000175000000620000004470410044153332017555 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* File - SHARMEM.C */ /*****************************************************************************/ /* */ /*Description: */ /* */ /* */ /* */ /* */ /*Author: Bob Pasteur */ /*Date: */ /* */ /*Editors: */ /* */ /*Remarks: */ /* */ /* */ /*****************************************************************************/ /*Include Files -------------------------------------------------------------*/ #include #include #include #include #include #include #include #include #include /* Definitions - Defines & Constants ---------------------------------------*/ /* Definitions - Structure & Typedef ---------------------------------------*/ /* Variables - External ----------------------------------------------------*/ /* Variables - Global ------------------------------------------------------*/ static int BufferID = -1; static char *SharedMemoryPtr; extern uSHORT dsplyFlags; #define DSPLY_SHAR_MEM 0x0004 /*-------------------------------------------------------------------------*/ /* Function GetSharedMemory */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed Into This Function */ /* */ /* This Function Will Allocate The Shared Memory */ /* */ /* Return : Pointer To The Attached Shared Memory, 0 If Failure */ /*-------------------------------------------------------------------------*/ static char *GetSharedMemory(void) { struct shmid_ds shm_buff; uLONG TotalSize; char *Ptr; ShMemHdr *Header; Ptr = NULL; /* Calculate The Size We Need */ TotalSize = sizeof(DPTCE_MasterMod_C) * MaxCommModules * CommModuleMultiplier + sizeof(DPTCE_RemoteInEP_C) * MaxRemoteConnections + sizeof(DPTCE_InputEP_C) * MaxDirectInputConnections + sizeof(DPTCE_Base_C) * MaxGlobalLists + WorkingSize; if(TotalSize < MinAllocationSize) TotalSize = MinAllocationSize; /* Get The Shared Memory Segment */ BufferID = shmget(IPC_PRIVATE,(int)TotalSize, SHM_ALLRD | SHM_ALLWR | IPC_CREAT); /* If We Got The Segment, Try To Attach To It */ if(BufferID != -1) { Ptr = (char *)shmat(BufferID,0,0); /* The Attach Failed, So DeAllocate The Shared Memory */ if((int)Ptr == -1) { shmctl(BufferID,IPC_RMID,&shm_buff); BufferID = -1; } /* The Attach Was Successful, So Set Up The Memory Header And */ /* Set It Up As One Big Element In The List */ else { Header = (ShMemHdr *)Ptr; Header->Busy = 0; Header->Size = TotalSize; Header->FreeList = (ShMemElmt *)(&Header->FreeSpace); Header->FreeList->Prev = NULL; Header->FreeList->Next = NULL; Header->FreeList->Size = TotalSize - sizeof(ShMemElmt) - sizeof(ShMemHdr); } } return(Ptr); } /*-------------------------------------------------------------------------*/ /* Function FindBestFit */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* FreeList : List Of Elements To Be Searched */ /* Size : Size In Bytes To Be Searched For */ /* */ /* This Function Will Search The Passed In List For An Enty That Will Best */ /* Fit The Passed In Size */ /* */ /* Return : Pointer To The Best Fit Element Found, Still Linked Into The */ /* List */ /*-------------------------------------------------------------------------*/ static ShMemElmt *FindBestFit(ShMemElmt *FreeList,uLONG Size) { ShMemElmt *BestFit; BestFit = NULL; /* Search All Elements */ while(FreeList != NULL) { /* If The Size Asked For Is Exact, We Are Done */ if(FreeList->Size == Size) { BestFit = FreeList; break; } /* If The Size Of The List Element Is Greater Than Our Size, This Is */ /* A Posibility */ else if(FreeList->Size > Size) { /* If We Haven't Found Any Others Yet, Save Him Off And Move On */ if(BestFit == NULL) BestFit = FreeList; /* If We Have One Already, See If This One Is Better */ else { if((FreeList->Size < BestFit->Size)&& (FreeList->Size - Size < MinUnitAllocation)) BestFit = FreeList; } } FreeList = FreeList->Next; } return(BestFit); } /*-------------------------------------------------------------------------*/ /* Function RemoveFromList */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* Header : Pointer To The Main Memory Header */ /* BestFit : Pointer To The Element To Remove From The List */ /* Size : Number Of Bytes Being Asked For */ /* */ /* This Function */ /* */ /* Return : RNONE */ /*-------------------------------------------------------------------------*/ static void RemoveFromList(ShMemHdr *Header, ShMemElmt *BestFit, uLONG Size) { ShMemElmt *NewElement; char *Ptr; uLONG SizeLeft; /* If The Size Asked For Is only Minimally Smaller Than The Actual */ /* Size, Just Pull It From The List As Is */ if(BestFit->Size - Size < MinUnitAllocation + sizeof(ShMemElmt)) { /* This One Is The Head Of The List */ if(BestFit->Prev == NULL) { Header->FreeList = BestFit->Next; if(Header->FreeList != NULL) Header->FreeList->Prev = NULL; } /* Not The Head Of The List */ else { BestFit->Prev->Next = BestFit->Next; if(BestFit->Next != NULL) BestFit->Next->Prev = BestFit->Prev; } } /* The Size Being Asked For Is Much Smaller Than The Actual Size, */ /* So We Are Going To Break It Into Two Headers, One To Keep And */ /* One To Share */ else { if(Size < MinUnitAllocation) Size = MinUnitAllocation; /* Calculate The Remaing Size And Set Up The Size For The One */ /* We Are Releasing (BestFit) */ SizeLeft = BestFit->Size - Size - sizeof(ShMemElmt); BestFit->Size = Size; /* The NewElement Will Be The One We Keep In Our List, So Set It Up */ Ptr = (char *)BestFit + sizeof(ShMemElmt); NewElement = (ShMemElmt *)(Ptr + Size); NewElement->Size = SizeLeft; NewElement->Prev = BestFit->Prev; NewElement->Next = BestFit->Next; /* If This Is The First Element In The List, Bump It To The New Element */ if(Header->FreeList == BestFit) Header->FreeList = NewElement; } BestFit->Prev = BestFit->Next = NULL; } /*-------------------------------------------------------------------------*/ /* Function FreeSharedMemory */ /*-------------------------------------------------------------------------*/ /* There Are No Parameters Passed In To This Function */ /* */ /* This Function Will DeAllocate The Shared Memory Buffer */ /* */ /* Return : None */ /*-------------------------------------------------------------------------*/ void CommFreeSharedMemory(void) { struct shmid_ds shm_buff; /* Make Sure That It Was Allocated First */ if(BufferID != -1) { /* UnAttach The Memory If It Is Attached */ if(SharedMemoryPtr != NULL) shmdt(SharedMemoryPtr); /* Free The Segment */ shmctl(BufferID,IPC_RMID,&shm_buff); } SharedMemoryPtr = NULL; BufferID = -1; } /*-------------------------------------------------------------------------*/ /* Function AddToList */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* Header : Pointer To The Main Memory Header */ /* Element : Pointer To The Element To Be Added Back Into The List */ /* */ /* This Function Will Add An Element Into The Free List, Combining It With */ /* Another Element If Possible */ /* */ /* Return : NONE */ /*-------------------------------------------------------------------------*/ static void AddToList(ShMemHdr *Header, ShMemElmt *Element) { char *Ptr; ShMemElmt *FreeList; /* If The Free List Is Empty, Make Him The First And Exit */ FreeList = Header->FreeList; if(FreeList == NULL) { Header->FreeList = Element; } /* The List Is Not Empty, So First Find His Place In The List */ else { while(FreeList->Next != NULL) { if(FreeList > Element) break; FreeList = FreeList->Next; } /* This Element Will Insert Before Our Free List Element */ if(Element < FreeList) { /* If The FreeList Is The First Element In The List, Make The New Element */ /* The First Element In The List */ if(Header->FreeList == FreeList) Header->FreeList = Element; /* If These Elements Will Combine, Add FreeList Into The Element */ Ptr = (char *)Element; if((Ptr + Element->Size + sizeof(ShMemElmt)) == (char *)FreeList) { Element->Size += FreeList->Size + sizeof(ShMemElmt); Element->Next = FreeList->Next; Element->Prev = FreeList->Prev; } /* They Will Not Combine, So Insert The Element Before FreeList */ else { Element->Next = FreeList; Element->Prev = FreeList->Prev; if(Element->Prev != NULL) Element->Prev->Next = Element; FreeList->Prev = Element; } } /* This Element Will Insert After Our Free List Element */ else { /* If These Elements Will Combine, Add The Element Into FreeList */ Ptr = (char *)FreeList; if((Ptr + FreeList->Size + sizeof(ShMemElmt)) == (char *)Element) { FreeList->Size += Element->Size + sizeof(ShMemElmt); } /* They Will Not Combine, So Insert The Element After FreeList */ else { Element->Prev = FreeList; Element->Next = FreeList->Next; FreeList->Next = Element; if(Element->Next != NULL) Element->Next->Prev = Element; } } } } /*-------------------------------------------------------------------------*/ /* Function AllocBytes */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* Size : The Number Of Bytes To Allocate */ /* */ /* This Function Will Allocate Memory From A Shared Memory Pool */ /* */ /* Return : Pointer To The Shared Memory, NULL If Failure */ /*-------------------------------------------------------------------------*/ char *AllocBytes(uLONG Size) { char *Ptr; ShMemHdr *Header; ShMemElmt *FreeList; ShMemElmt *BestFit; Ptr = NULL; /*If Not Set Up, Go Set Up The Shared Memory Segment */ if(BufferID == -1) { SharedMemoryPtr = GetSharedMemory(); if(SharedMemoryPtr == NULL) return(NULL); } /* Grab The Shared Memory Header In The Shared Memory */ Header = (ShMemHdr *)SharedMemoryPtr; /* Wait For The Busy Flag To Go Down */ while(Header->Busy) ; Header->Busy = 1; /* Grab The Free List, And Go Find A Suitable Element */ FreeList = Header->FreeList; BestFit = FindBestFit(FreeList,Size); /* If We Found One, Remove It From The List */ if(BestFit != NULL) { RemoveFromList(Header,BestFit,Size); Ptr = (char *)BestFit + sizeof(ShMemElmt); } Header->Busy = 0; #ifdef __INC_SCREEN_IO if(dsplyFlags & DSPLY_SHAR_MEM) printf("AllocBytes : %lx At Address %08lxh \n",Size,Ptr); #endif return(Ptr); } /*-------------------------------------------------------------------------*/ /* Function FreeBytes */ /*-------------------------------------------------------------------------*/ /* The Parameters Passed In To This Function Are : */ /* MemPtr : Pointer To The Shared Memory To Be Freed */ /* */ /* This Function Will Return An Allocated Element Of Shared Memory Back */ /* To The Pool */ /* */ /* Return : NONE */ /*-------------------------------------------------------------------------*/ void FreeBytes(char *MemPtr) { ShMemHdr *Header; ShMemElmt *Element; Header = (ShMemHdr *)SharedMemoryPtr; while(Header->Busy) ; Header->Busy = 1; Element = (ShMemElmt *)(MemPtr - sizeof(ShMemElmt)); #ifdef __INC_SCREEN_IO if(dsplyFlags & DSPLY_SHAR_MEM) printf("FreeBytes : %lx At Address %08lxh \n", Element->Size,MemPtr); #endif /* Do A Simple Check To See If This Element Is Within Our Memory Range */ if((MemPtr > SharedMemoryPtr)&&(MemPtr - SharedMemoryPtr < Header->Size)) AddToList(Header,Element); Header->Busy = 0; } raidutils-0.0.6.orig/raideng/stamp.hpp0000664000175000000620000001057410044153312017606 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __STAMP_HPP #define __STAMP_HPP //File - STAMP.HPP //*************************************************************************** // //Description: // // This file contains the data structures used to stamp a drive //with a SCSI address. These data structures are used to determine //if drives have been moved. // //Author: //Date: // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- //Definitions - Structure & Typedef ----------------------------------------- // flags - bit definitions // 1=This stamp address entry is valid const uCHAR FLG_STAMP_VALID = 0x01; // 1 = Stripe size must be a multiple of the underlying stripe size const uCHAR FLG_STAMP_SS_MULTIPLE = 0x02; // 1 = Optimize for capacity // 0 = Optimize for performance const uCHAR FLG_STAMP_CAPACITY_OPT = 0x04; struct stampAddr_S { uCHAR hbaChan; // Bits 7-3 = HBA # (slot based) // Bits 2-0 = SCSI Channel (Bus) # uCHAR idLUN; // Bits 7-3 = SCSI ID # // Bits 2-0 = SCSI LUN uCHAR sequenceNum; // Component sequence # uCHAR flags; // Miscellaneous flags //---------- Portability Additions ----------- in sp_stamp.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; struct compStamp_S { uLONG stripeSize; // Stripe size used on this component uLONG numStripes; // # of stripes used on this component //---------- Portability Additions ----------- in sp_stamp.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; // Unique # indicating a valid DPT SW stamp exists const uLONG DPT_SW_STAMP_ID = 0xc3491be5; // Size of the DPT SW address stamp buffer (in bytes) const uSHORT STAMP_BUFFER_SIZE = 48; // DPT software stamp structure // This structure is written to the reserve block of all HBA // physical devices in a system. This structure should be // STAMP_BUFFER_SIZE bytes in size. struct swStamp_S { uLONG id; // ID indicating a valid stamp uLONG sysStamp; // Random # used to identify a machine stampAddr_S phyStamp; // HBA physical device stamp stampAddr_S fwStamp; // FW logical device stamp stampAddr_S swStamp; // SW logical device stamp compStamp_S phyComp; // HBA physical component info compStamp_S fwComp; // FW logical component info uCHAR filler[12]; // Unused bytes //---------- Portability Additions ----------- in sp_stamp.cpp #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); #endif // DPT PORTABLE //-------------------------------------------- }; #endif raidutils-0.0.6.orig/raideng/stat_log.cpp0000664000175000000620000001013210044153310020255 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - DSTATLOG.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the dptDevStatLog_C //and dptHBAstatLog_C classes. // //Author: Doug Anderson //Date: 6/12/93 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "stats.h" #include "stat_log.hpp" //Function - dptDevStatLog_C::reverseParam() - start //=========================================================================== // //Description: // // This function is called from reverseAllParams() to provide an //opportunity to reverse the data portion of the log parameters. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void dptDevStatLog_C::reverseParam() { uSHORT i; DPT_UNALIGNED uLONG *stat_P; // Determine the # of uLONG statistics for this parameter uSHORT numStats = 0; switch (code()) { case 1: numStats = sizeof(readStats_S)>>2; break; case 3: numStats = sizeof(writeStats_S)>>2; break; case 2: case 4: numStats = sizeof(rwSizeStats_S)>>2; break; case 5: numStats = sizeof(miscDevStats_S)>>2; break; case 6: numStats = sizeof(rwSizeStat2_S)>>2; break; case 7: numStats = sizeof(rwSizeStat2_S)>>2; break; } // Get a pointer to the statistics data stat_P = (uLONG *) data_P(); for (i=0;i>2; // Get a pointer to the statistics data stat_P = (uLONG *) data_P(); for (i=0;i /*Function - swap2 - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function swaps the MSB & LSB of a two byte variable. */ /* */ /*Parameters: */ /* */ /*Return Value: */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /* */ /*---------------------------------------------------------------------------*/ uSHORT osdSwap2(uSHORT *inShort) { #if defined ( _DPT_BIG_ENDIAN ) # if (defined ( _DPT_STRICT_ALIGN ) ) uSHORT i; i = (unsigned short)*((unsigned char *)inShort); i <<= 8; i |= (unsigned short)*(((unsigned char *)inShort)+1); return (i); # else return(*inShort); # endif #else uSHORT i; i = *inShort & 0x0ff; *inShort >>= 8; *inShort |= (i << 8); return(*inShort); #endif } /*swap2() - end */ /*Function - swap4 - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function reverses the byte ordering of a four byte variable. */ /* */ /*Parameters: */ /* */ /*Return Value: */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /* */ /*---------------------------------------------------------------------------*/ uLONG osdSwap4(uLONG *inLong) { #if defined ( _DPT_BIG_ENDIAN ) # if (defined ( _DPT_STRICT_ALIGN )) uLONG i; i = (unsigned long)*((unsigned char *)inLong) << 24; i |= (unsigned long)*(((unsigned char *)inLong)+1) << 16; i |= (unsigned long)*(((unsigned char *)inLong)+2) << 8; i |= (unsigned long)*(((unsigned char *)inLong)+3); return (i); # else return(*inLong); # endif #else char src[4], *dst; int i; *(uLONG *)src = *inLong; dst = (char *)inLong; for(i = 0; i < 4; ++i) { dst[i] = src[3 - i]; } return(*inLong); #endif } /*swap4() - end */ uLONG osdSwap3(uLONG *inLong) { #if defined ( _DPT_BIG_ENDIAN ) # if (defined ( _DPT_STRICT_ALIGN )) uLONG i; i = (unsigned long)*(((unsigned char *)inLong)+0) << 16; i |= (unsigned long)*(((unsigned char *)inLong)+1) << 8; i |= (unsigned long)*(((unsigned char *)inLong)+2); return (i); # else return(*inLong); # endif #else return((osdSwap4(inLong) >> 8)); #endif } /*Function - trueSwap2 - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function ALWAYS swaps the MSB & LSB of a two byte variable. */ /* */ /*Parameters: */ /* */ /*Return Value: */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /* */ /*---------------------------------------------------------------------------*/ uSHORT trueSwap2(uSHORT *inShort) { uSHORT outShort; char *src, *dst; int i; src = (char *)inShort; dst = (char *)&outShort; dst[0] = src[1]; dst[1] = src[0]; src[0] = dst[0]; src[1] = dst[1]; return outShort; } /* trueSwap2() - end */ /*Function - trueSwap4 - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function ALWAYS reverses the byte ordering of a four byte variable. */ /* */ /*Parameters: */ /* */ /*Return Value: */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /* */ /*---------------------------------------------------------------------------*/ uLONG trueSwap4(uLONG *inLong) { uLONG outLong; char *src, *dst; int i; src = (char *)inLong; dst = (char *)&outLong; for(i = 0; i < 4; ++i) { dst[i] = src[3 - i]; } for(i = 0; i < 4; ++i) { src[i] = dst[i]; } return outLong; } /* trueSwap4() - end */ //Function - netSwap4() - start //=========================================================================== // //Description: // // This function ensures that the input four byte variable is returned // in DPT network order (little-endian). On big-endian machines this // function will swap the four byte variable. On little-endian machines // this function will return the input value. // //Parameters: // // val = 4 byte variable to be byte reversed. // //Return Value: // // The variable in network order. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- uLONG netSwap4(uLONG val) { #if defined (_DPT_BIG_ENDIAN) // we need to swap the value and return it uSHORT wd0, wd1; wd0 = (uSHORT) val; wd1 = (uSHORT) (val >> 16); wd0 = (wd0 >> 8) | (wd0 << 8); wd1 = (wd1 >> 8) | (wd1 << 8); return (((uLONG)wd0 << 16) | wd1); #else // just return the value for little-endian machines return val; #endif // big_endian } //netSwap4() - end raidutils-0.0.6.orig/raideng/threads.cpp0000664000175000000620000000716010044153333020107 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - THREADS.C //*************************************************************************** // //Description: // // This file contains function definitions to work with threads //in an OS independent manner. // //Author: //Date: // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include #include #include //#include /* exit, Thread...., delay */ typedef void (*threadFn_T) (void *); //Function - osdSwitchThreads() - start //=========================================================================== // //Description: // // This function switches control to the task switcher in a non- //preemptive multi-tasking operating system. A call to this function //will give other threads a chance to execute. // //Parameters: // //Return Value: // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- void osdSwitchThreads() { // ThreadSwitch(); } //Function - osdStartThread() - start //=========================================================================== // //Description: // // This function starts the specified thread function. // //Parameters: // // fn_P = Pointer to the thread function // param_P = Pointer to the thread function input parameter structure // //Return Value: // // 0 = Successfull // non-zero = Failure, unable to start the thread // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- uLONG osdStartThread(void *fn_P,void *param_P) { uLONG retVal=0; int P_ID; // Call the thread function if((P_ID = fork()) == -1) retVal=1; // If The PID Is 0, This Is The Child, So Go Process The Connection else if(!P_ID) { alarm(60); ((threadFn_T)fn_P)(param_P); exit(0); } return (retVal); } //osdStartThread() - end raidutils-0.0.6.orig/raideng/unreslvd.cpp0000664000175000000620000000360410044153332020315 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* fake _main function for Intek C++ pre-processor */ #include extern "C" { char *__nw__FUi(int size) { char *p; p = (char *)malloc(size); return(p); } char __dl__FPv(char *p) { free(p); return(1); } int __pure_virtual_called() { return(0); } } raidutils-0.0.6.orig/raidutil/0002775000175000000620000000000010333777643016174 5ustar bapstaff00000000000000raidutils-0.0.6.orig/raidutil/Makefile.am0000664000175000000620000000135410175141263020214 0ustar bapstaff00000000000000bin_PROGRAMS=raidutil raidutil_SOURCES=alarm.cpp bufiolsb.c cmdlist.cpp command.cpp config.cpp creatrad.cpp deletrad.cpp dynsize.cpp engiface.cpp eventlog.cpp expand.cpp flash.cpp flashmem.cpp forcest.cpp id_list.cpp intlist.cpp listdev.cpp lzssdon.cpp lzstrbuf.cpp modnvram.cpp namarray.cpp nvrambit.cpp parsargv.cpp parser.cpp parserr.cpp raidutil.cpp rawdata.cpp rdutlosd.cpp rmwflash.cpp rstnvram.cpp scsilist.cpp setcache.cpp setrate.cpp setspeed.cpp showinq.cpp status.cpp strlist.cpp taskctrl.cpp uartdmp.cpp usage.cpp zap.cpp setscfg.cpp segment.cpp swap_em.c raidutil_CPPFLAGS=-O3 -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -Dtrue=1 -Dfalse=0 -DHORIZONTAL -DNEW_RSC_MGR -DNEW_RSC_HDR -D_DPT_FLASH -I../include raidutil_LDADD=../lib/libraidutil.la raidutils-0.0.6.orig/raidutil/Makefile.in0000664000175000000620000031346610175141471020240 0ustar bapstaff00000000000000# Makefile.in generated by automake 1.9.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ SOURCES = $(raidutil_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c 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@ bin_PROGRAMS = raidutil$(EXEEXT) subdir = raidutil DIST_COMMON = $(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 = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_raidutil_OBJECTS = raidutil-alarm.$(OBJEXT) \ raidutil-bufiolsb.$(OBJEXT) raidutil-cmdlist.$(OBJEXT) \ raidutil-command.$(OBJEXT) raidutil-config.$(OBJEXT) \ raidutil-creatrad.$(OBJEXT) raidutil-deletrad.$(OBJEXT) \ raidutil-dynsize.$(OBJEXT) raidutil-engiface.$(OBJEXT) \ raidutil-eventlog.$(OBJEXT) raidutil-expand.$(OBJEXT) \ raidutil-flash.$(OBJEXT) raidutil-flashmem.$(OBJEXT) \ raidutil-forcest.$(OBJEXT) raidutil-id_list.$(OBJEXT) \ raidutil-intlist.$(OBJEXT) raidutil-listdev.$(OBJEXT) \ raidutil-lzssdon.$(OBJEXT) raidutil-lzstrbuf.$(OBJEXT) \ raidutil-modnvram.$(OBJEXT) raidutil-namarray.$(OBJEXT) \ raidutil-nvrambit.$(OBJEXT) raidutil-parsargv.$(OBJEXT) \ raidutil-parser.$(OBJEXT) raidutil-parserr.$(OBJEXT) \ raidutil-raidutil.$(OBJEXT) raidutil-rawdata.$(OBJEXT) \ raidutil-rdutlosd.$(OBJEXT) raidutil-rmwflash.$(OBJEXT) \ raidutil-rstnvram.$(OBJEXT) raidutil-scsilist.$(OBJEXT) \ raidutil-setcache.$(OBJEXT) raidutil-setrate.$(OBJEXT) \ raidutil-setspeed.$(OBJEXT) raidutil-showinq.$(OBJEXT) \ raidutil-status.$(OBJEXT) raidutil-strlist.$(OBJEXT) \ raidutil-taskctrl.$(OBJEXT) raidutil-uartdmp.$(OBJEXT) \ raidutil-usage.$(OBJEXT) raidutil-zap.$(OBJEXT) \ raidutil-setscfg.$(OBJEXT) raidutil-segment.$(OBJEXT) \ raidutil-swap_em.$(OBJEXT) raidutil_OBJECTS = $(am_raidutil_OBJECTS) raidutil_DEPENDENCIES = ../lib/libraidutil.la DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(raidutil_SOURCES) DIST_SOURCES = $(raidutil_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ raidutil_SOURCES = alarm.cpp bufiolsb.c cmdlist.cpp command.cpp config.cpp creatrad.cpp deletrad.cpp dynsize.cpp engiface.cpp eventlog.cpp expand.cpp flash.cpp flashmem.cpp forcest.cpp id_list.cpp intlist.cpp listdev.cpp lzssdon.cpp lzstrbuf.cpp modnvram.cpp namarray.cpp nvrambit.cpp parsargv.cpp parser.cpp parserr.cpp raidutil.cpp rawdata.cpp rdutlosd.cpp rmwflash.cpp rstnvram.cpp scsilist.cpp setcache.cpp setrate.cpp setspeed.cpp showinq.cpp status.cpp strlist.cpp taskctrl.cpp uartdmp.cpp usage.cpp zap.cpp setscfg.cpp segment.cpp swap_em.c raidutil_CPPFLAGS = -O3 -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -Dtrue=1 -Dfalse=0 -DHORIZONTAL -DNEW_RSC_MGR -DNEW_RSC_HDR -D_DPT_FLASH -I../include raidutil_LDADD = ../lib/libraidutil.la all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu raidutil/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu raidutil/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done raidutil$(EXEEXT): $(raidutil_OBJECTS) $(raidutil_DEPENDENCIES) @rm -f raidutil$(EXEEXT) $(CXXLINK) $(raidutil_LDFLAGS) $(raidutil_OBJECTS) $(raidutil_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-alarm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-bufiolsb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-cmdlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-command.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-creatrad.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-deletrad.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-dynsize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-engiface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-eventlog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-expand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-flash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-flashmem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-forcest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-id_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-intlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-listdev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-lzssdon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-lzstrbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-modnvram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-namarray.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-nvrambit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-parsargv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-parserr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-raidutil.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-rawdata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-rdutlosd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-rmwflash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-rstnvram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-scsilist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-segment.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-setcache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-setrate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-setscfg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-setspeed.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-showinq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-status.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-strlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-swap_em.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-taskctrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-uartdmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-usage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raidutil-zap.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< raidutil-bufiolsb.o: bufiolsb.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raidutil-bufiolsb.o -MD -MP -MF "$(DEPDIR)/raidutil-bufiolsb.Tpo" -c -o raidutil-bufiolsb.o `test -f 'bufiolsb.c' || echo '$(srcdir)/'`bufiolsb.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raidutil-bufiolsb.Tpo" "$(DEPDIR)/raidutil-bufiolsb.Po"; else rm -f "$(DEPDIR)/raidutil-bufiolsb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bufiolsb.c' object='raidutil-bufiolsb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raidutil-bufiolsb.o `test -f 'bufiolsb.c' || echo '$(srcdir)/'`bufiolsb.c raidutil-bufiolsb.obj: bufiolsb.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raidutil-bufiolsb.obj -MD -MP -MF "$(DEPDIR)/raidutil-bufiolsb.Tpo" -c -o raidutil-bufiolsb.obj `if test -f 'bufiolsb.c'; then $(CYGPATH_W) 'bufiolsb.c'; else $(CYGPATH_W) '$(srcdir)/bufiolsb.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raidutil-bufiolsb.Tpo" "$(DEPDIR)/raidutil-bufiolsb.Po"; else rm -f "$(DEPDIR)/raidutil-bufiolsb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bufiolsb.c' object='raidutil-bufiolsb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raidutil-bufiolsb.obj `if test -f 'bufiolsb.c'; then $(CYGPATH_W) 'bufiolsb.c'; else $(CYGPATH_W) '$(srcdir)/bufiolsb.c'; fi` raidutil-swap_em.o: swap_em.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raidutil-swap_em.o -MD -MP -MF "$(DEPDIR)/raidutil-swap_em.Tpo" -c -o raidutil-swap_em.o `test -f 'swap_em.c' || echo '$(srcdir)/'`swap_em.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raidutil-swap_em.Tpo" "$(DEPDIR)/raidutil-swap_em.Po"; else rm -f "$(DEPDIR)/raidutil-swap_em.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='swap_em.c' object='raidutil-swap_em.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raidutil-swap_em.o `test -f 'swap_em.c' || echo '$(srcdir)/'`swap_em.c raidutil-swap_em.obj: swap_em.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raidutil-swap_em.obj -MD -MP -MF "$(DEPDIR)/raidutil-swap_em.Tpo" -c -o raidutil-swap_em.obj `if test -f 'swap_em.c'; then $(CYGPATH_W) 'swap_em.c'; else $(CYGPATH_W) '$(srcdir)/swap_em.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/raidutil-swap_em.Tpo" "$(DEPDIR)/raidutil-swap_em.Po"; else rm -f "$(DEPDIR)/raidutil-swap_em.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='swap_em.c' object='raidutil-swap_em.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raidutil-swap_em.obj `if test -f 'swap_em.c'; then $(CYGPATH_W) 'swap_em.c'; else $(CYGPATH_W) '$(srcdir)/swap_em.c'; fi` .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< raidutil-alarm.o: alarm.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-alarm.o -MD -MP -MF "$(DEPDIR)/raidutil-alarm.Tpo" -c -o raidutil-alarm.o `test -f 'alarm.cpp' || echo '$(srcdir)/'`alarm.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-alarm.Tpo" "$(DEPDIR)/raidutil-alarm.Po"; else rm -f "$(DEPDIR)/raidutil-alarm.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='alarm.cpp' object='raidutil-alarm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-alarm.o `test -f 'alarm.cpp' || echo '$(srcdir)/'`alarm.cpp raidutil-alarm.obj: alarm.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-alarm.obj -MD -MP -MF "$(DEPDIR)/raidutil-alarm.Tpo" -c -o raidutil-alarm.obj `if test -f 'alarm.cpp'; then $(CYGPATH_W) 'alarm.cpp'; else $(CYGPATH_W) '$(srcdir)/alarm.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-alarm.Tpo" "$(DEPDIR)/raidutil-alarm.Po"; else rm -f "$(DEPDIR)/raidutil-alarm.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='alarm.cpp' object='raidutil-alarm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-alarm.obj `if test -f 'alarm.cpp'; then $(CYGPATH_W) 'alarm.cpp'; else $(CYGPATH_W) '$(srcdir)/alarm.cpp'; fi` raidutil-cmdlist.o: cmdlist.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-cmdlist.o -MD -MP -MF "$(DEPDIR)/raidutil-cmdlist.Tpo" -c -o raidutil-cmdlist.o `test -f 'cmdlist.cpp' || echo '$(srcdir)/'`cmdlist.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-cmdlist.Tpo" "$(DEPDIR)/raidutil-cmdlist.Po"; else rm -f "$(DEPDIR)/raidutil-cmdlist.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cmdlist.cpp' object='raidutil-cmdlist.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-cmdlist.o `test -f 'cmdlist.cpp' || echo '$(srcdir)/'`cmdlist.cpp raidutil-cmdlist.obj: cmdlist.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-cmdlist.obj -MD -MP -MF "$(DEPDIR)/raidutil-cmdlist.Tpo" -c -o raidutil-cmdlist.obj `if test -f 'cmdlist.cpp'; then $(CYGPATH_W) 'cmdlist.cpp'; else $(CYGPATH_W) '$(srcdir)/cmdlist.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-cmdlist.Tpo" "$(DEPDIR)/raidutil-cmdlist.Po"; else rm -f "$(DEPDIR)/raidutil-cmdlist.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cmdlist.cpp' object='raidutil-cmdlist.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-cmdlist.obj `if test -f 'cmdlist.cpp'; then $(CYGPATH_W) 'cmdlist.cpp'; else $(CYGPATH_W) '$(srcdir)/cmdlist.cpp'; fi` raidutil-command.o: command.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-command.o -MD -MP -MF "$(DEPDIR)/raidutil-command.Tpo" -c -o raidutil-command.o `test -f 'command.cpp' || echo '$(srcdir)/'`command.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-command.Tpo" "$(DEPDIR)/raidutil-command.Po"; else rm -f "$(DEPDIR)/raidutil-command.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='command.cpp' object='raidutil-command.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-command.o `test -f 'command.cpp' || echo '$(srcdir)/'`command.cpp raidutil-command.obj: command.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-command.obj -MD -MP -MF "$(DEPDIR)/raidutil-command.Tpo" -c -o raidutil-command.obj `if test -f 'command.cpp'; then $(CYGPATH_W) 'command.cpp'; else $(CYGPATH_W) '$(srcdir)/command.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-command.Tpo" "$(DEPDIR)/raidutil-command.Po"; else rm -f "$(DEPDIR)/raidutil-command.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='command.cpp' object='raidutil-command.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-command.obj `if test -f 'command.cpp'; then $(CYGPATH_W) 'command.cpp'; else $(CYGPATH_W) '$(srcdir)/command.cpp'; fi` raidutil-config.o: config.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-config.o -MD -MP -MF "$(DEPDIR)/raidutil-config.Tpo" -c -o raidutil-config.o `test -f 'config.cpp' || echo '$(srcdir)/'`config.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-config.Tpo" "$(DEPDIR)/raidutil-config.Po"; else rm -f "$(DEPDIR)/raidutil-config.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='config.cpp' object='raidutil-config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-config.o `test -f 'config.cpp' || echo '$(srcdir)/'`config.cpp raidutil-config.obj: config.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-config.obj -MD -MP -MF "$(DEPDIR)/raidutil-config.Tpo" -c -o raidutil-config.obj `if test -f 'config.cpp'; then $(CYGPATH_W) 'config.cpp'; else $(CYGPATH_W) '$(srcdir)/config.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-config.Tpo" "$(DEPDIR)/raidutil-config.Po"; else rm -f "$(DEPDIR)/raidutil-config.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='config.cpp' object='raidutil-config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-config.obj `if test -f 'config.cpp'; then $(CYGPATH_W) 'config.cpp'; else $(CYGPATH_W) '$(srcdir)/config.cpp'; fi` raidutil-creatrad.o: creatrad.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-creatrad.o -MD -MP -MF "$(DEPDIR)/raidutil-creatrad.Tpo" -c -o raidutil-creatrad.o `test -f 'creatrad.cpp' || echo '$(srcdir)/'`creatrad.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-creatrad.Tpo" "$(DEPDIR)/raidutil-creatrad.Po"; else rm -f "$(DEPDIR)/raidutil-creatrad.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='creatrad.cpp' object='raidutil-creatrad.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-creatrad.o `test -f 'creatrad.cpp' || echo '$(srcdir)/'`creatrad.cpp raidutil-creatrad.obj: creatrad.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-creatrad.obj -MD -MP -MF "$(DEPDIR)/raidutil-creatrad.Tpo" -c -o raidutil-creatrad.obj `if test -f 'creatrad.cpp'; then $(CYGPATH_W) 'creatrad.cpp'; else $(CYGPATH_W) '$(srcdir)/creatrad.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-creatrad.Tpo" "$(DEPDIR)/raidutil-creatrad.Po"; else rm -f "$(DEPDIR)/raidutil-creatrad.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='creatrad.cpp' object='raidutil-creatrad.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-creatrad.obj `if test -f 'creatrad.cpp'; then $(CYGPATH_W) 'creatrad.cpp'; else $(CYGPATH_W) '$(srcdir)/creatrad.cpp'; fi` raidutil-deletrad.o: deletrad.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-deletrad.o -MD -MP -MF "$(DEPDIR)/raidutil-deletrad.Tpo" -c -o raidutil-deletrad.o `test -f 'deletrad.cpp' || echo '$(srcdir)/'`deletrad.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-deletrad.Tpo" "$(DEPDIR)/raidutil-deletrad.Po"; else rm -f "$(DEPDIR)/raidutil-deletrad.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='deletrad.cpp' object='raidutil-deletrad.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-deletrad.o `test -f 'deletrad.cpp' || echo '$(srcdir)/'`deletrad.cpp raidutil-deletrad.obj: deletrad.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-deletrad.obj -MD -MP -MF "$(DEPDIR)/raidutil-deletrad.Tpo" -c -o raidutil-deletrad.obj `if test -f 'deletrad.cpp'; then $(CYGPATH_W) 'deletrad.cpp'; else $(CYGPATH_W) '$(srcdir)/deletrad.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-deletrad.Tpo" "$(DEPDIR)/raidutil-deletrad.Po"; else rm -f "$(DEPDIR)/raidutil-deletrad.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='deletrad.cpp' object='raidutil-deletrad.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-deletrad.obj `if test -f 'deletrad.cpp'; then $(CYGPATH_W) 'deletrad.cpp'; else $(CYGPATH_W) '$(srcdir)/deletrad.cpp'; fi` raidutil-dynsize.o: dynsize.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-dynsize.o -MD -MP -MF "$(DEPDIR)/raidutil-dynsize.Tpo" -c -o raidutil-dynsize.o `test -f 'dynsize.cpp' || echo '$(srcdir)/'`dynsize.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-dynsize.Tpo" "$(DEPDIR)/raidutil-dynsize.Po"; else rm -f "$(DEPDIR)/raidutil-dynsize.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dynsize.cpp' object='raidutil-dynsize.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-dynsize.o `test -f 'dynsize.cpp' || echo '$(srcdir)/'`dynsize.cpp raidutil-dynsize.obj: dynsize.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-dynsize.obj -MD -MP -MF "$(DEPDIR)/raidutil-dynsize.Tpo" -c -o raidutil-dynsize.obj `if test -f 'dynsize.cpp'; then $(CYGPATH_W) 'dynsize.cpp'; else $(CYGPATH_W) '$(srcdir)/dynsize.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-dynsize.Tpo" "$(DEPDIR)/raidutil-dynsize.Po"; else rm -f "$(DEPDIR)/raidutil-dynsize.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dynsize.cpp' object='raidutil-dynsize.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-dynsize.obj `if test -f 'dynsize.cpp'; then $(CYGPATH_W) 'dynsize.cpp'; else $(CYGPATH_W) '$(srcdir)/dynsize.cpp'; fi` raidutil-engiface.o: engiface.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-engiface.o -MD -MP -MF "$(DEPDIR)/raidutil-engiface.Tpo" -c -o raidutil-engiface.o `test -f 'engiface.cpp' || echo '$(srcdir)/'`engiface.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-engiface.Tpo" "$(DEPDIR)/raidutil-engiface.Po"; else rm -f "$(DEPDIR)/raidutil-engiface.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='engiface.cpp' object='raidutil-engiface.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-engiface.o `test -f 'engiface.cpp' || echo '$(srcdir)/'`engiface.cpp raidutil-engiface.obj: engiface.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-engiface.obj -MD -MP -MF "$(DEPDIR)/raidutil-engiface.Tpo" -c -o raidutil-engiface.obj `if test -f 'engiface.cpp'; then $(CYGPATH_W) 'engiface.cpp'; else $(CYGPATH_W) '$(srcdir)/engiface.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-engiface.Tpo" "$(DEPDIR)/raidutil-engiface.Po"; else rm -f "$(DEPDIR)/raidutil-engiface.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='engiface.cpp' object='raidutil-engiface.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-engiface.obj `if test -f 'engiface.cpp'; then $(CYGPATH_W) 'engiface.cpp'; else $(CYGPATH_W) '$(srcdir)/engiface.cpp'; fi` raidutil-eventlog.o: eventlog.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-eventlog.o -MD -MP -MF "$(DEPDIR)/raidutil-eventlog.Tpo" -c -o raidutil-eventlog.o `test -f 'eventlog.cpp' || echo '$(srcdir)/'`eventlog.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-eventlog.Tpo" "$(DEPDIR)/raidutil-eventlog.Po"; else rm -f "$(DEPDIR)/raidutil-eventlog.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='eventlog.cpp' object='raidutil-eventlog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-eventlog.o `test -f 'eventlog.cpp' || echo '$(srcdir)/'`eventlog.cpp raidutil-eventlog.obj: eventlog.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-eventlog.obj -MD -MP -MF "$(DEPDIR)/raidutil-eventlog.Tpo" -c -o raidutil-eventlog.obj `if test -f 'eventlog.cpp'; then $(CYGPATH_W) 'eventlog.cpp'; else $(CYGPATH_W) '$(srcdir)/eventlog.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-eventlog.Tpo" "$(DEPDIR)/raidutil-eventlog.Po"; else rm -f "$(DEPDIR)/raidutil-eventlog.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='eventlog.cpp' object='raidutil-eventlog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-eventlog.obj `if test -f 'eventlog.cpp'; then $(CYGPATH_W) 'eventlog.cpp'; else $(CYGPATH_W) '$(srcdir)/eventlog.cpp'; fi` raidutil-expand.o: expand.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-expand.o -MD -MP -MF "$(DEPDIR)/raidutil-expand.Tpo" -c -o raidutil-expand.o `test -f 'expand.cpp' || echo '$(srcdir)/'`expand.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-expand.Tpo" "$(DEPDIR)/raidutil-expand.Po"; else rm -f "$(DEPDIR)/raidutil-expand.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='expand.cpp' object='raidutil-expand.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-expand.o `test -f 'expand.cpp' || echo '$(srcdir)/'`expand.cpp raidutil-expand.obj: expand.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-expand.obj -MD -MP -MF "$(DEPDIR)/raidutil-expand.Tpo" -c -o raidutil-expand.obj `if test -f 'expand.cpp'; then $(CYGPATH_W) 'expand.cpp'; else $(CYGPATH_W) '$(srcdir)/expand.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-expand.Tpo" "$(DEPDIR)/raidutil-expand.Po"; else rm -f "$(DEPDIR)/raidutil-expand.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='expand.cpp' object='raidutil-expand.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-expand.obj `if test -f 'expand.cpp'; then $(CYGPATH_W) 'expand.cpp'; else $(CYGPATH_W) '$(srcdir)/expand.cpp'; fi` raidutil-flash.o: flash.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-flash.o -MD -MP -MF "$(DEPDIR)/raidutil-flash.Tpo" -c -o raidutil-flash.o `test -f 'flash.cpp' || echo '$(srcdir)/'`flash.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-flash.Tpo" "$(DEPDIR)/raidutil-flash.Po"; else rm -f "$(DEPDIR)/raidutil-flash.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='flash.cpp' object='raidutil-flash.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-flash.o `test -f 'flash.cpp' || echo '$(srcdir)/'`flash.cpp raidutil-flash.obj: flash.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-flash.obj -MD -MP -MF "$(DEPDIR)/raidutil-flash.Tpo" -c -o raidutil-flash.obj `if test -f 'flash.cpp'; then $(CYGPATH_W) 'flash.cpp'; else $(CYGPATH_W) '$(srcdir)/flash.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-flash.Tpo" "$(DEPDIR)/raidutil-flash.Po"; else rm -f "$(DEPDIR)/raidutil-flash.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='flash.cpp' object='raidutil-flash.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-flash.obj `if test -f 'flash.cpp'; then $(CYGPATH_W) 'flash.cpp'; else $(CYGPATH_W) '$(srcdir)/flash.cpp'; fi` raidutil-flashmem.o: flashmem.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-flashmem.o -MD -MP -MF "$(DEPDIR)/raidutil-flashmem.Tpo" -c -o raidutil-flashmem.o `test -f 'flashmem.cpp' || echo '$(srcdir)/'`flashmem.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-flashmem.Tpo" "$(DEPDIR)/raidutil-flashmem.Po"; else rm -f "$(DEPDIR)/raidutil-flashmem.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='flashmem.cpp' object='raidutil-flashmem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-flashmem.o `test -f 'flashmem.cpp' || echo '$(srcdir)/'`flashmem.cpp raidutil-flashmem.obj: flashmem.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-flashmem.obj -MD -MP -MF "$(DEPDIR)/raidutil-flashmem.Tpo" -c -o raidutil-flashmem.obj `if test -f 'flashmem.cpp'; then $(CYGPATH_W) 'flashmem.cpp'; else $(CYGPATH_W) '$(srcdir)/flashmem.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-flashmem.Tpo" "$(DEPDIR)/raidutil-flashmem.Po"; else rm -f "$(DEPDIR)/raidutil-flashmem.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='flashmem.cpp' object='raidutil-flashmem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-flashmem.obj `if test -f 'flashmem.cpp'; then $(CYGPATH_W) 'flashmem.cpp'; else $(CYGPATH_W) '$(srcdir)/flashmem.cpp'; fi` raidutil-forcest.o: forcest.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-forcest.o -MD -MP -MF "$(DEPDIR)/raidutil-forcest.Tpo" -c -o raidutil-forcest.o `test -f 'forcest.cpp' || echo '$(srcdir)/'`forcest.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-forcest.Tpo" "$(DEPDIR)/raidutil-forcest.Po"; else rm -f "$(DEPDIR)/raidutil-forcest.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='forcest.cpp' object='raidutil-forcest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-forcest.o `test -f 'forcest.cpp' || echo '$(srcdir)/'`forcest.cpp raidutil-forcest.obj: forcest.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-forcest.obj -MD -MP -MF "$(DEPDIR)/raidutil-forcest.Tpo" -c -o raidutil-forcest.obj `if test -f 'forcest.cpp'; then $(CYGPATH_W) 'forcest.cpp'; else $(CYGPATH_W) '$(srcdir)/forcest.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-forcest.Tpo" "$(DEPDIR)/raidutil-forcest.Po"; else rm -f "$(DEPDIR)/raidutil-forcest.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='forcest.cpp' object='raidutil-forcest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-forcest.obj `if test -f 'forcest.cpp'; then $(CYGPATH_W) 'forcest.cpp'; else $(CYGPATH_W) '$(srcdir)/forcest.cpp'; fi` raidutil-id_list.o: id_list.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-id_list.o -MD -MP -MF "$(DEPDIR)/raidutil-id_list.Tpo" -c -o raidutil-id_list.o `test -f 'id_list.cpp' || echo '$(srcdir)/'`id_list.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-id_list.Tpo" "$(DEPDIR)/raidutil-id_list.Po"; else rm -f "$(DEPDIR)/raidutil-id_list.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='id_list.cpp' object='raidutil-id_list.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-id_list.o `test -f 'id_list.cpp' || echo '$(srcdir)/'`id_list.cpp raidutil-id_list.obj: id_list.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-id_list.obj -MD -MP -MF "$(DEPDIR)/raidutil-id_list.Tpo" -c -o raidutil-id_list.obj `if test -f 'id_list.cpp'; then $(CYGPATH_W) 'id_list.cpp'; else $(CYGPATH_W) '$(srcdir)/id_list.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-id_list.Tpo" "$(DEPDIR)/raidutil-id_list.Po"; else rm -f "$(DEPDIR)/raidutil-id_list.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='id_list.cpp' object='raidutil-id_list.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-id_list.obj `if test -f 'id_list.cpp'; then $(CYGPATH_W) 'id_list.cpp'; else $(CYGPATH_W) '$(srcdir)/id_list.cpp'; fi` raidutil-intlist.o: intlist.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-intlist.o -MD -MP -MF "$(DEPDIR)/raidutil-intlist.Tpo" -c -o raidutil-intlist.o `test -f 'intlist.cpp' || echo '$(srcdir)/'`intlist.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-intlist.Tpo" "$(DEPDIR)/raidutil-intlist.Po"; else rm -f "$(DEPDIR)/raidutil-intlist.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='intlist.cpp' object='raidutil-intlist.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-intlist.o `test -f 'intlist.cpp' || echo '$(srcdir)/'`intlist.cpp raidutil-intlist.obj: intlist.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-intlist.obj -MD -MP -MF "$(DEPDIR)/raidutil-intlist.Tpo" -c -o raidutil-intlist.obj `if test -f 'intlist.cpp'; then $(CYGPATH_W) 'intlist.cpp'; else $(CYGPATH_W) '$(srcdir)/intlist.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-intlist.Tpo" "$(DEPDIR)/raidutil-intlist.Po"; else rm -f "$(DEPDIR)/raidutil-intlist.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='intlist.cpp' object='raidutil-intlist.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-intlist.obj `if test -f 'intlist.cpp'; then $(CYGPATH_W) 'intlist.cpp'; else $(CYGPATH_W) '$(srcdir)/intlist.cpp'; fi` raidutil-listdev.o: listdev.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-listdev.o -MD -MP -MF "$(DEPDIR)/raidutil-listdev.Tpo" -c -o raidutil-listdev.o `test -f 'listdev.cpp' || echo '$(srcdir)/'`listdev.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-listdev.Tpo" "$(DEPDIR)/raidutil-listdev.Po"; else rm -f "$(DEPDIR)/raidutil-listdev.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='listdev.cpp' object='raidutil-listdev.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-listdev.o `test -f 'listdev.cpp' || echo '$(srcdir)/'`listdev.cpp raidutil-listdev.obj: listdev.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-listdev.obj -MD -MP -MF "$(DEPDIR)/raidutil-listdev.Tpo" -c -o raidutil-listdev.obj `if test -f 'listdev.cpp'; then $(CYGPATH_W) 'listdev.cpp'; else $(CYGPATH_W) '$(srcdir)/listdev.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-listdev.Tpo" "$(DEPDIR)/raidutil-listdev.Po"; else rm -f "$(DEPDIR)/raidutil-listdev.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='listdev.cpp' object='raidutil-listdev.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-listdev.obj `if test -f 'listdev.cpp'; then $(CYGPATH_W) 'listdev.cpp'; else $(CYGPATH_W) '$(srcdir)/listdev.cpp'; fi` raidutil-lzssdon.o: lzssdon.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-lzssdon.o -MD -MP -MF "$(DEPDIR)/raidutil-lzssdon.Tpo" -c -o raidutil-lzssdon.o `test -f 'lzssdon.cpp' || echo '$(srcdir)/'`lzssdon.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-lzssdon.Tpo" "$(DEPDIR)/raidutil-lzssdon.Po"; else rm -f "$(DEPDIR)/raidutil-lzssdon.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lzssdon.cpp' object='raidutil-lzssdon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-lzssdon.o `test -f 'lzssdon.cpp' || echo '$(srcdir)/'`lzssdon.cpp raidutil-lzssdon.obj: lzssdon.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-lzssdon.obj -MD -MP -MF "$(DEPDIR)/raidutil-lzssdon.Tpo" -c -o raidutil-lzssdon.obj `if test -f 'lzssdon.cpp'; then $(CYGPATH_W) 'lzssdon.cpp'; else $(CYGPATH_W) '$(srcdir)/lzssdon.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-lzssdon.Tpo" "$(DEPDIR)/raidutil-lzssdon.Po"; else rm -f "$(DEPDIR)/raidutil-lzssdon.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lzssdon.cpp' object='raidutil-lzssdon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-lzssdon.obj `if test -f 'lzssdon.cpp'; then $(CYGPATH_W) 'lzssdon.cpp'; else $(CYGPATH_W) '$(srcdir)/lzssdon.cpp'; fi` raidutil-lzstrbuf.o: lzstrbuf.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-lzstrbuf.o -MD -MP -MF "$(DEPDIR)/raidutil-lzstrbuf.Tpo" -c -o raidutil-lzstrbuf.o `test -f 'lzstrbuf.cpp' || echo '$(srcdir)/'`lzstrbuf.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-lzstrbuf.Tpo" "$(DEPDIR)/raidutil-lzstrbuf.Po"; else rm -f "$(DEPDIR)/raidutil-lzstrbuf.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lzstrbuf.cpp' object='raidutil-lzstrbuf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-lzstrbuf.o `test -f 'lzstrbuf.cpp' || echo '$(srcdir)/'`lzstrbuf.cpp raidutil-lzstrbuf.obj: lzstrbuf.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-lzstrbuf.obj -MD -MP -MF "$(DEPDIR)/raidutil-lzstrbuf.Tpo" -c -o raidutil-lzstrbuf.obj `if test -f 'lzstrbuf.cpp'; then $(CYGPATH_W) 'lzstrbuf.cpp'; else $(CYGPATH_W) '$(srcdir)/lzstrbuf.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-lzstrbuf.Tpo" "$(DEPDIR)/raidutil-lzstrbuf.Po"; else rm -f "$(DEPDIR)/raidutil-lzstrbuf.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lzstrbuf.cpp' object='raidutil-lzstrbuf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-lzstrbuf.obj `if test -f 'lzstrbuf.cpp'; then $(CYGPATH_W) 'lzstrbuf.cpp'; else $(CYGPATH_W) '$(srcdir)/lzstrbuf.cpp'; fi` raidutil-modnvram.o: modnvram.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-modnvram.o -MD -MP -MF "$(DEPDIR)/raidutil-modnvram.Tpo" -c -o raidutil-modnvram.o `test -f 'modnvram.cpp' || echo '$(srcdir)/'`modnvram.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-modnvram.Tpo" "$(DEPDIR)/raidutil-modnvram.Po"; else rm -f "$(DEPDIR)/raidutil-modnvram.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='modnvram.cpp' object='raidutil-modnvram.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-modnvram.o `test -f 'modnvram.cpp' || echo '$(srcdir)/'`modnvram.cpp raidutil-modnvram.obj: modnvram.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-modnvram.obj -MD -MP -MF "$(DEPDIR)/raidutil-modnvram.Tpo" -c -o raidutil-modnvram.obj `if test -f 'modnvram.cpp'; then $(CYGPATH_W) 'modnvram.cpp'; else $(CYGPATH_W) '$(srcdir)/modnvram.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-modnvram.Tpo" "$(DEPDIR)/raidutil-modnvram.Po"; else rm -f "$(DEPDIR)/raidutil-modnvram.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='modnvram.cpp' object='raidutil-modnvram.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-modnvram.obj `if test -f 'modnvram.cpp'; then $(CYGPATH_W) 'modnvram.cpp'; else $(CYGPATH_W) '$(srcdir)/modnvram.cpp'; fi` raidutil-namarray.o: namarray.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-namarray.o -MD -MP -MF "$(DEPDIR)/raidutil-namarray.Tpo" -c -o raidutil-namarray.o `test -f 'namarray.cpp' || echo '$(srcdir)/'`namarray.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-namarray.Tpo" "$(DEPDIR)/raidutil-namarray.Po"; else rm -f "$(DEPDIR)/raidutil-namarray.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='namarray.cpp' object='raidutil-namarray.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-namarray.o `test -f 'namarray.cpp' || echo '$(srcdir)/'`namarray.cpp raidutil-namarray.obj: namarray.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-namarray.obj -MD -MP -MF "$(DEPDIR)/raidutil-namarray.Tpo" -c -o raidutil-namarray.obj `if test -f 'namarray.cpp'; then $(CYGPATH_W) 'namarray.cpp'; else $(CYGPATH_W) '$(srcdir)/namarray.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-namarray.Tpo" "$(DEPDIR)/raidutil-namarray.Po"; else rm -f "$(DEPDIR)/raidutil-namarray.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='namarray.cpp' object='raidutil-namarray.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-namarray.obj `if test -f 'namarray.cpp'; then $(CYGPATH_W) 'namarray.cpp'; else $(CYGPATH_W) '$(srcdir)/namarray.cpp'; fi` raidutil-nvrambit.o: nvrambit.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-nvrambit.o -MD -MP -MF "$(DEPDIR)/raidutil-nvrambit.Tpo" -c -o raidutil-nvrambit.o `test -f 'nvrambit.cpp' || echo '$(srcdir)/'`nvrambit.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-nvrambit.Tpo" "$(DEPDIR)/raidutil-nvrambit.Po"; else rm -f "$(DEPDIR)/raidutil-nvrambit.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nvrambit.cpp' object='raidutil-nvrambit.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-nvrambit.o `test -f 'nvrambit.cpp' || echo '$(srcdir)/'`nvrambit.cpp raidutil-nvrambit.obj: nvrambit.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-nvrambit.obj -MD -MP -MF "$(DEPDIR)/raidutil-nvrambit.Tpo" -c -o raidutil-nvrambit.obj `if test -f 'nvrambit.cpp'; then $(CYGPATH_W) 'nvrambit.cpp'; else $(CYGPATH_W) '$(srcdir)/nvrambit.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-nvrambit.Tpo" "$(DEPDIR)/raidutil-nvrambit.Po"; else rm -f "$(DEPDIR)/raidutil-nvrambit.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nvrambit.cpp' object='raidutil-nvrambit.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-nvrambit.obj `if test -f 'nvrambit.cpp'; then $(CYGPATH_W) 'nvrambit.cpp'; else $(CYGPATH_W) '$(srcdir)/nvrambit.cpp'; fi` raidutil-parsargv.o: parsargv.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-parsargv.o -MD -MP -MF "$(DEPDIR)/raidutil-parsargv.Tpo" -c -o raidutil-parsargv.o `test -f 'parsargv.cpp' || echo '$(srcdir)/'`parsargv.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-parsargv.Tpo" "$(DEPDIR)/raidutil-parsargv.Po"; else rm -f "$(DEPDIR)/raidutil-parsargv.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parsargv.cpp' object='raidutil-parsargv.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-parsargv.o `test -f 'parsargv.cpp' || echo '$(srcdir)/'`parsargv.cpp raidutil-parsargv.obj: parsargv.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-parsargv.obj -MD -MP -MF "$(DEPDIR)/raidutil-parsargv.Tpo" -c -o raidutil-parsargv.obj `if test -f 'parsargv.cpp'; then $(CYGPATH_W) 'parsargv.cpp'; else $(CYGPATH_W) '$(srcdir)/parsargv.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-parsargv.Tpo" "$(DEPDIR)/raidutil-parsargv.Po"; else rm -f "$(DEPDIR)/raidutil-parsargv.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parsargv.cpp' object='raidutil-parsargv.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-parsargv.obj `if test -f 'parsargv.cpp'; then $(CYGPATH_W) 'parsargv.cpp'; else $(CYGPATH_W) '$(srcdir)/parsargv.cpp'; fi` raidutil-parser.o: parser.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-parser.o -MD -MP -MF "$(DEPDIR)/raidutil-parser.Tpo" -c -o raidutil-parser.o `test -f 'parser.cpp' || echo '$(srcdir)/'`parser.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-parser.Tpo" "$(DEPDIR)/raidutil-parser.Po"; else rm -f "$(DEPDIR)/raidutil-parser.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parser.cpp' object='raidutil-parser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-parser.o `test -f 'parser.cpp' || echo '$(srcdir)/'`parser.cpp raidutil-parser.obj: parser.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-parser.obj -MD -MP -MF "$(DEPDIR)/raidutil-parser.Tpo" -c -o raidutil-parser.obj `if test -f 'parser.cpp'; then $(CYGPATH_W) 'parser.cpp'; else $(CYGPATH_W) '$(srcdir)/parser.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-parser.Tpo" "$(DEPDIR)/raidutil-parser.Po"; else rm -f "$(DEPDIR)/raidutil-parser.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parser.cpp' object='raidutil-parser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-parser.obj `if test -f 'parser.cpp'; then $(CYGPATH_W) 'parser.cpp'; else $(CYGPATH_W) '$(srcdir)/parser.cpp'; fi` raidutil-parserr.o: parserr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-parserr.o -MD -MP -MF "$(DEPDIR)/raidutil-parserr.Tpo" -c -o raidutil-parserr.o `test -f 'parserr.cpp' || echo '$(srcdir)/'`parserr.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-parserr.Tpo" "$(DEPDIR)/raidutil-parserr.Po"; else rm -f "$(DEPDIR)/raidutil-parserr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parserr.cpp' object='raidutil-parserr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-parserr.o `test -f 'parserr.cpp' || echo '$(srcdir)/'`parserr.cpp raidutil-parserr.obj: parserr.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-parserr.obj -MD -MP -MF "$(DEPDIR)/raidutil-parserr.Tpo" -c -o raidutil-parserr.obj `if test -f 'parserr.cpp'; then $(CYGPATH_W) 'parserr.cpp'; else $(CYGPATH_W) '$(srcdir)/parserr.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-parserr.Tpo" "$(DEPDIR)/raidutil-parserr.Po"; else rm -f "$(DEPDIR)/raidutil-parserr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parserr.cpp' object='raidutil-parserr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-parserr.obj `if test -f 'parserr.cpp'; then $(CYGPATH_W) 'parserr.cpp'; else $(CYGPATH_W) '$(srcdir)/parserr.cpp'; fi` raidutil-raidutil.o: raidutil.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-raidutil.o -MD -MP -MF "$(DEPDIR)/raidutil-raidutil.Tpo" -c -o raidutil-raidutil.o `test -f 'raidutil.cpp' || echo '$(srcdir)/'`raidutil.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-raidutil.Tpo" "$(DEPDIR)/raidutil-raidutil.Po"; else rm -f "$(DEPDIR)/raidutil-raidutil.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raidutil.cpp' object='raidutil-raidutil.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-raidutil.o `test -f 'raidutil.cpp' || echo '$(srcdir)/'`raidutil.cpp raidutil-raidutil.obj: raidutil.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-raidutil.obj -MD -MP -MF "$(DEPDIR)/raidutil-raidutil.Tpo" -c -o raidutil-raidutil.obj `if test -f 'raidutil.cpp'; then $(CYGPATH_W) 'raidutil.cpp'; else $(CYGPATH_W) '$(srcdir)/raidutil.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-raidutil.Tpo" "$(DEPDIR)/raidutil-raidutil.Po"; else rm -f "$(DEPDIR)/raidutil-raidutil.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='raidutil.cpp' object='raidutil-raidutil.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-raidutil.obj `if test -f 'raidutil.cpp'; then $(CYGPATH_W) 'raidutil.cpp'; else $(CYGPATH_W) '$(srcdir)/raidutil.cpp'; fi` raidutil-rawdata.o: rawdata.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-rawdata.o -MD -MP -MF "$(DEPDIR)/raidutil-rawdata.Tpo" -c -o raidutil-rawdata.o `test -f 'rawdata.cpp' || echo '$(srcdir)/'`rawdata.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-rawdata.Tpo" "$(DEPDIR)/raidutil-rawdata.Po"; else rm -f "$(DEPDIR)/raidutil-rawdata.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawdata.cpp' object='raidutil-rawdata.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-rawdata.o `test -f 'rawdata.cpp' || echo '$(srcdir)/'`rawdata.cpp raidutil-rawdata.obj: rawdata.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-rawdata.obj -MD -MP -MF "$(DEPDIR)/raidutil-rawdata.Tpo" -c -o raidutil-rawdata.obj `if test -f 'rawdata.cpp'; then $(CYGPATH_W) 'rawdata.cpp'; else $(CYGPATH_W) '$(srcdir)/rawdata.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-rawdata.Tpo" "$(DEPDIR)/raidutil-rawdata.Po"; else rm -f "$(DEPDIR)/raidutil-rawdata.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawdata.cpp' object='raidutil-rawdata.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-rawdata.obj `if test -f 'rawdata.cpp'; then $(CYGPATH_W) 'rawdata.cpp'; else $(CYGPATH_W) '$(srcdir)/rawdata.cpp'; fi` raidutil-rdutlosd.o: rdutlosd.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-rdutlosd.o -MD -MP -MF "$(DEPDIR)/raidutil-rdutlosd.Tpo" -c -o raidutil-rdutlosd.o `test -f 'rdutlosd.cpp' || echo '$(srcdir)/'`rdutlosd.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-rdutlosd.Tpo" "$(DEPDIR)/raidutil-rdutlosd.Po"; else rm -f "$(DEPDIR)/raidutil-rdutlosd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rdutlosd.cpp' object='raidutil-rdutlosd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-rdutlosd.o `test -f 'rdutlosd.cpp' || echo '$(srcdir)/'`rdutlosd.cpp raidutil-rdutlosd.obj: rdutlosd.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-rdutlosd.obj -MD -MP -MF "$(DEPDIR)/raidutil-rdutlosd.Tpo" -c -o raidutil-rdutlosd.obj `if test -f 'rdutlosd.cpp'; then $(CYGPATH_W) 'rdutlosd.cpp'; else $(CYGPATH_W) '$(srcdir)/rdutlosd.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-rdutlosd.Tpo" "$(DEPDIR)/raidutil-rdutlosd.Po"; else rm -f "$(DEPDIR)/raidutil-rdutlosd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rdutlosd.cpp' object='raidutil-rdutlosd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-rdutlosd.obj `if test -f 'rdutlosd.cpp'; then $(CYGPATH_W) 'rdutlosd.cpp'; else $(CYGPATH_W) '$(srcdir)/rdutlosd.cpp'; fi` raidutil-rmwflash.o: rmwflash.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-rmwflash.o -MD -MP -MF "$(DEPDIR)/raidutil-rmwflash.Tpo" -c -o raidutil-rmwflash.o `test -f 'rmwflash.cpp' || echo '$(srcdir)/'`rmwflash.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-rmwflash.Tpo" "$(DEPDIR)/raidutil-rmwflash.Po"; else rm -f "$(DEPDIR)/raidutil-rmwflash.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rmwflash.cpp' object='raidutil-rmwflash.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-rmwflash.o `test -f 'rmwflash.cpp' || echo '$(srcdir)/'`rmwflash.cpp raidutil-rmwflash.obj: rmwflash.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-rmwflash.obj -MD -MP -MF "$(DEPDIR)/raidutil-rmwflash.Tpo" -c -o raidutil-rmwflash.obj `if test -f 'rmwflash.cpp'; then $(CYGPATH_W) 'rmwflash.cpp'; else $(CYGPATH_W) '$(srcdir)/rmwflash.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-rmwflash.Tpo" "$(DEPDIR)/raidutil-rmwflash.Po"; else rm -f "$(DEPDIR)/raidutil-rmwflash.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rmwflash.cpp' object='raidutil-rmwflash.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-rmwflash.obj `if test -f 'rmwflash.cpp'; then $(CYGPATH_W) 'rmwflash.cpp'; else $(CYGPATH_W) '$(srcdir)/rmwflash.cpp'; fi` raidutil-rstnvram.o: rstnvram.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-rstnvram.o -MD -MP -MF "$(DEPDIR)/raidutil-rstnvram.Tpo" -c -o raidutil-rstnvram.o `test -f 'rstnvram.cpp' || echo '$(srcdir)/'`rstnvram.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-rstnvram.Tpo" "$(DEPDIR)/raidutil-rstnvram.Po"; else rm -f "$(DEPDIR)/raidutil-rstnvram.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rstnvram.cpp' object='raidutil-rstnvram.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-rstnvram.o `test -f 'rstnvram.cpp' || echo '$(srcdir)/'`rstnvram.cpp raidutil-rstnvram.obj: rstnvram.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-rstnvram.obj -MD -MP -MF "$(DEPDIR)/raidutil-rstnvram.Tpo" -c -o raidutil-rstnvram.obj `if test -f 'rstnvram.cpp'; then $(CYGPATH_W) 'rstnvram.cpp'; else $(CYGPATH_W) '$(srcdir)/rstnvram.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-rstnvram.Tpo" "$(DEPDIR)/raidutil-rstnvram.Po"; else rm -f "$(DEPDIR)/raidutil-rstnvram.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rstnvram.cpp' object='raidutil-rstnvram.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-rstnvram.obj `if test -f 'rstnvram.cpp'; then $(CYGPATH_W) 'rstnvram.cpp'; else $(CYGPATH_W) '$(srcdir)/rstnvram.cpp'; fi` raidutil-scsilist.o: scsilist.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-scsilist.o -MD -MP -MF "$(DEPDIR)/raidutil-scsilist.Tpo" -c -o raidutil-scsilist.o `test -f 'scsilist.cpp' || echo '$(srcdir)/'`scsilist.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-scsilist.Tpo" "$(DEPDIR)/raidutil-scsilist.Po"; else rm -f "$(DEPDIR)/raidutil-scsilist.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsilist.cpp' object='raidutil-scsilist.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-scsilist.o `test -f 'scsilist.cpp' || echo '$(srcdir)/'`scsilist.cpp raidutil-scsilist.obj: scsilist.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-scsilist.obj -MD -MP -MF "$(DEPDIR)/raidutil-scsilist.Tpo" -c -o raidutil-scsilist.obj `if test -f 'scsilist.cpp'; then $(CYGPATH_W) 'scsilist.cpp'; else $(CYGPATH_W) '$(srcdir)/scsilist.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-scsilist.Tpo" "$(DEPDIR)/raidutil-scsilist.Po"; else rm -f "$(DEPDIR)/raidutil-scsilist.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scsilist.cpp' object='raidutil-scsilist.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-scsilist.obj `if test -f 'scsilist.cpp'; then $(CYGPATH_W) 'scsilist.cpp'; else $(CYGPATH_W) '$(srcdir)/scsilist.cpp'; fi` raidutil-setcache.o: setcache.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-setcache.o -MD -MP -MF "$(DEPDIR)/raidutil-setcache.Tpo" -c -o raidutil-setcache.o `test -f 'setcache.cpp' || echo '$(srcdir)/'`setcache.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-setcache.Tpo" "$(DEPDIR)/raidutil-setcache.Po"; else rm -f "$(DEPDIR)/raidutil-setcache.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='setcache.cpp' object='raidutil-setcache.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-setcache.o `test -f 'setcache.cpp' || echo '$(srcdir)/'`setcache.cpp raidutil-setcache.obj: setcache.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-setcache.obj -MD -MP -MF "$(DEPDIR)/raidutil-setcache.Tpo" -c -o raidutil-setcache.obj `if test -f 'setcache.cpp'; then $(CYGPATH_W) 'setcache.cpp'; else $(CYGPATH_W) '$(srcdir)/setcache.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-setcache.Tpo" "$(DEPDIR)/raidutil-setcache.Po"; else rm -f "$(DEPDIR)/raidutil-setcache.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='setcache.cpp' object='raidutil-setcache.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-setcache.obj `if test -f 'setcache.cpp'; then $(CYGPATH_W) 'setcache.cpp'; else $(CYGPATH_W) '$(srcdir)/setcache.cpp'; fi` raidutil-setrate.o: setrate.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-setrate.o -MD -MP -MF "$(DEPDIR)/raidutil-setrate.Tpo" -c -o raidutil-setrate.o `test -f 'setrate.cpp' || echo '$(srcdir)/'`setrate.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-setrate.Tpo" "$(DEPDIR)/raidutil-setrate.Po"; else rm -f "$(DEPDIR)/raidutil-setrate.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='setrate.cpp' object='raidutil-setrate.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-setrate.o `test -f 'setrate.cpp' || echo '$(srcdir)/'`setrate.cpp raidutil-setrate.obj: setrate.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-setrate.obj -MD -MP -MF "$(DEPDIR)/raidutil-setrate.Tpo" -c -o raidutil-setrate.obj `if test -f 'setrate.cpp'; then $(CYGPATH_W) 'setrate.cpp'; else $(CYGPATH_W) '$(srcdir)/setrate.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-setrate.Tpo" "$(DEPDIR)/raidutil-setrate.Po"; else rm -f "$(DEPDIR)/raidutil-setrate.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='setrate.cpp' object='raidutil-setrate.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-setrate.obj `if test -f 'setrate.cpp'; then $(CYGPATH_W) 'setrate.cpp'; else $(CYGPATH_W) '$(srcdir)/setrate.cpp'; fi` raidutil-setspeed.o: setspeed.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-setspeed.o -MD -MP -MF "$(DEPDIR)/raidutil-setspeed.Tpo" -c -o raidutil-setspeed.o `test -f 'setspeed.cpp' || echo '$(srcdir)/'`setspeed.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-setspeed.Tpo" "$(DEPDIR)/raidutil-setspeed.Po"; else rm -f "$(DEPDIR)/raidutil-setspeed.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='setspeed.cpp' object='raidutil-setspeed.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-setspeed.o `test -f 'setspeed.cpp' || echo '$(srcdir)/'`setspeed.cpp raidutil-setspeed.obj: setspeed.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-setspeed.obj -MD -MP -MF "$(DEPDIR)/raidutil-setspeed.Tpo" -c -o raidutil-setspeed.obj `if test -f 'setspeed.cpp'; then $(CYGPATH_W) 'setspeed.cpp'; else $(CYGPATH_W) '$(srcdir)/setspeed.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-setspeed.Tpo" "$(DEPDIR)/raidutil-setspeed.Po"; else rm -f "$(DEPDIR)/raidutil-setspeed.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='setspeed.cpp' object='raidutil-setspeed.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-setspeed.obj `if test -f 'setspeed.cpp'; then $(CYGPATH_W) 'setspeed.cpp'; else $(CYGPATH_W) '$(srcdir)/setspeed.cpp'; fi` raidutil-showinq.o: showinq.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-showinq.o -MD -MP -MF "$(DEPDIR)/raidutil-showinq.Tpo" -c -o raidutil-showinq.o `test -f 'showinq.cpp' || echo '$(srcdir)/'`showinq.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-showinq.Tpo" "$(DEPDIR)/raidutil-showinq.Po"; else rm -f "$(DEPDIR)/raidutil-showinq.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='showinq.cpp' object='raidutil-showinq.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-showinq.o `test -f 'showinq.cpp' || echo '$(srcdir)/'`showinq.cpp raidutil-showinq.obj: showinq.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-showinq.obj -MD -MP -MF "$(DEPDIR)/raidutil-showinq.Tpo" -c -o raidutil-showinq.obj `if test -f 'showinq.cpp'; then $(CYGPATH_W) 'showinq.cpp'; else $(CYGPATH_W) '$(srcdir)/showinq.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-showinq.Tpo" "$(DEPDIR)/raidutil-showinq.Po"; else rm -f "$(DEPDIR)/raidutil-showinq.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='showinq.cpp' object='raidutil-showinq.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-showinq.obj `if test -f 'showinq.cpp'; then $(CYGPATH_W) 'showinq.cpp'; else $(CYGPATH_W) '$(srcdir)/showinq.cpp'; fi` raidutil-status.o: status.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-status.o -MD -MP -MF "$(DEPDIR)/raidutil-status.Tpo" -c -o raidutil-status.o `test -f 'status.cpp' || echo '$(srcdir)/'`status.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-status.Tpo" "$(DEPDIR)/raidutil-status.Po"; else rm -f "$(DEPDIR)/raidutil-status.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='status.cpp' object='raidutil-status.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-status.o `test -f 'status.cpp' || echo '$(srcdir)/'`status.cpp raidutil-status.obj: status.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-status.obj -MD -MP -MF "$(DEPDIR)/raidutil-status.Tpo" -c -o raidutil-status.obj `if test -f 'status.cpp'; then $(CYGPATH_W) 'status.cpp'; else $(CYGPATH_W) '$(srcdir)/status.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-status.Tpo" "$(DEPDIR)/raidutil-status.Po"; else rm -f "$(DEPDIR)/raidutil-status.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='status.cpp' object='raidutil-status.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-status.obj `if test -f 'status.cpp'; then $(CYGPATH_W) 'status.cpp'; else $(CYGPATH_W) '$(srcdir)/status.cpp'; fi` raidutil-strlist.o: strlist.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-strlist.o -MD -MP -MF "$(DEPDIR)/raidutil-strlist.Tpo" -c -o raidutil-strlist.o `test -f 'strlist.cpp' || echo '$(srcdir)/'`strlist.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-strlist.Tpo" "$(DEPDIR)/raidutil-strlist.Po"; else rm -f "$(DEPDIR)/raidutil-strlist.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strlist.cpp' object='raidutil-strlist.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-strlist.o `test -f 'strlist.cpp' || echo '$(srcdir)/'`strlist.cpp raidutil-strlist.obj: strlist.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-strlist.obj -MD -MP -MF "$(DEPDIR)/raidutil-strlist.Tpo" -c -o raidutil-strlist.obj `if test -f 'strlist.cpp'; then $(CYGPATH_W) 'strlist.cpp'; else $(CYGPATH_W) '$(srcdir)/strlist.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-strlist.Tpo" "$(DEPDIR)/raidutil-strlist.Po"; else rm -f "$(DEPDIR)/raidutil-strlist.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strlist.cpp' object='raidutil-strlist.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-strlist.obj `if test -f 'strlist.cpp'; then $(CYGPATH_W) 'strlist.cpp'; else $(CYGPATH_W) '$(srcdir)/strlist.cpp'; fi` raidutil-taskctrl.o: taskctrl.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-taskctrl.o -MD -MP -MF "$(DEPDIR)/raidutil-taskctrl.Tpo" -c -o raidutil-taskctrl.o `test -f 'taskctrl.cpp' || echo '$(srcdir)/'`taskctrl.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-taskctrl.Tpo" "$(DEPDIR)/raidutil-taskctrl.Po"; else rm -f "$(DEPDIR)/raidutil-taskctrl.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='taskctrl.cpp' object='raidutil-taskctrl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-taskctrl.o `test -f 'taskctrl.cpp' || echo '$(srcdir)/'`taskctrl.cpp raidutil-taskctrl.obj: taskctrl.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-taskctrl.obj -MD -MP -MF "$(DEPDIR)/raidutil-taskctrl.Tpo" -c -o raidutil-taskctrl.obj `if test -f 'taskctrl.cpp'; then $(CYGPATH_W) 'taskctrl.cpp'; else $(CYGPATH_W) '$(srcdir)/taskctrl.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-taskctrl.Tpo" "$(DEPDIR)/raidutil-taskctrl.Po"; else rm -f "$(DEPDIR)/raidutil-taskctrl.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='taskctrl.cpp' object='raidutil-taskctrl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-taskctrl.obj `if test -f 'taskctrl.cpp'; then $(CYGPATH_W) 'taskctrl.cpp'; else $(CYGPATH_W) '$(srcdir)/taskctrl.cpp'; fi` raidutil-uartdmp.o: uartdmp.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-uartdmp.o -MD -MP -MF "$(DEPDIR)/raidutil-uartdmp.Tpo" -c -o raidutil-uartdmp.o `test -f 'uartdmp.cpp' || echo '$(srcdir)/'`uartdmp.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-uartdmp.Tpo" "$(DEPDIR)/raidutil-uartdmp.Po"; else rm -f "$(DEPDIR)/raidutil-uartdmp.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='uartdmp.cpp' object='raidutil-uartdmp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-uartdmp.o `test -f 'uartdmp.cpp' || echo '$(srcdir)/'`uartdmp.cpp raidutil-uartdmp.obj: uartdmp.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-uartdmp.obj -MD -MP -MF "$(DEPDIR)/raidutil-uartdmp.Tpo" -c -o raidutil-uartdmp.obj `if test -f 'uartdmp.cpp'; then $(CYGPATH_W) 'uartdmp.cpp'; else $(CYGPATH_W) '$(srcdir)/uartdmp.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-uartdmp.Tpo" "$(DEPDIR)/raidutil-uartdmp.Po"; else rm -f "$(DEPDIR)/raidutil-uartdmp.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='uartdmp.cpp' object='raidutil-uartdmp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-uartdmp.obj `if test -f 'uartdmp.cpp'; then $(CYGPATH_W) 'uartdmp.cpp'; else $(CYGPATH_W) '$(srcdir)/uartdmp.cpp'; fi` raidutil-usage.o: usage.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-usage.o -MD -MP -MF "$(DEPDIR)/raidutil-usage.Tpo" -c -o raidutil-usage.o `test -f 'usage.cpp' || echo '$(srcdir)/'`usage.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-usage.Tpo" "$(DEPDIR)/raidutil-usage.Po"; else rm -f "$(DEPDIR)/raidutil-usage.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='usage.cpp' object='raidutil-usage.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-usage.o `test -f 'usage.cpp' || echo '$(srcdir)/'`usage.cpp raidutil-usage.obj: usage.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-usage.obj -MD -MP -MF "$(DEPDIR)/raidutil-usage.Tpo" -c -o raidutil-usage.obj `if test -f 'usage.cpp'; then $(CYGPATH_W) 'usage.cpp'; else $(CYGPATH_W) '$(srcdir)/usage.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-usage.Tpo" "$(DEPDIR)/raidutil-usage.Po"; else rm -f "$(DEPDIR)/raidutil-usage.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='usage.cpp' object='raidutil-usage.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-usage.obj `if test -f 'usage.cpp'; then $(CYGPATH_W) 'usage.cpp'; else $(CYGPATH_W) '$(srcdir)/usage.cpp'; fi` raidutil-zap.o: zap.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-zap.o -MD -MP -MF "$(DEPDIR)/raidutil-zap.Tpo" -c -o raidutil-zap.o `test -f 'zap.cpp' || echo '$(srcdir)/'`zap.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-zap.Tpo" "$(DEPDIR)/raidutil-zap.Po"; else rm -f "$(DEPDIR)/raidutil-zap.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zap.cpp' object='raidutil-zap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-zap.o `test -f 'zap.cpp' || echo '$(srcdir)/'`zap.cpp raidutil-zap.obj: zap.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-zap.obj -MD -MP -MF "$(DEPDIR)/raidutil-zap.Tpo" -c -o raidutil-zap.obj `if test -f 'zap.cpp'; then $(CYGPATH_W) 'zap.cpp'; else $(CYGPATH_W) '$(srcdir)/zap.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-zap.Tpo" "$(DEPDIR)/raidutil-zap.Po"; else rm -f "$(DEPDIR)/raidutil-zap.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zap.cpp' object='raidutil-zap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-zap.obj `if test -f 'zap.cpp'; then $(CYGPATH_W) 'zap.cpp'; else $(CYGPATH_W) '$(srcdir)/zap.cpp'; fi` raidutil-setscfg.o: setscfg.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-setscfg.o -MD -MP -MF "$(DEPDIR)/raidutil-setscfg.Tpo" -c -o raidutil-setscfg.o `test -f 'setscfg.cpp' || echo '$(srcdir)/'`setscfg.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-setscfg.Tpo" "$(DEPDIR)/raidutil-setscfg.Po"; else rm -f "$(DEPDIR)/raidutil-setscfg.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='setscfg.cpp' object='raidutil-setscfg.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-setscfg.o `test -f 'setscfg.cpp' || echo '$(srcdir)/'`setscfg.cpp raidutil-setscfg.obj: setscfg.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-setscfg.obj -MD -MP -MF "$(DEPDIR)/raidutil-setscfg.Tpo" -c -o raidutil-setscfg.obj `if test -f 'setscfg.cpp'; then $(CYGPATH_W) 'setscfg.cpp'; else $(CYGPATH_W) '$(srcdir)/setscfg.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-setscfg.Tpo" "$(DEPDIR)/raidutil-setscfg.Po"; else rm -f "$(DEPDIR)/raidutil-setscfg.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='setscfg.cpp' object='raidutil-setscfg.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-setscfg.obj `if test -f 'setscfg.cpp'; then $(CYGPATH_W) 'setscfg.cpp'; else $(CYGPATH_W) '$(srcdir)/setscfg.cpp'; fi` raidutil-segment.o: segment.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-segment.o -MD -MP -MF "$(DEPDIR)/raidutil-segment.Tpo" -c -o raidutil-segment.o `test -f 'segment.cpp' || echo '$(srcdir)/'`segment.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-segment.Tpo" "$(DEPDIR)/raidutil-segment.Po"; else rm -f "$(DEPDIR)/raidutil-segment.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='segment.cpp' object='raidutil-segment.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-segment.o `test -f 'segment.cpp' || echo '$(srcdir)/'`segment.cpp raidutil-segment.obj: segment.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT raidutil-segment.obj -MD -MP -MF "$(DEPDIR)/raidutil-segment.Tpo" -c -o raidutil-segment.obj `if test -f 'segment.cpp'; then $(CYGPATH_W) 'segment.cpp'; else $(CYGPATH_W) '$(srcdir)/segment.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/raidutil-segment.Tpo" "$(DEPDIR)/raidutil-segment.Po"; else rm -f "$(DEPDIR)/raidutil-segment.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='segment.cpp' object='raidutil-segment.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raidutil_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o raidutil-segment.obj `if test -f 'segment.cpp'; then $(CYGPATH_W) 'segment.cpp'; else $(CYGPATH_W) '$(srcdir)/segment.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raidutils-0.0.6.orig/raidutil/alarm.cpp0000664000175000000620000002356010044153337017763 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 12/18/98 * ***************************************************************************** * * File Name: alarm.cpp * Module: * Contributors: Kevin Caporaso * Description: * Version Control: * * $Revision: 11 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include #include #include "alarm.hpp" #include "rustring.h" #include "status.hpp" #include "ctlr_map.hpp" #include "rscenum.h" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ extern char* EventStrings[]; /*** MACROS ***/ /*** PROTOTYPES ***/ extern void Flush( String_List * ); extern void add_Unique_Item( Int_List *component_List, DPT_TAG_T component_Tag ); /*** FUNCTIONS ***/ AlarmStatus::AlarmStatus( int hba, AlarmCommand cmd ) { ENTER( "AlarmStatus::AlarmStatus(" ); alarmCmd = cmd; whichHBA = hba; EXIT(); } AlarmStatus::AlarmStatus( const AlarmStatus &new_AlarmStatus ) { ENTER( "AlarmStatus::AlarmStatus( const AlarmStatus &new_AlarmStatus ):" ); alarmCmd = new_AlarmStatus.alarmCmd; whichHBA = new_AlarmStatus.whichHBA; EXIT(); } AlarmStatus::~AlarmStatus() { ENTER( "AlarmStatus::~AlarmStatus()" ); EXIT(); } Command::Dpt_Error AlarmStatus::execute( String_List **output ) { ENTER( "Command::Dpt_Error AlarmStatus::execute( String_List **output )" ); Dpt_Error err; bool hbaIndexFound = true; DPT_TAG_T thisHBATag; Init_Engine(1); // only scan hbas (1) *output = new String_List(); (**output).add_Item (EventStrings[STR_ALARM_STATUS_HEADER]); (**output).add_Item (STR_DEV_DIVIDING_LINE); // If our HBA is -1 then we are going to process all the HBAs in the // system. if ( whichHBA != -1) { // Determine the hba address from the index. thisHBATag = Get_HBA_by_Index( whichHBA, &hbaIndexFound ); err |= DoEachHBA( output, thisHBATag ); } else { // We want to process all the HBA's on the system. Let the games begin! for ( int hbaIndex = 0; hbaIndexFound ; hbaIndex++ ) { thisHBATag = Get_HBA_by_Index( hbaIndex, &hbaIndexFound ); if ( hbaIndexFound ) { err |= DoEachHBA( output, thisHBATag ); } } } return ( err ); } Command::Dpt_Error AlarmStatus::DoEachHBA( String_List** output, DPT_TAG_T thisHBATag) { Dpt_Error err; // Call this initial status for the alarm. GetInitialStatus( thisHBATag ); dptHBAinfo_S hbaInfo; err |= engine->Send( MSG_GET_INFO, thisHBATag ); if( err.Is_Error() || ( engine->Extract( &hbaInfo, sizeof(dptHBAinfo_S) ) == 0 )) { memset ( &hbaInfo, 0, sizeof(dptHBAinfo_S) ); } // Process the command at hand. if ( !err.Is_Error() ) { err |= SendCommandToEngine( thisHBATag, output ); } // DEBUG CODE - kmc /* printf ("hbaTag=%ld IsError()=%ld cmd=%lx\n", (unsigned long)(thisHBATag), (unsigned long)(err.Is_Error()), (unsigned long) alarmCmd ); */ EXIT(); return( err ); } //////////////////////////////////////////////////////////////// // GetInitialStatus // Using this to get some initial status of the alarm. //////////////////////////////////////////////////////////////// Command::Dpt_Error AlarmStatus::GetInitialStatus( DPT_TAG_T hba ) { Dpt_Error err; char buf[128]; engine->Reset(); // Grab the NVRAM info into a local buffer. err |= engine->Send( MSG_GET_NV_INFO, hba ); if ( !err.Is_Error() ) { engine->Extract( buf, sizeof(buf) ); // Determine if the alarm is disabled or not. if ( buf[0x31] & 0x02 ) { alarmDisabled = 1; } else { alarmDisabled = 0; } } // Reset the engine buffer before we get a fresh 'initial' status. engine->Reset(); dptHBAinfo_S hbaInfo; err |= engine->Send( MSG_GET_INFO, hba ); if(!err.Is_Error()) { engine->Extract(&hbaInfo, sizeof(dptHBAinfo_S)); if ( hbaInfo.status.flags & FLG_STAT_ALARM_ON ) { alarmOn = 1; } else { alarmOn = 0; } } return ( err ); } /////////////////////////////////////////////////////////////// // SendCommandToEngine // ////////////////////////////////////////////////////////////// Command::Dpt_Error AlarmStatus::SendCommandToEngine( DPT_TAG_T hba, String_List** output ) { Dpt_Error err; switch ( alarmCmd ) { case On: // If the alarm is not disabled then we can send // down the alarm on message. if ( !alarmDisabled ) { err |= engine->Send( MSG_ALARM_ON, hba ); if ( !err.Is_Error() ) { alarmOn = 1; } } else { //(**output).add_Item( STR_CANT_DO_ALARM ); } err |= GetAlarmStatus( hba , output ); break; case Off: // If the alarm is not disabled then we can send // down the alarm off message. if ( !alarmDisabled ) { err |= engine->Send( MSG_ALARM_OFF, hba ); if ( !err.Is_Error() ) { alarmOn = 0; } } else { //(**output).add_Item( STR_CANT_DO_ALARM ); } err |= GetAlarmStatus( hba , output ); break; case Enable: err |= EnableAlarm( Enable, hba ); err |= GetAlarmStatus( hba , output ); break; case Disable: err |= EnableAlarm( Disable, hba ); err |= GetAlarmStatus( hba , output ); break; case Status: err |= GetAlarmStatus( hba , output ); break; } return( err ); } ////////////////////////////////////////////////////////////// // // ////////////////////////////////////////////////////////////// Command::Dpt_Error AlarmStatus::EnableAlarm(AlarmCommand enable, DPT_TAG_T hba) { Dpt_Error err; char buf[128]; engine->Reset(); // Grab the NVRAM info into a local buffer. err |= engine->Send( MSG_GET_NV_INFO, hba ); if ( !err.Is_Error() ) { engine->Extract( buf, sizeof(buf) ); if ( enable == Enable ) { buf[0x31] &= ~0x02; alarmDisabled = 0; } else if ( enable == Disable ) { buf[0x31] |= 0x02; alarmDisabled = 1; } // Insert the modified buffer and send back to the engine. // This will set the NVRAM. engine->Insert( buf, sizeof(buf) ); err |= engine->Send( MSG_SET_NV_INFO, hba ); } return ( err ); } ////////////////////////////////////////////////////////////// // GetAlarmStatus() // Gets alarm status for the hba in question. // This method prints nicely formatted text to the terminal. ////////////////////////////////////////////////////////////// Command::Dpt_Error AlarmStatus::GetAlarmStatus(DPT_TAG_T hba, String_List** output) { Dpt_Error err; dptHBAinfo_S hbaInfo; dptCaddr_S* addr_P; char temp_buf[256]; // Make sure we get the most recent HBA info. err |= engine->Send( MSG_GET_INFO, hba ); if( err.Is_Error() || ( engine->Extract( &hbaInfo, sizeof(dptHBAinfo_S) ) == 0 )) { memset ( &hbaInfo, 0, sizeof(dptHBAinfo_S) ); } if ( !err.Is_Error() ) { addr_P = &engine->devInfo_P->addr; sprintf ( temp_buf, "d%d", addr_P->hba ); (**output).add_Item( temp_buf ); DPTControllerMap map; for ( int bus = 0; bus < 3; ++bus ) { char * String = map.getChannelString( addr_P->hba, bus ); (**output).add_Item( ( *String == 'c' ) ? String : ( engine->hbaInfo_P->chanInfo[bus].flags ? "--" : " " )); delete [] String; } (**output).add_Item( Strip_Trailing_Whitespace( engine->devInfo_P->productID ) ); // Get the current alarm status (On / Off) // I have to use the 'alarmOn' member because the engine doesn't seem to // get the alarm on/off status change fast enough. if ( alarmOn == 1 ) (**output).add_Item (EventStrings[STR_ON]); else (**output).add_Item (EventStrings[STR_OFF]); } // Determine the Enable/Disable'ness of the the alarm. // This will involve getting data from NVRAM. char buf[128]; engine->Reset(); err |= engine->Send( MSG_GET_NV_INFO, hba ); if ( !err.Is_Error() ) { engine->Extract( buf, sizeof(buf) ); if ( buf[0x31] & 0x02 ) { (**output).add_Item (EventStrings[STR_DISABLED]); (**output).add_Item ("\n"); } else { (**output).add_Item (EventStrings[STR_ENABLED]); (**output).add_Item ("\n"); } } return (err); } Command &AlarmStatus::Clone() const { ENTER( "Command &AlarmStatus::Clone() const" ); EXIT(); return( *new AlarmStatus( *this ) ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/alarm.hpp0000664000175000000620000000601110044153336017757 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef ALARM_HPP #define ALARM_HPP /**************************************************************************** * * Created: 12/18/98 * ***************************************************************************** * * File Name: alarm.hpp * Module: * Contributors: Kevin Caporaso * Description: * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "scsilist.hpp" #include "intlist.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ enum AlarmCommand { None, On, Off, Enable, Disable, Status }; class AlarmStatus:public Command { public: AlarmStatus::AlarmStatus( int hba, AlarmCommand cmd ); AlarmStatus( const AlarmStatus &new_AlarmStatus ); virtual ~AlarmStatus(); AlarmStatus &operator = ( AlarmStatus &right ); Dpt_Error execute( String_List **output ); Dpt_Error DoEachHBA( String_List** output, DPT_TAG_T hba ); Dpt_Error GetInitialStatus( DPT_TAG_T hba ); Dpt_Error SendCommandToEngine( DPT_TAG_T hba, String_List **output ); Dpt_Error EnableAlarm( AlarmCommand enable, DPT_TAG_T hba ); Dpt_Error GetAlarmStatus( DPT_TAG_T hba, String_List **output ); Command &Clone() const; private: AlarmCommand alarmCmd; int whichHBA; int alarmDisabled; int alarmOn; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/bufio.h0000664000175000000620000000537310044153335017440 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /************************** Start of BUFIO.H *************************/ #ifndef __BUFIO_H #define __BUFIO_H #include typedef struct iobuf { unsigned char mask; int rack; int numbufs; int curbuf; long bufptr; char *buf[23]; } IOBUF; //#ifdef __STDC__ #ifdef __cplusplus extern "C" { #endif IOBUF *OpenInputBuf( char *buf[], int numbufs ); IOBUF *OpenOutputBuf( char *buf[], int numbufs ); void OutputBufBit( IOBUF *iobuf, int bit ); void OutputBufBits( IOBUF *iobuf, unsigned long code, int count ); void putbufc(int c, IOBUF *iobuf); int InputBufBit( IOBUF *iobuf ); unsigned long InputBufBits( IOBUF *iobuf, int bit_count ); void CloseInputBuf( IOBUF *iobuf ); void CloseOutputBuf( IOBUF *iobuf ); //void FilePrintBinary( FILE *file, unsigned int code, int bits ); #ifdef __cplusplus } #endif //#else /* __STDC__ */ //IOBUF *OpenInputBuf(); //IOBUF *OpenOutputBuf(); //void OutputBufBit(); //void OutputBufBits(); //int InputBufBit(); //unsigned long InputBufBits(); //void CloseInputBuf(); //void CloseOutputBuf(); //void FilePrintBinary(); //#endif /* __STDC__ */ #endif /* __BUFIO_H */ /*************************** End of BUFIO.H **************************/ raidutils-0.0.6.orig/raidutil/bufiolsb.c0000664000175000000620000001105710044153336020131 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /************************ Start of BUFIOLSB.C ************************ * */ #include "osd_util.h" #include #include #include "bufio.h" #define TRUE 1 #define FALSE 0 #ifdef __cplusplus extern "C" { #endif IOBUF *OpenOutputBuf( char *buf[], int numbufs ) { IOBUF *iobuf; int i; iobuf = (IOBUF *) calloc( 1, sizeof( IOBUF ) ); if ( iobuf == NULL ) return( iobuf ); for(i = 0; i < numbufs; i++) iobuf->buf[i] = buf[i]; iobuf->numbufs = numbufs; iobuf->curbuf = 0; iobuf->rack = 0; iobuf->mask = 0x01; iobuf->bufptr = 0L; return( iobuf ); } IOBUF *OpenInputBuf( char *buf[], int numbufs ) { IOBUF *iobuf; int i; iobuf = (IOBUF *) calloc( 1, sizeof( IOBUF ) ); if ( iobuf == NULL ) return( iobuf ); for(i = 0; i < numbufs; i++) iobuf->buf[i] = buf[i]; iobuf->numbufs = numbufs; iobuf->curbuf = 0; iobuf->rack = 0; iobuf->mask = 0x01; iobuf->bufptr = 0L; return( iobuf ); } void CloseOutputBuf( IOBUF *iobuf ) { if ( iobuf->mask != 0x01 ) putbufc( iobuf->rack, iobuf ); free( (char *) iobuf ); } void CloseInputBuf( IOBUF *iobuf ) { free( (char *) iobuf ); } void putbufc(int c, IOBUF *iobuf) { iobuf->buf[iobuf->curbuf][iobuf->bufptr++] = c; if(iobuf->bufptr == 64512) { iobuf->curbuf++; iobuf->bufptr = 0L; } } /* void OutputBufBit( IOBUF *iobuf, int bit ) IOBUF *iobuf; int bit; { if ( bit ) iobuf->rack |= iobuf->mask; iobuf->mask <<= 1; if ( iobuf->mask == 0 ) { iobuf->buf[iobuf->bufptr++] = iobuf->rack; if(iobuf->bufptr == 64512) { iobuf->curbuf++; iobuf->bufptr = 0L; } iobuf->rack = 0; iobuf->mask = 0x01; } } */ int InputBufBit( IOBUF *iobuf ) { int value; if ( iobuf->mask == 0x01 ) { iobuf->rack = iobuf->buf[iobuf->curbuf][iobuf->bufptr++]; if(iobuf->bufptr == 64512) { iobuf->curbuf++; iobuf->bufptr = 0L; } } value = iobuf->rack & iobuf->mask; iobuf->mask <<= 1; if ( iobuf->mask == 0 ) iobuf->mask = 0x01; return( value ? 1 : 0 ); } /* void OutputBufBits( IOBUF *iobuf, unsigned long code, int count ) { unsigned long mask; mask = 1L; while ( count-- > 0) { if ( mask & code ) iobuf->rack |= iobuf->mask; iobuf->mask <<= 1; if ( iobuf->mask == 0 ) { iobuf->buf[iobuf->bufptr++] = iobuf->rack; if(iobuf->bufptr == 64512) { iobuf->curbuf++; iobuf->bufptr = 0L; } iobuf->rack = 0; iobuf->mask = 0x01; } mask <<= 1; } } */ unsigned long InputBufBits( IOBUF *iobuf, int bit_count ) { unsigned long mask; unsigned long return_value; mask = 1L; return_value = 0; while ( bit_count-- > 0) { if ( iobuf->mask == 0x01 ) { iobuf->rack = iobuf->buf[iobuf->curbuf][iobuf->bufptr++]; if(iobuf->bufptr == 64512) { iobuf->curbuf++; iobuf->bufptr = 0L; } // if ( iobuf->rack == EOF ) // ; // fatal_error( "Fatal error in InputBit!\n" ); } if ( iobuf->rack & iobuf->mask ) return_value |= mask; mask <<= 1; iobuf->mask <<= 1; if ( iobuf->mask == 0 ) iobuf->mask = 0x01; } return( return_value ); } #ifdef __cplusplus } #endif raidutils-0.0.6.orig/raidutil/cmdlist.cpp0000664000175000000620000001726210044153336020327 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/17/98 * ***************************************************************************** * * File Name: ScsiAddr.cpp * Module: * Contributors: Lee Page * Description: Encapsulates an array of SCSI items. Used as a least-common denominator solution in coding C++ without STL. * Version Control: * * $Revision: 5 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "debug.hpp" #include "cmdlist.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Command_List::Command_List(): num_Items( 0 ), items( 0 ), next_Item_Index( 0 ) { ENTER( "Command_List::Command_List():" ); EXIT(); } Command_List::Command_List( const Command_List &right ) { ENTER( "Command_List::Command_List( const Command_List &right )" ); Copy_Items( right ); num_Items = right.num_Items; next_Item_Index = right.next_Item_Index; EXIT(); } Command_List::~Command_List() { ENTER( "Command_List::~Command_List()" ); Destroy_Items(); EXIT(); } Command_List &Command_List::operator += ( const Command_List &right ) { ENTER( "Command_List &Command_List::operator += ( const Command_List &right )" ); int int_Index; Command **temp_Items; // allocate a larger buffer and copy over the existing entries temp_Items = new Command *[ num_Items + right.num_Items ]; memcpy( temp_Items, items, num_Items * sizeof( Command * ) ); delete items; items = temp_Items; // now copy over the ones being added for( int_Index = 0; int_Index < right.num_Items; int_Index++ ) { items[ int_Index + num_Items ] = &right.get_Item( int_Index ); } num_Items += right.num_Items; EXIT(); return( *this ); } const Command_List & Command_List::operator = ( const Command_List &right ) { ENTER( "const Command_List & Command_List::operator = ( const Command_List &right )" ); Destroy_Items(); Copy_Items( right ); num_Items = right.num_Items; next_Item_Index = right.next_Item_Index; EXIT(); return( *this ); } /**************************************************************************** * * Function Name: add_Command(), Created:7/17/98 * * Description: Appends a command to the end of the list of items. * * Notes: * *****************************************************************************/ void Command_List::add_Item( const Command &command ) { ENTER( "void Command_List::add_Item( const Command &command )" ); Command **temp_Commands; temp_Commands = new Command *[ num_Items + 1 ]; if( temp_Commands ) { num_Items++; if( items ) { // copy the pointers over memcpy( temp_Commands, items, num_Items * sizeof( Command *) ); delete[] items; } items = temp_Commands; items[ num_Items - 1 ] = &command.Clone(); } EXIT(); } /**************************************************************************** * * Function Name: get_Command(), Created:7/17/98 * * Description: Fetches the nth command (0 based). The user should not deallocate the returned command. It is owned by the object. * * Return: char * * Notes: * *****************************************************************************/ Command &Command_List::get_Item( int index ) const { ENTER( "Command &Command_List::get_Item( int index ) const" ); Command *ret_Command = 0; if( index < num_Items ) { ret_Command = items[ index ]; } EXIT(); return( *ret_Command ); } /**************************************************************************** * * Function Name: get_Next_Command(), Created:7/17/98 * * Description: Fetches the next command. The user should not deallocate the returned command. It is owned by the object. * * Return: C-command * * Notes: * *****************************************************************************/ Command &Command_List::get_Next_Item() { ENTER( "Command &Command_List::get_Next_Item()" ); Command *ret_Command = 0; if( next_Item_Index < num_Items ) { ret_Command = items[ next_Item_Index ]; next_Item_Index++; } EXIT(); return( *ret_Command ); } /**************************************************************************** * * Function Name: shift_Item(), Created:7/28/98 * * Description: FIFO. Removes the first ITOEM from the list, and returns it. * * Return: The first item in the list. * * Notes: This is a destructive read. !!!MEMORY LEAK ALERT!!! The USER is required to free this object!! * *****************************************************************************/ Command &Command_List::shift_Item() { ENTER( "Command &Command_List::shift_Item()" ); Command *ret_Item = items[ 0 ]; int copy_Index; for( copy_Index = 0; copy_Index < num_Items - 1; copy_Index++ ) { items[ copy_Index ] = items[ copy_Index + 1 ]; } num_Items--; next_Item_Index = ( next_Item_Index > 0 )?next_Item_Index - 1:0; EXIT(); return( *ret_Item ); } /**************************************************************************** * * Function Name: reset_Next_Index(), Created:7/17/98 * * Description: Resets the get_Next_Command index to point to the first item. * * Notes: * *****************************************************************************/ void Command_List::reset_Next_Index() { ENTER( "void Command_List::reset_Next_Index()" ); next_Item_Index = 0; EXIT(); } int Command_List::num_Left() const { ENTER( "int Command_List::num_Left() const" ); EXIT(); return( num_Items - next_Item_Index ); } void Command_List::Destroy_Items() { ENTER( "void Command_List::Destroy_Items()" ); int command_Index; for( command_Index = 0; command_Index < num_Items; command_Index++ ) { delete items[ command_Index ]; } delete[] items; EXIT(); } void Command_List::Copy_Items( const Command_List &right ) { ENTER( "void Command_List::Copy_Items( const Command_List &right )" ); int command_Index; items = new Command *[ right.num_Items ]; num_Items = right.num_Items; for( command_Index = 0; command_Index < num_Items; command_Index++ ) { items[ command_Index ] = &right.items[ command_Index ]->Clone(); } EXIT(); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/cmdlist.hpp0000664000175000000620000000656010044153334020331 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef CMD_LIST_HPP #define CMD_LIST_HPP /**************************************************************************** * * Created: 7/20/98 * ***************************************************************************** * * File Name: Cmd_List.hpp * Module: * Contributors: Lee Page * Description: This class encapsulates a list of command objects. Unfortunately, I cannot use STL or templates, so I use a least-common denominator solution. * Version Control: * * $Revision: 5 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Command_List { public: Command_List(); Command_List( const Command_List &right ); ~Command_List(); Command_List &operator += ( const Command_List &right ); const Command_List & operator = ( const Command_List &right ); void add_Item( const Command &command ); // Fetches the nth command (0 based). The user should not // deallocate the returned command. It is owned by the // object. Command &get_Item( int index ) const; // Fetches the next command. The user should not deallocate // the returned command. It is owned by the object. Command &get_Next_Item(); // FIFO. Removes the first item from the list, and returns it. Command &shift_Item(); // Resets the get_Next_Command index to point to the first item. void reset_Next_Index(); // returns the number of entries minus the index int num_Left() const; int get_Num_Items() const { return( num_Items ); } private: void Destroy_Items(); void Copy_Items( const Command_List &right ); int num_Items; Command **items; int next_Item_Index; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/command.cpp0000664000175000000620000017745010044153336020314 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/17/98 * ***************************************************************************** * * File Name: Command.cpp * Module: * Contributors: Lee Page * Description: This object provides the common interface to many commands that the engine is capable of performing. It is expected that all parameters necessary for the completion of the command will be gathered by the derived object. * Version Control: * * $Revision: 45 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #ifdef _DPT_NETWARE #include #ifdef __cplusplus extern "C" { #endif unsigned long DPT_Bswapl(unsigned long value) { return((value >> 24) + ((value >> 8) & 0xFF00) + ((value << 8) & 0xFF0000) + (value << 24)); } #ifdef __cplusplus }; #endif #endif //_DPT_NETWARE #include "debug.hpp" #include "command.hpp" #include "rustring.h" #include "rdutlosd.h" #include "ctlr_map.hpp" #include "eng_std.h" #include "rscenum.h" #include #include /*** CONSTANTS ***/ extern char* EventStrings[]; int FID_RESET_OUTBUFF = 1; uSHORT PHYS_LIST_SIZE = 675; uSHORT LOG_LIST_SIZE = 15 * 128; const DPT_TAG_T INVALID_TAG = (DPT_TAG_T) -1; /*** TYPES ***/ /*** STATIC DATA ***/ DPT_EngineIO_C *Command::engine = 0; int Command::num_Instances = 0; /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Command::Command() { ENTER( "Command::Command()" ); // printf( "before num_Instances\n" ); num_Instances++; EXIT(); } Command::~Command() { ENTER( "Command::~Command()" ); num_Instances--; if (num_Instances == 0 && engine) { engine->Disconnect(); engine->Close(); // if we were going to dynamically load the engine, then we'd use the line // below. // Unload_Module( eng_Module_Handle ); delete engine; engine = 0; } EXIT(); } Command::Dpt_Error::operator char *() const { ENTER( "Command::Dpt_Error::operator char *() const" ); char *constant_Str = EventStrings[STR_UNKNOWN]; switch ((uLONG) err) { case DPT_CMD_ERR_NO_ERROR: constant_Str = STR_CMD_ERR_NO_ERROR; break; case DPT_CMD_PARSER_ERROR: constant_Str = EventStrings[STR_CMD_PARSER_ERROR]; break; case DPT_CMD_ERR_INVALID_LIST_TYPE: constant_Str = EventStrings[STR_CMD_ERR_INVALID_LIST_TYPE]; break; case DPT_CMD_ERR_CANT_FIND_COMPONENT: constant_Str = EventStrings[STR_CMD_ERR_CANT_FIND_COMPONENT]; break; case DPT_CMD_ERR_CANT_FIND_HBA_INDEX: constant_Str = EventStrings[STR_CMD_ERR_CANT_FIND_HBA_INDEX]; break; case DPT_CMD_ERR_CANT_FIND_HBA_INDEX_NVRAM: constant_Str = EventStrings[STR_CMD_ERR_CANT_FIND_HBA_INDEX_NVRAM]; break; case DPT_CMD_ERR_COMPONENT_BUSY: constant_Str = EventStrings[STR_CMD_ERR_COMPONENT_BUSY]; break; case DPT_CMD_ERR_INVALID_FLASH_IMAGE: constant_Str = EventStrings[STR_CMD_ERR_INVALID_FLASH_IMAGE]; break; case DPT_ERR_VALUE_OUT_OF_RANGE: constant_Str = EventStrings[STR_ERR_VALUE_OUT_OF_RANGE]; break; case DPT_ERR_INVALID_FILE: constant_Str = EventStrings[STR_ERR_INVALID_FILE]; break; case DPT_ERR_INVALID_RAID_TYPE: constant_Str = EventStrings[STR_ERR_INVALID_RAID_TYPE]; break; case DPT_ERR_NOT_ENOUGH_MEMORY: constant_Str = EventStrings[STR_ERR_NOT_ENOUGH_MEMORY]; break; case DPT_ERR_TWO_TB_RAID: constant_Str = EventStrings[STR_ERR_TWO_TB_RAID]; break; case DPT_ERR_INVALID_SEGMENT_OFFSET: constant_Str = EventStrings[STR_ERR_INVALID_SEGMENT_OFFSET]; break; case DPT_ERR_INVALID_SEGMENT_SIZE: constant_Str = EventStrings[STR_ERR_INVALID_SEGMENT_SIZE]; break; case DPT_ERR_NAME_ALREADY_USED: constant_Str = EventStrings[STR_ERR_NAME_ALREADY_USED]; break; case DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID: constant_Str = EventStrings[STR_CMD_ERR_CMD_NOT_POSS_ON_RAID]; break; case DPT_CMD_ERR_CMD_NOT_POSS_ON_HBA: constant_Str = EventStrings[STR_CMD_ERR_CMD_NOT_POSS_ON_HBA]; break; case DPT_CMD_ERR_CMD_NOT_POSS_ON_THIS_DEVICE: constant_Str = EventStrings[STR_CMD_ERR_CMD_NOT_POSS_ON_THIS_DEVICE]; break; case DPT_ERR_POSS_BUFFER_CORRUPTION: constant_Str = EventStrings[STR_ERR_POSS_BUFFER_CORRUPTION]; break; case DPT_MSG_RTN_COMPLETED: constant_Str = EventStrings[STR_MSG_RTN_COMPLETED]; break; case DPT_MSG_RTN_STARTED: constant_Str = EventStrings[STR_MSG_RTN_STARTED]; break; case DPT_MSG_RTN_FAILED: constant_Str = EventStrings[STR_MSG_RTN_FAILED]; break; case DPT_MSG_RTN_DATA_OVERFLOW: constant_Str = EventStrings[STR_MSG_RTN_DATA_OVERFLOW]; break; case DPT_MSG_RTN_DATA_UNDERFLOW: constant_Str = EventStrings[STR_MSG_RTN_DATA_UNDERFLOW]; break; case DPT_MSG_RTN_IGNORED: constant_Str = EventStrings[STR_MSG_RTN_IGNORED]; break; case DPT_MSG_RTN_DISCONNECT: constant_Str = EventStrings[STR_MSG_RTN_DISCONNECT]; break; case DPT_ERR_CONN_LIST_ALLOC: constant_Str = EventStrings[STR_ERR_CONN_LIST_ALLOC]; break; case DPT_ERR_SEMAPHORE_ALLOC: constant_Str = EventStrings[STR_ERR_SEMAPHORE_ALLOC]; break; case DPT_ERR_OSD_OPEN_ENGINE: constant_Str = EventStrings[STR_ERR_OSD_OPEN_ENGINE]; break; case DPT_ERR_INVALID_IO_METHOD: constant_Str = EventStrings[STR_ERR_INVALID_IO_METHOD]; break; case DPT_ERR_NO_SMARTROM: constant_Str = EventStrings[STR_ERR_NO_SMARTROM]; break; case DPT_ERR_ENGINE_INIT: constant_Str = EventStrings[STR_ERR_ENGINE_INIT]; break; case DPT_ERR_INVALID_CONN_TAG: constant_Str = EventStrings[STR_ERR_INVALID_CONN_TAG]; break; case DPT_ERR_SEMAPHORE_TIMEOUT: constant_Str = EventStrings[STR_ERR_SEMAPHORE_TIMEOUT]; break; case DPT_ERR_NULL_IO_BUFFER: constant_Str = EventStrings[STR_ERR_NULL_IO_BUFFER]; break; case DPT_ERR_INVALID_TGT_TAG: constant_Str = EventStrings[STR_ERR_INVALID_TGT_TAG]; break; case DPT_ERR_DESTROY_SEMAPHORE: constant_Str = EventStrings[STR_ERR_DESTROY_SEMAPHORE]; break; case DPT_ERR_MEM_ALLOC: constant_Str = EventStrings[STR_ERR_MEM_ALLOC]; break; case DPT_ERR_INVALID_DEV_ADDR: constant_Str = EventStrings[STR_ERR_INVALID_DEV_ADDR]; break; case DPT_ERR_DUPLICATE_NAME: constant_Str = EventStrings[STR_ERR_DUPLICATE_NAME]; break; case DPT_ERR_GET_CCB: constant_Str = EventStrings[STR_ERR_GET_CCB]; break; case DPT_ERR_NO_RAID_DEVICES: constant_Str = EventStrings[STR_ERR_NO_RAID_DEVICES]; break; case DPT_ERR_RESERVE_BLK_SIG: constant_Str = EventStrings[STR_ERR_RESERVE_BLK_SIG]; break; case DPT_ERR_FORMAT_BLK_SIZE: constant_Str = EventStrings[STR_ERR_FORMAT_BLK_SIZE]; break; case DPT_ERR_RAID_REFNUM: constant_Str = EventStrings[STR_ERR_RAID_REFNUM]; break; case DPT_ERR_RAID_COMP_DUPLICATE: constant_Str = EventStrings[STR_ERR_RAID_COMP_DUPLICATE]; break; case DPT_ERR_RAID_COMP_RESTRICT: constant_Str = EventStrings[STR_ERR_RAID_COMP_RESTRICT]; break; case DPT_ERR_RAID_COMP_USED: constant_Str = EventStrings[STR_ERR_RAID_COMP_USED]; break; case DPT_ERR_RAID_COMP_GHOST: constant_Str = EventStrings[STR_ERR_RAID_COMP_GHOST]; break; case DPT_ERR_RAID_COMP_FAILED: constant_Str = EventStrings[STR_ERR_RAID_COMP_FAILED]; break; case DPT_ERR_RAID_TOO_FEW: constant_Str = EventStrings[STR_ERR_RAID_TOO_FEW]; break; case DPT_ERR_RAID_TOO_MANY: constant_Str = EventStrings[STR_ERR_RAID_TOO_MANY]; break; case DPT_ERR_RAID_EVEN: constant_Str = EventStrings[STR_ERR_RAID_EVEN]; break; case DPT_ERR_RAID_ODD: constant_Str = EventStrings[STR_ERR_RAID_ODD]; break; case DPT_ERR_RAID_POWER_2_PLUS: constant_Str = EventStrings[STR_ERR_RAID_POWER_2_PLUS]; break; case DPT_ERR_RAID_CHAN_COUNT: constant_Str = EventStrings[STR_ERR_RAID_CHAN_COUNT]; break; case DPT_ERR_RAID_MIN_STRIPE: constant_Str = EventStrings[STR_ERR_RAID_MIN_STRIPE]; break; case DPT_ERR_RAID_MAX_STRIPE: constant_Str = EventStrings[STR_ERR_RAID_MAX_STRIPE]; break; case DPT_ERR_RAID_ZERO_STRIPES: constant_Str = EventStrings[STR_ERR_RAID_ZERO_STRIPES]; break; case DPT_ERR_RAID_TOO_LARGE: constant_Str = EventStrings[STR_ERR_RAID_TOO_LARGE]; break; case DPT_ERR_RAID_START_CHAN: constant_Str = EventStrings[STR_ERR_RAID_START_CHAN]; break; case DPT_ERR_RAID_SEQ_CHAN: constant_Str = EventStrings[STR_ERR_RAID_SEQ_CHAN]; break; case DPT_ERR_RAID_DIFF_STRIPES: constant_Str = EventStrings[STR_ERR_RAID_DIFF_STRIPES]; break; case DPT_ERR_RAID_DIFF_NUM_STR: constant_Str = EventStrings[STR_ERR_RAID_DIFF_NUM_STR]; break; case DPT_ERR_RAID_OVER_STRIPE: constant_Str = EventStrings[STR_ERR_RAID_OVER_STRIPE]; break; case DPT_ERR_RAID_COMP_REMOVE: constant_Str = EventStrings[STR_ERR_RAID_COMP_REMOVE]; break; case DPT_ERR_RAID_COMP_EMULATED: constant_Str = EventStrings[STR_ERR_RAID_COMP_EMULATED]; break; case DPT_ERR_RAID_COMP_DEVTYPE: constant_Str = EventStrings[STR_ERR_RAID_COMP_DEVTYPE]; break; case DPT_ERR_RAID_COMP_NON_512: constant_Str = EventStrings[STR_ERR_RAID_COMP_NON_512]; break; case DPT_ERR_RAID_DIFF_BLOCKS: constant_Str = EventStrings[STR_ERR_RAID_DIFF_BLOCKS]; break; case DPT_ERR_RAID_DIFF_CAPACITY: constant_Str = EventStrings[STR_ERR_RAID_DIFF_CAPACITY]; break; case DPT_ERR_RAID_DIFF_VENDOR: constant_Str = EventStrings[STR_ERR_RAID_DIFF_VENDOR]; break; case DPT_ERR_RAID_DIFF_PRODUCT: constant_Str = EventStrings[STR_ERR_RAID_DIFF_PRODUCT]; break; case DPT_ERR_RAID_DIFF_REVISION: constant_Str = EventStrings[STR_ERR_RAID_DIFF_REVISION]; break; case DPT_ERR_RAID_NOT_SUPPORTED: constant_Str = EventStrings[STR_ERR_RAID_NOT_SUPPORTED]; break; case DPT_ERR_RAID_INVALID_HBA: constant_Str = EventStrings[STR_ERR_RAID_INVALID_HBA]; break; case DPT_ERR_RAID_TABLE_REQUIRED: constant_Str = EventStrings[STR_ERR_RAID_TABLE_REQUIRED]; break; case DPT_ERR_RAID_COMP_TAG: constant_Str = EventStrings[STR_ERR_RAID_COMP_TAG]; break; case DPT_ERR_RAID_MAX_ARRAYS: constant_Str = EventStrings[STR_ERR_RAID_MAX_ARRAYS]; break; case DPT_ERR_RAID_COMP_SIZE: constant_Str = EventStrings[STR_ERR_RAID_COMP_SIZE]; break; case DPT_ERR_RAID_FW_LEVEL: constant_Str = EventStrings[STR_ERR_RAID_FW_LEVEL]; break; case DPT_ERR_INVALID_HBA_ADDR: constant_Str = EventStrings[STR_ERR_INVALID_HBA_ADDR]; break; case DPT_ERR_ISA_ADDR_ONLY: constant_Str = EventStrings[STR_ERR_ISA_ADDR_ONLY]; break; case DPT_ERR_PRIMARY_HBA_EXISTS: constant_Str = EventStrings[STR_ERR_PRIMARY_HBA_EXISTS]; break; case DPT_ERR_NO_MORE_SLOTS: constant_Str = EventStrings[STR_ERR_NO_MORE_SLOTS]; break; case DPT_ERR_DUP_ISA_ADDR: constant_Str = EventStrings[STR_ERR_DUP_ISA_ADDR]; break; case DPT_ERR_DUP_EISA_SLOT: constant_Str = EventStrings[STR_ERR_DUP_EISA_SLOT]; break; case DPT_ERR_PRIMARY_ISA_ADDR: constant_Str = EventStrings[STR_ERR_PRIMARY_ISA_ADDR]; break; case DPT_ERR_SECONDARY_ISA_ADDR: constant_Str = EventStrings[STR_ERR_SECONDARY_ISA_ADDR]; break; case DPT_ERR_ABS_NO_MORE_IDS: constant_Str = EventStrings[STR_ERR_ABS_NO_MORE_IDS]; break; case DPT_ERR_ABS_NON_ZERO_LUN: constant_Str = EventStrings[STR_ERR_ABS_NON_ZERO_LUN]; break; case DPT_ERR_ABS_ADDR_LIMITS: constant_Str = EventStrings[STR_ERR_ABS_ADDR_LIMITS]; break; case DPT_ERR_ABS_ADDR_OCCUPIED: constant_Str = EventStrings[STR_ERR_ABS_ADDR_OCCUPIED]; break; case DPT_ERR_ABS_NO_MORE_LUNS: constant_Str = EventStrings[STR_ERR_ABS_NO_MORE_LUNS]; break; case DPT_ERR_NEW_ARTIFICIAL: constant_Str = EventStrings[STR_ERR_NEW_ARTIFICIAL]; break; case DPT_ERR_IO_NOT_SUPPORTED: constant_Str = EventStrings[STR_ERR_IO_NOT_SUPPORTED]; break; case DPT_ERR_RW_EXCEEDS_CAPACITY: constant_Str = EventStrings[STR_ERR_RW_EXCEEDS_CAPACITY]; break; case DPT_ERR_DATA_IN_OUT: constant_Str = EventStrings[STR_ERR_DATA_IN_OUT]; break; case DPT_ERR_SCSI_CMD_FAILED: constant_Str = EventStrings[STR_ERR_SCSI_CMD_FAILED]; break; case DPT_ERR_ARTIFICIAL_IO: constant_Str = EventStrings[STR_ERR_ARTIFICIAL_IO]; break; case DPT_ERR_SCSI_IO: constant_Str = EventStrings[STR_ERR_SCSI_IO]; break; case DPT_ERR_BLINK_LED_IO: constant_Str = EventStrings[STR_ERR_BLINK_LED_IO]; break; case DPT_ERR_OSD_MEM_ALLOC: constant_Str = EventStrings[STR_ERR_OSD_MEM_ALLOC]; break; case DPT_ERR_FORMATTING: constant_Str = EventStrings[STR_ERR_FORMATTING]; break; case DPT_ERR_HBA_BUSY: constant_Str = EventStrings[STR_ERR_HBA_BUSY]; break; case DPT_ERR_HBA_INITIALIZING: constant_Str = EventStrings[STR_ERR_HBA_INITIALIZING]; break; case DPT_ERR_DEL_OLD_RAID: constant_Str = EventStrings[STR_ERR_DEL_OLD_RAID]; break; case DPT_ERR_ENABLE_NEW_RAID: constant_Str = EventStrings[STR_ERR_ENABLE_NEW_RAID]; break; case DPT_ERR_UPDATE_OS_CONFIG: constant_Str = EventStrings[STR_ERR_UPDATE_OS_CONFIG]; break; case DPT_ERR_SCSI_ADDR_BOUNDS: constant_Str = EventStrings[STR_ERR_SCSI_ADDR_BOUNDS]; break; case DPT_ERR_SCSI_ADDR_CONFLICT: constant_Str = EventStrings[STR_ERR_SCSI_ADDR_CONFLICT]; break; case DPT_ERR_CANNOT_DELETE: constant_Str = EventStrings[STR_ERR_CANNOT_DELETE]; break; case DPT_ERR_FWD_NO_SPACE: constant_Str = EventStrings[STR_ERR_FWD_NO_SPACE]; break; case DPT_ERR_FWD_NOT_RESERVED: constant_Str = EventStrings[STR_ERR_FWD_NOT_RESERVED]; break; case DPT_ERR_FWD_NOT_INITIALIZED: constant_Str = EventStrings[STR_ERR_FWD_NOT_INITIALIZED]; break; case DPT_ERR_FWD_BLK_MISMATCH: constant_Str = EventStrings[STR_ERR_FWD_BLK_MISMATCH]; break; case DPT_ERR_FWD_BLK_OVERFLOW: constant_Str = EventStrings[STR_ERR_FWD_BLK_OVERFLOW]; break; case DPT_ERR_RSV_REMOVEABLE: constant_Str = EventStrings[STR_ERR_RSV_REMOVEABLE]; break; case DPT_ERR_RSV_NOT_DASD: constant_Str = EventStrings[STR_ERR_RSV_NOT_DASD]; break; case DPT_ERR_RSV_NON_ZERO: constant_Str = EventStrings[STR_ERR_RSV_NON_ZERO]; break; case DPT_ERR_RSV_HBA_UNABLE: constant_Str = EventStrings[STR_ERR_RSV_HBA_UNABLE]; break; case DPT_ERR_RSV_OTHER: constant_Str = EventStrings[STR_ERR_RSV_OTHER]; break; case DPT_ERR_SCAN_PHYSICALS: constant_Str = EventStrings[STR_ERR_SCAN_PHYSICALS]; break; case DPT_ERR_INIT_PHYSICALS: constant_Str = EventStrings[STR_ERR_INIT_PHYSICALS]; break; case DPT_ERR_SCAN_LOGICALS: constant_Str = EventStrings[STR_ERR_SCAN_LOGICALS]; break; case DPT_ERR_INIT_LOGICALS: constant_Str = EventStrings[STR_ERR_INIT_LOGICALS]; break; case DPT_ERR_COMM_XMIT_BUFFER: constant_Str = EventStrings[STR_ERR_COMM_XMIT_BUFFER]; break; case DPT_ERR_COMM_RCVE_BUFFER: constant_Str = EventStrings[STR_ERR_COMM_RCVE_BUFFER]; break; case DPT_ERR_COMM_DISCONNECTED: constant_Str = EventStrings[STR_ERR_COMM_DISCONNECTED]; break; case DPT_ERR_COMM_DATA_OVERFLOW: constant_Str = EventStrings[STR_ERR_COMM_DATA_OVERFLOW]; break; case DPT_ERRC_T_OPEN: constant_Str = EventStrings[STR_ERRC_T_OPEN]; break; case DPT_ERRC_T_BIND: constant_Str = EventStrings[STR_ERRC_T_BIND]; break; case DPT_ERRC_T_ALLOC: constant_Str = EventStrings[STR_ERRC_T_ALLOC]; break; case DPT_ERRC_T_CONNECT: constant_Str = EventStrings[STR_ERRC_T_CONNECT]; break; case DPT_ERRC_T_LISTEN: constant_Str = EventStrings[STR_ERRC_T_LISTEN]; break; case DPT_ERRC_T_ACCEPT: constant_Str = EventStrings[STR_ERRC_T_ACCEPT]; break; case DPT_ERRC_COMM_NW_INIT: constant_Str = EventStrings[STR_ERRC_COMM_NW_INIT]; break; case DPT_ERRC_COMM_WS_INIT: constant_Str = EventStrings[STR_ERRC_COMM_WS_INIT]; break; case DPT_ERRC_SEMAPHORE_TIMEOUT: constant_Str = EventStrings[STR_ERRC_SEMAPHORE_TIMEOUT]; break; case DPT_ERRC_CONNECTION_TAG: constant_Str = EventStrings[STR_ERRC_CONNECTION_TAG]; break; case DPT_ERRC_NOT_NULL_TERMED: constant_Str = EventStrings[STR_ERRC_NOT_NULL_TERMED]; break; case DPT_ERRC_MEM_ALLOC: constant_Str = EventStrings[STR_ERRC_MEM_ALLOC]; break; case DPT_ERRC_NULL_IO_BUFFER: constant_Str = EventStrings[STR_ERRC_NULL_IO_BUFFER]; break; case DPT_ERRC_INVALID_PASSWORD: constant_Str = EventStrings[STR_ERRC_INVALID_PASSWORD]; break; case DPT_ERRC_NOT_LOGGED_IN: constant_Str = EventStrings[STR_ERRC_NOT_LOGGED_IN]; break; case DPT_ERRC_ENGINE_LOAD: constant_Str = EventStrings[STR_ERRC_ENGINE_LOAD]; break; case DPT_ERRC_NOT_SUPPORTED: constant_Str = EventStrings[STR_ERRC_NOT_SUPPORTED]; break; case DPT_ERRC_ICRS_ACTIVE: constant_Str = EventStrings[STR_ERRC_ICRS_ACTIVE]; break; case DPT_ERRC_ICRS_INACTIVE: constant_Str = EventStrings[STR_ERRC_ICRS_INACTIVE]; break; case DPT_ERRC_ICRS_REQ_POSTED: constant_Str = EventStrings[STR_ERRC_ICRS_REQ_POSTED]; break; case DPT_ERRC_ICRS_THREAD_START: constant_Str = EventStrings[STR_ERRC_ICRS_THREAD_START]; break; case DPT_ERRC_ICRS_START_REQUEST: constant_Str = EventStrings[STR_ERRC_ICRS_START_REQUEST]; break; case DPT_ERRC_ICRS_INIT: constant_Str = EventStrings[STR_ERRC_ICRS_INIT]; break; case DPT_ERRC_ACCEPTING_ICR: constant_Str = EventStrings[STR_ERRC_ACCEPTING_ICR]; break; case DPT_ERRC_TX_MSG_SYNC: constant_Str = EventStrings[STR_ERRC_TX_MSG_SYNC]; break; case DPT_ERRC_RX_MSG_ACK: constant_Str = EventStrings[STR_ERRC_RX_MSG_ACK]; break; case DPT_ERRC_RX_MSG_HEADER: constant_Str = EventStrings[STR_ERRC_RX_MSG_HEADER]; break; case DPT_ERRC_TX_MSG_HEADER: constant_Str = EventStrings[STR_ERRC_TX_MSG_HEADER]; break; case DPT_ERRC_TX_TO_ENG_DATA: constant_Str = EventStrings[STR_ERRC_TX_TO_ENG_DATA]; break; case DPT_ERRC_RX_TO_ENG_DATA: constant_Str = EventStrings[STR_ERRC_RX_TO_ENG_DATA]; break; case DPT_ERRC_RX_STATUS_HEADER: constant_Str = EventStrings[STR_ERRC_RX_STATUS_HEADER]; break; case DPT_ERRC_TX_STATUS_HEADER: constant_Str = EventStrings[STR_ERRC_TX_STATUS_HEADER]; break; case DPT_ERRC_RX_FROM_ENG_DATA: constant_Str = EventStrings[STR_ERRC_RX_FROM_ENG_DATA]; break; case DPT_ERRC_TX_FROM_ENG_DATA: constant_Str = EventStrings[STR_ERRC_TX_FROM_ENG_DATA]; break; case DPT_ERRC_FROM_ENG_SIZE: constant_Str = EventStrings[STR_ERRC_FROM_ENG_SIZE]; break; case DPT_ERRC_TO_ENG_SIZE: constant_Str = EventStrings[STR_ERRC_TO_ENG_SIZE]; break; case DPT_ERRC_SERIAL_INIT: constant_Str = EventStrings[STR_ERRC_SERIAL_INIT]; break; case DPT_ERRC_BAUD_RATE: constant_Str = EventStrings[STR_ERRC_BAUD_RATE]; break; case DPT_ERRC_COMM_BUSY: constant_Str = EventStrings[STR_ERRC_COMM_BUSY]; break; case DPT_ERRC_INVALID_PROTOCOL: constant_Str = EventStrings[STR_ERRC_INVALID_PROTOCOL]; break; case DPT_ERRC_PORT_CONFLICT: constant_Str = EventStrings[STR_ERRC_PORT_CONFLICT]; break; case DPT_ERRC_MODEM_INIT: constant_Str = EventStrings[STR_ERRC_MODEM_INIT]; break; case DPT_ERRC_DIAL_ABORT: constant_Str = EventStrings[STR_ERRC_DIAL_ABORT]; break; case DPT_ERRC_DIAL_TIMEOUT: constant_Str = EventStrings[STR_ERRC_DIAL_TIMEOUT]; break; case DPT_ERRC_DIAL_BUSY: constant_Str = EventStrings[STR_ERRC_DIAL_BUSY]; break; case DPT_ERRC_DIAL_BEEPER_OK: constant_Str = EventStrings[STR_ERRC_DIAL_BEEPER_OK]; break; case DPT_ERRC_DIAL_UNEXPECTED_CD: constant_Str = EventStrings[STR_ERRC_DIAL_UNEXPECTED_CD]; break; case DPT_ERRC_DIAL_NO_TONE: constant_Str = EventStrings[STR_ERRC_DIAL_NO_TONE]; break; case DPT_ERRC_DIAL_NO_ANSWER: constant_Str = EventStrings[STR_ERRC_DIAL_NO_ANSWER]; break; case DPT_ERRC_DIAL_ERROR: constant_Str = EventStrings[STR_ERRC_DIAL_ERROR]; break; case DPT_ERRC_NEGOTIATION: constant_Str = EventStrings[STR_ERRC_NEGOTIATION]; break; case DPT_ERRC_MSG_TIMEOUT: constant_Str = EventStrings[STR_ERRC_MSG_TIMEOUT]; break; case DPT_ERRC_USER_ABORT: constant_Str = EventStrings[STR_ERRC_USER_ABORT]; break; case DPT_ERRSPX_RD_PROPERTY: constant_Str = EventStrings[STR_ERRSPX_RD_PROPERTY]; break; case DPT_ERRSPX_SAP: constant_Str = EventStrings[STR_ERRSPX_SAP]; break; case DPT_ERRC_SOCKET_ALLOC: constant_Str = EventStrings[STR_ERRC_SOCKET_ALLOC]; break; case DPT_ERRC_SOCKET_BIND: constant_Str = EventStrings[STR_ERRC_SOCKET_BIND]; break; case DPT_ERRC_SOCKET_ACCEPT: constant_Str = EventStrings[STR_ERRC_SOCKET_ACCEPT]; break; case DPT_ERRC_SOCKET_CONNECT: constant_Str = EventStrings[STR_ERRC_SOCKET_CONNECT]; break; case DPT_ERRC_USER_VALIDATION: constant_Str = EventStrings[STR_ERRC_USER_VALIDATION]; break; case DPT_ERR_FLASH_ERASE: constant_Str = EventStrings[STR_ERR_FLASH_ERASE]; break; case DPT_ERR_FLASH_SWITCH_MODES: constant_Str = EventStrings[STR_ERR_FLASH_SWITCH_MODES]; break; case DPT_ERR_FLASH_WRITE_512: constant_Str = EventStrings[STR_ERR_FLASH_WRITE_512]; break; case DPT_ERR_FLASH_ENG_VERIFY: constant_Str = EventStrings[STR_ERR_FLASH_ENG_VERIFY]; break; case DPT_ERR_FLASH_INIT_REQ: constant_Str = EventStrings[STR_ERR_FLASH_INIT_REQ]; break; case DPT_ERR_EXCLUSION_TIME: constant_Str = EventStrings[STR_ERR_EXCLUSION_TIME]; break; case DPT_ERR_DIAG_SCHEDULED: constant_Str = EventStrings[STR_ERR_DIAG_SCHEDULED]; break; case DPT_ERR_DIAG_NOT_ACTIVE: constant_Str = EventStrings[STR_ERR_DIAG_NOT_ACTIVE]; break; case DPT_ERR_ELOG_NOT_LOADED: constant_Str = EventStrings[STR_ERR_ELOG_NOT_LOADED]; break; case DPT_ERR_ELOG_LOADED: constant_Str = EventStrings[STR_ERR_ELOG_LOADED]; break; case DPT_ERR_ELOG_EVENTS: constant_Str = EventStrings[STR_ERR_ELOG_EVENTS]; break; case DPT_ERR_ELOG_PAUSED: constant_Str = EventStrings[STR_ERR_ELOG_PAUSED]; break; case DPT_ERR_ELOG_NOT_PAUSED: constant_Str = EventStrings[STR_ERR_ELOG_NOT_PAUSED]; break; case DPT_ERR_SLOG_INVALID_TIME: constant_Str = EventStrings[STR_ERR_SLOG_INVALID_TIME]; break; case DPT_ERR_SLOG_STAT_GROUP: constant_Str = EventStrings[STR_ERR_SLOG_STAT_GROUP]; break; case DPT_ERR_ALMS_ALREADY_LINKED: constant_Str = EventStrings[STR_ERR_ALMS_ALREADY_LINKED]; break; case DPT_ERR_ALMS_NOT_LINKED: constant_Str = EventStrings[STR_ERR_ALMS_NOT_LINKED]; break; case DPT_ERR_ALMS_INVALID_RESOURCE_TYPE: constant_Str = EventStrings[STR_ERR_ALMS_INVALID_RESOURCE_TYPE]; break; default: constant_Str = EventStrings[STR_ERR_UNKNOWN_ERROR]; break; } EXIT(); return( constant_Str ); } /* char *Command::Cmd_Error_to_Str( Dpt_Error err ) { ENTER( "char *Command::Cmd_Error_to_Str( Dpt_Error err )" ); char *constant_Str = ""; switch( err ) { case CMD_ERR_NO_ERROR: constant_Str = "CMD_ERR_NO_ERROR"; break; case CMD_PARSER_ERROR: constant_Str = "CMD_PARSER_ERROR"; break; case CMD_ERR_INVALID_LIST_TYPE: constant_Str = "CMD_ERR_INVALID_LIST_TYPE"; break; default: constant_Str = "Unknown"; break; } EXIT(); return( constant_Str ); } */ /**************************************************************************** * * Function Name: Get_Log_Component(), Created:7/30/98 * * Description: This fetches the tags of all components belonging to this raid. * * Return: Returns the tag for the indexed component of this raid. * * Notes: This doesn't work recursively. i.e. if this raid contains raids, * you will have to call this function to get the children of the * raids returned. * *****************************************************************************/ DPT_TAG_T Command::Get_Log_Component( SCSI_Address &obj_Address, int dev_Index, bool *obj_Found ) { ENTER( "DPT_TAG_T Command::Get_Log_Component(" ); DPT_TAG_T ret_Tag = INVALID_TAG; DPT_TAG_T parent_Tag; bool parent_Found; *obj_Found = false; engine->Reset(); // get the parent's tag so we can find all logicals that claim this logical as // their parent. parent_Tag = Get_Log_Dev_by_Address( obj_Address, (bool)false, &parent_Found ); if (parent_Found) { int log_Index; int log_Component_Index = 0; bool index_Found = true; // loop through all logicals and find ones claiming this parent_Tag as their // parent for (log_Index = 0; index_Found; log_Index++) { DPT_TAG_T log_Dev_Tag; // get the tag for the nth logical so we can see if it has the parent_Tag // as its parent. log_Dev_Tag = Get_Log_Dev_by_Index( log_Index, (bool)false, &index_Found ); if (index_Found && engine->Send( MSG_GET_INFO, log_Dev_Tag ) == MSG_RTN_COMPLETED) { if (engine->devInfo_P->raidParent == parent_Tag) { if (log_Component_Index == dev_Index) { ret_Tag = engine->ids.tag; index_Found = true; } else { log_Component_Index++; } } } } } EXIT(); return( ret_Tag ); } DPT_TAG_T Command::Get_Log_Dev_by_Index( int dev_Index, bool retrieve_Hiddens, bool *index_Found, int hba_Index // will be negative if unused // and search all hbas ) { ENTER( "DPT_TAG_T Command::Get_Log_Dev_by_Index(" ); DPT_TAG_T ret_Tag = INVALID_TAG; *index_Found = false; engine->Reset(); if (engine->GetIDs( ( retrieve_Hiddens )? MSG_ID_ALL_HIDDEN:MSG_ID_ALL_LOGICALS ) == MSG_RTN_COMPLETED && engine->ids.GetID()) { int num_Devs; int id_Index; int this_Dev_Type_Index = 0; num_Devs = engine->ids.numIDs; for (id_Index = 0; id_Index < num_Devs && !*index_Found; id_Index++) { engine->ids.SetCurIDnum( id_Index ); // get some info so we can have the raid level and filter out physicals engine->Send( MSG_GET_INFO, engine->ids.tag ); // filter out physicals if ((hba_Index != -1) && (engine->devInfo_P->addr.hba != hba_Index)) continue; if (Convert_Engine_Level( engine->devInfo_P->level ) != 0) { if (this_Dev_Type_Index == dev_Index) { ret_Tag = engine->ids.tag; *index_Found= true; } else { this_Dev_Type_Index++; } } } } EXIT(); return( ret_Tag ); } DPT_TAG_T Command::Get_Log_Dev_by_Address( SCSI_Address &obj_Address, bool retrieve_Hiddens, bool *obj_Found ) { ENTER( "DPT_TAG_T Command::Get_Log_Dev_by_Address(" ); DPT_TAG_T ret_Tag = INVALID_TAG; *obj_Found = false; engine->Reset(); if (engine->GetIDs( ( retrieve_Hiddens )? MSG_ID_ALL_HIDDEN:MSG_ID_ALL_LOGICALS ) == MSG_RTN_COMPLETED && engine->ids.GetID()) { int num_Devs; int id_Index; num_Devs = engine->ids.numIDs; for (id_Index = 0; id_Index < num_Devs && !*obj_Found; id_Index++) { engine->ids.SetCurIDnum( id_Index ); // get some info so we can have the raid level and filter out physicals engine->Send( MSG_GET_INFO, engine->ids.tag ); dptCaddr_S *addr_P = &engine->devInfo_P->addr; // filter out physicals if (obj_Address.hba == addr_P->hba && obj_Address.bus == addr_P->chan && obj_Address.id == addr_P->id && obj_Address.lun == addr_P->lun // && obj_Address.level == Convert_Engine_Level( engine->devInfo_P->level ) ) && Convert_Engine_Level( engine->devInfo_P->level ) > 0) { ret_Tag = engine->ids.tag; *obj_Found = true; } } } EXIT(); return( ret_Tag ); } /**************************************************************************** * * Function Name: Get_Dev_by_Index(), Created:8/10/98 * * Description: This searches for a device based on index alone (although it does ignore RAIDs). * * Return: DPT_TAG_T * * Notes: * *****************************************************************************/ DPT_TAG_T Command::Get_Dev_by_Index( int hba_Index, // should be negative if unused // (will index across all HBA's then) int dev_Index, bool *index_Found, get_Devs_Type *dev_Type) { ENTER( "DPT_TAG_T Command::Get_Dev_by_Index(" ); unsigned char ignore_Field_Mask; DPT_TAG_T ret_Tag = INVALID_TAG; bool param_Error = false; *index_Found = false; ignore_Field_Mask = GET_BY_SCSI_ADDR_IGNORE_LUN_FIELD | GET_BY_SCSI_ADDR_IGNORE_ID_FIELD | GET_BY_SCSI_ADDR_IGNORE_BUS_FIELD; if (hba_Index < 0) { // for some reason, when I tell this stupid thing NOT to ignore the hba // field, it still does it. This code here is wasted, but I keep it here // for good looks. The way I actually got it to regard the HBA field is // by checking the hba field on each item this thing returns. Otherwise, // it will return devs from all hba's. ignore_Field_Mask |= GET_BY_SCSI_ADDR_IGNORE_HBA_FIELD; } if (!param_Error) { engine->Reset(); // for some blinking reason, when I specify what HBA's devs to search for, // and that HBA's index is non-zero, it ignores it and fetches NOTHING!?! // This works now, so I changed it back to be hba specific. kds dptCaddr_S addr; addr.hba = hba_Index; addr.chan = 0; addr.id = 0; addr.lun = 0; // this was changed because SCO wouldn't compile // dptCaddr_S addr = { hba_Index /* 0 */, 0, 0, 0 }; //insert the address and the masks engine->Insert(&addr, sizeof( dptCaddr_S )); engine->Insert((unsigned char) ( /*GET_BY_SCSI_ADDR_DEVS*/GET_BY_SCSI_ADDR_MGR_AND_DEVS_1 | ignore_Field_Mask )); engine->Insert((unsigned char) DEV_CLASS_ALL_MATCHING); if (engine->GetIDs( MSG_ID_BY_SCSI_ADDR ) == MSG_RTN_COMPLETED && engine->ids.GetID()) { int num_Devs; int id_Index; int this_Dev_Type_Index = 0; num_Devs = engine->ids.numIDs; for (id_Index = 0; id_Index < num_Devs && !*index_Found; id_Index++) { engine->ids.SetCurIDnum( id_Index ); // don't check the error here. If this one fails, just go on // to the next one... engine->Send( MSG_GET_INFO, engine->ids.tag ); if (engine->devInfo_P->status.flags & FLG_STAT_REAL) { switch (engine->devInfo_P->raidType) { // filter out raid types case RAID_TYPE_0: case RAID_TYPE_1: case RAID_TYPE_3: case RAID_TYPE_5: case RAID_TYPE_HOT_SPARE: case RAID_TYPE_REDIRECT: break; // only process non-raid types default: if (engine->devInfo_P->addr.hba == hba_Index || hba_Index < 0) { if (this_Dev_Type_Index == dev_Index) { *dev_Type = (get_Devs_Type) engine->ids.type; ret_Tag = engine->ids.tag; *index_Found= true; } else { this_Dev_Type_Index++; } } break; } } } } } EXIT(); return( ret_Tag ); } /**************************************************************************** * * Function Name: Get_HBA_by_Index(), Created:9/29/98 * * Description: Fetches an HBA by index. * * Return: DPT_TAG_T * * Notes: * *****************************************************************************/ DPT_TAG_T Command::Get_HBA_by_Index( int hba_Index, bool *index_Found ) { ENTER( "DPT_TAG_T Command::Get_HBA_by_Index(" ); DPT_TAG_T ret_Tag = INVALID_TAG; *index_Found = false; engine->Reset(); engine->Insert( (uSHORT) DPT_ANY_OBJECT ); if (engine->GetIDs( MSG_ID_VISIBLES ) == MSG_RTN_COMPLETED && engine->ids.GetID()) { int num_Devs; int id_Index; num_Devs = engine->ids.numIDs; for (id_Index = 0; id_Index < num_Devs && !*index_Found; id_Index++) { get_Devs_Type this_Devs_Type; engine->ids.SetCurIDnum( id_Index ); this_Devs_Type = (get_Devs_Type) engine->ids.type; if (this_Devs_Type == GET_SCSI_HBA) { engine->Send( MSG_GET_INFO, engine->ids.tag ); if (engine->devInfo_P->status.flags & FLG_STAT_REAL) { if (engine->devInfo_P->addr.hba == hba_Index) { ret_Tag = engine->ids.tag; *index_Found= true; } } } } } EXIT(); return( ret_Tag ); } /**************************************************************************** * * Function Name: Get_Dev_by_Address(), Created:8/10/98 * * Description: This finds physical (non-hba, non-raid) devices only. * * Return: DPT_TAG_T * * Notes: * *****************************************************************************/ DPT_TAG_T Command::Get_Dev_by_Address( SCSI_Address &obj_Address, get_Devs_Type *dev_Type, // Note: this is // only physical types bool *obj_Found ) { ENTER( "DPT_TAG_T Command::Get_Dev_by_Address(" ); DPT_TAG_T ret_Tag = INVALID_TAG; bool param_Error = false; *obj_Found = false; if (!param_Error) { engine->Reset(); engine->Insert( (uSHORT) DPT_ANY_OBJECT ); if (engine->GetIDs( MSG_ID_VISIBLES ) == MSG_RTN_COMPLETED && engine->ids.GetID()) { int num_Devs; int id_Index; num_Devs = engine->ids.numIDs; for (id_Index = 0; id_Index < num_Devs && !*obj_Found; id_Index++) { get_Devs_Type this_Devs_Type; engine->ids.SetCurIDnum( id_Index ); this_Devs_Type = (get_Devs_Type) engine->ids.type; switch (this_Devs_Type) { case GET_SCSI_DASD: case GET_SCSI_SASD: case GET_SCSI_WORM: case GET_SCSI_CD_ROM: case GET_SCSI_OPTICAL: case GET_SCSI_JUKEBOX: { engine->Send( MSG_GET_INFO, engine->ids.tag ); if (engine->devInfo_P->status.flags & FLG_STAT_REAL) { dptCaddr_S *addr_P; addr_P = &engine->devInfo_P->addr; if (addr_P->id == obj_Address.id && addr_P->chan == obj_Address.bus && addr_P->hba == obj_Address.hba) { ret_Tag = engine->ids.tag; *obj_Found = true; *dev_Type = (get_Devs_Type) engine->ids.type; } } } break; } } } } EXIT(); return( ret_Tag ); } /**************************************************************************** * * Function Name: Get_Address_by_Index(), Created:10/22/98 * * Description: This finds all devices. * * Return: DPT_TAG_T * * Notes: * *****************************************************************************/ DPT_TAG_T Command::Get_Address_by_Index( SCSI_Address &obj_Address, int dev_Index, bool *obj_Found, get_Devs_Type *dev_Type ) { ENTER( "DPT_TAG_T Command::Get_Address_by_Index(" ); DPT_TAG_T ret_Tag = INVALID_TAG; *obj_Found = false; engine->Reset(); dptCaddr_S addr; addr.hba = 0; addr.chan = 0; addr.id = 0; addr.lun = 0; // this was changed because SCO wouldn't compile // dptCaddr_S addr = { 0, 0, 0, 0 }; //insert the address and the masks engine->Insert( &addr, sizeof( dptCaddr_S ) ); engine->Insert( (unsigned char) ( GET_BY_SCSI_ADDR_MGR_AND_DEVS_0 | GET_BY_SCSI_ADDR_IGNORE_HBA_FIELD | GET_BY_SCSI_ADDR_IGNORE_BUS_FIELD | GET_BY_SCSI_ADDR_IGNORE_ID_FIELD | GET_BY_SCSI_ADDR_IGNORE_LUN_FIELD )); engine->Insert( (unsigned char) DEV_CLASS_ALL_MATCHING ); if (engine->GetIDs( MSG_ID_BY_SCSI_ADDR ) == MSG_RTN_COMPLETED && engine->ids.GetID()) { int num_Devs, id_Index, this_Dev_Type_Index = 0; num_Devs = engine->ids.numIDs; for (id_Index = 0; id_Index < num_Devs && !*obj_Found; id_Index++) { engine->ids.SetCurIDnum( id_Index ); // don't check the error here. If this one fails, just go on // to the next one... engine->Send( MSG_GET_INFO, engine->ids.tag ); if (( engine->devInfo_P->status.flags & FLG_STAT_REAL ) && (( engine->devInfo_P->addr.hba == obj_Address.hba ) || ( obj_Address.hba < 0 )) && (( engine->devInfo_P->addr.chan == obj_Address.bus ) || ( obj_Address.bus < 0 )) && (( engine->devInfo_P->addr.id == obj_Address.id ) || ( obj_Address.id < 0 )) && (( engine->devInfo_P->addr.lun == obj_Address.lun ) || ( obj_Address.lun < 0 ))) { if (this_Dev_Type_Index == dev_Index) { *dev_Type = (get_Devs_Type) engine->ids.type; if (*dev_Type == GET_SCSI_DASD) switch (engine->devInfo_P->raidType) { case RAID_TYPE_0: case RAID_TYPE_1: case RAID_TYPE_3: case RAID_TYPE_5: *dev_Type = GET_RAID; break; case RAID_TYPE_HOT_SPARE: *dev_Type = GET_RAID_HOT_SPARE; break; case RAID_TYPE_REDIRECT: *dev_Type = GET_RAID_REDIRECT; break; } ret_Tag = engine->ids.tag; *obj_Found= true; } else { this_Dev_Type_Index++; } } } } EXIT(); return( ret_Tag ); } /**************************************************************************** * * Function Name: Get_Component(), Created:10/22/98 * * Description: This finds all devices that are part of an array * * Return: DPT_TAG_T * * Notes: * *****************************************************************************/ DPT_TAG_T Command::Get_Component( DPT_TAG_T parent_Tag, int dev_Index, bool *obj_Found, get_Devs_Type *dev_Type ) { ENTER( "DPT_TAG_T Command::Get_Component(" ); DPT_TAG_T ret_Tag = INVALID_TAG; SCSI_Address component( -1, -1, -1, -1, -1 ); int Component_Index = 0; *obj_Found = true; for (int id_Index = 0; *obj_Found; id_Index++) { ret_Tag = Get_Address_by_Index ( component, id_Index, obj_Found, dev_Type ); if (*obj_Found && ( engine->Send( MSG_GET_INFO, ret_Tag ) == MSG_RTN_COMPLETED ) && ( engine->devInfo_P->raidParent == parent_Tag ) && ( Component_Index++ == dev_Index )) { break; } } EXIT(); return( ret_Tag ); } #ifdef ORIGINAL_SEARCH DPT_TAG_T Command::Get_Dev_by_Address( SCSI_Address &obj_Address, get_Devs_Type *dev_Type, // Note: this is // only physical // types bool *obj_Found ) { ENTER( "DPT_TAG_T Command::Get_Dev_by_Address(" ); DPT_TAG_T ret_Tag; bool param_Error = false; *obj_Found = false; if (!param_Error) { engine->Reset(); dptCaddr_S addr = { obj_Address.hba, obj_Address.bus, obj_Address.id, obj_Address.lun }; //insert the address and the masks engine->Insert( &addr, sizeof( dptCaddr_S ) ); engine->Insert( (unsigned char) GET_BY_SCSI_ADDR_DEVS | GET_BY_SCSI_ADDR_IGNORE_LUN_FIELD ); engine->Insert( (unsigned char) DEV_CLASS_ALL_MATCHING ); if (engine->GetIDs( MSG_ID_BY_SCSI_ADDR ) == MSG_RTN_COMPLETED && engine->ids.GetID()) { int num_Devs; num_Devs = engine->ids.numIDs; if (num_Devs > 0) { engine->ids.SetCurIDnum( 0 ); ret_Tag = engine->ids.tag; *obj_Found = true; *dev_Type = (get_Devs_Type) engine->ids.type; } } } EXIT(); return( ret_Tag ); } #endif DPT_TAG_T Command::Get_Dev_by_Address_and_Type( get_Devs_Type dev_Type, SCSI_Address &obj_Address, bool *obj_Found ) { ENTER( "DPT_TAG_T Command::Get_Dev_by_Address_and_Type(" ); DPT_TAG_T ret_Tag = INVALID_TAG; *obj_Found = false; engine->Reset(); #if !defined _DPT_SCO dptCaddr_S addr = { obj_Address.hba, obj_Address.bus, obj_Address.id, obj_Address.lun }; #else dptCaddr_S addr; addr.hba = obj_Address.hba; addr.chan = obj_Address.bus; addr.id = obj_Address.id; addr.lun = obj_Address.lun; #endif engine->Insert( (uSHORT) DPT_ANY_OBJECT ); if (engine->GetIDs( MSG_ID_VISIBLES ) == MSG_RTN_COMPLETED && engine->ids.GetID()) { int num_Devs; int id_Index; num_Devs = engine->ids.numIDs; for (id_Index = 0; id_Index < num_Devs && !*obj_Found; id_Index++) { dptCaddr_S *addr_P; engine->ids.SetCurIDnum( id_Index ); if (engine->Send( MSG_GET_INFO, engine->ids.tag ) == MSG_RTN_COMPLETED) { if (engine->devInfo_P->status.flags & FLG_STAT_REAL) { bool address_Matches = false; addr_P = &engine->devInfo_P->addr; switch (dev_Type) { case GET_SCSI_HBA: if (addr_P->hba == obj_Address.hba) { address_Matches = true; } break; default: if (addr_P->id == obj_Address.id && addr_P->chan == obj_Address.bus && addr_P->hba == obj_Address.hba) { address_Matches = true; } break; } if (address_Matches && engine->ids.type == (unsigned) dev_Type) { ret_Tag = engine->ids.tag; *obj_Found = true; } } } } } EXIT(); return( ret_Tag ); } #ifdef ORIGINAL_SEARCH DPT_TAG_T Command::Get_Dev_by_Address_and_Type( get_Devs_Type dev_Type, SCSI_Address &obj_Address, bool *obj_Found ) { ENTER( "DPT_TAG_T Command::Get_Dev_by_Address_and_Type(" ); unsigned char ignore_Field_Mask; DPT_TAG_T ret_Tag; Dev_Class dev_Class; bool param_Error = false; *obj_Found = false; engine->Reset(); switch (dev_Type) { case GET_SCSI_DASD: case GET_SCSI_SASD: case GET_SCSI_JUKEBOX: case GET_SCSI_CD_ROM: case GET_SCSI_PRINTER: case GET_SCSI_PROCESSOR: case GET_SCSI_WORM: case GET_SCSI_SCANNER: case GET_SCSI_OPTICAL: case GET_SCSI_PRO_ROOT: case GET_SCSI_PRO_CONNECTION: case GET_SCSI_BCD: case GET_RAID_BCD: ignore_Field_Mask = GET_BY_SCSI_ADDR_DEVS; break; case GET_SCSI_HBA: ignore_Field_Mask = GET_BY_SCSI_ADDR_MGR_AND_DEVS_1 | GET_BY_SCSI_ADDR_IGNORE_LUN_FIELD | GET_BY_SCSI_ADDR_IGNORE_ID_FIELD | GET_BY_SCSI_ADDR_IGNORE_BUS_FIELD; break; // case GET_ANY_MANAGER: // case GET_RAID_TYPE: default: param_Error = true; break; } dev_Class = DEV_CLASS_ALL_MATCHING; if (!param_Error) { engine->Reset(); dptCaddr_S addr = { obj_Address.hba, obj_Address.bus, obj_Address.id, obj_Address.lun }; //insert the address and the masks engine->Insert( &addr, sizeof( dptCaddr_S ) ); engine->Insert( (unsigned char) ignore_Field_Mask ); engine->Insert( (unsigned char) dev_Class ); if (engine->GetIDs( MSG_ID_BY_SCSI_ADDR ) == MSG_RTN_COMPLETED && engine->ids.GetID()) { int num_Devs; int id_Index; num_Devs = engine->ids.numIDs; for (id_Index = 0; id_Index < num_Devs && !*obj_Found; id_Index++) { engine->ids.SetCurIDnum( id_Index ); if (engine->ids.type == (unsigned) dev_Type) { ret_Tag = engine->ids.tag; *obj_Found = true; } } } } EXIT(); return( ret_Tag ); } #endif /**************************************************************************** * * Function Name: Get_Dev_by_Index_Type_and_Mask(), Created:8/4/98 * * Description: Allows the fetching of a device's tag, given an index into all the devices. This lets you specify what type you're looking for. It also lets you choose which "root" you will index from. By this, it is meant, that you can find the nth device in the system, or find the nth device on an HBA, channel, etc. * * Return: Tag of the object found. * * Notes: * *****************************************************************************/ #if DONT_USE_TILL_DEBUGGED DPT_TAG_T Command::Get_Dev_by_Index_Type_and_Mask( get_Devs_Type dev_Type, SCSI_Address &obj_Root, // so as to find all // devs on a specific // hba, or bus, etc. get_Devs_Mask dev_Mask, int dev_Index, bool *index_Found ) { ENTER( "DPT_TAG_T Command::Get_Dev_by_Index_Type_and_Mask(" ); DPT_TAG_T ret_Tag; Dev_Class dev_Class; bool param_Error = false; *index_Found = false; dev_Class = DEV_CLASS_ALL_MATCHING; if (!param_Error) { engine->Reset(); engine->Insert( (uSHORT) DPT_ANY_OBJECT ); if (engine->GetIDs( MSG_ID_VISIBLES ) == MSG_RTN_COMPLETED && engine->ids.GetID()) { int num_Devs; int id_Index; int this_Dev_Type_Index = 0; num_Devs = engine->ids.numIDs; for (id_Index = 0; id_Index < num_Devs && !*index_Found; id_Index++) { get_Devs_Type this_Devs_Type; engine->ids.SetCurIDnum( id_Index ); this_Devs_Type = (get_Devs_Type) engine->ids.type; if (this_Devs_Type == dev_Type) { dptCaddr_S *addr_P; bool doesnt_Match = false; // don't check the error here. If this one fails, just go on // to the next one... engine->Send( MSG_GET_INFO, engine->ids.tag ); if (engine->devInfo_P->status.flags & FLG_STAT_REAL) { addr_P = &engine->devInfo_P->addr; switch (dev_Mask) { case GET_DEVS_ON_THIS_HBA_BUS_ID: if (addr_P->id != obj_Root.id) { doesnt_Match = true; } case GET_DEVS_ON_THIS_HBA_BUS: if (addr_P->chan != obj_Root.bus) { doesnt_Match = true; } case GET_DEVS_ON_THIS_HBA: if (addr_P->hba != obj_Root.hba) { doesnt_Match = true; } // case GET_DEVS_ALL_DEVS: // default: } // Limit this to ONLY physicals, no logicals please. I know // that there are no raid types greater than ten, so I compare // to ten. if (!doesnt_Match && ( (unsigned) engine->devInfo_P->raidType > 10 || dev_Type == GET_SCSI_HBA )) { if (this_Dev_Type_Index == dev_Index) { ret_Tag = engine->ids.tag; *index_Found= true; } else { this_Dev_Type_Index++; } } } } } } } EXIT(); return( ret_Tag ); } #endif #ifdef ORIGINAL_SEARCH DPT_TAG_T Command::Get_Dev_by_Index_Type_and_Mask( get_Devs_Type dev_Type, SCSI_Address &obj_Root, // so as to find all // devs on a specific // hba, or bus, etc. get_Devs_Mask dev_Mask, int dev_Index, bool *index_Found ) { ENTER( "DPT_TAG_T Command::Get_Dev_by_Index_Type_and_Mask(" ); unsigned char ignore_Field_Mask; DPT_TAG_T ret_Tag; Dev_Class dev_Class; bool param_Error = false; *index_Found = false; engine->Reset(); switch (dev_Mask) { case GET_DEVS_ALL_DEVS: ignore_Field_Mask = GET_BY_SCSI_ADDR_IGNORE_LUN_FIELD | GET_BY_SCSI_ADDR_IGNORE_ID_FIELD | GET_BY_SCSI_ADDR_IGNORE_BUS_FIELD | GET_BY_SCSI_ADDR_IGNORE_HBA_FIELD; break; case GET_DEVS_ON_THIS_HBA: ignore_Field_Mask = GET_BY_SCSI_ADDR_IGNORE_LUN_FIELD | GET_BY_SCSI_ADDR_IGNORE_ID_FIELD | GET_BY_SCSI_ADDR_IGNORE_BUS_FIELD; break; case GET_DEVS_ON_THIS_HBA_BUS: ignore_Field_Mask = GET_BY_SCSI_ADDR_IGNORE_LUN_FIELD | GET_BY_SCSI_ADDR_IGNORE_ID_FIELD; break; case GET_DEVS_ON_THIS_HBA_BUS_ID: ignore_Field_Mask = GET_BY_SCSI_ADDR_IGNORE_LUN_FIELD; break; default: param_Error = true; break; } dev_Class = DEV_CLASS_ALL_MATCHING; if (!param_Error) { engine->Reset(); dptCaddr_S addr = { obj_Root.hba, obj_Root.bus, obj_Root.id, obj_Root.lun }; //insert the address and the masks engine->Insert( &addr, sizeof( dptCaddr_S ) ); engine->Insert( (unsigned char) ( /*GET_BY_SCSI_ADDR_DEVS*/GET_BY_SCSI_ADDR_MGR_AND_DEVS_1 | ignore_Field_Mask ) ); engine->Insert( (unsigned char) dev_Class ); if (engine->GetIDs( MSG_ID_BY_SCSI_ADDR ) == MSG_RTN_COMPLETED && engine->ids.GetID()) { int num_Devs; int id_Index; int this_Dev_Type_Index = 0; num_Devs = engine->ids.numIDs; for (id_Index = 0; id_Index < num_Devs && !*index_Found; id_Index++) { get_Devs_Type this_Devs_Type; engine->ids.SetCurIDnum( id_Index ); this_Devs_Type = (get_Devs_Type) engine->ids.type; if (this_Devs_Type == dev_Type) { // don't check the error here. If this one fails, just go on // to the next one... engine->Send( MSG_GET_INFO, engine->ids.tag ); // Limit this to ONLY physicals, no logicals please. I know // that there are no raid types greater than ten, so I compare // to ten. if ((unsigned) engine->devInfo_P->raidType > 10 || dev_Type == GET_SCSI_HBA) { if (this_Dev_Type_Index == dev_Index) { ret_Tag = engine->ids.tag; *index_Found= true; } else { this_Dev_Type_Index++; } } } } } } EXIT(); return( ret_Tag ); } #endif SCSI_Address Command::DPT_Tag_to_Address( DPT_TAG_T tag, bool *tag_Valid ) { ENTER( "SCSI_Address Command::DPT_Tag_to_Address( DPT_TAG_T tag, bool *tag_Valid )" ); dptCaddr_S *addr_P = &engine->devInfo_P->addr; engine->Reset(); if (engine->Send( MSG_GET_INFO, tag ) == MSG_RTN_COMPLETED) { *tag_Valid = true; } else { *tag_Valid = false; } EXIT(); return( SCSI_Address( addr_P->hba, addr_P->chan, addr_P->id, addr_P->lun, Convert_Engine_Level( engine->devInfo_P->level ) ) ); } void Command::PrintRaidAddress(DPT_TAG_T raid_Tag, String_List *out) { bool tag_Valid; SCSI_Address raid_Address; raid_Address = DPT_Tag_to_Address(raid_Tag, &tag_Valid); DPTControllerMap map; char * String = map.getTargetString(raid_Address.hba, raid_Address.bus, raid_Address.id, raid_Address.lun); out->add_Item(String); delete [] String; } char *Command::Strip_Trailing_Whitespace( char *str ) { ENTER( "char *Show_Inquiry::Strip_Trailing_Whitespace( char *str )" ); int strip_White_Index; char prev_Char = ' '; bool done = false; for (strip_White_Index = strlen( str ) - 1; strip_White_Index >= 0 && !done; strip_White_Index--) { // find the transition from white to non-white if (isspace( prev_Char ) && !isspace( str[ strip_White_Index ] )) { // null-terminate the string at the transition point. str[ strip_White_Index + 1 ]= 0; done = true; } prev_Char = str[ strip_White_Index ]; } EXIT(); return( str ); } // prints a question and get a one character answer char Command::PrintAQuestion(char *str) { char Buffer[512]; fprintf(stderr, str); fgets(Buffer, sizeof(Buffer), stdin); return(Buffer[0]); } void Command::Commit( DPT_TAG_T tag, bool nobuild) { ENTER( "void Command::Commit( DPT_TAG_T tag )" ); dptID_S *idlist = new dptID_S[PHYS_LIST_SIZE]; if (engine->Send( MSG_RAID_HW_ENABLE ) == MSG_RTN_COMPLETED) { if (tag && (!nobuild)) { engine->Send( MSG_RAID_BUILD, tag ); } if (tag && nobuild) { int numComps = EngineFindIDs(FID_RESET_OUTBUFF, MSG_ID_COMPONENTS, tag, idlist, PHYS_LIST_SIZE); for (int k = 0; k < numComps; k++) { engine->Reset(); engine->Insert((uCHAR) FORCE_OPTIMAL); engine->Send(MSG_FORCE_STATE, idlist[k].tag); } } if (engine->Send( MSG_IO_SCAN_PHYSICALS ) == MSG_RTN_COMPLETED) { engine->Send( MSG_IO_SCAN_LOGICALS ); } } EXIT(); } void Command::MakeArrayOptimal(DPT_TAG_T arrayTag) { dptID_S *idlist = new dptID_S[PHYS_LIST_SIZE]; int numComps = EngineFindIDs(FID_RESET_OUTBUFF, MSG_ID_COMPONENTS, arrayTag, idlist, PHYS_LIST_SIZE); // loop through all components for (int i = 0; i < numComps; i++) { // get the info structure for the component if (MSG_RTN_COMPLETED != engine->Send(MSG_GET_INFO, idlist[i].tag)) return; // if this is a physical component with failed status, force to optimal if (engine->devInfo_P->raidType == RAID_NONE) { if (engine->devInfo_P->status.main == PAPM_FAILED) { engine->Reset(); engine->Insert((uCHAR) FORCE_OPTIMAL); engine->Send(MSG_FORCE_STATE, idlist[i].tag); } } // this is an array component, so loop through his components else { numComps = EngineFindIDs(FID_RESET_OUTBUFF, MSG_ID_COMPONENTS, idlist[i].tag, idlist, PHYS_LIST_SIZE); for (int j = 0; j < numComps; j++) { // get the info structure for the component if (MSG_RTN_COMPLETED != engine->Send(MSG_GET_INFO, idlist[j].tag)) return; // if this is a physical component with failed status, force to optimal if (engine->devInfo_P->status.main == PAPM_FAILED) { engine->Reset(); engine->Insert((uCHAR) FORCE_OPTIMAL); engine->Send(MSG_FORCE_STATE, idlist[i].tag); } } // since we blew away the original array component info for the // component arrays components, get the original data back for the // next iteration of the loop numComps = EngineFindIDs(FID_RESET_OUTBUFF, MSG_ID_COMPONENTS, arrayTag, idlist, PHYS_LIST_SIZE); } } } #ifdef sparc # define VOLATILE volatile #else # define VOLATILE #endif extern "C" { VOLATILE void exit (int);} void Command::Init_Engine(int scanHbasOnly) { if (engine == 0) { // printf( "before ctor\n" ); engine = new DPT_EngineIO_C(LZSS_BUF_SIZE); // printf( "before Open\n" ); if (engine->Open()) { engine->Disconnect(); engine->Close(); printf (EventStrings[STR_ENG_CONN_FAILED]); printf (EventStrings[STR_COLON_OPEN]); exit (1); // exit with error } // if we were going to dynamically load the engine, then we'd use the // line below. // eng_Module_Handle = Load_Engine( &engine->EngineProc ); #ifdef _DPT_MSDOS engine->Connect( DPT_ENGINE_COMPATIBILITY, DPT_IO_EATA_DIRECT ); #else // printf( "before Connect\n" ); if (engine->Connect( DPT_ENGINE_COMPATIBILITY )) { engine->Disconnect(); engine->Close(); printf (EventStrings[STR_ENG_CONN_FAILED]); printf (EventStrings[STR_COLON_COMPAT_NBR]); exit (1); // exit with error } #endif // printf( "before send\n" ); if (scanHbasOnly == 0) // scan entire system { if (engine->Send( MSG_IO_SCAN_SYSTEM )) { engine->Disconnect(); engine->Close(); printf (EventStrings[STR_ENG_CONN_FAILED]); printf (EventStrings[STR_COLON_SCAN_FAILED]); exit (1); // exit with error } } else // only scan the hbas { if (engine->Send (MSG_IO_SCAN_HBAS)) { engine->Disconnect(); engine->Close(); printf (EventStrings[STR_ENG_CONN_FAILED]); printf (EventStrings[STR_COLON_SCAN_FAILED]); exit (1); // exit with error } } // printf( "after send\n" ); } } int Command::EngineFindIDs(int flags, DPT_MSG_T message, DPT_TAG_T devicetag, void *where, uSHORT maxIDs) { dptBuffer_S *outBuff_P = dptBuffer_S::newBuffer(4*1024); dptBuffer_S *idBuff_P = dptBuffer_S::newBuffer(4*1024); outBuff_P->clear(); idBuff_P->clear(); // Handle the flags if (flags & FID_RESET_OUTBUFF) outBuff_P->reset(); // Find all devices of specified type attached to this device if (MSG_RTN_COMPLETED != engine->Send(message, devicetag, idBuff_P, outBuff_P)) { delete[] outBuff_P; delete[] idBuff_P; return 0; } // if (MSG_RTN_COMPLETED != CallEngineBuff(message, devicetag, idBuff_P, // outBuff_P, FALSE)) return 0; // Figure out how many HBAs were found #if defined(_SINIX) int dptID_S_sz = sizeof(uLONG) + sizeof(uSHORT); int numFound = idBuff_P->writeIndex / dptID_S_sz; #else int numFound = idBuff_P->writeIndex / sizeof(dptID_S); #endif // Make sure there is enough space in the array to hold all the IDs // If not, just copy what it can hold and return that number if (numFound > maxIDs) numFound = maxIDs; // Copy the tags to our array #if defined(_SINIX) dptID_S *list = (dptIS_S *)where; for (int i=0; i < numFound; i++) { memcpy(&(list[i]), &(idBuff_P->data[i*dptID_S_sz]), dptID_S_sz); } #else memcpy(where, idBuff_P->data, numFound * sizeof(dptID_S)); #endif delete[] outBuff_P; delete[] idBuff_P; // Tell them how many we found return numFound; } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/command.hpp0000664000175000000620000006604510044153333020313 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef COMMAND_HPP #define COMMAND_HPP /**************************************************************************** * * Created: 7/17/98 * ***************************************************************************** * * File Name: Command.hpp * Module: * Contributors: Lee Page * Description: This object provides the common interface to many commands that * the engine is capable of performing. It is expected that all * parameters necessary for the completion of the command will be * gathered by the derived object. * Version Control: * * $Revision: 37 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "debug.hpp" #include "engiface.hpp" #include "strlist.hpp" #include "scsiaddr.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ class Command { public: enum Raid_Type { RAID_TYPE_0 = RAID_0, RAID_TYPE_1 = RAID_1, RAID_TYPE_3 = RAID_3, RAID_TYPE_5 = RAID_5, RAID_TYPE_HOT_SPARE = RAID_HOT_SPARE, RAID_TYPE_REDIRECT = RAID_REDIRECT }; // this isn't a mask, this is used to select the mask to use // so the function can know what address fields to ignore. enum get_Devs_Mask { GET_DEVS_ALL_DEVS, GET_DEVS_ON_THIS_HBA, GET_DEVS_ON_THIS_HBA_BUS, GET_DEVS_ON_THIS_HBA_BUS_ID }; enum get_Devs_Type { GET_SCSI_DASD = DPT_SCSI_DASD, GET_SCSI_SASD = DPT_SCSI_SASD, GET_SCSI_PRINTER = DPT_SCSI_PRINTER, GET_SCSI_PROCESSOR = DPT_SCSI_PROCESSOR, GET_SCSI_WORM = DPT_SCSI_WORM, GET_SCSI_CD_ROM = DPT_SCSI_CD_ROM, GET_SCSI_SCANNER = DPT_SCSI_SCANNER, GET_SCSI_OPTICAL = DPT_SCSI_OPTICAL, GET_SCSI_JUKEBOX = DPT_SCSI_JUKEBOX, GET_SCSI_PRO_ROOT = DPT_SCSI_PRO_ROOT, GET_SCSI_PRO_CONNECTION = DPT_SCSI_PRO_CONNECTION, GET_SCSI_HBA = DPT_SCSI_HBA, GET_SCSI_BCD = DPT_SCSI_BCD, GET_RAID_BCD = DPT_RAID_BCD, GET_RAID, GET_RAID_HOT_SPARE, GET_RAID_REDIRECT, GET_ARRAY, GET_ARRAYNAME }; enum Dev_Class { DEV_CLASS_SOFTWARE_RAID = 0, DEV_CLASS_HARDWARE_RAID = 1, DEV_CLASS_PHYSICAL_DEVs = 2, DEV_CLASS_PHYSICAL_BRIDGES = 3, DEV_CLASS_ALL_MATCHING = 0xff }; enum Get_By_Scsi_Address_Mask { // see the notes on "MSG_ID_BY_SCSI_ADDR" for the source of these constants. GET_BY_SCSI_ADDR_IGNORE_LUN_FIELD = 1, GET_BY_SCSI_ADDR_IGNORE_ID_FIELD = 2, GET_BY_SCSI_ADDR_IGNORE_BUS_FIELD = 4, GET_BY_SCSI_ADDR_IGNORE_HBA_FIELD = 8, GET_BY_SCSI_ADDR_MGR_AND_DEVS_0 = 0, // the doc doesn't say what the difference GET_BY_SCSI_ADDR_MGR_AND_DEVS_1 = 0x40, // is between these two items GET_BY_SCSI_ADDR_DEVS = 0x80, GET_BY_SCSI_ADDR_MGRS = 0xd0 }; class Dpt_Error { public: enum dpt_Error { // errors unique to the Command object and its derivitives. DPT_CMD_ERR_NO_ERROR = 10000, DPT_CMD_PARSER_ERROR, DPT_CMD_ERR_INVALID_LIST_TYPE, DPT_CMD_ERR_CANT_FIND_COMPONENT, DPT_CMD_ERR_CANT_FIND_HBA_INDEX, DPT_CMD_ERR_CANT_FIND_HBA_INDEX_NVRAM, DPT_CMD_ERR_COMPONENT_BUSY, DPT_CMD_ERR_INVALID_FLASH_IMAGE, DPT_ERR_VALUE_OUT_OF_RANGE, DPT_ERR_INVALID_FILE, DPT_ERR_INVALID_RAID_TYPE, DPT_ERR_NOT_ENOUGH_MEMORY, DPT_ERR_TWO_TB_RAID, DPT_ERR_INVALID_SEGMENT_OFFSET, DPT_ERR_INVALID_SEGMENT_SIZE, DPT_ERR_NAME_ALREADY_USED, // this is not possible (see taskctrl.cpp) DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID, DPT_CMD_ERR_CMD_NOT_POSS_ON_HBA, DPT_CMD_ERR_CMD_NOT_POSS_ON_THIS_DEVICE, DPT_ERR_POSS_BUFFER_CORRUPTION, // errors that correspond directly to engine errors DPT_MSG_RTN_COMPLETED = MSG_RTN_COMPLETED, DPT_MSG_RTN_STARTED = MSG_RTN_STARTED, // added to get around 'long enum' compile error #if (!defined _DPT_SCO) DPT_MSG_RTN_FAILED = MSG_RTN_FAILED, #else #define DPT_MSG_RTN_FAILED MSG_RTN_FAILED #endif DPT_MSG_RTN_DATA_OVERFLOW = MSG_RTN_DATA_OVERFLOW, DPT_MSG_RTN_DATA_UNDERFLOW = MSG_RTN_DATA_UNDERFLOW, DPT_MSG_RTN_IGNORED = MSG_RTN_IGNORED, DPT_MSG_RTN_DISCONNECT = MSG_RTN_DISCONNECT, DPT_ERR_CONN_LIST_ALLOC = ERR_CONN_LIST_ALLOC, DPT_ERR_SEMAPHORE_ALLOC = ERR_SEMAPHORE_ALLOC, DPT_ERR_OSD_OPEN_ENGINE = ERR_OSD_OPEN_ENGINE, DPT_ERR_INVALID_IO_METHOD = ERR_INVALID_IO_METHOD, DPT_ERR_NO_SMARTROM = ERR_NO_SMARTROM, DPT_ERR_ENGINE_INIT = ERR_ENGINE_INIT, DPT_ERR_INVALID_CONN_TAG = ERR_INVALID_CONN_TAG, DPT_ERR_SEMAPHORE_TIMEOUT = ERR_SEMAPHORE_TIMEOUT, DPT_ERR_NULL_IO_BUFFER = ERR_NULL_IO_BUFFER, DPT_ERR_INVALID_TGT_TAG = ERR_INVALID_TGT_TAG, DPT_ERR_DESTROY_SEMAPHORE = ERR_DESTROY_SEMAPHORE, DPT_ERR_MEM_ALLOC = ERR_MEM_ALLOC, DPT_ERR_INVALID_DEV_ADDR = ERR_INVALID_DEV_ADDR, DPT_ERR_DUPLICATE_NAME = ERR_DUPLICATE_NAME, DPT_ERR_GET_CCB = ERR_GET_CCB, DPT_ERR_NO_RAID_DEVICES = ERR_NO_RAID_DEVICES, DPT_ERR_RESERVE_BLK_SIG = ERR_RESERVE_BLK_SIG, DPT_ERR_FORMAT_BLK_SIZE = ERR_FORMAT_BLK_SIZE, DPT_ERR_RAID_REFNUM = ERR_RAID_REFNUM, DPT_ERR_RAID_COMP_DUPLICATE = ERR_RAID_COMP_DUPLICATE, DPT_ERR_RAID_COMP_RESTRICT = ERR_RAID_COMP_RESTRICT, DPT_ERR_RAID_COMP_USED = ERR_RAID_COMP_USED, DPT_ERR_RAID_COMP_GHOST = ERR_RAID_COMP_GHOST, DPT_ERR_RAID_COMP_FAILED = ERR_RAID_COMP_FAILED, DPT_ERR_RAID_TOO_FEW = ERR_RAID_TOO_FEW, DPT_ERR_RAID_TOO_MANY = ERR_RAID_TOO_MANY, DPT_ERR_RAID_EVEN = ERR_RAID_EVEN, DPT_ERR_RAID_ODD = ERR_RAID_ODD, DPT_ERR_RAID_POWER_2_PLUS = ERR_RAID_POWER_2_PLUS, DPT_ERR_RAID_CHAN_COUNT = ERR_RAID_CHAN_COUNT, DPT_ERR_RAID_MIN_STRIPE = ERR_RAID_MIN_STRIPE, DPT_ERR_RAID_MAX_STRIPE = ERR_RAID_MAX_STRIPE, DPT_ERR_RAID_ZERO_STRIPES = ERR_RAID_ZERO_STRIPES, DPT_ERR_RAID_TOO_LARGE = ERR_RAID_TOO_LARGE, DPT_ERR_RAID_START_CHAN = ERR_RAID_START_CHAN, DPT_ERR_RAID_SEQ_CHAN = ERR_RAID_SEQ_CHAN, DPT_ERR_RAID_DIFF_STRIPES = ERR_RAID_DIFF_STRIPES, DPT_ERR_RAID_DIFF_NUM_STR = ERR_RAID_DIFF_NUM_STR, DPT_ERR_RAID_OVER_STRIPE = ERR_RAID_OVER_STRIPE, DPT_ERR_RAID_COMP_REMOVE = ERR_RAID_COMP_REMOVE, DPT_ERR_RAID_COMP_EMULATED = ERR_RAID_COMP_EMULATED, DPT_ERR_RAID_COMP_DEVTYPE = ERR_RAID_COMP_DEVTYPE, DPT_ERR_RAID_COMP_NON_512 = ERR_RAID_COMP_NON_512, DPT_ERR_RAID_DIFF_BLOCKS = ERR_RAID_DIFF_BLOCKS, DPT_ERR_RAID_DIFF_CAPACITY = ERR_RAID_DIFF_CAPACITY, DPT_ERR_RAID_DIFF_VENDOR = ERR_RAID_DIFF_VENDOR, DPT_ERR_RAID_DIFF_PRODUCT = ERR_RAID_DIFF_PRODUCT, DPT_ERR_RAID_DIFF_REVISION = ERR_RAID_DIFF_REVISION, DPT_ERR_RAID_NOT_SUPPORTED = ERR_RAID_NOT_SUPPORTED, DPT_ERR_RAID_INVALID_HBA = ERR_RAID_INVALID_HBA, DPT_ERR_RAID_TABLE_REQUIRED = ERR_RAID_TABLE_REQUIRED, DPT_ERR_RAID_COMP_TAG = ERR_RAID_COMP_TAG, DPT_ERR_RAID_MAX_ARRAYS = ERR_RAID_MAX_ARRAYS, DPT_ERR_RAID_COMP_SIZE = ERR_RAID_COMP_SIZE, DPT_ERR_RAID_FW_LEVEL = ERR_RAID_FW_LEVEL, DPT_ERR_INVALID_HBA_ADDR = ERR_INVALID_HBA_ADDR, DPT_ERR_ISA_ADDR_ONLY = ERR_ISA_ADDR_ONLY, DPT_ERR_PRIMARY_HBA_EXISTS = ERR_PRIMARY_HBA_EXISTS, DPT_ERR_NO_MORE_SLOTS = ERR_NO_MORE_SLOTS, DPT_ERR_DUP_ISA_ADDR = ERR_DUP_ISA_ADDR, DPT_ERR_DUP_EISA_SLOT = ERR_DUP_EISA_SLOT, DPT_ERR_PRIMARY_ISA_ADDR = ERR_PRIMARY_ISA_ADDR, DPT_ERR_SECONDARY_ISA_ADDR = ERR_SECONDARY_ISA_ADDR, DPT_ERR_ABS_NO_MORE_IDS = ERR_ABS_NO_MORE_IDS, DPT_ERR_ABS_NON_ZERO_LUN = ERR_ABS_NON_ZERO_LUN, DPT_ERR_ABS_ADDR_LIMITS = ERR_ABS_ADDR_LIMITS, DPT_ERR_ABS_ADDR_OCCUPIED = ERR_ABS_ADDR_OCCUPIED, DPT_ERR_ABS_NO_MORE_LUNS = ERR_ABS_NO_MORE_LUNS, DPT_ERR_NEW_ARTIFICIAL = ERR_NEW_ARTIFICIAL, DPT_ERR_IO_NOT_SUPPORTED = ERR_IO_NOT_SUPPORTED, DPT_ERR_RW_EXCEEDS_CAPACITY = ERR_RW_EXCEEDS_CAPACITY, DPT_ERR_DATA_IN_OUT = ERR_DATA_IN_OUT, DPT_ERR_SCSI_CMD_FAILED = ERR_SCSI_CMD_FAILED, DPT_ERR_ARTIFICIAL_IO = ERR_ARTIFICIAL_IO, DPT_ERR_SCSI_IO = ERR_SCSI_IO, DPT_ERR_BLINK_LED_IO = ERR_BLINK_LED_IO, DPT_ERR_OSD_MEM_ALLOC = ERR_OSD_MEM_ALLOC, DPT_ERR_FORMATTING = ERR_FORMATTING, DPT_ERR_HBA_BUSY = ERR_HBA_BUSY, DPT_ERR_HBA_INITIALIZING = ERR_HBA_INITIALIZING, DPT_ERR_DEL_OLD_RAID = ERR_DEL_OLD_RAID, DPT_ERR_ENABLE_NEW_RAID = ERR_ENABLE_NEW_RAID, DPT_ERR_UPDATE_OS_CONFIG = ERR_UPDATE_OS_CONFIG, DPT_ERR_SCSI_ADDR_BOUNDS = ERR_SCSI_ADDR_BOUNDS, DPT_ERR_SCSI_ADDR_CONFLICT = ERR_SCSI_ADDR_CONFLICT, DPT_ERR_CANNOT_DELETE = ERR_CANNOT_DELETE, DPT_ERR_FWD_NO_SPACE = ERR_FWD_NO_SPACE, DPT_ERR_FWD_NOT_RESERVED = ERR_FWD_NOT_RESERVED, DPT_ERR_FWD_NOT_INITIALIZED = ERR_FWD_NOT_INITIALIZED, DPT_ERR_FWD_BLK_MISMATCH = ERR_FWD_BLK_MISMATCH, DPT_ERR_FWD_BLK_OVERFLOW = ERR_FWD_BLK_OVERFLOW, DPT_ERR_RSV_REMOVEABLE = ERR_RSV_REMOVEABLE, DPT_ERR_RSV_NOT_DASD = ERR_RSV_NOT_DASD, DPT_ERR_RSV_NON_ZERO = ERR_RSV_NON_ZERO, DPT_ERR_RSV_HBA_UNABLE = ERR_RSV_HBA_UNABLE, DPT_ERR_RSV_OTHER = ERR_RSV_OTHER, DPT_ERR_SCAN_PHYSICALS = ERR_SCAN_PHYSICALS, DPT_ERR_INIT_PHYSICALS = ERR_INIT_PHYSICALS, DPT_ERR_SCAN_LOGICALS = ERR_SCAN_LOGICALS, DPT_ERR_INIT_LOGICALS = ERR_INIT_LOGICALS, DPT_ERR_COMM_XMIT_BUFFER = ERR_COMM_XMIT_BUFFER, DPT_ERR_COMM_RCVE_BUFFER = ERR_COMM_RCVE_BUFFER, DPT_ERR_COMM_DISCONNECTED = ERR_COMM_DISCONNECTED, DPT_ERR_COMM_DATA_OVERFLOW = ERR_COMM_DATA_OVERFLOW, DPT_ERRC_T_OPEN = ERRC_T_OPEN, DPT_ERRC_T_BIND = ERRC_T_BIND, DPT_ERRC_T_ALLOC = ERRC_T_ALLOC, DPT_ERRC_T_CONNECT = ERRC_T_CONNECT, DPT_ERRC_T_LISTEN = ERRC_T_LISTEN, DPT_ERRC_T_ACCEPT = ERRC_T_ACCEPT, DPT_ERRC_COMM_NW_INIT = ERRC_COMM_NW_INIT, DPT_ERRC_COMM_WS_INIT = ERRC_COMM_WS_INIT, DPT_ERRC_SEMAPHORE_TIMEOUT = ERRC_SEMAPHORE_TIMEOUT, DPT_ERRC_CONNECTION_TAG = ERRC_CONNECTION_TAG, DPT_ERRC_NOT_NULL_TERMED = ERRC_NOT_NULL_TERMED, DPT_ERRC_MEM_ALLOC = ERRC_MEM_ALLOC, DPT_ERRC_NULL_IO_BUFFER = ERRC_NULL_IO_BUFFER, DPT_ERRC_INVALID_PASSWORD = ERRC_INVALID_PASSWORD, DPT_ERRC_NOT_LOGGED_IN = ERRC_NOT_LOGGED_IN, DPT_ERRC_ENGINE_LOAD = ERRC_ENGINE_LOAD, DPT_ERRC_NOT_SUPPORTED = ERRC_NOT_SUPPORTED, DPT_ERRC_ICRS_ACTIVE = ERRC_ICRS_ACTIVE, DPT_ERRC_ICRS_INACTIVE = ERRC_ICRS_INACTIVE, DPT_ERRC_ICRS_REQ_POSTED = ERRC_ICRS_REQ_POSTED, DPT_ERRC_ICRS_THREAD_START = ERRC_ICRS_THREAD_START, DPT_ERRC_ICRS_START_REQUEST = ERRC_ICRS_START_REQUEST, DPT_ERRC_ICRS_INIT = ERRC_ICRS_INIT, DPT_ERRC_ACCEPTING_ICR = ERRC_ACCEPTING_ICR, DPT_ERRC_TX_MSG_SYNC = ERRC_TX_MSG_SYNC, DPT_ERRC_RX_MSG_ACK = ERRC_RX_MSG_ACK, DPT_ERRC_RX_MSG_HEADER = ERRC_RX_MSG_HEADER, DPT_ERRC_TX_MSG_HEADER = ERRC_TX_MSG_HEADER, DPT_ERRC_TX_TO_ENG_DATA = ERRC_TX_TO_ENG_DATA, DPT_ERRC_RX_TO_ENG_DATA = ERRC_RX_TO_ENG_DATA, DPT_ERRC_RX_STATUS_HEADER = ERRC_RX_STATUS_HEADER, DPT_ERRC_TX_STATUS_HEADER = ERRC_TX_STATUS_HEADER, DPT_ERRC_RX_FROM_ENG_DATA = ERRC_RX_FROM_ENG_DATA, DPT_ERRC_TX_FROM_ENG_DATA = ERRC_TX_FROM_ENG_DATA, DPT_ERRC_FROM_ENG_SIZE = ERRC_FROM_ENG_SIZE, DPT_ERRC_TO_ENG_SIZE = ERRC_TO_ENG_SIZE, DPT_ERRC_SERIAL_INIT = ERRC_SERIAL_INIT, DPT_ERRC_BAUD_RATE = ERRC_BAUD_RATE, DPT_ERRC_COMM_BUSY = ERRC_COMM_BUSY, DPT_ERRC_INVALID_PROTOCOL = ERRC_INVALID_PROTOCOL, DPT_ERRC_PORT_CONFLICT = ERRC_PORT_CONFLICT, DPT_ERRC_MODEM_INIT = ERRC_MODEM_INIT, DPT_ERRC_DIAL_ABORT = ERRC_DIAL_ABORT, DPT_ERRC_DIAL_TIMEOUT = ERRC_DIAL_TIMEOUT, DPT_ERRC_DIAL_BUSY = ERRC_DIAL_BUSY, DPT_ERRC_DIAL_BEEPER_OK = ERRC_DIAL_BEEPER_OK, DPT_ERRC_DIAL_UNEXPECTED_CD = ERRC_DIAL_UNEXPECTED_CD, DPT_ERRC_DIAL_NO_TONE = ERRC_DIAL_NO_TONE, DPT_ERRC_DIAL_NO_ANSWER = ERRC_DIAL_NO_ANSWER, DPT_ERRC_DIAL_ERROR = ERRC_DIAL_ERROR, DPT_ERRC_NEGOTIATION = ERRC_NEGOTIATION, DPT_ERRC_MSG_TIMEOUT = ERRC_MSG_TIMEOUT, DPT_ERRC_USER_ABORT = ERRC_USER_ABORT, DPT_ERRSPX_RD_PROPERTY = ERRSPX_RD_PROPERTY, DPT_ERRSPX_SAP = ERRSPX_SAP, DPT_ERRC_SOCKET_ALLOC = ERRC_SOCKET_ALLOC, DPT_ERRC_SOCKET_BIND = ERRC_SOCKET_BIND, DPT_ERRC_SOCKET_ACCEPT = ERRC_SOCKET_ACCEPT, DPT_ERRC_SOCKET_CONNECT = ERRC_SOCKET_CONNECT, DPT_ERRC_USER_VALIDATION = ERRC_USER_VALIDATION, DPT_ERR_FLASH_ERASE = ERR_FLASH_ERASE, DPT_ERR_FLASH_SWITCH_MODES = ERR_FLASH_SWITCH_MODES, DPT_ERR_FLASH_WRITE_512 = ERR_FLASH_WRITE_512, DPT_ERR_FLASH_ENG_VERIFY = ERR_FLASH_ENG_VERIFY, DPT_ERR_FLASH_INIT_REQ = ERR_FLASH_INIT_REQ, DPT_ERR_EXCLUSION_TIME = ERR_EXCLUSION_TIME, DPT_ERR_DIAG_SCHEDULED = ERR_DIAG_SCHEDULED, DPT_ERR_DIAG_NOT_ACTIVE = ERR_DIAG_NOT_ACTIVE, DPT_ERR_ELOG_NOT_LOADED = ERR_ELOG_NOT_LOADED, DPT_ERR_ELOG_LOADED = ERR_ELOG_LOADED, DPT_ERR_ELOG_EVENTS = ERR_ELOG_EVENTS, DPT_ERR_ELOG_PAUSED = ERR_ELOG_PAUSED, DPT_ERR_ELOG_NOT_PAUSED = ERR_ELOG_NOT_PAUSED, DPT_ERR_SLOG_INVALID_TIME = ERR_SLOG_INVALID_TIME, DPT_ERR_SLOG_STAT_GROUP = ERR_SLOG_STAT_GROUP, DPT_ERR_ALMS_ALREADY_LINKED = ERR_ALMS_ALREADY_LINKED, DPT_ERR_ALMS_NOT_LINKED = ERR_ALMS_NOT_LINKED, DPT_ERR_ALMS_INVALID_RESOURCE_TYPE = ERR_ALMS_INVALID_RESOURCE_TYPE }; Dpt_Error( dpt_Error new_Err = DPT_CMD_ERR_NO_ERROR ): err( new_Err ) {} Dpt_Error( int new_Err ): err( (dpt_Error) new_Err ) {} Dpt_Error(const Dpt_Error &src) { err = src.err; } Dpt_Error &operator = ( int eng_Err ) { err = (dpt_Error) eng_Err; if( Is_Error() ) { // _asm int 3; } return( *this ); } Dpt_Error &operator = ( dpt_Error eng_Err ) { err = eng_Err; if( Is_Error() ) { // _asm int 3; } return( *this ); } Dpt_Error &operator |= ( int eng_Err ) { if ( !Is_Error() ) { err = (dpt_Error) eng_Err; } return( *this ); } Dpt_Error &operator |= ( dpt_Error eng_Err ) { if ( !Is_Error() ) { err = eng_Err; } return( *this ); } operator char *() const; operator dpt_Error() const { return(err); } bool operator==(dpt_Error e) const { return(err == e); } bool operator!=(dpt_Error e) const { return(err != e); } inline bool Success() const { return((bool) ((err == DPT_MSG_RTN_COMPLETED) || (err == DPT_CMD_ERR_NO_ERROR))); } inline bool Failure() const { return(!Success()); } // we have two errors meaning "OK". Allow both to work. bool Is_Error() const { #if !defined _DPT_NETWARE return( !( err == DPT_MSG_RTN_COMPLETED || err == DPT_CMD_ERR_NO_ERROR ) ); #else return((bool) !(err == DPT_MSG_RTN_COMPLETED || err == DPT_CMD_ERR_NO_ERROR)); #endif } private: dpt_Error err; }; Command(); virtual ~Command(); void Init_Engine(int scanHbasOnly = 0); // This executes the command that this object represents. This returns a // "String_List" object. The reason it returns this rather than printing // to the screen is to allow the caller complete control over how the strings // are given to the user (if at all). // Note: The caller is responsible for deleting this String_List // object! virtual Dpt_Error execute( String_List **output ) = 0; virtual Command &Clone() const = 0; static DPT_EngineIO_C *engine; protected: DPT_TAG_T Get_Log_Component( SCSI_Address &obj_Address, int dev_Index, bool *index_Found ); DPT_TAG_T Get_Component( DPT_TAG_T parent_Tag, int dev_Index, bool *index_Found, get_Devs_Type *dev_Type ); DPT_TAG_T Get_Log_Dev_by_Index( int dev_Index, bool retrieve_Hiddens, // like hot-spares bool *index_Found, int hba_Index = -1 ); DPT_TAG_T Get_Log_Dev_by_Address( SCSI_Address &obj_Address, bool retrieve_Hiddens, // like hot-spares bool *obj_Found ); DPT_TAG_T Get_Address_by_Index( SCSI_Address &obj_Address, int dev_Index, bool *obj_Found, get_Devs_Type *dev_Type ); DPT_TAG_T Get_Dev_by_Index( int hba_Index, // should be negative // if unused (will index // across all HBA's then) int dev_Index, bool *index_Found, get_Devs_Type *dev_Type ); DPT_TAG_T Get_HBA_by_Index( int hba_Index, bool *index_Found ); #if DONT_USE_TILL_DEBUGGED DPT_TAG_T Get_Dev_by_Index_Type_and_Mask( get_Devs_Type dev_Type, // what kind of object SCSI_Address &obj_Root, // used for scope limitation get_Devs_Mask dev_Mask, // used for scope limitation int dev_Index, bool *index_Found ); #endif DPT_TAG_T Get_Dev_by_Address( SCSI_Address &obj_Address, get_Devs_Type *dev_Type, // Note: this is // only physical // types bool *obj_Found ); DPT_TAG_T Get_Dev_by_Address_and_Type( get_Devs_Type dev_Type, SCSI_Address &obj_Address, bool *obj_Found ); SCSI_Address DPT_Tag_to_Address( DPT_TAG_T tag, bool *tag_Valid ); void PrintRaidAddress(DPT_TAG_T raid_Tag, String_List *out); char *Strip_Trailing_Whitespace (char *str); char PrintAQuestion(char *str); void MakeArrayOptimal(DPT_TAG_T arrayTag); void Commit( DPT_TAG_T tag = (DPT_TAG_T)NULL, bool nobuild = (bool)false ); int EngineFindIDs(int flags, DPT_MSG_T message, DPT_TAG_T devicetag, void *where, uSHORT maxIDs); private: int Convert_Engine_Level( unsigned engine_Level ) { // the engine level has physicals as the highest value, // which limits the number of levels. We're converting // the level to '0' == phys, and anything higher is another // higher level. return( 2 - engine_Level ); } static int num_Instances; DLL_HANDLE_T eng_Module_Handle; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/config.cpp0000664000175000000620000003746210044153334020137 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 12/1/1999 * ***************************************************************************** * * File Name: Config.cpp * Module: * Contributors: Karla Summers * Description: This command loads and saves controller configuration * Version Control: * * $Revision: 7 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "rustring.h" #include "config.hpp" #include "scsilist.hpp" #include "deletrad.hpp" #include "rscenum.h" extern char* EventStrings[]; /*** CONSTANTS ***/ const uCHAR SMU_SWARRAY = 0x04; const uCHAR SMU_STRIPED = 0x02; const uCHAR SMU_NEWARRAY = 0x80; uCHAR SMU_EXPANDING = 0x01; const uCHAR SMU_CLEAR_BOTH = 0x10; const uSHORT RESERVED_SIZE_IN_BLOCKS = 17; extern uSHORT LOG_LIST_SIZE; extern int FID_RESET_OUTBUFF; extern uSHORT PHYS_LIST_SIZE; /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Config::Config (char * fName, ConfigureOption option, bool nobuildOption) { ENTER ("Config::Config("); (void)strcpy (fileName = new char [strlen (fName) + 5], (const char *) fName); configOption = option; noBuild = nobuildOption; EXIT (); } Config::Config (const Config &new_Config) { ENTER ("Config::Config (const Config &new_Config):"); Config (new_Config.fileName, new_Config.configOption, new_Config.noBuild); EXIT (); } Config::~Config () { ENTER ("Config::~Config()"); if (fileName) { delete [] fileName; fileName = (char *)NULL; } EXIT (); } Command::Dpt_Error Config::execute (String_List **output) { ENTER ("Command::Dpt_Error Config::execute (String_List **output)"); Dpt_Error err; FILE * fp; *output = new String_List (); Init_Engine(); int dev_Index = 0; bool more_Devs_Left = true; bool first_time_through = true; bool cluster_ON = false; for(dev_Index = 0; more_Devs_Left && !err.Is_Error(); dev_Index ++){ DPT_TAG_T hba_Tag; hba_Tag = Get_HBA_by_Index(dev_Index, &more_Devs_Left); engine->Reset(); engine->Send(MSG_GET_INFO, hba_Tag); //if the cluster bit is enabled, DISABLE this feature if (engine->hbaInfo_P->flags2 & FLG_HBA_CLUSTER_MODE) cluster_ON = true; } if (cluster_ON && configOption == LoadCfg) (**output).add_Item ( EventStrings[STR_CLSTR_FEAT_DISABLE]); else{ // add .dsm to file name if not already there if (!strchr(fileName, '.')) strcat(fileName, ".dsm"); // open file for reading or writing if (configOption == LoadCfg) fp = fopen (fileName, "rb"); else fp = fopen (fileName, "wb"); if (fp == (FILE *)NULL) { (**output).add_Item (EventStrings[STR_FAILURE]); (**output).add_Item (fileName); return (err); } switch (configOption) { case LoadCfg: err = LoadConfig (fp); break; case SaveCfg: err = SaveConfig (fp); break; } if (!err.Is_Error()) { if (configOption == LoadCfg) (**output).add_Item (EventStrings[STR_CFG_FILE_LOADED]); else (**output).add_Item (EventStrings[STR_CFG_FILE_SAVED]); } (void)fclose (fp); } if (err.Is_Error()) (**output).add_Item ((char *) err); EXIT(); return( err ); } Command::Dpt_Error Config::SaveConfig (FILE * fp) { ENTER ("Command::Dpt_Error Config::SaveConfig("); Dpt_Error err; dsmHdr_S writeHdr; dptBuffer_S *deadBuff_P = dptBuffer_S::newBuffer(10); // clear out the header memset(&writeHdr, 0, sizeof(dsmHdr_S)); // fill in the DSM header strcpy(writeHdr.signature, "DSM1"); // get the compatibility value from the Engine err = engine->Send (MSG_GET_COMPATABILITY, 0); if (!err.Is_Error()) { engine->Extract (&writeHdr.compatibilityValue, sizeof(writeHdr.compatibilityValue)); dptBuffer_S *config_P = (dptBuffer_S *) new uCHAR[50000+sizeof(dptData_S)]; config_P->allocSize = 50000; config_P->reset(); err = engine->Send(MSG_GET_CONFIG, 0, config_P, deadBuff_P); if (!err.Is_Error()) { writeHdr.dataSize = config_P->writeIndex; fwrite(&writeHdr, sizeof(dsmHdr_S), 1, fp); fwrite(config_P->data, config_P->writeIndex, 1, fp); } delete[] config_P; } EXIT(); return (err); } Command::Dpt_Error Config::LoadConfig (FILE * fp) { ENTER ("Command::Dpt_Error Config::LoadConfig("); Dpt_Error err; int goodfile = TRUE; dptID_S *loglist = new dptID_S[LOG_LIST_SIZE]; dptBuffer_S *deadBuff_P = dptBuffer_S::newBuffer(10); dptBuffer_S *tempBuff_P = dptBuffer_S::newBuffer(1024); dptBuffer_S *outBuff_P = dptBuffer_S::newBuffer(4*1024); dsmHdr_S readHdr; uLONG compatibilityValue; dptBuffer_S *config_P = (dptBuffer_S *) new uCHAR[50000+sizeof(dptData_S)]; config_P->allocSize = 50000; config_P->reset(); // read the header into our buffer fread (&readHdr, sizeof(dsmHdr_S), 1, fp); // get the compatibility byte err = engine->Send (MSG_GET_COMPATABILITY, 0); if (!err.Is_Error()) { engine->Extract (&compatibilityValue, sizeof(compatibilityValue)); // check the compatibility byte if (readHdr.compatibilityValue != compatibilityValue) goodfile = FALSE; // check the signature int version = 0; if (0 == strcmp(readHdr.signature, "DSM1")) version = 1; else if(0 == strcmp(readHdr.signature, "DSM2")) version = 2; if (!version) goodfile = FALSE; if (goodfile){ config_P->writeIndex = readHdr.dataSize; // Delete All Arrays DeleteAllArrays(); // read the data that follows it fread(config_P->data,config_P->writeIndex,1,fp); // tack on the array size limiting stuff /* if (message == MSG_RAID_SET_CONFIG && limitIsDefault) { config_P->insert((uSHORT) FLG_DSM_DONT_RECOMPUTE_ARRAYS); config_P->insert((uSHORT) FLG_DSM_FLAGS_VALID); } */ err = engine->Send(MSG_RAID_SET_CONFIG, 0, deadBuff_P, config_P); } else{ // err - bad file err = Dpt_Error::DPT_ERR_INVALID_FILE; return (err); } } delete[] config_P; // Check to see if there are any arrays in the config and take action tempBuff_P->reset(); tempBuff_P->clear(); smUserBuff_S *smUB_P = (smUserBuff_S *) tempBuff_P->data; // get all the RAID devices outBuff_P->reset(); outBuff_P->insert((uSHORT) (DPT_RAID_TYPE | DPT_EXCEPT)); outBuff_P->insert((uSHORT)0xffff); int numLogs = EngineFindIDs(0, MSG_ID_ALL_LOGICALS, 0, loglist, LOG_LIST_SIZE); for (int i = 0; (i < numLogs) && (!err.Is_Error()); i++) { // get info about the array err = engine->Send (MSG_GET_INFO, loglist[i].tag); if (!err.Is_Error()) { // reset flags smUB_P->arrayFlags &= ~SMU_SWARRAY; smUB_P->arrayFlags &= ~SMU_STRIPED; // flag the array as newly created smUB_P->arrayFlags |= SMU_NEWARRAY; // set the raid type smUB_P->raidType = (uCHAR) engine->devInfo_P->raidType; // if this is the top level of dual aray if (engine->devInfo_P->level == 0) smUB_P->arrayFlags |= SMU_SWARRAY; // if a striped FW level array else if ((engine->devInfo_P->level == 1) && (engine->devInfo_P->raidParent != (DPT_TAG_T) -1)) smUB_P->arrayFlags |= SMU_STRIPED; tempBuff_P->writeIndex = sizeof (smUserBuff_S); err = engine->Send(MSG_SET_USER_BUFF, loglist[i].tag, deadBuff_P, tempBuff_P); } } if (numLogs && !err.Is_Error()) err = SetSysConfig(); delete loglist; EXIT(); return (err); } void Config::DeleteAllArrays(void) { String_List *noOutput = new String_List (); SCSI_Address Temp (-1, -1, -1, -1); SCSI_Addr_List *components = new SCSI_Addr_List(); // delete RAIDs components->add_Item (Temp); Delete_Raid *temp = new Delete_Raid (components, false); temp->execute (&noOutput); // delete hot spares components->add_Item (Temp); temp = new Delete_Raid (components, true); temp->execute (&noOutput); delete components; delete noOutput; } //////////////////////////////////////////////////////////////////////////// // This function sets the system hardware to the current configuration // Call with warn == TRUE if you want the user warned // We don't warn when exiting the program. //////////////////////////////////////////////////////////////////////////// Command::Dpt_Error Config::SetSysConfig() { Dpt_Error err; dptID_S *loglist = new dptID_S[LOG_LIST_SIZE]; dptID_S *idlist = new dptID_S[PHYS_LIST_SIZE]; dptBuffer_S *deadBuff_P = dptBuffer_S::newBuffer(10); dptBuffer_S *tempBuff_P = dptBuffer_S::newBuffer(1024); // set up a buffer to receive the user buffer smUserBuff_S *smUB_P = (smUserBuff_S *)tempBuff_P->data; tempBuff_P->reset(); /////////////////////////////////////////////////////////////////////// // Go through all the Arrays looking for RAID-1s flagged as being // created in this session and ask copy direction ////////////////////////////////////////////////////////////////////// if (!noBuild) { // get all the RAID devices - engine->Reset(); engine->Insert((uSHORT)(DPT_RAID_TYPE | DPT_EXCEPT)); engine->Insert((uSHORT)0xffff); int numLogs = EngineFindIDs(0, MSG_ID_ALL_LOGICALS, 0, loglist, LOG_LIST_SIZE); for (int i = 0; i < numLogs; i++) { // read the user buffer err = engine->Send(MSG_GET_USER_BUFF, loglist[i].tag, tempBuff_P, deadBuff_P); // was this array created in this session? if (smUB_P->arrayFlags & SMU_NEWARRAY) { err = engine->Send (MSG_GET_INFO, loglist[i].tag); if(smUB_P->raidType == 1) { // Never offer a copy, because we are making this // config from scratch. int copydir = SMU_CLEAR_BOTH; tempBuff_P->reset(); tempBuff_P->writeIndex = sizeof(smUserBuff_S); // was 4; smUB_P->arrayFlags |= copydir; err = engine->Send (MSG_SET_USER_BUFF,loglist[i].tag,deadBuff_P,tempBuff_P); } } } } // tell the Engine to do it err = engine->Send (MSG_RAID_HW_ENABLE); if (err.Is_Error()) return err; /////////////////////////////////////////////////////////////////////// // Go through all the Arrays looking for ones flagged as being // created in this session and fire off builds, etc. ////////////////////////////////////////////////////////////////////// // get all the RAID devices - engine->Reset(); engine->Insert((uSHORT)(DPT_RAID_TYPE | DPT_EXCEPT)); engine->Insert((uSHORT)0xffff); int numLogs = EngineFindIDs(0, MSG_ID_ALL_LOGICALS, 0, loglist, LOG_LIST_SIZE); for (int i = 0; i < numLogs;i++) { err = engine->Send (MSG_GET_INFO, loglist[i].tag); // read the user buffer err = engine->Send(MSG_GET_USER_BUFF, loglist[i].tag, tempBuff_P, deadBuff_P); // was this array created in this session? if(smUB_P->arrayFlags & SMU_NEWARRAY) { // We don't want to fire off builds if the user disabled them // with command line option - we just want to force them // to optimal if (noBuild) { // We don't want to send this command to a SW RAID-0 // (the Engine will explode) if (smUB_P->arrayFlags & SMU_SWARRAY) { continue; } int numComps = EngineFindIDs (FID_RESET_OUTBUFF, MSG_ID_COMPONENTS, loglist[i].tag, idlist, PHYS_LIST_SIZE); for (int k = 0; k < numComps; k++) { engine->Reset(); engine->Insert ((uCHAR) FORCE_OPTIMAL); engine->Send (MSG_FORCE_STATE, idlist[k].tag); } } else // fire off builds { if(smUB_P->raidType == 1) { // If this is a component of a stripped array // on a Gen5 HBA, we will not fire off the // build, it will be done on the parent if(!(smUB_P->arrayFlags & SMU_STRIPED)) { if (smUB_P->arrayFlags & SMU_CLEAR_BOTH) { engine->Send (MSG_RAID_BUILD, loglist[i].tag); } /* else { // Get the components EngineFindIDs (FID_RESET_OUTBUFF,MSG_ID_COMPONENTS,loglist[i].tag,idlist, PHYS_LIST_SIZE); int source; if (smUB_P->arrayFlags & SMU_COPY_1_TO_2) source = 0; else source = 1; // Force the source drive to optimal engine->Reset(); // outBuff_P->reset(); engine->Insert((uCHAR) FORCE_OPTIMAL); //outBuff_P->insert((uCHAR) FORCE_OPTIMAL); engine->Send (MSG_FORCE_STATE,idlist[source].tag); //CallEngine(MSG_FORCE_STATE,idlist[source].tag,FALSE); // Force the target drive to replaced engine->Reset(); // outBuff_P->reset(); engine->Insert((uCHAR) FORCE_REPLACED); //outBuff_P->insert((uCHAR) FORCE_REPLACED); engine->Send (MSG_FORCE_STATE,idlist[source ^ 1].tag); //CallEngine(MSG_FORCE_STATE,idlist[source ^ 1].tag,FALSE); }*/ } // Gen5 stripped array component must be in the background // list for status updates. else { engine->Send (MSG_UPDATE_STATUS,loglist[i].tag); } } else if(smUB_P->raidType == 5) { // If this is a component of a stripped array // on a Gen5 HBA, we will not fire off the // build, it will be done on the parent if(!(smUB_P->arrayFlags & SMU_STRIPED)) { engine->Send (MSG_RAID_BUILD, loglist[i].tag); } else { engine->Send (MSG_UPDATE_STATUS, loglist[i].tag); } } // For a stripped array on a Gen5 adapter, we will send // off the build and update background status for the // top level instead of the components else if (engine->devInfo_P->level == 0) { engine->Send (MSG_RAID_BUILD, loglist[i].tag); } } // Clear the user buffer tempBuff_P->reset(); tempBuff_P->clear(); tempBuff_P->writeIndex = sizeof(smUserBuff_S); engine->Send (MSG_SET_USER_BUFF,loglist[i].tag, deadBuff_P,tempBuff_P); } // if expanding fire off a background task else if (smUB_P->arrayFlags & SMU_EXPANDING) { // Clear the user buffer tempBuff_P->reset(); tempBuff_P->clear(); tempBuff_P->writeIndex = sizeof(smUserBuff_S); engine->Send (MSG_SET_USER_BUFF,loglist[i].tag, deadBuff_P,tempBuff_P); } } delete loglist; delete idlist; return err; } Command &Config::Clone() const { ENTER ("Command &Config::Clone() const"); EXIT (); return (*new Config (this->fileName, this->configOption, this->noBuild)); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/config.hpp0000664000175000000620000000606710044153336020143 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef CONFIG_HPP #define CONFIG_HPP /**************************************************************************** * * Created: 12/1/1999 * ***************************************************************************** * * File Name: Config.hpp * Module: * Contributors: Karla Summers * Description: This command loads and saves controller configuration * Version Control: * * $Revision: 1 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ /*** CONSTANTS ***/ enum ConfigureOption { LoadCfg, SaveCfg }; /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Config: public Command { public: // configure an HBA with the specified image Config (char * fName, ConfigureOption option, bool nobuildOption); Config (const Config &new_Config); virtual ~Config (); Dpt_Error execute (String_List **output); Command &Clone () const; private: void DeleteAllArrays(void); Dpt_Error SetSysConfig(void); Dpt_Error SaveConfig (FILE * fp); Dpt_Error LoadConfig (FILE * fp); char * fileName; char * image; bool noBuild; ConfigureOption configOption; typedef struct { char signature[5]; char bullshit[3]; uLONG compatibilityValue; uLONG dataSize; } dsmHdr_S; typedef struct { uCHAR arrayFlags; uCHAR raidType; uCHAR pad[2]; } smUserBuff_S; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/creatrad.cpp0000664000175000000620000005563310044153334020457 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/20/98 * ***************************************************************************** * * File Name: CreatRad.cpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 45 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include #include "creatrad.hpp" #include "intlist.hpp" #include "rustring.h" #include "rscenum.h" extern char* EventStrings[]; /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Create_Raid::Create_Raid( SCSI_Addr_List *addresses, Raid_Type new_Raid_Type, uLONG size_of_Stripe, uLONG raid_Size_in_Blocks, bool nobuildOption, bool ignoreNonfatalErrorsOption, int numDrivesPerArray, SCSI_Addr_List *compsOmit ): raid_Type( new_Raid_Type ), stripe_Size( size_of_Stripe ), address_List( addresses ), desired_Raid_Size_in_Blocks( raid_Size_in_Blocks ), nobuild(nobuildOption), ignoreNonfatalErrors(ignoreNonfatalErrorsOption), drivesPerArray (numDrivesPerArray), comps_Omit (compsOmit) { ENTER( "Create_Raid::Create_Raid(" ); EXIT(); } Create_Raid::Create_Raid( const Create_Raid &new_Create_Raid ): raid_Type( new_Create_Raid.raid_Type ), stripe_Size( new_Create_Raid.stripe_Size ), address_List( new_Create_Raid.address_List ), desired_Raid_Size_in_Blocks( new_Create_Raid.desired_Raid_Size_in_Blocks ), nobuild(new_Create_Raid.nobuild), ignoreNonfatalErrors(new_Create_Raid.ignoreNonfatalErrors), drivesPerArray (new_Create_Raid.drivesPerArray), comps_Omit (new_Create_Raid.comps_Omit) { ENTER( "Create_Raid::Create_Raid( const Create_Raid &new_Create_Raid ):" ); EXIT(); } Create_Raid::~Create_Raid() { ENTER( "Create_Raid::~Create_Raid()" ); EXIT(); } Command::Dpt_Error Create_Raid::Create(Raid_Type raidType, int level, Int_List *componentList, uLONG stripeSize, uLONG desiredRaidSizeInBlocks, DPT_TAG_T *this_RAID_Tag) { ENTER( "Command::Dpt_Error Create_Raid::Create (Raid_Type raidType, int level, Int_List *componentList, uLONG stripeSize, uLONG desiredRaidSizeInBlocks, this_RAID_Tag)"); Dpt_Error err; DPT_TAG_T this_HBAs_Tag; bool hba_Index_Found; raidCompList_S component; memset (&component, 0, sizeof(raidCompList_S)); // verify the target hba this_HBAs_Tag = Get_HBA_by_Index (targetHba, &hba_Index_Found); if ( this_RAID_Tag != (DPT_TAG_T *) NULL) { *this_RAID_Tag = (DPT_TAG_T) NULL; } if( !hba_Index_Found ) { err = Command::Dpt_Error::DPT_CMD_ERR_CANT_FIND_HBA_INDEX; } // Verify RAID-5 is supported by the hba if ((!err.Is_Error()) && (raidType == RAID_TYPE_5)) { err = engine->Send( MSG_GET_INFO, this_HBAs_Tag); dptHBAinfo_S *hba_Info = engine->hbaInfo_P; if (!(hba_Info->raidSupport & FLG_RAID_5)) { err = Command::Dpt_Error::DPT_ERR_RAID_NOT_SUPPORTED; } } if (!err.Is_Error()) { raidHeader_S raid_Hdr; memset (&raid_Hdr, 0, sizeof(raidHeader_S)); // set up the RAID header stuff raid_Hdr.control = 0; // FLG_RCTL_ADDR; raid_Hdr.refNum = raidType; // if dual level array, don't limit the stripe size on top level if (level == 1) stripeSize = 0; else if (stripeSize == 0) // If zero, use the defaults { switch (raidType) { case RAID_TYPE_0: // get the default size from the hba err = engine->Send(MSG_RAID_GET_LIMITS, this_HBAs_Tag); if (!err.Is_Error()) { dptArrayLimits_S limits; engine->Extract(&limits, sizeof(dptArrayLimits_S)); int RAID0Stripe = limits.getR0defStripe(); // In case we got garbage if (RAID0Stripe > 512) RAID0Stripe = 64; // divide blocks in half ... RAID0Stripe >>= 1; // and multiply to get Ks stripeSize = RAID0Stripe * 1024L; } break; case RAID_TYPE_1: // stripeSize = 128 * 1024L; stripeSize = 64 * 1024L; break; case RAID_TYPE_5: // get the default size from the hba err = engine->Send(MSG_RAID_GET_LIMITS, this_HBAs_Tag); if (!err.Is_Error()) { dptArrayLimits_S limits; engine->Extract(&limits, sizeof(dptArrayLimits_S)); // this gets the stripe size in BLOCKS int RAID5Stripe = limits.getR5defStripe(); // In case we got garbage if(RAID5Stripe > 512) RAID5Stripe = 64; // divide blocks in half ... RAID5Stripe >>= 1; // and multiply to get Ks stripeSize = RAID5Stripe * 1024L; } break; default: stripeSize = 64 * 1024L; break; } } if (!err.Is_Error()) { raid_Hdr.stripeSize = stripeSize / 512L; // if this "size" is zero, it means "use the maximum". raid_Hdr.size = desiredRaidSizeInBlocks; // set up the component header. component.startLBA = 0; component.stripeSize = stripeSize / 512L; component.numStripes = 0; engine->Reset (); engine->Insert (&raid_Hdr, sizeof(raidHeader_S)); while (componentList->num_Left()) { component.tag = componentList->get_Next_Item(); engine->Insert (&component, sizeof(raidCompList_S)); } } } if( !err.Is_Error() ) { err = engine->Send( MSG_RAID_NEW, (level == 0) ? this_HBAs_Tag : (DPT_TAG_T) NULL); if( !err.Is_Error() && ((raidType == RAID_TYPE_5) || (raidType == RAID_TYPE_1)) && (this_RAID_Tag != (DPT_TAG_T *)NULL)) { engine->Extract (this_RAID_Tag, sizeof(DPT_TAG_T)); } if( !err.Is_Error() && raidType == RAID_TYPE_1 && !nobuild) { engine->Reset(); // this is a mirrored drive. We will default to copying from the // first drive to the second... err = engine->Send( MSG_RAID1_SET_TARGET, component.tag); } } EXIT(); return( err ); } Command::Dpt_Error Create_Raid::execute (String_List **output) { ENTER ("Command::Dpt_Error Create_Raid::execute (String_List **output)"); Dpt_Error err, busy_err; String_List *out; get_Devs_Type devType; DPT_TAG_T tempTag; SCSI_Address dummyAddr; *output = out = new String_List(); Init_Engine(); engine->Reset(); bool component_Found = true; bool tagValid = true; // if hba or hba/bus specified (all), make new address list if ((address_List->get_Num_Items() == 1) && (raid_Type != RAID_TYPE_HOT_SPARE)) { // Fix / verify drivesPerArray according to raid if (raid_Type == RAID_TYPE_1) drivesPerArray = 2; else if (((raid_Type == RAID_TYPE_0) && (drivesPerArray < 1)) || ((raid_Type == RAID_TYPE_5) && (drivesPerArray < 3))) { err = Dpt_Error::DPT_ERR_RAID_TOO_FEW; out->add_Item ((char *) err); return (err); } // get this hba or hba/bus OUT OF THERE!!! SCSI_Address tempAddr = address_List->shift_Item(); for (int devIndex = 0; component_Found; devIndex++) { tempTag = Get_Address_by_Index(tempAddr, devIndex, &component_Found, &devType); if ((component_Found) && (devType == GET_SCSI_DASD)) { if (!comps_Omit->In_List (DPT_Tag_to_Address (tempTag, &tagValid))) address_List->add_Item(DPT_Tag_to_Address (tempTag, &tagValid)); // if found the wanted # of drives, go ahead and make the raid if (address_List->get_Num_Items() == drivesPerArray) { MakeGroupLists (output); // take items out of list for (int i = 0; i < drivesPerArray; i++) dummyAddr = address_List->shift_Item(); } } else if (!component_Found && (devIndex == 0)) { err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; out->add_Item ((char *) err); return (err); } } } if ((drivesPerArray == 0) && (address_List->get_Num_Items())) { // do this just for some protection in case user doesn't // really know what HE is doing drivesPerArray = 0; MakeGroupLists (output); } EXIT(); return( err ); } Command::Dpt_Error Create_Raid::MakeGroupLists (String_List **output) { int this_RAID_Type; bool component_Found = true; int group = -2; Dpt_Error err, busy_err; Int_List component_List; Int_List group_List; int is_Group_List_Valid = 0; DPT_TAG_T this_RAID_Tag = (DPT_TAG_T) NULL; String_List *out; bool fromRedirect = false; out = *output; // The old DriveBusy class, leaving for a bit for // logic verification from Mark Salyzyn. //DPTDriveBusy * busy = new DPTDriveBusy(); component_Found = true; while (component_Found && address_List->num_Left()) { DPT_TAG_T component_Tag; SCSI_Address component; component_Tag = Get_Dev_by_Address_and_Type(GET_SCSI_DASD, component = address_List->get_Next_Item(), &component_Found ); if ( group == -2 ) { group = component.level; } if ( group != component.level ) { group = -3; } if( component_Found ) { #if !defined _DPT_LINUX // Determine if the component is busy. // This replaces the old DriveBusy class. uLONG devStatus; busy_err |= engine->Send( MSG_CHECK_BUSY, component_Tag ); // If busy_err = MSG_RTN_IGNORED, then the engine does not // support this command. Simply treat as not busy. if ((busy_err.Is_Error()) && (busy_err != Dpt_Error::DPT_MSG_RTN_IGNORED)) err |= busy_err; if( !err.Is_Error() ) { engine->Extract( &devStatus, sizeof(uLONG) ); // If 1, then this device is busy, otherwise // the device is considered NOT busy. if ( devStatus == 1 ) { err = Dpt_Error::DPT_CMD_ERR_COMPONENT_BUSY; } } /* // OLD DriveBusy stuff.. Leaving here for logic verification. if( busy->drvBusy( component.hba, component.bus, component.id, component.lun )) { err = Dpt_Error::DPT_CMD_ERR_COMPONENT_BUSY; } */ #endif component_List.add_Item( component_Tag ); group_List.add_Item( component.level ); targetHba = component.hba; } else { err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; } } is_Group_List_Valid = ( group == -3 ); int level = 0; uLONG calcRaidSize = 0; // Determine if it is necessary to construct multiple level arrays if( !err.Is_Error() ) { DPT_TAG_T component; SCSI_Address saddr; // If drive is NOT a redirect, // leave the original list as it is. // If drive IS a redirect, delete the redirect, // get the new tag and put back in the original list. address_List->reset_Next_Index(); component_List.reset_Next_Index(); component_Found = true; while (component_Found && address_List->num_Left()) { // variable created to keep track of component_List position int next_Item_In_Component_List = 0; saddr = address_List->get_Next_Item(); component = component_List.get_Next_Item(); next_Item_In_Component_List++; err = engine->Send(MSG_GET_INFO, component); if (engine->devInfo_P->raidType == RAID_TYPE_REDIRECT) { DPT_TAG_T newComponent, hbaTag; //fromRedirect = true; raidHeader_S hdr; raidCompList_S cList; memset (&hdr, 0, sizeof(raidHeader_S)); memset (&cList, 0, sizeof(raidCompList_S)); hdr.control = FLG_RCTL_ADDR; // get the tag for the matching // physical device and put in the list bool compFound = true; get_Devs_Type comp_Type; for (int cmpIdx = 0; compFound; ++cmpIdx) { newComponent = Get_Component(component, cmpIdx, &compFound, &comp_Type); err = engine->Send(MSG_GET_INFO, newComponent); if (compFound && (comp_Type == GET_SCSI_DASD)) { hbaTag = engine->devInfo_P->hbaTag; hdr.refNum = raid_Type; hdr.addr.hba = saddr.hba; hdr.addr.chan = saddr.bus; hdr.addr.id = saddr.id; hdr.addr.lun = saddr.lun; cList.tag = newComponent; break; } else err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; } // delete the redirect engine->Reset(); err = engine->Send(MSG_DELETE, component); // put the new tag in the list component_List.set_Item((next_Item_In_Component_List - 1), newComponent); // now send header and list and make the raid engine->Insert (&hdr, sizeof(raidHeader_S)); engine->Insert (&cList, sizeof(raidCompList_S)); err = engine->Send (MSG_RAID_NEW, hbaTag); } // not a redirected drive // leave entry alone } component_List.reset_Next_Index(); } //Check all components for reserve conflict before attempting to create. bool reserve_Conflict = false; while (component_List.num_Left()){ DPT_TAG_T temp_comp_Tag = component_List.get_Next_Item(); engine->Reset(); err = engine->Send(MSG_GET_INFO, temp_comp_Tag); if (engine->devInfo_P->flags3 & FLG_DEV_RES_CONFLICT) reserve_Conflict = true; } component_List.reset_Next_Index(); int numDrvs = component_List.get_Num_Items(); //drives not counted in size calculation int groupNum = 0; // Check to see if TOTAL raid size exceeds 2TB limit, if it does, create fails if (raid_Type == RAID_TYPE_1) groupNum = numDrvs/2; else if (raid_Type == RAID_TYPE_5){ if (is_Group_List_Valid) // RAID-50, one drive per RAID-5 group is not counted in size calculation groupNum = group_List.get_Num_Uniques(); else //regular RAID-5 only one parity drive is not counted in the size calculation groupNum = 1; } uLONG totalRaidSize = CalculateRaidSize(&component_List, groupNum); const uLONG NUM_MB_IN_TWO_TB = 2097152; if (totalRaidSize > NUM_MB_IN_TWO_TB) err = Dpt_Error::DPT_ERR_TWO_TB_RAID; component_List.reset_Next_Index(); if (!reserve_Conflict && !err.Is_Error()){ switch( this_RAID_Type = raid_Type ) { case RAID_TYPE_1: { // // Check for copying from a larger drive to a smaller drive. // CR2789 // component_List.reset_Next_Index(); while ( component_List.num_Left() >= 2 ) { // // Get the size of the source drive. // const DPT_TAG_T srcDriveTag = component_List.get_Next_Item(); engine->Reset(); err = engine->Send(MSG_GET_INFO, srcDriveTag); const uLONG srcDriveSize = engine->devInfo_P->capacity.maxLBA; // // Get the size of the destination drive. // const DPT_TAG_T dstDriveTag = component_List.get_Next_Item(); engine->Reset(); err |= engine->Send(MSG_GET_INFO, dstDriveTag); const uLONG dstDriveSize = engine->devInfo_P->capacity.maxLBA; // // Check if the source drive is larger than the destination drive. // if ( err.Success() ) { if (( srcDriveSize > dstDriveSize ) && ( !ignoreNonfatalErrors )) { err = Dpt_Error::DPT_ERR_RAID_DIFF_CAPACITY; break; } } } // // If an error has occurred then don't proceed with creating the array. // if ( err.Failure() ) { break; } component_List.reset_Next_Index(); int numComps = component_List.get_Num_Items(); if ((numComps > 2) && ((numComps & 1) == 0 )) { Int_List components; // figure out the size of underlying arrays if limited size if (desired_Raid_Size_in_Blocks) { int numGroups = numComps / 2; calcRaidSize = desired_Raid_Size_in_Blocks / numGroups; desired_Raid_Size_in_Blocks = 0; } while (component_List.num_Left()) { Int_List pair; DPT_TAG_T component; component = component_List.get_Next_Item(); pair.add_Item (component); component = component_List.get_Next_Item(); pair.add_Item (component); err = Create (raid_Type, level, & pair, stripe_Size, calcRaidSize, &this_RAID_Tag); if( err.Is_Error()) { break; } components.add_Item (this_RAID_Tag); } raid_Type = RAID_TYPE_0; this_RAID_Type = 10; component_List = components; level = 1; } } break; case RAID_TYPE_5: if (is_Group_List_Valid) { Int_List components; int blksPerComp; int numComps = component_List.get_Num_Items(); int numGroups = group_List.get_Num_Uniques(); int group = group_List.get_Next_Item(); numComps -= numGroups; if (desired_Raid_Size_in_Blocks) blksPerComp = desired_Raid_Size_in_Blocks / numComps; component_List.reset_Next_Index(); DPT_TAG_T component = component_List.get_Next_Item(); while (component_List.num_Left()) { Int_List groups; int last_group = group; while (group == last_group) { groups.add_Item (component); if (component_List.num_Left () == 0) { break; } component = component_List.get_Next_Item(); group = group_List.get_Next_Item(); } // get # components in this group -1 (for parity drive) int numInThisGroup = groups.get_Num_Items() - 1; // figure out the size of underlying arrays if limited size if (desired_Raid_Size_in_Blocks) calcRaidSize = blksPerComp * numInThisGroup; err = Create (raid_Type, level, &groups, stripe_Size, calcRaidSize, &this_RAID_Tag); if (err.Is_Error ()) { break; } components.add_Item (this_RAID_Tag); } if (desired_Raid_Size_in_Blocks) desired_Raid_Size_in_Blocks = 0; raid_Type = RAID_TYPE_0; this_RAID_Type = 50; component_List = components; level = 1; } break; } } if (!err.Is_Error() && !fromRedirect && !reserve_Conflict) { err = Create(raid_Type, level, &component_List, stripe_Size, desired_Raid_Size_in_Blocks, & this_RAID_Tag); } // If there was a reserve conflict detected, create fails and user is informed of failure. if (reserve_Conflict) { out->add_Item( EventStrings[STR_RESCONFLICT] ); } if( err.Is_Error() ) { out->add_Item ((char *) err); // // If the error relates to different capacities and this is RAID 1 then print // an additional message explaining to the user how to get around the problem. // CR2789 // if (( err == Dpt_Error::DPT_ERR_RAID_DIFF_CAPACITY ) && ( raid_Type == 1 )) { out->add_Item(EventStrings[STR_MIRROR_MSG1]); out->add_Item(EventStrings[STR_MIRROR_MSG2]); out->add_Item(EventStrings[STR_MIRROR_MSG3]); out->add_Item(EventStrings[STR_MIRROR_MSG4]); out->add_Item(EventStrings[STR_MIRROR_MSG5]); } } else { char address_Buf[ 80 ]; switch( raid_Type ) { case RAID_TYPE_0: case RAID_TYPE_1: case RAID_TYPE_3: case RAID_TYPE_5: sprintf( address_Buf, "%s: %s %d", EventStrings[STR_CREATED], EventStrings[STR_RAID], this_RAID_Type ); break; case RAID_TYPE_HOT_SPARE: sprintf( address_Buf, "%s: %s", EventStrings[STR_CREATED], EventStrings[STR_RAID_HOT_SPARE]); break; case RAID_TYPE_REDIRECT: sprintf( address_Buf, "%s: %s", EventStrings[STR_CREATED], EventStrings[STR_RAID_REDIRECT]); break; } // out->add_Item( STR_SUCCESS ); out->add_Item( address_Buf ); out->add_Item( "\n" ); if ( this_RAID_Type >= 10 ) { this_RAID_Tag = component_List.get_Item( 0 ); } Commit (this_RAID_Tag, nobuild); // out->add_Item( STR_REBOOT ); } return( err ); } //Function - //Command::Dpt_Error Create_Raid::CalculateRaidSize (Int_List Comp_List, int groupNum) - start //=========================================================================== // //Description: // // This method takes in a component list of the drives to be used in creation, and // the number of groups the drives are separated into to calculate total raid size before creation. // If the raid is <2TB then the raid creation fails. // //--------------------------------------------------------------------------- uLONG Create_Raid::CalculateRaidSize (Int_List* drive_List, int groupNum) { drive_List->reset_Next_Index(); DPT_TAG_T smallestDriveTag = 0; uLONG smallestDriveSize = 0; uLONG currDriveSize = 0; //parse through component list to calculate while (drive_List->num_Left()){ //get drive tag for get info call const DPT_TAG_T driveTag = drive_List->get_Next_Item(); engine->Reset(); engine->Send(MSG_GET_INFO, driveTag); //get size of current drive currDriveSize = engine->devInfo_P->capacity.maxLBA; //if first time through, the smallest drive is set to the first drive found if (smallestDriveTag == 0) smallestDriveTag = driveTag; else{ engine->Reset(); engine->Send(MSG_GET_INFO, smallestDriveTag); smallestDriveSize = engine->devInfo_P->capacity.maxLBA; // If a smaller drive is found, update smallestDriveTag if (currDriveSize < smallestDriveSize) smallestDriveTag = driveTag; } } //get smallest drive size engine->Reset(); engine->Send(MSG_GET_INFO, smallestDriveTag); smallestDriveSize = engine->devInfo_P->capacity.maxLBA; // convert from blocks to MB uLONG drvSzInMB = smallestDriveSize/2048; // drive_List.num_Items - groupNum refers to the drives not counted when calculating raid size // for RAID-0 ALL drives are counted (groupNum == 0) // for RAID-1 only half of the components count for size // for RAID-5 one drive per group is not counted (parity drives) uLONG raidSize = drvSzInMB * (drive_List->get_Num_Items() - groupNum); return raidSize; } //Command::Dpt_Error Create_Raid::CalculateRaidSize (Int_List Comp_List, int groupNum) - end Command &Create_Raid::Clone() const { ENTER( "Command &Create_Raid::Clone() const" ); EXIT(); return( *new Create_Raid( *this ) ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/creatrad.hpp0000664000175000000620000000700710044153336020456 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef CREATRAD_HPP #define CREATRAD_HPP /**************************************************************************** * * Created: 7/17/98 * ***************************************************************************** * * File Name: CreatRad.hpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 13 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "scsilist.hpp" #include "intlist.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ class Create_Raid:public Command { public: Create_Raid( SCSI_Addr_List *addresses, // a list of addresses from which the // raid will be created. Raid_Type raid_Type, uLONG size_of_Stripe, uLONG raid_Size_in_Blocks = 0, // zero means use default bool nobuildOption = (bool)false, // default to false (build) bool ignoreNonfatalErrorsOption = (bool)false, int numDrivesPerArray = 0, // set to 0 if not given SCSI_Addr_List *compsOmit = NULL); // do not include in array/s Create_Raid (const Create_Raid &new_Create_Raid); virtual ~Create_Raid (); Create_Raid &operator = (Create_Raid &right); Dpt_Error execute (String_List **output); Command &Clone () const; private: Dpt_Error MakeGroupLists (String_List **output); //calculates total raid size uLONG CalculateRaidSize (Int_List* drive_List, int groupNum); Dpt_Error Create (Raid_Type raidType, int level, Int_List *addressList, uLONG stripeSize = 0, uLONG desiredRaidSizeInBlocks = 0, DPT_TAG_T * this_RAID_Tag = NULL); Raid_Type raid_Type; uLONG stripe_Size; uLONG desired_Raid_Size_in_Blocks; int targetHba; int drivesPerArray; const bool nobuild; const bool ignoreNonfatalErrors; SCSI_Addr_List *address_List; SCSI_Addr_List *comps_Omit; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/debug.hpp0000664000175000000620000000633510044153336017762 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef DEBUG_HPP #define DEBUG_HPP /**************************************************************************** * * Created: 9/11/98 * ***************************************************************************** * * File Name: debug.hpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 1 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include /*** CONSTANTS ***/ /*** TYPES ***/ #ifdef DEBUG_ENTER_EXIT class Enter_Exit { public: Enter_Exit( char *name ) { func_Name = name; if( show_Enters ) { printf( "%s>> %s\n", Generate_Spaces( ++indent_Counter ), func_Name ); } } ~Enter_Exit() { if( show_Enters ) { printf( "%s<< %s\n", Generate_Spaces( indent_Counter-- ), func_Name ); } } static void Set_Show_Enters() { show_Enters = true; } static void Clear_Show_Enters() { show_Enters = false; } private: char *func_Name; static bool show_Enters; static int indent_Counter; // generates num_Spaces spaces in the buf char *Generate_Spaces( int num_Spaces ) { static char space_Buf[ 80 ]; int space_Index; for( space_Index = 0; space_Index < num_Spaces; space_Index++ ) { space_Buf[ space_Index ] = ' '; } // null terminate it space_Buf[ space_Index ] = 0; return( space_Buf ); } }; #endif /*** STATIC DATA ***/ /*** MACROS ***/ #ifdef DEBUG_ENTER_EXIT #define ENTER( str ) Enter_Exit enter_Exit( str ); #define EXIT() #else #define ENTER( str ) #define EXIT() #endif /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/deletrad.cpp0000664000175000000620000003511210044153333020443 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/30/98 * ***************************************************************************** * * File Name: DeletRad.cpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 22 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "deletrad.hpp" #include "rustring.h" #include "ctlr_map.hpp" #include "intlist.hpp" #include /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ extern int FID_RESET_OUTBUFF; extern uSHORT LOG_LIST_SIZE; /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ /**************************************************************************** * * Function Name: Delete_Raid(), Created:7/30/98 * * Description: This deletes the logicals listed. If null is passed in, then ALL logicals will be deleted. * * Return: Delete_Raid * * Notes: ALL LOGICALS WILL BE DELETED IF NULL IS PASSED IN! * *****************************************************************************/ Delete_Raid::Delete_Raid( SCSI_Addr_List *which_Raids, bool del_Hiddens ) : raids_to_Del( which_Raids ), delete_Hiddens( del_Hiddens ) { ENTER( "Delete_Raid::Delete_Raid(" ); EXIT(); } Delete_Raid::Delete_Raid( const Delete_Raid &del_Raid ): delete_Hiddens( del_Raid.delete_Hiddens ) { ENTER( "Delete_Raid::Delete_Raid( const Delete_Raid &del_Raid ): delete_Hiddens( del_Raid.delete_Hiddens )" ); if( del_Raid.raids_to_Del ) { raids_to_Del = new SCSI_Addr_List( *del_Raid.raids_to_Del ); } else { raids_to_Del = 0; } EXIT(); } Delete_Raid::~Delete_Raid() { ENTER( "Delete_Raid::~Delete_Raid()" ); delete raids_to_Del; EXIT(); } Command::Dpt_Error Delete_Raid::execute( String_List **output ) { ENTER( "Command::Dpt_Error Delete_Raid::execute( String_List **output )" ); String_List *out; Dpt_Error err = Dpt_Error::DPT_CMD_ERR_NO_ERROR; extern void add_Unique_Item( Int_List *component_List, DPT_TAG_T component_Tag ); Int_List raid_List; Int_List raid_List_dual; *output = out = new String_List(); Init_Engine(); if( !raids_to_Del ) { Make_Address_List_of_All_Logicals( &raids_to_Del ); } while( raids_to_Del->num_Left() ) { bool more_Devs_Left = true; bool tag_Valid; //kds SCSI_Address trash_addr; //kds SCSI_Address raid_Address = raids_to_Del->get_Next_Item(); // get this raid's tag for (int dev_Index = 0; more_Devs_Left; dev_Index++) { get_Devs_Type devs_Type; DPT_TAG_T raid_Tag = Get_Address_by_Index( raid_Address, dev_Index, &more_Devs_Left, &devs_Type ); if ( !more_Devs_Left ) { break; } switch ( devs_Type ) { case GET_RAID: case GET_RAID_HOT_SPARE: case GET_RAID_REDIRECT: break; default: continue; } if ((devs_Type == GET_RAID_HOT_SPARE) ^ (delete_Hiddens == 0)) { trash_addr = DPT_Tag_to_Address (raid_Tag, &tag_Valid); // if dual level array, put in one list if (trash_addr.level >= 2) add_Unique_Item ( &raid_List_dual, raid_Tag); // otherwise put in other else add_Unique_Item( &raid_List, raid_Tag ); } } } raid_List_dual.reset_Next_Index(); raid_List.reset_Next_Index(); // invalid if target not found -kds if ((raid_List_dual.num_Left() == 0) && (raid_List.num_Left() == 0)) { err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; out->add_Item( (char *) err ); } if (!err.Is_Error()) { // get rid of parents and their children first if (raid_List_dual.num_Left()) { while( raid_List_dual.num_Left() ) { Dpt_Error this_err = Delete_Raid_and_Children( raid_List_dual.get_Next_Item(), out ); if( this_err.Is_Error() ) { err |= this_err; // output intermediate errors, but don't stop // deleting others out->add_Item( (char *) this_err ); } } } // now get rid of orphans if (raid_List.num_Left()) { while( raid_List.num_Left() ) { Dpt_Error this_err = Delete_Raid_and_Children( raid_List.get_Next_Item(), out ); // this was already deleted in if (dual) above if (this_err == Dpt_Error::DPT_ERR_INVALID_TGT_TAG) this_err = Dpt_Error::DPT_CMD_ERR_NO_ERROR; // other errors are really errors if( this_err.Is_Error() ) { err |= this_err; // output intermediate errors, but don't stop // deleting others out->add_Item( (char *) this_err ); } } } Commit(); } // !err.Is_Error EXIT(); return( err ); } /**************************************************************************** * * Function Name: Make_Address_List_of_All_Logicals(), Created:7/30/98 * * Description: This fetches a list of all logicals, whether they be parent * or child logicals. * * Return: SCSI_Addr_List * * Notes: The caller must deallocate the object returned. * *****************************************************************************/ void Delete_Raid::Make_Address_List_of_All_Logicals( SCSI_Addr_List **ret_List ) { ENTER( "void Delete_Raid::Make_Address_List_of_All_Logicals( SCSI_Addr_List **ret_List )" ); SCSI_Addr_List *addr_List; int dev_Index; bool index_Found = true; // force it to succeed the first time through *ret_List = 0; addr_List = new SCSI_Addr_List(); for( dev_Index = 0; index_Found; dev_Index++ ) { SCSI_Address this_Logicals_Address; DPT_TAG_T this_Logicals_Tag; this_Logicals_Tag = Get_Log_Dev_by_Index( dev_Index, (bool)false, &index_Found ); if( index_Found ) { this_Logicals_Address = DPT_Tag_to_Address( this_Logicals_Tag, &index_Found ); if( index_Found ) { addr_List->add_Item( this_Logicals_Address ); } } } *ret_List = addr_List; EXIT(); } Command::Dpt_Error Delete_Raid::Delete_Raid_and_Children( DPT_TAG_T raid_Tag, String_List *out) { ENTER( "Command::Dpt_Error Delete_Raid::Delete_Raid_and_Children(" ); Dpt_Error err, busy_err; int component_Index; Int_List component_List; bool raid_Component_Found = TRUE; // collect all the children for( component_Index = 0; raid_Component_Found; component_Index++ ) { DPT_TAG_T component_Tag; get_Devs_Type comp_Type; // find the nth *logical* (not physical) owned by this logical component_Tag = Get_Component( raid_Tag, component_Index, &raid_Component_Found, &comp_Type ); if( raid_Component_Found && ( comp_Type != GET_SCSI_DASD )) { component_List.add_Item( component_Tag ); } } // delete this top-level raid engine->Reset(); err = engine->Send( MSG_GET_INFO, raid_Tag ); // Checks to see if there are any reserved devices that are trying to be deleted if ((engine->devInfo_P->flags3 & FLG_DEV_RES_CONFLICT) && (!(engine->devInfo_P->raidType == RAID_HOT_SPARE)) ){ out->add_Item( EventStrings[STR_RESCONFLICT] ); } else if( !err.Is_Error() ) { bool tag_Valid; SCSI_Address raid_Address; switch( engine->devInfo_P->raidType ) { case RAID_0 : case RAID_1 : case RAID_5 : case RAID_HOT_SPARE : case RAID_REDIRECT : /*******start of device busy section**********/ uLONG devStatus; busy_err |= engine->Send(MSG_CHECK_BUSY, raid_Tag); // If busy_err = MSG_RTN_IGNORED, then the engine does not // support this command. Simply treat as not busy. if ((busy_err.Is_Error()) && (busy_err != Dpt_Error::DPT_MSG_RTN_IGNORED)) err |= busy_err; if (!err.Is_Error()) { engine->Extract(&devStatus, sizeof(uLONG)); // If 1, then this device is busy, otherwise // the device is considered NOT busy. if (devStatus == 1) { err = Dpt_Error::DPT_CMD_ERR_COMPONENT_BUSY; } } /*******end of device busy section**********/ // delete all logicals (not physicals) owned by this logical if (!err.Is_Error()) { raid_Address = DPT_Tag_to_Address(raid_Tag, &tag_Valid); // get the tag for the corresponding physical device DPT_TAG_T newComponent; bool compFound = false; get_Devs_Type comp_Type; for (int cmpIdx = 0; !compFound; ++cmpIdx) { newComponent = Get_Component(raid_Tag, cmpIdx, &compFound, &comp_Type); } // err = engine->Send(MSG_GET_INFO, newComponent); // if (compFound && (comp_Type == GET_SCSI_DASD)) engine->Reset(); err = engine->Send(MSG_DELETE, raid_Tag); // check to see if this made it unintentionally suppressed CheckForSuppressed(newComponent); } if( !err.Is_Error()) { DPTControllerMap * map = new DPTControllerMap; char * String = map->getTargetString( raid_Address.hba, raid_Address.bus, raid_Address.id, raid_Address.lun ); out->add_Item( String ); delete [] String; delete map; out->add_Item( "\n" ); } break; } component_List.reset_Next_Index(); while ( component_List.num_Left() ) { // delete all logicals (not physicals) owned by this logical err |= (Dpt_Error)Delete_Raid_and_Children( component_List.get_Next_Item(), out ); } } EXIT(); return( err ); } // check to see if this made it unintentionally suppressed // if so, the new id will be the lowest chan/id available Command::Dpt_Error Delete_Raid::CheckForSuppressed (DPT_TAG_T tag) { Dpt_Error err = Dpt_Error::DPT_CMD_ERR_NO_ERROR; const int MAX_CHANNELS = 4; const int NUMBER_OF_IDS = 16; const int NOT_IN_USE = 0; const int IN_USE = 1; err = engine->Send(MSG_GET_INFO, tag); if ((engine->devInfo_P->flags & FLG_DEV_SUPPRESSED) && (!(engine->devInfo_P->flags & FLG_DEV_SUP_DESIRED))) { dptID_S *loglist = new dptID_S[LOG_LIST_SIZE]; int devChannel; // channel number of this device int availIDs [MAX_CHANNELS]; char ids [MAX_CHANNELS][NUMBER_OF_IDS]; // array of IDs // Get the information about this device DPT_TAG_T newIDhba = engine->devInfo_P->hbaTag; devChannel = engine->devInfo_P->addr.chan; /////////////////////////////////////////// // We need to find out which IDs are legal /////////////////////////////////////////// // first mark all IDs as NOT-IN-USE for(int i = 0; i < MAX_CHANNELS; i++) for(int j = 0; j < NUMBER_OF_IDS; j++) ids[i][j] = NOT_IN_USE; // mark the HBAs ID as IN-USE on all channels if(engine->devInfo_P->level != 0) { err = engine->Send(MSG_GET_INFO, newIDhba); // assume that it is an HBA for now for(int j = 0; j < MAX_CHANNELS; j++) ids[j][engine->hbaInfo_P->addr.id] = IN_USE; } // mark off the IDs that are out-of-range for the HBA as IN-USE for(int k = 0; k < MAX_CHANNELS; k++) { for(int l = 0; l < NUMBER_OF_IDS; l++) { if((l > engine->hbaInfo_P->maxAddr.id) || (k > engine->hbaInfo_P->maxAddr.chan)) ids[k][l] = IN_USE; } } // loop through the logicals of this guy's manager and // mark off the ids that are in use int numLogs = EngineFindIDs(FID_RESET_OUTBUFF,MSG_ID_LOGICALS,newIDhba,loglist, LOG_LIST_SIZE); for(int m = 0; m < numLogs; m++) { err = engine->Send(MSG_GET_INFO, loglist[m].tag); ids[engine->devInfo_P->addr.chan][engine->devInfo_P->addr.id] = IN_USE; } // Figure out the maximum number of IDs available on any bus // and how many buses have IDs available for(int n = 0; n < MAX_CHANNELS; n++) availIDs[n] = 0; int newID = -1; int newChan; for(int p = 0; p < MAX_CHANNELS; p++) { for(int q = 0; q < NUMBER_OF_IDS; q++) { if(ids[p][q] == NOT_IN_USE) { availIDs[p]++; // remember the lowest available ID if(newID == -1) { newChan = p; newID = q; } } } } int maxAvail = 0; // max. number of IDs available on any channel int chansWithAvail = 0; // number of channels with available IDs for(int r = 0; r < MAX_CHANNELS; r++) { if(availIDs[r] > maxAvail) maxAvail = availIDs[r]; if(availIDs[r]) chansWithAvail++; } // Make sure there are IDs available to redirect this drive to if(!chansWithAvail) { err = Dpt_Error::DPT_ERR_ABS_NO_MORE_IDS; } if (!err.Is_Error()) { // set new id engine->Reset(); raidHeader_S rh; memset(&rh, 0, sizeof(raidHeader_S)); rh.refNum = RAID_REDIRECT; rh.addr.id = newID; rh.addr.chan = newChan; rh.control = FLG_RCTL_ADDR; raidCompList_S component; component.tag = tag; engine->Insert (&rh, sizeof(raidHeader_S)); engine->Insert (&component, sizeof(raidCompList_S)); engine->Send (MSG_RAID_NEW, newIDhba); } } return (err); } Command &Delete_Raid::Clone() const { ENTER( "Command &Delete_Raid::Clone() const" ); EXIT(); return( *new Delete_Raid( *this ) ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/deletrad.hpp0000664000175000000620000000541110044153336020452 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef DELETRAD_HPP #define DELETRAD_HPP /**************************************************************************** * * Created: 7/29/98 * ***************************************************************************** * * File Name: DeletRad.hpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 6 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "scsilist.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ class Delete_Raid: public Command { public: Delete_Raid( SCSI_Addr_List *which_Raids, bool del_Hiddens // true for hot-spares, false for raids ); Delete_Raid( const Delete_Raid &del_Raid ); virtual ~Delete_Raid(); Dpt_Error execute( String_List **output ); Command &Clone() const; private: Dpt_Error Delete_Raid_and_Children( DPT_TAG_T raid_Tag, String_List *out ); void Make_Address_List_of_All_Logicals( SCSI_Addr_List **ret_List ); Dpt_Error CheckForSuppressed (DPT_TAG_T tag); SCSI_Addr_List *raids_to_Del; bool delete_Hiddens; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/dpt_api.c0000664000175000000620000001033110044153336017736 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - DPT_API.C //*************************************************************************** // //Description: // // This file contains the function definitions for a real mode //DOS application to inteface with the DPT engine. // //Author: Doug Anderson //Date: 5/18/94 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "dpt_api.h" //Function - DPT_OpenEngine() - start //=========================================================================== // //Description: // // This function initializes the DPT engine for use by an //application. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T DPT_OpenEngine() { // Initialize the DPT engine return (MSG_RTN_COMPLETED); } //DPT_OpenEngine() - end //Function - DPT_CloseEngine() - start //=========================================================================== // //Description: // // This function initializes the DPT engine for use by an //application. // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T DPT_CloseEngine() { // Initialize the DPT engine return (MSG_RTN_COMPLETED); } //DPT_CloseEngine() - end #if defined(HAS_COMM_ENG) && defined(NEW_COMM_ENG) //dz // Function - DPT_RTN_T DPT_OpenCommEngine(void) - start //=========================================================================== // //Description: // // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //=========================================================================== DPT_RTN_T DPT_OpenCommEngine(void) { return DPTCE_StartUp(NULL); } // end - DPT_RTN_T DPT_OpenCommEngine(void) // Function - DPT_RTN_T DPT_CloseCommEngine(void) - start //=========================================================================== // //Description: // // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //=========================================================================== DPT_RTN_T DPT_CloseCommEngine(void) { DPTCE_ShutDown(); return MSG_RTN_COMPLETED; } #endif //dz defined(HAS_COMM_ENG) && defined(NEW_COMM_ENG) // end - DPT_RTN_T DPT_CloseCommEngine(void) raidutils-0.0.6.orig/raidutil/dpt_info.h0000664000175000000620000000420710044153333020127 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPT_INFO_H #define __DPT_INFO_H //File - DPT_INFO.H //*************************************************************************** // //Description: // // This file contains the data structure definitions used to //interface with the DPT engine. // //Author: Doug Anderson //Date: 5/18/94 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- // Temporary - Eventually we want to create a seperate DPT_INFO.H file #include "get_info.h" #endif raidutils-0.0.6.orig/raidutil/dpt_msg.h0000664000175000000620000000413610044153333017763 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPT_MSG_H #define __DPT_MSG_H //File - DPT_MSG.H //*************************************************************************** // //Description: // // This file contains the DPT engine message definitions. // //Author: Doug Anderson //Date: 5/18/94 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- // Temporary - Eventually we want to create a seperate DPT_MSG.H file #include "messages.h" #endif raidutils-0.0.6.orig/raidutil/dpt_rtn.h0000664000175000000620000000417310044153335020003 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DPT_RTN_H #define __DPT_RTN_H //File - DPT_RTN.H //*************************************************************************** // //Description: // // This file contains the return codes (and error codes) returned //by the DPT engine. // //Author: Doug Anderson //Date: 5/18/94 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- // Temporary - Eventually we want to create a seperate DPT_RTN.H file #include "rtncodes.h" #endif raidutils-0.0.6.orig/raidutil/drv_busy.cpp0000664000175000000620000002447610044153337020533 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* UNIX based drive busy checking routine. * * 1999/02/11 salyzyn@dpt.com * Initial creation */ #include "stdio.h" #include "drv_busy.hpp" #include "string.h" #include "stdlib.h" #if (defined(_DPT_WIN_NT)) int DPTDriveBusy::drvBusy(int hba, int bus, int target, int lun) { return (0); } #else // _DPT_WIN_NT int DPTDriveBusy::newDeviceList (DPTDeviceList ** List, char * name) { char * Buffer; char * Head = Buffer = Strdup(name); char * Path; DPTDeviceList * Link = *List; DPTDeviceList * New = (DPTDeviceList *)NULL; DPTDeviceList * Next; int RetVal = 0; FILE * fp; /* Parse out major, minor and links */ static char ls[] = "ls -ld %s 2>/dev/null | sed -n '" "s#.* \\([0-9][0-9]*\\),[ ]*\\([0-9][0-9]*\\).*#\\1 \\2#p\n" "s#^d.*#d#p\n" "s#^l.* \\([^ ]*/\\)[^/ ]*/[^/ ]*/[^/ ]*/[^/ ]* -> \\.\\./\\.\\./\\.\\./\\([^ ][^ ]*\\)$# \\1\\2#p\n" "s#^l.* \\([^ ]*/\\)[^/ ]*/[^/ ]*/[^/ ]* -> \\.\\./\\.\\./\\([^ ][^ ]*\\)$#l\\1\\2#p\n" "s#^l.* \\([^ ]*/\\)[^/ ]*/[^/ ]* -> \\.\\./\\([^ ][^ ]*\\)$#l\\1\\2#p\n" "s#^l.* \\([^ ]*/\\)[^/ ]* -> \\([^/ ][^ ]*\\)$#l\\1\\2#p\n" "s#^l.* -> \\([^ ][^ ]*\\)$#l\\1#p'"; static char eol[] = " \t\r\n"; Link = *List; while (((Path = strtok (Head, eol)) != NULL) && (Path[0] != '\0')) { Head = (char *)NULL; if ((Next = (DPTDeviceList *)new char[sizeof(DPTDeviceList) + strlen(Path)]) != (DPTDeviceList *)NULL) { Next->Next = Link; Next->Link = (DPTDeviceList *)NULL; Next->Major = -1; Next->Minor = -1; (void)strcpy (Next->Name, Path); if (New) { New->Link = Next; } else { *List = Next; } New = Next; } else { RetVal = -1; } } delete [] Buffer; /* Find any links, or device information, and extend them */ if (New) /* Any new entries to check? */ for (Link = *List; Link != (DPTDeviceList *)NULL; Link = Link->Link) { Buffer = new char[sizeof(ls) + strlen(Link->Name) - 1]; sprintf (Buffer, ls, Link->Name); fp = SafePopenRead (Buffer); delete [] Buffer; Buffer = new char[512]; while (fgets(Buffer, 512, fp)) { switch (Buffer[0]) { case 'd': /* Mark it as the mount point */ Link->Major = -2; Link->Minor = -2; break; case 'l': /* It's a link to a device */ if ((Next = (DPTDeviceList *)new char[sizeof(DPTDeviceList) + strlen(Buffer + 1)]) != (DPTDeviceList *)NULL) { Next->Next = Link->Next; Next->Link = Link->Link; Next->Major = -1; Next->Minor = -1; (void)strcpy (Next->Name, strtok (Buffer + 1, eol)); Link->Link = Next; } else { RetVal = -1; } break; default: /* It's the mount device */ if ((Path = strtok(Buffer, eol)) != (char *)NULL) { Link->Major = atoi(Path); if ((Path = strtok ((char *)NULL, eol)) != (char *)NULL) { Link->Minor = atoi(Path); } } break; } } delete [] Buffer; SafePclose (fp); } return (RetVal); } void DPTDriveBusy::deleteDeviceList (DPTDeviceList * List) { if (List != (DPTDeviceList *)NULL) { DPTDeviceList * Link; do { if ((Link = List->Link) == (DPTDeviceList *)NULL) { Link = List->Next; } delete [] ((char *) List); } while ((List = Link) != (DPTDeviceList *)NULL); } } static char *TargetStringDirs[] = { "", "/dev/dsk/", "/dev/rdsk/", "/dev/", "/dev/r", (char *)NULL }; static char *TargetStringSuffixes[] = { "", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "a", "b", "c", "d", "e", "f", "g", "h", (char *)NULL }; static char *TargetPathDirs[] = { "", "/devices/", "/proc/", (char *)NULL }; static char *TargetPathSuffixes[] = { "", ":a", ":b", ":c", ":d", ":e", ":f", ":g", ":h", (char *)NULL }; int DPTDriveBusy::drvBusy(int hba, int bus, int target, int lun) { char * Targets[2]; char ** Dirs[sizeof(Targets)/sizeof(Targets[0])]; char ** Suffixes[sizeof(Targets)/sizeof(Targets[0])]; int SuffixIndex; DPTDeviceList * Mounts = (DPTDeviceList *)NULL; int RetVal = -1; /* Initialize the local structures */ Targets[0] = getTargetString(hba, bus, target, lun); Dirs[0] = TargetStringDirs; Suffixes[0] = TargetStringSuffixes; Targets[1] = getTargetPath(hba, bus, target, lun); Dirs[1] = TargetPathDirs; Suffixes[1] = TargetPathSuffixes; for (SuffixIndex = 0;;) { while (Targets[0] == (char *)NULL) { int Index, NoneZero = 0; for (Index = sizeof(Targets)/sizeof(Targets[0]); Index; --Index) { if ((Targets[Index-2] = Targets[Index-1]) != (char *)NULL) { ++NoneZero; } Targets[Index-1] = (char *)NULL; Dirs[Index-2] = Dirs[Index-1]; Suffixes[Index-2] = Suffixes[Index-1]; } if (NoneZero == 0) { break; } } if (Targets[0] == (char *)NULL) { break; } /* Check if the Dirs/Targets entry exists */ { char * name = new char[strlen(Dirs[0][0]) + strlen(Targets[0]) + strlen(Suffixes[0][SuffixIndex]) + 1]; if (name == (char *)NULL) { RetVal = -2; break; } (void)strcat(strcat(strcpy(name, Dirs[0][0]), Targets[0]), Suffixes[0][SuffixIndex]); switch(PathExists(name)) { case PathExists_Exists: case PathExists_Read: case PathExists_Open: /* Check if the Dirs/Target entry is mounted */ if (Mounts == (DPTDeviceList *)NULL) { FILE * fp = SafePopenRead("mount | sed -n '" "s/^\\([^ ][^ ]*\\)[ ][ ]*on[ ][ ]*\\([^ ][^ ]*\\).*/\\1 \\2/p'"); char * Buffer = new char[512]; while (fgets (Buffer, 512, fp)) { if (newDeviceList (&Mounts, Buffer)) { RetVal = -2; } } SafePclose(fp); if (RetVal == -1) { RetVal = 0; } # if (defined(DEBUG) && (DEBUG > 0)) if (Mounts != (DPTDeviceList *)NULL) { DPTDeviceList * List = Mounts; DPTDeviceList * Link; printf ("Mount list:\n"); do { printf ("%s", List->Name); if ((List->Major == -2) && (List->Minor == -2)) { printf ("/"); } else if ((List->Major != -1) || (List->Minor != -1)) { printf ("(%d,%d)", List->Major, List->Minor); } if ((Link = List->Link) == (DPTDeviceList *)NULL) { printf ("\n"); Link = List->Next; } else { printf (", "); } } while ((List = Link) != (DPTDeviceList *)NULL); } # endif } /* We have an initialized mount database, search! */ { DPTDeviceList * Link; DPTDeviceList * Names = (DPTDeviceList *)NULL; newDeviceList (&Names, name); for (Link = Mounts; Link != (DPTDeviceList *)NULL; ) { DPTDeviceList * Next; DPTDeviceList *Name; for (Name = Names; (Name = Name->Link) != (DPTDeviceList *)NULL; ) { /* Same name, or same device */ if ((strcmp (Name->Name, Link->Name) == 0) || ((Name->Major == Link->Major) && (Name->Minor == Link->Minor))) { break; } } if (Name != (DPTDeviceList *)NULL) { RetVal = 1; break; } if ((Next = Link->Link) == (DPTDeviceList *)NULL) { Next = Link->Next; } Link = Next; } deleteDeviceList (Names); } break; case PathExists_Busy: RetVal = 1; /* It's busy even before we hit the ground */ case PathExists_None: break; } delete [] name; } if ((RetVal != -1) && (RetVal != 0)) { break; } /* Try next */ if (Suffixes[0][++SuffixIndex] == (char *)NULL) { SuffixIndex = 0; if ((++(Dirs[0]))[0] == (char *)NULL) { delete [] Targets[0]; Targets[0] = (char *)NULL; } } } /* Free up resources */ { int Index; for (Index = 0; Index < (sizeof(Targets)/sizeof(Targets[0])); ++Index) { if (Targets[Index] != (char *)NULL) { delete [] Targets[Index]; } } } deleteDeviceList (Mounts); return (RetVal); } #endif /* `C' interface routine */ extern "C" { int drv_busy(int hba, int bus, int target, int lun) { if (hba == -1) { DPTControllerMap::Reset(); return (0); } DPTDriveBusy * obj = new DPTDriveBusy(); int retVal = obj->drvBusy(hba, bus, target, lun); delete obj; return (retVal); } #if (defined(DEBUG)) main (int argc, char ** argv) { int hba, bus, target, lun; hba = bus = target = lun = 0; if (argc > 1) { hba = atoi(argv[1]); } if (argc > 2) { bus = atoi(argv[2]); } if (argc > 3) { target = atoi(argv[3]); } if (argc > 4) { lun = atoi(argv[4]); } printf ("d%db%dt%dd%d: ", hba, bus, target, lun); switch (drv_busy (hba, bus, target, lun)) { case 0: printf ("not busy\n"); break; case 1: printf ("busy\n"); break; case -1: printf ("not found\n"); break; case -2: printf ("allocation error\n"); break; default: printf ("Error\n"); } } #endif } #if (defined(DEBUG)) # if (DEBUG <= 1) # undef DEBUG # endif # include "ctlr_map.cpp" #endif raidutils-0.0.6.orig/raidutil/dynsize.cpp0000664000175000000620000000746010044153335020353 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 1/18/2000 * ***************************************************************************** * * File Name: DynSize.cpp * Module: * Contributors: David Dillard * Description: Contains the implementation of the DynamicSizeInStreamBuf * class. * Version Control: * * $Revision: 3 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "dynsize.h" //============================================================================= // //Name: DynamicSizeInStreamBuf::AllocBuf // //Abstract: Allocates a variable size buffer, based upon available memory, // for buffering data. // //Parameters: maxSize - Maximum size, in bytes, of the buffer to be allocated // minSize - Minimum size, in bytes, of the buffer to be allocated // decrementSize - The size, in bytes, to decrement with each // allocation attempt until the allocation is made or // until 'minSize' is passed // //Return Values: The size, in bytes, of the buffer that was allocated. If // there was insufficient memory to allocate a buffer of // 'minSize' bytes then zero is returned. // //Error Codes: None // //Global Variables Affected: None // //Notes: None // //----------------------------------------------------------------------------- size_t DynamicSizeInStreamBuf::AllocBuf( size_t maxSize, size_t minSize, size_t decrementSize ) { size_t allocatedSize = 0; // // Loop trying to get the maximum amount of memory possible. // for ( size_t curSize = maxSize; curSize >= minSize; curSize -= decrementSize ) { char *buf = new char[curSize]; if ( buf != NULL ) { #if !defined __MWERKS__ && !defined(__GXX_ABI_VERSION) setb(buf, buf + curSize, 1); #else pubsetbuf (buf, curSize); #endif setg(buf, buf, buf); setp(NULL, NULL); allocatedSize = curSize; break; } } // // Return the number of bytes allocated to the caller. // return(allocatedSize); } raidutils-0.0.6.orig/raidutil/dynsize.h0000664000175000000620000000675310046160410020016 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DYNSIZE_H #define __DYNSIZE_H /**************************************************************************** * * Created: 1/18/2000 * ***************************************************************************** * * File Name: DynSize.h * Module: Generic * Contributors: David Dillard * Description: Contains the declaration of the DynamicSizeInStreamBuf * class. * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include #if HAVE_IOSTREAM # include #else # if HAVE_IOSTREAM_H # include # endif #endif #include /*** DEFINES ***/ #ifdef _DPT_DOS #define MaxBufSize (24 * 1024) #else #define MaxBufSize ((unsigned) 63 * (unsigned) 1024) #endif #define MinBufSize 1024 #define BufSizeDecrement 2048 //Class - DynamicSizeInStreamBuf //=========================================================================== // //Description: // // This class is a base class for other streambuf classes which wish to // dynamically adjust to the amount of memory that is available to the // application. This is particularly useful in a DOS environment, where // memory is inherently a scarce resource. // //--------------------------------------------------------------------------- class DynamicSizeInStreamBuf : public std::streambuf { protected: // // Allocates a maximually sized buffer based on the maximum, minimum, and // decrement sizes specified. // size_t AllocBuf( size_t maxSize, size_t minSize, size_t decrementSize ); // // Allocates a maximually sized buffer based on some defaults and the // the amount of available memory. // inline size_t AllocBuf(void) { return(AllocBuf(MaxBufSize, MinBufSize, BufSizeDecrement)); } }; #endif raidutils-0.0.6.orig/raidutil/engiface.cpp0000664000175000000620000002606710044153336020434 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - ENGIFACE.CPP //*************************************************************************** // //Description: // // This file contains the function definitions for the DPT //engine interface class. The engine interface class is designed //to facilitate access to the DPT engine. // //Author: Doug Anderson //Date: 7/18/94 // //*************************************************************************** //Include Files ------------------------------------------------------------- #include #include "engiface.hpp" #include "id_list.hpp" #include "dpt_api.h" extern "C" uLONG engineTimeOut = 0; //Function - DPT_EngineIO_C::DPT_EngineIO_C() - start //=========================================================================== // //Description: // // This function is the constructor for the engine I/O structure. // //--------------------------------------------------------------------------- DPT_EngineIO_C::DPT_EngineIO_C( uLONG fromEngSize, uLONG toEngSize ) { toEng_P = NULL; fromEng_P = NULL; AllocFromEng(fromEngSize); AllocIObuff(&toEng_P,toEngSize); connectTag = 0; compatability = 0; EngineProc = 0; SetDataPointers(); } //DPT_EngineIO_C::DPT_EngineIO_C() - end //Function - DPT_EngineIO_C::operator= - start //=========================================================================== // //Description: // // This function is an overload for operator= that handles const references--MSS // //--------------------------------------------------------------------------- DPT_EngineIO_C& DPT_EngineIO_C::operator=(const DPT_EngineIO_C& inEngine) { if(this == &inEngine) return *this; // copy member vars here maxIDs = inEngine.maxIDs; connectTag = inEngine.connectTag; compatability = inEngine.compatability; ids = inEngine.ids; loggerIDs = inEngine.loggerIDs; AllocIObuff(&toEng_P, inEngine.toEng_P->allocSize); memcpy(toEng_P->data, inEngine.toEng_P->data, inEngine.toEng_P->allocSize); AllocFromEng(inEngine.fromEng_P->allocSize); memcpy(fromEng_P->data, inEngine.fromEng_P->data, inEngine.fromEng_P->allocSize); SetDataPointers(); return *this; } //DPT_EngineIO_C::operator= - end //Function - DPT_EngineIO_C::AllocFromEng() - start //=========================================================================== // //Description: // // This function allocates or reallocates the "from engine" //I/O buffer. // //--------------------------------------------------------------------------- DPT_RTN_T DPT_EngineIO_C::AllocFromEng(uLONG allocSize) { //----------------------------------- // Attempt to allocate the new buffer //----------------------------------- DPT_RTN_T rtnVal = AllocIObuff(&fromEng_P,allocSize); SetDataPointers(); return (rtnVal); } //DPT_EngineIO_C::AllocFromEng() - end // Function - void DPT_EngineIO_C::SetDataPointers() - start //=========================================================================== // //Description: // // // //Parameters: // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //=========================================================================== void DPT_EngineIO_C::SetDataPointers() { //-------------------------------------------- // Set up the "from engine" structure pointers //-------------------------------------------- if (fromEng_P != NULL) { hbaInfo_P = (dptHBAinfo_S *) fromEng_P->data; devInfo_P = (dptDevInfo_S *) fromEng_P->data; progInfo_P = (dptProgress_S *) fromEng_P->data; sysInfo_P = (sysInfo_S *) fromEng_P->data; } else { hbaInfo_P = NULL; devInfo_P = NULL; progInfo_P = NULL; sysInfo_P = NULL; } } // end - void DPT_EngineIO_C::SetDataPointers() //Function - DPT_EngineIO_C::AllocIObuff() - start //=========================================================================== // //Description: // // This function allocates an engine I/O buffer. // //--------------------------------------------------------------------------- DPT_RTN_T DPT_EngineIO_C::AllocIObuff(dptBuffer_S **buff_P,uLONG allocSize) { uLONG oldSize; uLONG TotalAllocSize; DPT_RTN_T rtnVal = MSG_RTN_COMPLETED; // If the buffer is to be allocated... if (allocSize) { rtnVal = MSG_RTN_FAILED; // If there is an existing buffer... if (*buff_P!=NULL) { oldSize = (*buff_P)->allocSize; dptBuffer_S::delBuffer(*buff_P); } else oldSize = 0; // // Set up the alloc size to include the buffer header // TotalAllocSize = sizeof(dptBuffer_S)-1 + allocSize; // // Now lets make sure the size is an even multiple of 16, and // just for good measure we will buffer it by 16 for all of those // environments that have a problem with alignment // TotalAllocSize = (TotalAllocSize & 0xfffffff0) + 0x10; // Try to allocate the new buffer size if ((*buff_P = (dptBuffer_S *) new uCHAR[TotalAllocSize]) != NULL) { (*buff_P)->allocSize = allocSize; rtnVal = MSG_RTN_COMPLETED; } // If unable to allocate the new buffer size... if ((*buff_P == NULL) && oldSize) // Try to allocate the old buffer size *buff_P = dptBuffer_S::newBuffer(oldSize); } return (rtnVal); } //DPT_EngineIO_C::AllocIObuff() - end //Function - DPT_EngineIO_C::Connect() - start //=========================================================================== // //Description: // // This function attempts to establish a connection with the //DPT engine. If the specified compatability word does not match //the engine's compatability, this function will disconnect from //the engine. If the specified compatability word is zero, no //compatability check is performed. // //--------------------------------------------------------------------------- DPT_RTN_T DPT_EngineIO_C::Connect(uLONG inCompatability, uSHORT ioMethod, DPT_TAG_T target, uCHAR extractConnTag) { DPT_RTN_T rtnVal; Reset(); // Request SmartRom as the I/O method Insert(ioMethod); // Make a connection if ((rtnVal = Send(MSG_CONNECT, target)) == MSG_RTN_COMPLETED) { // Get the engine's compatability word Extract(compatability); if (extractConnTag) // Get the connection key Extract(connectTag); // If the compatability word is to be used and does not match... if (inCompatability && (inCompatability != compatability)) { rtnVal = MSG_RTN_FAILED; Disconnect(); connectTag = 0; } } Reset(); return (rtnVal); } //DPT_EngineIO_C::Connect() - end //Function - DPT_EngineIO_C::GetIDs() - start //=========================================================================== // //Description: // // This function sends the specified object ID message to the //DPT engine and places the returned IDs into the id_P buffer. // //--------------------------------------------------------------------------- DPT_RTN_T DPT_EngineIO_C::GetIDs(DPT_MSG_T message,DPT_TAG_T targetTag) { DPT_RTN_T rtnVal; // Send the engine object ID message if (!((rtnVal=Send(message,targetTag)) & MSG_RTN_FAILED)) rtnVal = ids.CopyBuffer(fromEng_P); return (rtnVal); } //DPT_EngineIO_C::GetIDs() - end //Function - DPT_EngineIO_C::GetLoggerIDs() - start //=========================================================================== // //Description: // // This function sends the specified object ID message to the //DPT engine and places the returned IDs into the id_P buffer. // //--------------------------------------------------------------------------- DPT_RTN_T DPT_EngineIO_C::GetLoggerIDs(DPT_MSG_T message,DPT_TAG_T targetTag) { DPT_RTN_T rtnVal; // Send the engine object ID message if (!((rtnVal=Send(message,targetTag)) & MSG_RTN_FAILED)) rtnVal = loggerIDs.CopyBuffer(fromEng_P); return (rtnVal); } //DPT_EngineIO_C::GetLoggerIDs() - end //Function - DPT_EngineIO_C::Send() - start //=========================================================================== // //Description: // This function send the specified message to the DPT engine. // //--------------------------------------------------------------------------- DPT_RTN_T DPT_EngineIO_C::Send(DPT_MSG_T message,DPT_TAG_T targetTag) { #ifdef _USE_RT_ENG_LINKING if( EngineProc ) { return ( (EngineProc)( connectTag, message, targetTag, fromEng_P, toEng_P, engineTimeOut) ); } else return MSG_RTN_FAILED; #else return (DPT_CallEngine(connectTag,message,targetTag,fromEng_P,toEng_P,engineTimeOut)); #endif } //DPT_EngineIO_C::Send() - end //Function - DPT_EngineIO_C::Send() - start //=========================================================================== // //Description: // This function send the specified message to the DPT engine. // //--------------------------------------------------------------------------- DPT_RTN_T DPT_EngineIO_C::Send(DPT_MSG_T message, DPT_TAG_T targetTag, dptBuffer_S *inFromEng_P, dptBuffer_S *inToEng_P ) { #ifdef _USE_RT_ENG_LINKING if( EngineProc ) { return ( (EngineProc)( connectTag, message, targetTag, inFromEng_P, inToEng_P, engineTimeOut) ); } else return MSG_RTN_FAILED; #else return (DPT_CallEngine(connectTag,message,targetTag,inFromEng_P,inToEng_P,engineTimeOut)); #endif } //Send() - end //Function - DPT_EngineIO_C::~DPT_EngineIO_C() - start //=========================================================================== // //Description: // // This function is the destructor for the engine I/O structure. // //--------------------------------------------------------------------------- DPT_EngineIO_C::~DPT_EngineIO_C() { delete toEng_P; delete fromEng_P; } //DPT_EngineIO_C::~DPT_EngineIO_C() - end raidutils-0.0.6.orig/raidutil/engiface.hpp0000664000175000000620000001614710044153333020434 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __ENGIFACE_HPP #define __ENGIFACE_HPP //File - ENGIFACE.HPP //*************************************************************************** // //Description: // // This file defines the DPT engine interface class DPT_EngineIO_C. //This class is designed to facilitate access to the DPT engine. // //Author: Doug Anderson //Date: 7/18/94 // //Editors: // //Remarks: // // //*************************************************************************** //-------------- // Include Files //-------------- #include "dpt_api.h" #include "id_list.hpp" extern "C" uLONG engineTimeOut; //class - DPT_EngineIO_C - start //=========================================================================== // //Description: // // This class facilitates accessing the DPT engine. // //--------------------------------------------------------------------------- class DPT_EngineIO_C { public: uSHORT maxIDs; uSHORT reserved; // Data......................................................... //---------------------------- // Engine connection variables //---------------------------- DPT_TAG_T connectTag; uLONG compatability; // Functions.................................................... //------------------ // Support Functions //------------------ // Allocates an engine I/O buffer DPT_RTN_T AllocIObuff(dptBuffer_S **,uLONG); virtual void SetDataPointers(); public: // Data......................................................... //------------------------------------------------- //function ptr for engine I/F; for run-time linking //------------------------------------------------- DPT_ENGINE_FN_T EngineProc; //-------------------------- // Actual engine I/O buffers //-------------------------- dptBuffer_S *toEng_P; dptBuffer_S *fromEng_P; //---------------------------------------- // Pointers to info returned by the engine //---------------------------------------- dptHBAinfo_S *hbaInfo_P; dptDevInfo_S *devInfo_P; dptProgress_S *progInfo_P; sysInfo_S *sysInfo_P; //-------------------------- // Buffer to hold engine IDs //-------------------------- DPT_IDlist_C ids; DPT_LoggerIDlist_C loggerIDs; // Functions.................................................... //----------------------- // Constructor/Destructor //----------------------- DPT_EngineIO_C(uLONG=1024,uLONG=1024); ~DPT_EngineIO_C(); //------------------------ // Overloaded operator= //------------------------ DPT_EngineIO_C& operator=(const DPT_EngineIO_C&); // MSS //---------------------------- // Buffer allocation functions //---------------------------- // Allocate/Re-allocate the engine I/O buffers DPT_RTN_T AllocFromEng(uLONG); DPT_RTN_T AllocToEng(uLONG allocSize) { return (AllocIObuff(&toEng_P,allocSize)); } //--------------------------- // Engine interface functions //--------------------------- // Open the DPT engine interface virtual DPT_RTN_T Open() { return DPT_OpenEngine(); } // Close the DPT engine interface virtual DPT_RTN_T Close() { return DPT_CloseEngine(); } // Send the specified engine message to the specified engine object virtual DPT_RTN_T Send(DPT_MSG_T,DPT_TAG_T=0); virtual DPT_RTN_T Send(DPT_MSG_T,DPT_TAG_T,dptBuffer_S *,dptBuffer_S *); // Connect to the engine DPT_RTN_T Connect(uLONG, uSHORT = DPT_IO_PASS_THRU, DPT_TAG_T target = 0, uCHAR extractConnTag = 1); // Disconnect from the engine DPT_RTN_T Disconnect() { DPT_RTN_T rtnVal = Send(MSG_DISCONNECT); connectTag = 0; return rtnVal; } // Issue an ID message and place the IDs in the ID buffer DPT_RTN_T GetIDs(DPT_MSG_T,DPT_TAG_T=0); DPT_RTN_T GetLoggerIDs(DPT_MSG_T,DPT_TAG_T=0); //------------------------------ // Return protected data members //------------------------------ uLONG GetConnectTag() { return (connectTag); } uLONG GetCompatability() { return (compatability); } //-------------------------------- // Buffer Extract/Insert Functions //-------------------------------- void Reset() { toEng_P->reset(); } uSHORT Insert(void *toVoid_P,uLONG numBytes) { return (toEng_P->insert(toVoid_P,numBytes)); } uSHORT Insert(uLONG inData) { return (toEng_P->insert(inData)); } uSHORT Insert(uSHORT inData) { return (toEng_P->insert(inData)); } uSHORT Insert(uINT inData) { return (toEng_P->insert(inData)); } uSHORT Insert(uCHAR inData) { return (toEng_P->insert(inData)); } uSHORT Insert(long inData) { return (toEng_P->insert(inData)); } uSHORT Insert(short inData) { return (toEng_P->insert(inData)); } uSHORT Insert(int inData) { return (toEng_P->insert(inData)); } uSHORT Insert(char inData) { return (toEng_P->insert(inData)); } void Replay() { fromEng_P->replay(); } uSHORT Skip(uLONG numBytes) { return (fromEng_P->skip(numBytes)); } uSHORT Extract(void *fromVoid_P,uLONG numBytes) { return (fromEng_P->extract(fromVoid_P,numBytes)); } uSHORT Extract(uLONG &inData) { return (fromEng_P->extract(inData)); } uSHORT Extract(uSHORT &inData) { return (fromEng_P->extract(inData)); } uSHORT Extract(uINT &inData) { return (fromEng_P->extract(inData)); } uSHORT Extract(uCHAR &inData) { return (fromEng_P->extract(inData)); } uSHORT Extract(long &inData) { return (fromEng_P->extract(inData)); } uSHORT Extract(short &inData) { return (fromEng_P->extract(inData)); } uSHORT Extract(int &inData) { return (fromEng_P->extract(inData)); } uSHORT Extract(char &inData) { return (fromEng_P->extract(inData)); } }; //DPT_EngineIO_C - end #endif raidutils-0.0.6.orig/raidutil/eventlog.cpp0000664000175000000620000023714610044153335020517 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 6/16/99 * ***************************************************************************** * * File Name: EventLog.cpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 42 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include #include #include #include "eventlog.hpp" #include "rustring.h" #include "rscenum.h" #include "dpt_buff.h" extern char* EventStrings[]; void GetBatteryEventString(uSHORT, char *); #if defined _DPT_SOLARIS || defined _DPT_SCO || defined _DPT_UNIXWARE || defined _DPT_LINUX || defined _DPT_NETWARE || defined _DPT_MSDOS || defined _DPT_BSDI || defined _DPT_FREE_BSD #include #endif /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ void set_time(void); // Need to flush the event buffer periodically for very large event logs. (12/1 ECE) extern void Flush( String_List * ); /*** FUNCTIONS ***/ static int errorchart[] = {0, 2, 4, 8, 16, 20, 24, 34, 40}; static int scsierrs[] = { STR_GOOD, STR_CHECK_COND, STR_COND_MET, STR_BUSY, STR_INTERMEDIATE, STR_INT_COND_MET, STR_RESERV_CONFLICT, STR_CMD_TERMINATED, STR_QUEUE_FULL }; static int LAPmainstatus[] = { STR_OPTIMAL, STR_STAT_DEGRADED, STR_STAT_RECONSTRUCT, STR_STAT_EXPAND, STR_STAT_DEAD, STR_ARRAY_WARNING, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_VERIFY2, STR_BUILDING, STR_NON_ARRAYED }; static int PAPmainstatus[] = { STR_OPTIMAL, STR_NON_EXISTANT, STR_UNINITIALIZED_HYPH, STR_FAILED_DRIVE, STR_REPLACED_DRIVE, STR_DRIVE_WARNING, STR_PARAM_MISMATCH, STR_BLANK, STR_FORMAT_UNIT, STR_BLANK, STR_UNINITIALIZED_HYPH, STR_DRIVE_VERIFY, STR_NON_ARRAYED, }; // Up to 7 message entries for each main status static int LAPsubtable[13][9] = { // 0 { STR_BLANK, STR_PARAMETER_MISMATCH, STR_BLANK, STR_BLANK, STR_REPLACED_FORMAT, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 1 { STR_DRIVE_FAILED, STR_PARAMETER_MISMATCH, STR_STAT_19, STR_STAT_20, STR_STAT_31, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 2 { STR_BLANK, STR_PARAMETER_MISMATCH, STR_STAT_19, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_STAT_5}, // 3 { STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 4 { STR_STAT_32, STR_PARAMETER_MISMATCH, STR_STAT_19, STR_STAT_20, STR_STAT_33, STR_STAT_34, STR_BLANK, STR_STAT_23, STR_STAT_5}, // 5 { STR_STAT_35, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 6 { STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 7 { STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 8 { STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 9 { STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 10 { STR_STAT_26, STR_STAT_27, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 11 { STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 12 { STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK} }; static int PAPsubtable[13][7] = { // 0 { STR_BLANK, STR_STAT_1, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 1 { STR_BLANK, STR_STAT_2, STR_STAT_3, STR_STAT_4, STR_BLANK, STR_BLANK, STR_BLANK}, // 2 { STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 3 { STR_BLANK, STR_STAT_5, STR_STAT_6, STR_STAT_7, STR_STAT_8, STR_STAT_9, STR_STAT_10}, // 4 { STR_STAT_11, STR_STAT_12, STR_STAT_13, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 5 { STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 6 { STR_STAT_14, STR_STAT_15, STR_STAT_16, STR_STAT_17, STR_STAT_18, STR_STAT_19, STR_STAT_20}, // 7 { STR_STAT_21, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 8 { STR_STAT_22, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 9 { STR_STAT_23, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 10 { STR_STAT_24, STR_STAT_25, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 11 { STR_STAT_26, STR_STAT_27, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK}, // 12 { STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK} }; int chanIdTable[] = {0,0,0,4,4,4,4,0,0,6,0,5,4,4,4,0,0,0,4,0,0,0,0,0,0,0,4,4,4,0}; char *serverStatus[] = { "failed", "has returned, OnCallServer shutting down", "(Primary) online", "(OnCallServer) online", "is not protected", "is protected", "(OnCallServer) is now the primary server"}; char *beatError[] = {"read", "write"}; uSHORT LOGTEXTSIZE = 0xFFFF-1; uSHORT bytesInBuffer = 0; char *buffer = NULL; #define CheckAddress() if ((logtype != LT_HBA) && ((CHAN != chan) || (ID != id) || (LUN != lun))) break #define CheckIDLUN() if ((logtype != LT_HBA) && ((ID != id) || (LUN != lun))) break #define HBAOnly() if (logtype != LT_HBA) break; #define PrintTime() DoTime(etime, severity, out); #define PrintAddress() bufcat(out, "HBA=%d BUS=%d ID=%d LUN=%d\n", hba, CHAN, ID, LUN) // these are the same as BBU_ (instead of RDR_) #define RDR_STATUS_DIRTY_DATA 0x80000000 #define RDR_STATUS_CRC_FAIL 0x00000001 #define RDR_STATUS_LOCAL_PARAMS_FAIL 0x00000002 #define RDR_STATUS_LOCAL_SIG_FAIL 0x00000004 #define RDR_STATUS_CACHE_SIG_FAIL 0x00000008 #define RDR_STATUS_LSU_ZERO_TID 0x00000010 #define RDR_STATUS_NO_CACHE 0x00000020 #define RDR_STATUS_PCB_INVALID 0x00000100 #define RDR_STATUS_PCB_NO_LSU 0x00000200 #define RDR_STATUS_PCB_COUNT 0x00000400 #define RDR_STATUS_DIRTY_BLOCK_COUNT 0x00000800 #define RDR_STATUS_LSU_INVALID_TID 0x00001000 #define RDR_STATUS_LSU_INVALID_TYPE 0x00002000 #define RDR_STATUS_LSU_PARENT_TID 0x00004000 #define RDR_STATUS_LSU_CAPACITY 0x00008000 #define RDR_STATUS_LSU_MAGIC 0x00010000 #define MAX_RDR_STATUS 16 struct RdrStatusStrings_S { uLONG StatusBit; char *StatusString; }; static void GetRdrStatusString(uLONG RdrStatus, char *RdrStatusString) { int Count; RdrStatusStrings_S RdrStatusStrings[MAX_RDR_STATUS]; RdrStatusStrings[0].StatusBit = RDR_STATUS_DIRTY_DATA; RdrStatusStrings[0].StatusString = EventStrings[STR_DIRTY_DATA]; RdrStatusStrings[1].StatusBit = RDR_STATUS_CRC_FAIL; RdrStatusStrings[1].StatusString = EventStrings[STR_CRC_FAILURE]; RdrStatusStrings[2].StatusBit = RDR_STATUS_LOCAL_PARAMS_FAIL; RdrStatusStrings[2].StatusString = EventStrings[STR_LOCAL_PARAM_FAILURE]; RdrStatusStrings[3].StatusBit = RDR_STATUS_LOCAL_SIG_FAIL; RdrStatusStrings[3].StatusString = EventStrings[STR_LOCAL_SIG_FAILURE]; RdrStatusStrings[4].StatusBit = RDR_STATUS_CACHE_SIG_FAIL; RdrStatusStrings[4].StatusString = EventStrings[STR_CACHE_SIG_FAILURE]; RdrStatusStrings[5].StatusBit = RDR_STATUS_LSU_ZERO_TID; RdrStatusStrings[5].StatusString = EventStrings[STR_LSU_DEV_ID_ZERO]; RdrStatusStrings[6].StatusBit = RDR_STATUS_NO_CACHE; RdrStatusStrings[6].StatusString = EventStrings[STR_NO_CACHE]; RdrStatusStrings[7].StatusBit = RDR_STATUS_PCB_INVALID; RdrStatusStrings[7].StatusString = EventStrings[STR_INVALID_PCB]; RdrStatusStrings[8].StatusBit = RDR_STATUS_PCB_NO_LSU; RdrStatusStrings[8].StatusString = EventStrings[STR_PCB_NO_LSU]; RdrStatusStrings[9].StatusBit = RDR_STATUS_PCB_COUNT; RdrStatusStrings[9].StatusString = EventStrings[STR_PCB_COUNT]; RdrStatusStrings[10].StatusBit = RDR_STATUS_DIRTY_BLOCK_COUNT; RdrStatusStrings[10].StatusString = EventStrings[STR_DIRTY_BLOCK_COUNT]; RdrStatusStrings[11].StatusBit = RDR_STATUS_LSU_INVALID_TID; RdrStatusStrings[11].StatusString = EventStrings[STR_LSU_INVALID_DEV_ID]; RdrStatusStrings[12].StatusBit = RDR_STATUS_LSU_INVALID_TYPE; RdrStatusStrings[12].StatusString = EventStrings[STR_LSU_INVALID_TYPE]; RdrStatusStrings[13].StatusBit = RDR_STATUS_LSU_PARENT_TID; RdrStatusStrings[13].StatusString = EventStrings[STR_LSU_PARENT_DEV_ID]; RdrStatusStrings[14].StatusBit = RDR_STATUS_LSU_CAPACITY; RdrStatusStrings[14].StatusString = EventStrings[STR_LSU_CAPACITY]; RdrStatusStrings[15].StatusBit = RDR_STATUS_LSU_MAGIC; RdrStatusStrings[15].StatusString = EventStrings[STR_LSU_MAGIC_NBR]; RdrStatusString[0] = '\0'; // // Loop through all possible sytatus values and add in that string if the status // bit is set. // for(Count = 0; Count < MAX_RDR_STATUS; ++Count) { if(RdrStatus & RdrStatusStrings[Count].StatusBit) { // // If not the first status string, add a ',' first // if(strlen(RdrStatusString)) { strcat(RdrStatusString,", "); } // // If this is the first string added, add a ':' // else { strcat(RdrStatusString,": "); } // // Add in the string associated with this status // strcat(RdrStatusString,RdrStatusStrings[Count].StatusString); } } strcat(RdrStatusString,"\n"); } #define SES_ENCLOSURE 0x01 #define SAFTE_ENCLOSURE 0x02 #define DEC_ENCLOSURE 0x04 #define NILE_ENCLOSURE 0x08 EventLog::EventLog (SCSI_Addr_List *deviceList, EventLogOptions cmd) :devsToCtrl (deviceList), eventCmd (cmd) { ENTER("EventLog::EventLog("); EXIT(); } EventLog::EventLog (const EventLog &new_EventLog) { ENTER("EventLog::EventLog (const EventLog &new_EventLog):"); devsToCtrl = new_EventLog.devsToCtrl; eventCmd = new_EventLog.eventCmd; EXIT(); } EventLog::~EventLog() { ENTER( "EventLog::~EventLog()" ); delete[] buffer; EXIT(); } Command::Dpt_Error EventLog::execute(String_List **output) { ENTER("Command::Dpt_Error EventLog::execute(String_List **output)"); String_List *out; Dpt_Error err; Init_Engine(); *output = out = new String_List(); while (devsToCtrl->num_Left()) { bool hba_found = true; SCSI_Address obj_Address = devsToCtrl->get_Next_Item(); // get this hba's tag DPT_TAG_T dev_Tag = Get_HBA_by_Index(obj_Address.hba, &hba_found); if (!hba_found) { err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; break; } // only allow hba to be specified, not bus (or beyond) if (obj_Address.bus != -1) { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_THIS_DEVICE; break; } switch (eventCmd) { case Delete: // delete the log err = engine->Send(MSG_LOG_CLEAR, dev_Tag); if (!err.Is_Error()) out->add_Item(EventStrings[STR_EVENT_LOG_CLEARED]); break; case Soft: case Recov: case Nonrecov: case StatusChg: if ((buffer = new char[4 * 1024]) == NULL ) { printf( " ERROR BUFFER MISALLOCATED \n"); break; } ourViewThreshold = eventCmd; err = ViewEventLog(dev_Tag, obj_Address, out); break; case Board: if ((buffer = new char[4 * 1024]) == NULL ) { printf( " ERROR BUFFER MISALLOCATED \n"); break; } ourViewThreshold = Soft; err = ViewEventLog(dev_Tag, obj_Address, out); break; } } if (err.Is_Error()) out->add_Item((char *) err); out->add_Item("\n"); return(err); } /****************************************************************** Carries out the command on each array specified ******************************************************************/ Command::Dpt_Error EventLog::ViewEventLog( DPT_TAG_T obj_Tag, SCSI_Address obj_Address, String_List *out) { Dpt_Error err; uLONG offset = 0; uLONG nCurrentHBALogOffSet = 0; totalbytes = 0xFFFFFFFF; int keepgoing = TRUE; dptBuffer_S *outBuff_P = dptBuffer_S::newBuffer(4*1024); dptBuffer_S *logbuf_P = dptBuffer_S::newBuffer(4*1024); char *tempBuf_P = new char[4*1024]; outBuff_P->clear(); logbuf_P->clear(); dptHBAlog_C log; // set the time on the HBA currentTime = time(NULL); # if (defined(_DPT_WIN_NT)) struct tm *sT = localtime(¤tTime); currentTime -= timezone; # else struct tm * sT = gmtime(¤tTime); # endif if (sT) { int dst = (sT->tm_isdst > 0); currentTime += (dst * 3600); } outBuff_P->reset(); outBuff_P->insert((uLONG)currentTime); err = engine->Send(MSG_SET_TIME, obj_Tag, logbuf_P, outBuff_P); logbuf_P->reset(); // end of set the time on the HBA if (!err.Is_Error()) { while ((offset < totalbytes) && keepgoing) { outBuff_P->reset(); if (eventCmd == Board) { outBuff_P->insert((uCHAR) 0x38); // page code outBuff_P->insert((uCHAR) 0x01 ); // Read, do not clear outBuff_P->insert((uSHORT) offset); // ofset - optional outBuff_P->insert((uCHAR) 0); // control byte err |= engine->Send(MSG_GET_LOG_PAGE, obj_Tag, logbuf_P, outBuff_P); if (validateBuffer(logbuf_P, tempBuf_P)) { out->add_Item(EventStrings[STR_INCOMPLETE_ENTRY]); } } else { outBuff_P->insert((uLONG) offset); err |= engine->Send(MSG_LOG_READ, obj_Tag, logbuf_P, outBuff_P); } if (err.Is_Error()) { delete[] logbuf_P; delete[] outBuff_P; delete[] tempBuf_P; return(err); } if (eventCmd == Board) log.initSense(logbuf_P->data, 1); else log.initSense(logbuf_P->data); log.reset(); offset += log.eventBytes(); if (!log.eventBytes()) break; DisplayEvents(keepgoing, log, out, obj_Address); // Update our offset tracker. nCurrentHBALogOffSet += log.fwEventBytes; }// while ((offset < totalbytes) && keepgoing) } // if !err // print message if no entries were printed if (!out->get_Num_Items()) out->add_Item(EventStrings[STR_NO_LOG_ENTRIES]); delete[] logbuf_P; delete[] outBuff_P; delete[] tempBuf_P; return(err); } void EventLog::DisplayEvents(int keepgoing, dptHBAlog_C log, String_List *out, SCSI_Address obj_Address) { int cntr=0; Dpt_Error err; uCHAR *datap; uSHORT ID, CHAN, LUN; char buf[100]; uLONG etime; uSHORT insStart = 0; uSHORT idTableMax = sizeof(chanIdTable)/sizeof(int); uSHORT showedOverFlow = FALSE; int logtype; uSHORT hba, id, lun, chan; logtype = LT_HBA; hba = obj_Address.hba; chan = obj_Address.bus; id = obj_Address.id; lun = obj_Address.lun; while ((datap = log.data_P()) && keepgoing && (log.curEventBytes < log.fwEventBytes)) { // Remember where we are in the text buffer // We might need to discard a partially formatted event insStart = bytesInBuffer; uSHORT lcode = log.code(); uCHAR severity = lcode >> 12; lcode &= 0x0FFF; // If the eventdata option was passed in, display the // event data in HEX // if(DisplayEventData) // { // bufcat(out, EventStrings[STR_LOG_SEPARATOR]); // DoBytes(log.length() + 4, datap - 4, out); // bufcat(out, EventStrings[STR_LOG_SEPARATOR]); // } // we are only concerned with header stuff or // events above and equal to the threshold if (severity >= ourViewThreshold) { // All the times are at the same offset etime = ((hl_Standard_S *)datap)->getTime(); // Check for an invalid length // <4 means not even a time value // >128 && lcode != 0x01D - too long except if debug event if (log.length() < 4 || (log.length() > 128 && lcode != 0x01D)) { // If so, bail err = Dpt_Error::DPT_ERR_POSS_BUFFER_CORRUPTION; keepgoing = FALSE; continue; } int toffset; if (lcode < idTableMax) { toffset = chanIdTable[lcode]; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); } switch (lcode) { case 0x001: // Header - never show { hl_Header_S *hdr = (hl_Header_S *) datap; totalbytes = hdr->getNumParams(); } // Do not display break; case 0x002: // Log overflow { hl_Overflow_S *of = (hl_Overflow_S *) datap; // we only want to show a log overflow once if (!showedOverFlow) { PrintTime(); bufcat(out, EventStrings[STR_LOG_OVERFLOW]); showedOverFlow = TRUE; } } break; case 0x003: // Bad SCSI status { hl_SCSIstat_S *ss = (hl_SCSIstat_S *) datap; CheckAddress(); PrintTime(); PrintAddress(); // figure out which string to use for the SCSI error uSHORT errorstring = STR_UNKNOWN; int error = (ss->getStatus() & 62); for (int e = 0; e < 9; e++) if (error == errorchart[e]) errorstring = scsierrs[e]; bufcat(out, "%s - %s\n",EventStrings[STR_BAD_SCSI], EventStrings[errorstring]); DoBytes(12, ss->getScsiCDB(), out); } break; case 0x004: // Request Sense - { hl_ReqSense_S *rs = (hl_ReqSense_S *) datap; CheckAddress(); PrintTime(); PrintAddress(); uCHAR *data = rs->getData(); bufcat(out, EventStrings[STR_REQ_SENSE]); DoBytes(18, data, out); // This assumes that STR_SENSE_0 through STR_SENSE_F // are consecutive bufcat(out, EventStrings[STR_SENSE_0 + (*(data+2) & 0xF)]); } break; case 0x005: // HBA Error // do not try to print evt->systemError because it is undefined { hl_HBAerr_S *evt = (hl_HBAerr_S *) datap; char ErrorString[80]; CheckAddress(); PrintTime(); PrintAddress(); // This assumes that STR_NO_ERROR through STR_RAM_PARITY // are consecutive GetGen5HbaErrorString(evt->getHbaError(),ErrorString); bufcat(out, "%s - %s\n", EventStrings[STR_HBA_ERROR], ErrorString); } break; case 0x006: // Reassign block { hl_Reassign_S *ra = (hl_Reassign_S *) datap; CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, "%s - %lx\n", EventStrings[STR_BLOCK_REASSIGN], ra->getBlockNum()); } break; case 0x007: // RAM Error { hl_RAMerr_S *ram = (hl_RAMerr_S *) datap; // Is it ECC error across the SCSI bus? if (ram->getFlags() & FLG_HL_SCSI) { if (ram->getFlags() & FLG_HL_CHAN) { CHAN = (ram->getIdLun() & 0xE0) >> 5; ID = ram->getIdLun() & 0x1F; LUN = (ram->getFlags() & 0xE0) >> 5; CheckAddress(); } else { ID = (ram->getIdLun() & 0xF0) >> 4; LUN = ram->getIdLun() & 0x0F; CheckIDLUN(); } PrintTime(); bufcat(out, EventStrings[STR_SCSI_BUS_ECC_ERR], (ram->getFlags() & FLG_HL_CORR) ? EventStrings[STR_CORRECTABLE] : EventStrings[STR_NONCORRECTABLE]); if (ram->getFlags() & FLG_HL_CHAN) PrintAddress(); else bufcat(out, "HBA=%d ID=%d LUN=%d\n", hba, ID, LUN); } else // RAM error { HBAOnly(); PrintTime(); // Is is an ECC error? if (ram->getFlags() & FLG_HL_ECC) { bufcat(out, "\n%s%s %s%08lXh", (ram->getFlags() & FLG_HL_CORR) ? EventStrings[STR_CORRECTABLE] : EventStrings[STR_NONCORRECTABLE], EventStrings[STR_ECC], EventStrings[STR_RAM_ERR_ADDR],ram->getAddrValid() ? ram->getAddr() : 0); } // Must be a Parity error else { bufcat(out, "\n%s", EventStrings[STR_PARITY]); } bufcat(out, "\n"); } } break; case 0x008: // Time Change { hl_Time_S *t = (hl_Time_S *) datap; HBAOnly(); bufcat(out, "%s\n%s ", EventStrings[STR_HBA_TIME_CHG], EventStrings[STR_OLD]); DoTime(t->getOldTime(), 0xF, out); bufcat(out, "\n%s ", EventStrings[STR_NEW]); DoTime(t->getNewTime(), 0xF, out); } break; case 0x009: // Array Config. Update { hl_ArrayCfg_S *ac = (hl_ArrayCfg_S *) datap; HBAOnly(); PrintTime(); bufcat(out, "\n%s - %s\n", EventStrings[STR_CONFIG_UPDATE], (ac->getLevel() == 2) ? EventStrings[STR_FIRMWARE] : EventStrings[STR_SOFTWARE]); } break; case 0x00B: // Major Status Change { uCHAR *schng = datap; hl_MajorStat_S *sc = (hl_MajorStat_S *)schng;//eventData_P; uCHAR level = sc->getLevel(); if (level != logtype && logtype != LT_HBA) break; CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_STATUS_CHANGE]); LogRaidStatus(level, sc->getOldStatus(), buf); bufcat(out, buf); bufcat(out, " => "); LogRaidStatus(level, sc->getNewStatus(), buf); bufcat(out, buf); bufcat(out, "\n"); } break; case 0x00C: // Data inconsistency { hl_DataIC_S *di = (hl_DataIC_S *) datap; CheckAddress(); PrintTime(); PrintAddress(); if (di->getBlockNum() != 0xFFFFFFFF) { bufcat(out, "%s - %s=%lx %s=%lx\n", EventStrings[STR_DATA_INC], EventStrings[STR_BLOCK], di->getBlockNum() , EventStrings[STR_COUNT], di->getBlockCount()); } } break; case 0x00D: // Host command received case 0x00E: // Host command sent { hl_SCSIcmd_S *hc = (hl_SCSIcmd_S *) datap; CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[(lcode & 0x1) ? STR_HOST_CMD_REC : STR_HOST_CMD_SENT]); bufcat(out, "\n"); DoBytes(12, hc->getScsiCDB(), out); } break; case 0x00F: // Lock Start/Stop { HBAOnly(); hl_Lock_S *lock = (hl_Lock_S *) datap; PrintTime(); bufcat(out, "%s %s %d : %s\n", EventStrings[STR_LOCK], EventStrings[STR_FOR_CHANNEL], lock->getChanId() >> 5, lock->getStart() & 0x01 ? EventStrings[STR_STARTED] : EventStrings[STR_STOPPED]); } break; case 0x010: // DEC Array Component Failed case 0x011: // DEC Array Component Fully Functional { HBAOnly(); hl_decArray_S *da = (hl_decArray_S *) datap; PrintTime(); bufcat(out, EventStrings[(lcode & 0x1) ? STR_SS_FULLY_FUNC : STR_SS_COMP_FAILED]); bufcat(out, "\n"); } break; case 0x012: // Drive failure { hl_driveFailure_S *df = (hl_driveFailure_S *) datap; CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_DRIVE_FAILURE]); bufcat(out, "\n"); } break; case 0x013: // Low Voltage Detected case 0x014: // Normal Voltage Restored case 0x015: // High Voltage Detected { hl_voltage_S *vc = (hl_voltage_S *) datap; HBAOnly(); PrintTime(); if (lcode == 0x013) bufcat(out, EventStrings[STR_LOW_VOLTAGE]); else if (lcode == 0x014) bufcat(out, EventStrings[STR_NORMAL_VOLTAGE]); else bufcat(out, EventStrings[STR_HIGH_VOLTAGE]); } break; case 0x016: // Normal Temp. restored case 0x017: // High Temp. detected case 0x018: // Very High Temp. detected { hl_temperature_S *tc = (hl_temperature_S *) datap; HBAOnly(); PrintTime(); if (lcode == 0x016) { bufcat(out, EventStrings[STR_NORMAL_TEMP_RESTORED]); bufcat(out, "\n"); } else if (lcode == 0x017) { bufcat(out, EventStrings[STR_HIGH_TEMP]); bufcat(out, " "); bufcat(out, EventStrings[STR_DETECTED]); } else bufcat(out, EventStrings[STR_VERY_HIGH_TEMP]); } break; case 0x019: // Double Component Failure { HBAOnly(); PrintTime(); bufcat(out, EventStrings[STR_DOUBLE_COMP_FAIL]); } break; case 0x01A: // Diagnostics Start/Stop { hl_diagStartStop_S *ds = (hl_diagStartStop_S *) datap; CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_DIAGNOSTIC]); switch (ds->getCode()) { case 0: bufcat(out, EventStrings[STR_STARTED]); bufcat(out, "\n"); break; case 1: bufcat(out, EventStrings[STR_STOPPED_DDS]); break; case 2: bufcat(out, EventStrings[STR_STOPPED_FAIL]); break; case 3: bufcat(out, EventStrings[STR_STOPPED_LIMIT]); break; case 4: bufcat(out, EventStrings[STR_STOPPED_USER]); break; case 5: bufcat(out, EventStrings[STR_STOPPED_COMPLETE]); break; default: bufcat(out, "\n"); break; } } break; case 0x01B: // SMART threshold reached { hl_smartThreshold_S *st = (hl_smartThreshold_S *) datap; CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_SMART_THRESHOLD]); switch (st->getCode()) { case 0: bufcat(out, EventStrings[STR_DRIVE_PREDICTION]); break; case 1: bufcat(out, EventStrings[STR_SPINUP_CRITERION]); break; case 2: bufcat(out, EventStrings[STR_SEEK_CRITERION]); break; } } break; case 0x01C: // Scheduled Diagnostics Start/Cancel/Failed { hl_scheduledDiag_S *sd = (hl_scheduledDiag_S *) datap; CheckAddress(); PrintTime(); PrintAddress(); int code = sd->getCode(); if (code != 3) bufcat(out, EventStrings[STR_DIAGNOSTIC]); switch (code) { case 0: bufcat(out, EventStrings[STR_SCHEDULED]); break; case 1: bufcat(out, EventStrings[STR_QUERIED]); break; case 2: bufcat(out, EventStrings[STR_CANCELED]); break; case 3: bufcat(out, EventStrings[STR_EX_PERIOD_SET]); break; default: bufcat(out, "\n"); break; } } break; case 0x01D: // Debug Event { hl_debug_S *db = (hl_debug_S *) datap; PrintTime(); bufcat(out, EventStrings[STR_DEBUG_EVENT]); // we need to subtract 4 for the time DoBytes(log.length()-4, db->getData(), out); } break; // array expansion case 0x01F: { hl_expandArray_S *ea = (hl_expandArray_S *) datap; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_ARRAY_MODIFY]); if (ea->getOptions() & 0x80) { bufcat(out, EventStrings[STR_STARTED]); bufcat(out, "\n"); } else { bufcat(out, EventStrings[STR_COMPLETED]); bufcat(out, "\n"); } // the new raid type bufcat(out, EventStrings[STR_RAID_TYPE]); if (ea->getRAIDtype() != 0xff) bufcat(out, "%d", ea->getRAIDtype()); else bufcat(out, EventStrings[STR_UNCHANGED]); bufcat(out, "\n"); // new stripe size bufcat(out, EventStrings[STR_STRIPE_SIZE]); bufcat(out, ": "); if (ea->getStripeSize() != 0xffff) bufcat(out, "0x%uX", ea->getStripeSize()); else bufcat(out, EventStrings[STR_UNCHANGED]); bufcat(out, "\n"); uCHAR var_modnumdrives = ((uCHAR *)datap)[-1]; var_modnumdrives -= sizeof(hl_expandArray_S); var_modnumdrives /= 2; // drives bufcat(out, EventStrings[STR_DEVICES]); bufcat(out, ": "); if (var_modnumdrives != 0xff) bufcat(out, "%s", (ea->getOptions() & 0x01) ? EventStrings[STR_REMOVED] : EventStrings[STR_ADDED]); else bufcat(out, EventStrings[STR_UNCHANGED]); bufcat(out, "\n"); } break; // server failed, protected, on call, etc case 0x020: { hl_serverStatus_S *ss = (hl_serverStatus_S *) datap; HBAOnly(); PrintTime(); bufcat(out, EventStrings[STR_THE_SERVER]); bufcat(out, (char *) ss->getServerName()); bufcat(out, " "); bufcat(out, serverStatus[ss->getChange()]); } break; // heartbeat error case 0x021: { hl_serverStatus_S *ss = (hl_serverStatus_S *) datap; HBAOnly(); PrintTime(); bufcat(out, EventStrings[STR_THE_SERVER]); bufcat(out, (char *) ss->getServerName()); bufcat(out, EventStrings[STR_COULD_NOT]); bufcat(out, beatError[ss->getChange()]); bufcat(out, EventStrings[STR_A_HEARTBEAT]); bufcat(out, "."); } break; // format complete case 0x022: { hl_formatDone_S *fd = (hl_formatDone_S *) datap; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_FORMAT]); if (fd->getCode() & 0x01) bufcat(out, EventStrings[STR_SLASH_CLEAR]); bufcat(out, EventStrings[STR_FINISHED]); if (fd->getCode() & 0x02) { bufcat(out, "("); bufcat(out, EventStrings[STR_ERROR]); bufcat(out, ")"); } if (fd->getCode() & 0x04) { bufcat(out, "("); bufcat(out, EventStrings[STR_ABORT]); bufcat(out, ")"); } } break; case 0x23 : // Swap Signal Detected { HBAOnly(); PrintTime(); bufcat(out, EventStrings[STR_SWAP_SIG_DETECTED]); } break; case 0x24 : // SAF-TE component malfunction { SafTe_S *st = (SafTe_S *) datap; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); LUN = 0; CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_SAFTE]); bufcat(out, " "); bufcat(out, EventStrings[STR_COMP_MALFUNC]); if (st->getCode() & 0x40) { bufcat(out, ", "); bufcat(out, EventStrings[STR_TEMP_OUT_OF_RANGE]); } else if (st->getCode() & 0x20) { bufcat(out, ", "); bufcat(out, EventStrings[STR_POWER_SUPPLY]); bufcat(out, " "); bufcat(out, EventStrings[STR_FAILURE]); } else if (st->getCode() & 0x10) { bufcat(out, ", "); bufcat(out, EventStrings[STR_FAN]); bufcat(out, " "); bufcat(out, EventStrings[STR_FAILURE]); } } break; case 0x25 : // SAF-TE component operational { SafTe_S *st = (SafTe_S *) datap; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); LUN = 0; CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_SAFTE]); bufcat(out, " "); bufcat(out, EventStrings[STR_COMP_OPERATIONAL]); if (st->getCode() & 0x40) { bufcat(out, ", "); bufcat(out, EventStrings[STR_TEMP_NORMAL]); } else if (st->getCode() & 0x20) { bufcat(out, ", "); bufcat(out, EventStrings[STR_POWER_SUPPLY]); } else if (st->getCode() & 0x10) { bufcat(out, ", "); bufcat(out, EventStrings[STR_FAN]); } } bufcat(out, "\n"); break; case 0x26 : // SES component malfunction case 0x27 : // SES component operational { Ses_S *ses = (Ses_S *) datap; char TypeString[80]; char StatusString[80]; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); LUN = 0; CheckAddress(); PrintTime(); PrintAddress(); GetSesTypeAndStatus(ses->getType(),TypeString,ses->getStatus(),StatusString); bufcat(out, EventStrings[STR_SES]); bufcat(out, " "); if (lcode == 0x26) bufcat(out, EventStrings[STR_COMP_MALFUNC]); else bufcat(out, EventStrings[STR_COMP_OPERATIONAL]); bufcat(out, "\n"); bufcat(out, "%s #%d : %s\n",TypeString,ses->getIndex(),StatusString); } break; case 0x28 : // SES Temperature High/Low/Normal { SesTemp_S *sesTemp = (SesTemp_S *) datap; uCHAR SesTempStatus = sesTemp->getStatus(); SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); LUN = 0; CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_SES]); bufcat(out, " "); bufcat(out, EventStrings[STR_ENCL_TEMPERATURE_SENSOR]); bufcat(out, "%d\n", sesTemp->getTempSensorIndex()); if (SesTempStatus & 0x08) { bufcat(out, EventStrings[STR_HIGH_TEMP]); bufcat(out, " "); bufcat(out, EventStrings[STR_FAILURE]); } else if (SesTempStatus & 0x04) { bufcat(out, EventStrings[STR_HIGH_TEMP]); bufcat(out, " "); bufcat(out, EventStrings[STR_WARNING]); } else if (SesTempStatus & 0x02) { bufcat(out, EventStrings[STR_LOW_TEMP]); bufcat(out, " "); bufcat(out, EventStrings[STR_FAILURE]); } else if (SesTempStatus & 0x01) { bufcat(out, EventStrings[STR_LOW_TEMP]); bufcat(out, " "); bufcat(out, EventStrings[STR_WARNING]); } else bufcat(out, EventStrings[STR_NORMAL_TEMP_RESTORED]); bufcat(out, " : %d C\n", sesTemp->getTemp()); } break; case 0x30 : // Cache Disabled { HBAOnly(); PrintTime(); bufcat(out, EventStrings[STR_CACHE_DISABLED]); bufcat(out, "\n"); } break; case 0x31 : // Reset Data Retention { ResetDataRetention_S *rdrTemp = (ResetDataRetention_S *) datap; char StatusString[200]; uLONG rdrStatus = rdrTemp->getStatusFlags(); HBAOnly(); PrintTime(); bufcat( out, "Status: 0x%08ld", rdrStatus); GetRdrStatusString(rdrStatus, StatusString); bufcat(out, StatusString); // Dumping the remaining 64 bytes of data contained in the event. DoBytes(64, (uCHAR *)datap+8, out); } break; case 0x33 : // 3.3 A Volts high { HBAOnly(); PrintTime(); bufcat(out, "3.3 A "); bufcat(out, EventStrings[STR_VOLTS_HIGH]); bufcat(out, "\n"); } break; case 0x34 : // 3.3 A voltage restored { HBAOnly(); PrintTime(); bufcat(out, "3.3 A "); bufcat(out, EventStrings[STR_VOLT_RESTORED]); bufcat(out, "\n"); } break; case 0x35 : // 3.3 A voltage low { HBAOnly(); PrintTime(); bufcat(out, "3.3 A "); bufcat(out, EventStrings[STR_VOLTS_LOW]); bufcat(out, "\n"); } break; case 0x36 : // 3.3 B Volts high { HBAOnly(); PrintTime(); bufcat(out, "3.3 B "); bufcat(out, EventStrings[STR_VOLTS_HIGH]); bufcat(out, "\n"); } break; case 0x37 : // 3.3 B voltage restored { HBAOnly(); PrintTime(); bufcat(out, "3.3 B "); bufcat(out, EventStrings[STR_VOLT_RESTORED]); bufcat(out, "\n"); } break; case 0x38 : // 3.3 B voltage low { HBAOnly(); PrintTime(); bufcat(out, "3.3 B "); bufcat(out, EventStrings[STR_VOLTS_LOW]); bufcat(out, "\n"); } break; case 0x39 : // Term Power voltage high { HBAOnly(); PrintTime(); bufcat(out, EventStrings[STR_TERM_POWER]); bufcat(out, EventStrings[STR_VOLTS_HIGH]); bufcat(out, "\n"); } break; case 0x3A : // Term power voltage restored { HBAOnly(); PrintTime(); bufcat(out, EventStrings[STR_TERM_POWER]); bufcat(out, EventStrings[STR_VOLT_RESTORED]); bufcat(out, "\n"); } break; case 0x3B : // Term Power voltage low { HBAOnly(); PrintTime(); bufcat(out, EventStrings[STR_TERM_POWER]); bufcat(out, EventStrings[STR_VOLTS_LOW]); bufcat(out, "\n"); } break; case 0x3e : // Bad Data Block { BlockList_S *bk = (BlockList_S *) datap; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_BAD_DATA_BLOCK]); bufcat(out, " : %lx\n",bk->getBlockNumber()); } break; case 0x3f : // Bad Parity Block { BlockList_S *bk = (BlockList_S *) datap; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_BAD_PARITY_BLOCK]); bufcat(out, " : %lx\n",bk->getBlockNumber()); } break; case 0x40 : // Bad Data List Full { BlockList_S *bk = (BlockList_S *) datap; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_BAD_DATA_LIST_FULL_BLOCK]); bufcat(out, " : %lx\n",bk->getBlockNumber()); } break; case 0x41 : // Bad Parity List Full { BlockList_S *bk = (BlockList_S *) datap; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_BAD_PARITY_LIST_FULL_BLOCK]); bufcat(out, " : %lx\n",bk->getBlockNumber()); } break; case 0x42 : // Write Back Failure { WriteBackFailue_S* wb = (WriteBackFailue_S *) datap; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); CheckAddress(); PrintTime(); PrintAddress(); bufcat(out, EventStrings[STR_WRITE_BACK_FAIL_BLOCK]); bufcat(out, " : %lx ", wb->getBlockNumber()); bufcat(out, EventStrings[STR_FOR]); bufcat(out, " %lx ", wb->getBlockCount()); bufcat(out, EventStrings[STR_BLOCKS]); bufcat(out, "\n"); } break; case 0x43 : // Battery Status { BatteryEvent_S *bt = (BatteryEvent_S *) datap; char OldState[80]; char NewState[80]; HBAOnly(); PrintTime(); DoBytes(24, datap, out); bufcat(out, EventStrings[STR_BATT_STAT_CHANGE]); bufcat(out, "\n"); GetBatteryEventString(bt->getOldState(),OldState); GetBatteryEventString(bt->getNewState(),NewState); bufcat(out, "%s => %s\n",OldState,NewState); } break; case 0x44 : // Cache Change Status { char OldState[80]; char NewState[80]; CacheChangeEvent_S *ch = (CacheChangeEvent_S *) datap; HBAOnly(); if (ch->getOldState() == 0) { strcpy(OldState, EventStrings[STR_WRITE_THRU]); } else { strcpy(OldState, EventStrings[STR_WRITE_BACK]); } if (ch->getNewState() == 0) { strcpy(NewState, EventStrings[STR_WRITE_THRU]); } else { strcpy(NewState, EventStrings[STR_WRITE_BACK]); } PrintTime(); bufcat(out, EventStrings[STR_GLOBAL_CACHE_STATE_CHG]); bufcat(out, "\n"); bufcat(out, "%s => %s\n",OldState,NewState); } break; case 0x45 : // Bus reset occurred { char msg[80]; msg[0] = '\0'; uCHAR infoByte; uSHORT chanID; BusReset_S* br = (BusReset_S *) datap; HBAOnly(); PrintTime(); infoByte = (uCHAR) br->getInfoByte(); chanID = (infoByte & 0xE0) >> 5; if (br->getInfoByte() & 0x01) { strcpy(msg, EventStrings[STR_CAUSE_OF_BUS_RESET]); } else if (br->getInfoByte() & 0x02) { strcpy(msg, EventStrings[STR_HOST_CMD_BUS_RESET]); } else if (br->getInfoByte() & 0x04) { strcpy(msg, EventStrings[STR_WATCHDOG_BUS_RESET]); } bufcat(out, EventStrings[STR_BUS_RESET_ON_CHAN]); bufcat(out, " %d - %s\n", chanID, msg); } break; case 0x46: // fibre loop event { FibreLoop_S *fl = (FibreLoop_S *) datap; uCHAR P1ExtendedDeviceID; uCHAR P2ExtendedDeviceID; uCHAR P1ChannelNumber; uCHAR P2ChannelNumber; uCHAR InfoByte; HBAOnly(); PrintTime(); SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); P1ExtendedDeviceID = (uCHAR) ID; P2ExtendedDeviceID = (uCHAR) fl->getP2ExtendedDeviceId(); P1ChannelNumber = (uCHAR) (fl->getChannelByte() >> 5) & 0x07; P2ChannelNumber = (uCHAR) (fl->getChannelByte() >> 2) & 0x07; InfoByte = (uCHAR) fl->getInfoByte(); switch (InfoByte & 0x0f) { // up bit is set case 1: bufcat (out, EventStrings[STR_FIBRE_LOOP_CHAN_FROM]); bufcat (out, EventStrings[STR_DOWN_TO_UP], P1ChannelNumber); break; // up bit is set case 2: bufcat (out, EventStrings[STR_FIBRE_LOOP_CHAN_FROM]); bufcat (out, EventStrings[STR_UP_TO_DOWN], P1ChannelNumber); break; // P1 bit is set case 4: bufcat (out, EventStrings[STR_ACCESS_FIBRE_FAILED_FILLIN], P1ExtendedDeviceID, P1ChannelNumber); break; // P2 bit is set case 8: bufcat (out, EventStrings[STR_ACCESS_FIBRE_FAILED_FILLIN], P2ExtendedDeviceID, P2ChannelNumber); break; // unknown value default: bufcat (out, EventStrings[STR_UNKNOWN_FLAGS_FIBRE_LOOP]); break; } } break; case 0x47: //3V voltage high { HBAOnly(); PrintTime(); bufcat (out, "3.0 "); bufcat(out, EventStrings[STR_VOLTS_HIGH]); bufcat (out, "\n"); } break; case 0x48: //3V voltage restored { HBAOnly(); PrintTime(); bufcat (out, "3.0 "); bufcat(out, EventStrings[STR_VOLT_RESTORED]); bufcat (out, "\n"); } break; case 0x49: //3V voltage low { HBAOnly(); PrintTime(); bufcat (out, "3.0 "); bufcat(out, EventStrings[STR_VOLTS_LOW]); bufcat (out, "\n"); } break; case 0x4a: //12V voltage high { HBAOnly(); PrintTime(); bufcat (out, "12.0 "); bufcat(out, EventStrings[STR_VOLTS_HIGH]); bufcat (out, "\n"); } break; case 0x4b: //12V voltage restored { HBAOnly(); PrintTime(); bufcat (out, "12.0 "); bufcat(out, EventStrings[STR_VOLT_RESTORED]); bufcat (out, "\n"); } break; case 0x4c: //12V voltage low { HBAOnly(); PrintTime(); bufcat (out, "12.0 "); bufcat(out, EventStrings[STR_VOLTS_LOW]); bufcat (out, "\n"); } break; case 0x4d: //5V voltage high { HBAOnly(); PrintTime(); bufcat (out, "5.0 "); bufcat(out, EventStrings[STR_VOLTS_HIGH]); bufcat (out, "\n"); } break; case 0x4e: //5V voltage restored { HBAOnly(); PrintTime(); bufcat (out, "5.0 "); bufcat(out, EventStrings[STR_VOLT_RESTORED]); bufcat (out, "\n"); } break; case 0x4f: //5V voltage low { HBAOnly(); PrintTime(); bufcat (out, "5.0 "); bufcat(out, EventStrings[STR_VOLTS_LOW]); bufcat (out, "\n"); } break; case 0x50: // Calibration start/stop / battery calibration { char msg[80]; msg[0] = '\0'; uCHAR infoByte; BatteryCalibrate_S *bc = (BatteryCalibrate_S *) datap; HBAOnly(); PrintTime(); infoByte = (uCHAR) bc->getInfoByte(); if (infoByte & 0x80) strcpy (msg, EventStrings[STR_STARTED]); else strcpy (msg, EventStrings[STR_STOPPED]); bufcat (out, EventStrings[STR_BATTERY_CALIB_COUNT], msg, infoByte & 0x0f); } break; case 0x51: // HDM/ISP Channel event { HdmIspChannel_S *hic = (HdmIspChannel_S *) datap; PrintTime(); uCHAR infoByte = (uCHAR) hic->getInfoByte(); uCHAR bus = (uCHAR) (infoByte >> 5) & 0x07; bufcat (out, EventStrings[STR_CHAN_FILLIN_WAS], bus); uCHAR reason = (uCHAR) infoByte & 0x1f; switch (reason) { case 0: bufcat (out, EventStrings[STR_TAKEN_OFFLINE]); bufcat (out, "\n"); bufcat (out, EventStrings[STR_ISP_PROC_DIAG_CHK_FAILED]); break; case 1: bufcat (out, EventStrings[STR_TAKEN_OFFLINE]); bufcat (out, "\n"); bufcat (out, EventStrings[STR_EXCESS_REINIT_ISP_SUB]); break; case 2: bufcat (out, EventStrings[STR_TAKEN_OFFLINE]); bufcat (out, "\n"); bufcat (out, EventStrings[STR_EXCESS_INBOUND_RESETS]); break; case 3: bufcat (out, EventStrings[STR_TAKEN_OFFLINE]); bufcat (out, "\n"); bufcat (out, EventStrings[STR_ISP_UNABLE_RESET_SFBUS]); break; case 4: bufcat (out, EventStrings[STR_TAKEN_OFFLINE]); bufcat (out, "\n"); bufcat (out, EventStrings[STR_ISP_RECV_UNRECOV_PCIBUS_FAULT]); break; case 5: bufcat (out, EventStrings[STR_LEFT_OFFLINE]); bufcat (out, "\n"); bufcat (out, EventStrings[STR_ISP_FAILED_INIT]); break; default: bufcat (out, EventStrings[STR_UNKNOWN_REASON_CODE]); break; } } break; case 0x52: // Domain validation & scsi device down speed event { SpcDownSpeed_S *sds = (SpcDownSpeed_S *) datap; PrintTime(); uCHAR chanIdByte = (uCHAR) sds->getChanIdByte(); uCHAR infoByte = (uCHAR) sds->getInfoByte(); uCHAR bus = (uCHAR) (chanIdByte >> 5) & 0x07; uCHAR id = (uCHAR) chanIdByte & 0x1f; uCHAR dv = (uCHAR) (infoByte >> 7) & 0x01; uCHAR dvf = (uCHAR) (infoByte >> 6) & 0x01; uCHAR lun = (uCHAR) infoByte & 0x1f; if (dv == 1) // if dv was set bufcat (out, EventStrings[STR_DOWN_SPEED_DOMAIN_VALID], bus, id, lun); else if (dvf == 1) // if dvf was set bufcat (out, EventStrings[STR_NOT_SCSI_DEV_DOMAIN_VALID], bus, id, lun); else // something wrong if get in here bufcat (out, EventStrings[STR_ERR_IN_LOG_MSG]); } break; case 0x53 : //Enclosure Existance { uCHAR TmpValue; EnclosureExist_S *ee = (EnclosureExist_S *) datap; SetScsiAddr(log, toffset, &ID, &CHAN, &LUN); LUN = 0; HBAOnly(); PrintTime(); PrintAddress(); TmpValue = ee->getEnclosureByte(); // // Add in the enclosure type // switch (TmpValue) { case SES_ENCLOSURE : bufcat(out, EventStrings[STR_SES_ENCL]); break; case SAFTE_ENCLOSURE : bufcat(out, EventStrings[STR_SAFTE_ENCL]); break; case DEC_ENCLOSURE : bufcat(out, EventStrings[STR_DEC_ENCL]); break; case NILE_ENCLOSURE : bufcat(out, EventStrings[STR_NILE_ENCL]); break; } bufcat(out, ": "); TmpValue = ee->getInfoByte(); // // If the Communication Lost bit is set, add in // that information // if (TmpValue) { bufcat(out, EventStrings[STR_COMMUNICATION_LOST]); bufcat(out, ": "); } TmpValue = ee->getReasonByte(); // // Add in the Reason for lost communication, or // that the enclosure was found // switch (TmpValue) { case 0 : bufcat(out, EventStrings[STR_SES_ENCL_FOUND]); break; case 1 : bufcat(out, EventStrings[STR_SES_ENCL_SELECTION_TIMEOUT]); break; case 2 : bufcat(out, EventStrings[STR_SES_ENCL_HARDWARE_ERROR]); break; case 3 : bufcat(out, EventStrings[STR_SES_ENCL_ERROR_LIMIT]); break; } bufcat(out, "\n"); } break; case 0x54 : //CPU Register Dump { HBAOnly(); PrintTime(); bufcat(out, EventStrings[STR_CPU_REGISTER_DUMP] ); DoBytes(log.length(), datap, out); } break; case 0x55 : //BlinkLED { BlinkLED_S *bl = (BlinkLED_S *) datap; uCHAR Type = bl->getBlinkTypeByte(); uCHAR Code = bl->getBlinkCodeByte(); HBAOnly(); PrintTime(); bufcat(out, EventStrings[STR_BLINKLED_EVENT],Type,Code); bufcat(out, "\n"); } break; case 0x56: // no hot spare/s detected { PrintTime(); bufcat(out, EventStrings[STR_NO_HOTSPARE_AVAIL]); bufcat(out, "\n"); } break; case 0x57: // rebuild drive too small { PrintTime(); bufcat(out, EventStrings[STR_RBLD_DRV_TOO_SMALL]); bufcat(out, "\n"); } break; default : // Unknown Event { HBAOnly(); PrintTime(); bufcat(out, EventStrings[STR_UNKNOWN_EVENT]); bufcat(out, " : "); // Add 4 to the length and subtract 4 from the address // so we can display the entire event, including the header DoBytes(log.length() + 4, datap - 4, out); } break; } // end switch(lcode) if (insStart != bytesInBuffer){ keepgoing = bufcat(out, "\n\n"); cntr++; } if (keepgoing && (bytesInBuffer+256 >= LOGTEXTSIZE)){ // The original buffer is only 64K large. This buffer must be flushed and reset when it gets full // for large eventlogs Flush (out); bytesInBuffer = 0; out->resetString_List(); } } //if(severity >= ourViewThreshold) if (keepgoing) log.next(); } // while((datap = log.data_P()) && keepgoing (log.curEventBytes < log.fwEventBytes)) } Command &EventLog::Clone() const { ENTER("Command &EventLog::Clone() const"); EXIT(); return(*new EventLog(*this)); } static int bufcat(String_List *out, char *source, ...) { va_list arguments; va_start(arguments, source); vsprintf(buffer, source, arguments); va_end(arguments); int length = strlen(buffer); if (bytesInBuffer + length < LOGTEXTSIZE - 1) { out->add_Item(buffer); bytesInBuffer += length; return TRUE; } return FALSE; } static void DoBytes (uSHORT numbytes, uCHAR *bytes, String_List *out) { uCHAR *p = bytes; for (int i = 0; i < numbytes; i++) bufcat(out, "%02X ", *p++); bufcat(out, "\n"); } static void DoLongs (uSHORT numlongs, uLONG *longs, String_List *out) { uLONG *p = longs; for (int i = 0; i < numlongs; i++) bufcat(out, "%08X ", *p++); bufcat(out, "\n"); } ///////////////////////////////////////////////////////////////////////////// // Set up an HBA error string for the passed in HBA error code ///////////////////////////////////////////////////////////////////////////// static void GetGen5HbaErrorString(uCHAR ErrorCode, char *ErrorString) { switch (ErrorCode) { case 0x00 : strcpy(ErrorString, EventStrings[STR_SUCCESS]); break; case 0x02 : strcpy(ErrorString, EventStrings[STR_REQ_ABORTED]); break; case 0x03 : strcpy(ErrorString, EventStrings[STR_UNABLE_TO_ABORT]); break; case 0x04 : strcpy(ErrorString, EventStrings[STR_COMPLETE_WITH_ERROR]); break; case 0x05 : strcpy(ErrorString, EventStrings[STR_ADAPTER_BUSY]); break; case 0x06 : strcpy(ErrorString, EventStrings[STR_REQUEST_INVALID]); break; case 0x07 : strcpy(ErrorString, EventStrings[STR_PATH_INVALID]); break; case 0x08 : strcpy(ErrorString, EventStrings[STR_DEVICE]); strcat(ErrorString, " "); strcat(ErrorString, EventStrings[STR_NOT_PRESENT]); break; case 0x09 : strcpy(ErrorString, EventStrings[STR_UNABLE_TO_TERMINATE]); break; case 0x0a : strcpy(ErrorString, EventStrings[STR_SEL_TIMEOUT]); break; case 0x0b : strcpy(ErrorString, EventStrings[STR_CMD_TIMEOUT]); break; case 0x0d : strcpy(ErrorString, EventStrings[STR_MR_MSG_RECVD]); break; case 0x0e : strcpy(ErrorString, EventStrings[STR_BUS_RESET]); break; case 0x0f : strcpy(ErrorString, EventStrings[STR_PARITY_ERR_FAILURE]); break; case 0x10 : strcpy(ErrorString, EventStrings[STR_AUTOSENSE_FAILED]); break; case 0x11 : strcpy(ErrorString, EventStrings[STR_NO_ADAPTER]); break; case 0x12 : strcpy(ErrorString, EventStrings[STR_DATA_OVERRUN]); break; case 0x13 : strcpy(ErrorString, EventStrings[STR_UNX_FREE]); break; case 0x14 : strcpy(ErrorString, EventStrings[STR_SEQ_FAILURE]); break; case 0x15 : strcpy(ErrorString, EventStrings[STR_REQ_LEN_ERROR]); break; case 0x16 : strcpy(ErrorString, EventStrings[STR_PROVIDE_FAILURE]); break; case 0x17 : strcpy(ErrorString, EventStrings[STR_BDR_MSG_SENT]); break; case 0x18 : strcpy(ErrorString, EventStrings[STR_REQ_TERM]); break; case 0x33 : strcpy(ErrorString, EventStrings[STR_IDE_MSG_SENT]); break; case 0x34 : strcpy(ErrorString, EventStrings[STR_RESOURCE_UNAVAIL]); break; case 0x35 : strcpy(ErrorString, EventStrings[STR_UNACKED_EVENT]); break; case 0x36 : strcpy(ErrorString, EventStrings[STR_MSG_RECVD]); break; case 0x37 : strcpy(ErrorString, EventStrings[STR_INVALID_CDB]); break; case 0x38 : strcpy(ErrorString, EventStrings[STR_LUN_INVALID]); break; case 0x39 : strcpy(ErrorString, EventStrings[STR_SCSI_TID_INVALID]); break; case 0x3a : strcpy(ErrorString, EventStrings[STR_FUNC_UNAVAIL]); break; case 0x3b : strcpy(ErrorString, EventStrings[STR_NO_NEXUS]); break; case 0x3c : strcpy(ErrorString, EventStrings[STR_SCSI_IID_INVALID]); break; case 0x3d : strcpy(ErrorString, EventStrings[STR_CDB_RECVD]); break; case 0x3e : strcpy(ErrorString, EventStrings[STR_LUN_ALREADY_AVAIL]); break; case 0x3f : strcpy(ErrorString, EventStrings[STR_BUS]); strcpy(ErrorString, EventStrings[STR_BUSY]); break; case 0x40 : strcpy(ErrorString, EventStrings[STR_QUEUE_FROZEN]); break; default : sprintf(ErrorString,"%s : %x", EventStrings[STR_UNKNOWN_ERR_CODE], ErrorCode & 0x0f); break; } } ///////////////////////////////////////////////////////////////////////////// // Formats the passed-in time into global buffer for printing ///////////////////////////////////////////////////////////////////////////// static void DoTime(uLONG ti, uSHORT level, String_List *out) { struct tm *sT = localtime((time_t*)&ti); // approx 12:00 am 1/1/93 if ((ti > 723787536) && sT) { #if defined (_MIPS_) || defined (_PPC_) ti += _timezone; #elif (defined(_DPT_WIN_NT)) ti += timezone; #endif #ifndef _DPT_MACINTOSH int dst = (sT->tm_isdst > 0); ti -= (dst * 3600); #endif # if (defined(_DPT_WIN_NT)) struct tm *mt = localtime((time_t *)&ti); # else struct tm *mt = gmtime((time_t *)&ti); # endif if (mt) { bufcat(out, EventStrings[STR_LOG_TIME], mt->tm_mon+1, mt->tm_mday, mt->tm_year + 1900, mt->tm_hour, mt->tm_min, mt->tm_sec); } } else bufcat(out, "%s", EventStrings[STR_INVALID_HBA_TIME]); if (level < 5) bufcat(out, EventStrings[STR_LOG_LEVEL], level); bufcat(out, "\n"); } ///////////////////////////////////////////////////////////////////////////// // Formats the passed-in time into global buffer for printing ///////////////////////////////////////////////////////////////////////////// bool EventLog::CheckTime(uLONG ti) { struct tm *sT = localtime((time_t*)&ti); // check if time is between // approx 12:00 am 1/1/93 and current tme if ((ti > 723787536) && (ti < (uLONG)currentTime) && sT) return true; else return false; } void SetScsiAddr(dptHBAlog_C log, int offset, uSHORT *ID, uSHORT *CHAN, uSHORT *LUN) { uCHAR chanID; chanID = getU1(log.data_P(),offset); if (log.flags()) *ID = log.flags(); else *ID = chanID & 0x1f; *CHAN = (chanID & 0xe0) >> 5; *LUN = getU1 (log.data_P(), offset + 1); } ///////////////////////////////////////////////////////////////////////////// // Set up a string for the passed in battery event ///////////////////////////////////////////////////////////////////////////// void GetBatteryEventString(uSHORT Event, char *EventString) { switch (Event) { case BATTERY_STAT_NO_BATTERY: strcpy(EventString, EventStrings[STR_NO_BATTERY]); break; case BATTERY_STAT_TRICKLE_CHARGE: strcpy(EventString, EventStrings[STR_TRICKLE_CHRGING]); break; case BATTERY_STAT_FAST_CHARGE: strcpy(EventString, EventStrings[STR_BBU_CHARGING]); break; case BATTERY_STAT_DISCHARGE: strcpy(EventString, EventStrings[STR_BBU_DISCHARGING]); break; case BATTERY_STAT_BAD: strcpy(EventString, EventStrings[STR_BAD_BATTERY]); break; case BATTERY_STAT_PRED_FAIL: strcpy(EventString, EventStrings[STR_BBU_PRED_FAILURE]); break; case BATTERY_STAT_STARTUP: strcpy(EventString, EventStrings[STR_BBU_STARTING]); break; case BATTERY_STAT_OPERATIONAL: strcpy(EventString, EventStrings[STR_BBU_OPERATIONAL]); break; case BATTERY_STAT_MAINTENANCE_CHARGE: strcpy(EventString, EventStrings[STR_MAINT_CALIB]); strcat(EventString, ", "); strcpy(EventString, EventStrings[STR_BBU_CHARGING]); break; case BATTERY_STAT_MAINTENANCE_DISCHARGE: strcpy(EventString, EventStrings[STR_MAINT_CALIB]); strcat(EventString, ", "); strcpy(EventString, EventStrings[STR_BBU_DISCHARGING]); break; case BATTERY_STAT_INIT_CHARGE: strcpy(EventString, EventStrings[STR_INIT_CALIB]); strcat(EventString, ", "); strcpy(EventString, EventStrings[STR_BBU_CHARGING]); break; case BATTERY_STAT_INIT_DISCHARGE: strcpy(EventString, EventStrings[STR_INIT_CALIB]); strcat(EventString, ", "); strcpy(EventString, EventStrings[STR_BBU_DISCHARGING]); break; case BATTERY_STAT_INIT_RECHARGE: strcpy(EventString, EventStrings[STR_INIT_CALIB]); strcat(EventString, ", "); strcpy(EventString, EventStrings[STR_RECHARGING]); break; default : strcpy(EventString, EventStrings[STR_UNKNOWN]); break; } } ///////////////////////////////////////////////////////////////////////////// // Set up a component type string and a component status string for the // passed in SES component type ans status ///////////////////////////////////////////////////////////////////////////// static void GetSesTypeAndStatus(uCHAR SesType,char *TypeString, uCHAR SesStatus,char *StatusString) { switch (SesType) { case 0x00: strcpy(TypeString,EventStrings[STR_UNSPECIFIED]); break; case 0x01: strcpy(TypeString,EventStrings[STR_DEVICE]); break; case 0x02: strcpy(TypeString,EventStrings[STR_POWER_SUPPLY]); break; case 0x03: strcpy(TypeString,EventStrings[STR_COOLING_ELEM]); break; case 0x04: strcpy(TypeString,EventStrings[STR_TEMP_SENSOR]); break; case 0x05: strcpy(TypeString,EventStrings[STR_DOOR_LOCK]); break; case 0x06: strcpy(TypeString,EventStrings[STR_AUD_ALARM]); break; case 0x07: strcpy(TypeString,EventStrings[STR_ENCL_SERV_CTLR_ELEC]); break; case 0x08: strcpy(TypeString,EventStrings[STR_SCC_CTLR_ELEC]); break; case 0x09: strcpy(TypeString,EventStrings[STR_NONVOLATILE_CACHE]); break; case 0x0b: strcpy(TypeString,EventStrings[STR_UNINTERRUPTABLE]); strcpy(TypeString," "); strcpy(TypeString,EventStrings[STR_POWER_SUPPLY]); break; case 0x0c: strcpy(TypeString,EventStrings[STR_DISPLAY]); break; case 0x0d: strcpy(TypeString,EventStrings[STR_KEY_PAD_ENTRY_DEV]); break; case 0x0f: strcpy(TypeString,EventStrings[STR_SCSI_PORT_XCEIVER]); break; case 0x10: strcpy(TypeString,EventStrings[STR_LANGUAGE]); break; case 0x11: strcpy(TypeString,EventStrings[STR_COMM_PORT]); break; case 0x12: strcpy(TypeString,EventStrings[STR_VOLT_SENSOR]); break; case 0x13: strcpy(TypeString,EventStrings[STR_CURRENT_SENSOR]); break; case 0x14: strcpy(TypeString,EventStrings[STR_SCSI_TGT_PORT]); break; case 0x15: strcpy(TypeString,EventStrings[STR_SCSI_INIT_PORT]); break; case 0x16: strcpy(TypeString,EventStrings[STR_SIMPLE_SUBENCL]); break; default: strcpy(TypeString,EventStrings[STR_UNKNOWN]); break; } switch (SesStatus) { case 0x00: strcpy(StatusString,EventStrings[STR_UNSUPPORTED]); break; case 0x01: strcpy(StatusString,EventStrings[STR_OK]); break; case 0x02: strcpy(StatusString,EventStrings[STR_CRITICAL]); break; case 0x03: strcpy(StatusString,EventStrings[STR_NONCRITICAL]); break; case 0x04: strcpy(StatusString,EventStrings[STR_UNRECOVERABLE]); break; case 0x05: strcpy(StatusString,EventStrings[STR_NOT_INSTALLED]); break; case 0x06: strcpy(StatusString,EventStrings[STR_UNKNOWN]); break; case 0x07: strcpy(StatusString,EventStrings[STR_UNAVAILABLE]); break; default: strcpy(StatusString,EventStrings[STR_UNKNOWN]); break; } } /////////////////////////////////////////////////////////////////////////// // Puts a string into supplied buffer that descripes current Array status /////////////////////////////////////////////////////////////////////////// void LogRaidStatus(uCHAR level, uCHAR status, char *buf) { int main; int sub; uCHAR LOGPHYSICAL = 0; uCHAR LOGLOGICAL = 1; //This initialization isn't supported under SCO 3.2.4.2 // int maxmain[2] = { 12, 12 }; // int maxsub[2] = { 12, 12 }; int maxmain[2]; int maxsub[2]; maxmain[0] = 12; maxmain[1] = 12; maxsub[0] = 12; maxsub[1] = 12; if (level == LOGPHYSICAL) status &= 0x7F; main = (int)(status & 0x0F); sub = (int)((status & 0xF0) >> 4); buf[0] = '\0'; /* if (main > maxmain[level] || sub > maxsub[level]) { //if(runflags & RTF_DEBUG) sprintf(buf, "%s: %s = %d %s = %d", EventStrings[STR_UNKNOWN], EventStrings[STR_MAIN], EventStrings[STR_SUB], main, sub); return; } */ if (level == LOGPHYSICAL) { // Kludge for now if (main == 4 && sub == 1) { strcpy(buf, EventStrings[STR_PARENT_ARRAY_BUILDING]); return; } // put the main status in the buffer strcpy(buf, EventStrings[PAPmainstatus[main]]); // put a blank after the main status strcat(buf, " "); // Put the submessage at the end of the buffer strcat(buf, EventStrings[PAPsubtable[main][sub]]); } else { // put the main status in the buffer strcpy(buf, EventStrings[LAPmainstatus[main]]); // put a blank after the main status strcat(buf, " "); // Put the submessage at the end of the buffer strcat(buf, EventStrings[LAPsubtable[main][sub]]); } } // when using 'board' option, the first entry returned in the buffer // may be partial. Fix the buffer. // returns true if buffer manipulated // returns false if buffer seems intact bool EventLog::validateBuffer(dptBuffer_S *logbuf_P, char *tempBuf_P) { int index, tempIndex; uSHORT bufLen, origBufLen, code; uLONG tempTime; bool retVal = false; memcpy(tempBuf_P, logbuf_P->data, logbuf_P->writeIndex); index = 2; bufLen = (((uCHAR)*(tempBuf_P + index++)) << 8); bufLen += (uCHAR)(*(tempBuf_P + index++)); bufLen += 4; // add in 4 byte header origBufLen = bufLen; // verify the 1st parameter code is xf001 (will error out on return) code = (*(tempBuf_P + index++)) << 8; code += *(tempBuf_P + index++); if (code == 0xf001) { index += *(tempBuf_P + ++index); // skip the header index++; } // 00, 10, 20, 30, 40 are only codes available right now // if this byte is not one of these, adjust buffer while (index < bufLen) { if ((*(tempBuf_P + index) != 0x00) && (*(tempBuf_P + index) != 0x10) && (*(tempBuf_P + index) != 0x20) && (*(tempBuf_P + index) != 0x30) && (*(tempBuf_P + index) != 0x40)) { // skip this byte, adjust buffer memcpy(tempBuf_P + index, tempBuf_P + (index + 1), bufLen - index - 1); bufLen--; retVal = true; } // 1st byte OK, get length, check next else { tempIndex = index + 4; // next 4 bytes for date/time tempTime = (uCHAR)*(tempBuf_P + tempIndex) << 8; tempTime |= (uCHAR)*(tempBuf_P + tempIndex + 1); tempTime <<= 8; tempTime |= (uCHAR)*(tempBuf_P + tempIndex + 2); tempTime <<= 8; tempTime |= (uCHAR)*(tempBuf_P + tempIndex + 3); if (CheckTime(tempTime)) { index = bufLen; memcpy(logbuf_P->data, tempBuf_P, origBufLen); } else { // invalid time, skip this byte, adjust buffer memcpy(tempBuf_P + index, tempBuf_P + (index + 1), bufLen - index - 1); bufLen--; retVal = true; } } } return retVal; } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/eventlog.hpp0000664000175000000620000000731410044153337020516 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENTLOG_HPP #define EVENTLOG_HPP /**************************************************************************** * * Created: 6/16/99 * ***************************************************************************** * * File Name: EventLog.hpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 7 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include #include "command.hpp" #include "scsilist.hpp" #include "intlist.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ enum EventLogOptions { Soft = 1, Recov, Nonrecov, StatusChg, Delete, Board }; enum vl_LogTypes { LT_PHYSICAL, LT_LOGICAL, LT_HBA }; static void GetSesTypeAndStatus(uCHAR SesType, char *TypeString, uCHAR SesStatus,char *StatusString); static void DoTime(uLONG ti, uSHORT level, String_List *out); static void GetGen5HbaErrorString(uCHAR ErrorCode, char *ErrorString); static void DoBytes (uSHORT numbytes, uCHAR *bytes, String_List *out); static void DoLongs (uSHORT numlongs, uLONG *longs, String_List *out); static int bufcat(String_List *out, char *source, ...); void SetScsiAddr(dptHBAlog_C log, int offset, uSHORT *ID, uSHORT *CHAN, uSHORT *LUN); void LogRaidStatus(uCHAR level, uCHAR status, char *buf); class EventLog:public Command { public: EventLog::EventLog(SCSI_Addr_List *deviceList, EventLogOptions cmd); EventLog(const EventLog &new_EventLog); virtual ~EventLog(); Dpt_Error execute(String_List **output); Dpt_Error ViewEventLog(DPT_TAG_T dev_Tag, SCSI_Address obj_Address, String_List *out); void DisplayEvents(int keepgoing, dptHBAlog_C log, String_List *out, SCSI_Address obj_Address); bool validateBuffer(dptBuffer_S *logbuf_P, char *tempBuf_P); bool CheckTime(uLONG ti); Command &Clone() const; private: EventLogOptions eventCmd; SCSI_Addr_List *devsToCtrl; int ourViewThreshold; time_t currentTime; uLONG totalbytes; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/expand.cpp0000664000175000000620000002213210044153333020134 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 12/17/99 * ***************************************************************************** * * File Name: Expand.cpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 4 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include #include "expand.hpp" #include "intlist.hpp" #include "rustring.h" #include "rscenum.h" /*** CONSTANTS ***/ extern int FID_RESET_OUTBUFF; extern uSHORT PHYS_LIST_SIZE; extern uCHAR SMU_EXPANDING; extern char* EventStrings[]; /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Expand::Expand( SCSI_Address raid, SCSI_Addr_List *list ): raidToExpandAddr (raid), components (list) { ENTER( "Expand::Expand(" ); EXIT(); } Expand::Expand (const Expand &new_Expand): raidToExpandAddr (new_Expand.raidToExpandAddr), components (new_Expand.components) { ENTER ("Expand::Expand( const Expand &new_Expand):"); EXIT (); } Expand::~Expand() { ENTER ("Expand::~Expand()"); EXIT (); } Command::Dpt_Error Expand::RaidExpandable (void) { ENTER( "Command::Dpt_Error Expand::RaidExpandable (void)"); bool objFound = false; bool getHidden = false; int numComps; dptID_S *idlist = new dptID_S[PHYS_LIST_SIZE]; Dpt_Error err; raidToExpandTag = Get_Log_Dev_by_Address (raidToExpandAddr, getHidden, &objFound); err = engine->Send (MSG_GET_INFO, raidToExpandTag); raidToExpandType = engine->devInfo_P->raidType; if (!err.Is_Error()) { // make sure the raid is a 0 or a 5 and not dual level if ((engine->devInfo_P->raidParent == -1) && ((raidToExpandType == 5) || (raidToExpandType == 0))) { numComps = EngineFindIDs(FID_RESET_OUTBUFF, MSG_ID_COMPONENTS, raidToExpandTag, idlist, PHYS_LIST_SIZE); // save this for later. raidStripeSize = engine->devInfo_P->maxCompStripe; if (raidToExpandType == 5) currStripeSize = numComps * raidStripeSize; else currStripeSize = engine->devInfo_P->maxCompStripe; // get info from hba mgrTag = engine->devInfo_P->hbaTag; err = engine->Send (MSG_GET_INFO, mgrTag); // this value will have to be >= currStripeSize to add in the drive if (!err.Is_Error()) { maxStripeSize = engine->hbaInfo_P->maxMajorStripe; if (!maxStripeSize) maxStripeSize = 0x800; if (raidToExpandType == 5) maxStripeSize += raidStripeSize; } } else err = Dpt_Error::DPT_ERR_INVALID_RAID_TYPE; } EXIT(); return (err); } Command::Dpt_Error Expand::execute( String_List **output ) { ENTER ("Command::Dpt_Error Expand::execute (String_List **output)"); Dpt_Error err, temp_err; String_List *out; raidHeader_S raid_hdr; raidCompList_S comp_list; DPT_TAG_T compTag; uLONG buffSize; *output = out = new String_List(); Init_Engine(); engine->Reset(); // warning to all OSs except NT (and 2000 - same define) #if !defined _DPT_WIN_NT out->add_Item (EventStrings[STR_WARN_ONLY_NT_2000]); #endif err = RaidExpandable(); int dev_Index = 0; bool more_Devs_Left = true; bool first_time_through = true; bool cluster_ON = false; for(dev_Index = 0; more_Devs_Left && !err.Is_Error(); dev_Index ++){ DPT_TAG_T hba_Tag; hba_Tag = Get_HBA_by_Index(dev_Index, &more_Devs_Left); engine->Reset(); engine->Send(MSG_GET_INFO, hba_Tag); //if the cluster bit is enabled, DISABLE this feature if (engine->hbaInfo_P->flags2 & FLG_HBA_CLUSTER_MODE) cluster_ON = true; } if (cluster_ON) (**output).add_Item ( EventStrings[STR_CLSTR_FEAT_DISABLE]); else if (!err.Is_Error()) { dptBuffer_S *deadBuff_P = dptBuffer_S::newBuffer(10); dptBuffer_S *tempBuff_P = dptBuffer_S::newBuffer(1024); smUserBuff_S *smUB_P = (smUserBuff_S *) tempBuff_P->data; memset(&raid_hdr, 0, sizeof(raidHeader_S)); memset(&comp_list, 0, sizeof(raidCompList_S)); if (components->get_Num_Items()) { raid_hdr.refNum = raidToExpandType; buffSize = sizeof(DPT_TAG_T) + sizeof(uCHAR) + sizeof(raidHeader_S) + sizeof(raidCompList_S) * components->get_Num_Items(); dptBuffer_S *raidBuff_P = dptBuffer_S::newBuffer(buffSize); raidBuff_P->reset (); raidBuff_P->insert ((uLONG) raidToExpandTag); raidBuff_P->insert ((uCHAR) 0); raidBuff_P->insert (&raid_hdr, sizeof(raidHeader_S)); // loop on each drive to add bool component_Found = true; bool includeDrive = true; while (component_Found && components->num_Left() && includeDrive) { includeDrive = true; compTag = Get_Dev_by_Address_and_Type (GET_SCSI_DASD, components->get_Next_Item(), &component_Found); if (component_Found) { // must be unarrayed drive, but redirected okay err = engine->Send (MSG_GET_INFO, compTag); // if part o f a logical ... if (engine->devInfo_P->flags & FLG_DEV_RAID_COMPONENT) { // check the hba ... err = engine->Send (MSG_GET_INFO, engine->devInfo_P->raidParent); // if not redirected, get out if (engine->devInfo_P->raidType != RAID_REDIRECT) includeDrive = false; } if (includeDrive) { // be sure hba has enough memory to add this drive if (StripeSizeCapable (compTag)) { comp_list.tag = compTag; raidBuff_P->insert (&comp_list, sizeof(raidCompList_S)); } else { err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; break; } } } else { err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; break; } } if (!err.Is_Error()) err = engine->Send(MSG_RAID_CHANGE, mgrTag, deadBuff_P, raidBuff_P); delete[] raidBuff_P; } if (!err.Is_Error()) { tempBuff_P->reset(); tempBuff_P->writeIndex = 4; smUB_P->arrayFlags |= SMU_EXPANDING; smUB_P->raidType = (uCHAR) 5; err = engine->Send(MSG_SET_USER_BUFF, raidToExpandTag, deadBuff_P, tempBuff_P); } delete[] deadBuff_P; delete[] tempBuff_P; if (!err.Is_Error()) { engine->Insert (mgrTag); engine->Send (MSG_UPDATE_ALL_STATUS); } } if (err.Is_Error()) out->add_Item ((char *) err); else { err = engine->Send (MSG_RAID_HW_ENABLE); if (!err.Is_Error() && !cluster_ON) PrintRaidAddress(raidToExpandTag, out); } EXIT (); return (err); } bool Expand::StripeSizeCapable (DPT_TAG_T compTag) { bool retval = true; if (raidToExpandType == 5) { if ((currStripeSize + raidStripeSize) > maxStripeSize) retval = false; } else // raid 0 { if (currStripeSize > maxStripeSize) retval = false; } return (retval); } Command &Expand::Clone() const { ENTER ("Command &Expand::Clone() const"); EXIT (); return (*new Expand (*this)); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/expand.hpp0000664000175000000620000000567410044153336020160 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef EXPAND_HPP #define EXPAND_HPP /**************************************************************************** * * Created: 12/17/99 * ***************************************************************************** * * File Name: Expand.hpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 1 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "scsilist.hpp" #include "intlist.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ class Expand:public Command { public: Expand::Expand (SCSI_Address raid, SCSI_Addr_List *list); Expand (const Expand &new_Expand); virtual ~Expand(); Expand &operator = (Expand &right); Dpt_Error execute (String_List **output); Command &Clone () const; private: Dpt_Error RaidExpandable (void); bool StripeSizeCapable (DPT_TAG_T compTag); SCSI_Address raidToExpandAddr; DPT_TAG_T raidToExpandTag; DPT_TAG_T mgrTag; uSHORT raidToExpandType; uLONG maxStripeSize; SCSI_Addr_List *components; uLONG raidStripeSize; uLONG currStripeSize; typedef struct { uCHAR arrayFlags; uCHAR raidType; uCHAR pad[2]; } smUserBuff_S; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/flash.cpp0000664000175000000620000014260010046160774017766 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 10/10/98 * ***************************************************************************** * * File Name: Flash.cpp * Module: * Contributors: Mark Salyzyn * David Dillard * Description: This command flashes the specified controller * Version Control: * * $Revision: 68 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "flash.hpp" #include "listdev.hpp" #include "intlist.hpp" #include "rustring.h" #include "ctlr_map.hpp" #include "status.hpp" #include "osd_util.h" #include "rscenum.h" #include #include #if HAVE_FSTREAM # include #else # if HAVE_FSTREAM_H # include # endif #endif #if defined _DPT_WIN_NT # include #else # if HAVE_SSTREAM # include # else # if HAVE_STRSTREAM_H # include # endif # endif #endif extern char* EventStrings[]; /*** CONSTANTS ***/ enum output_Type { OUTPUT_TAB_HEADER, OUTPUT_MULTI_LINED_TAB_HEADER, OUTPUT_END_OF_TAB_SCOPE, OUTPUT_UNADORNED }; enum display_States { STATE_COLUMNAR, STATE_MULTI_LINE_COLUMNAR, STATE_RAW, STATE_ONE_SHOT_RAW }; /*** TYPES ***/ typedef struct _FW_MODEL_MAPPING { char controllerModel[8]; char fileDescriptionModel[8]; } FW_MODEL_MAPPING; /*** STATIC DATA ***/ // This array contains the valid mappings of the model number representing the // class of adapters that a firmware file is for and the model numbers which // represent that class. This is used to validate that a firmware file can // legitimately be flashed to an adapter before the flash is performed. // // This mapping does NOT contain the mirror mappings where the fileDescriptionModel // is the same as the productIdModel, e.g. "2554" and "2554". static FW_MODEL_MAPPING modelMappings[] = { "PM1554", "PM2554", "PM2564", "PM2554", "PM2654", "PM2554", "PM25XX", "PM2554", "PM1564", "PM2564", "PM2664", "PM2564", "PM25XX", "PM2564", "PM3755", "PM3754", "PM375X", "PM3754", "2000S", "2005S", }; /*** MACROS ***/ #ifndef min #define min(x, y) ((x) < (y) ? (x) : (y)) #endif /*** PROTOTYPES ***/ extern void Flush( String_List * ); /*** FUNCTIONS ***/ Flash::Flash( char * sourceFile, int resync, int hba ) { ENTER( "Flash::Flash(" ); (void)strcpy (source = new char [ strlen (sourceFile) + 1 ], (const char *) sourceFile); Resync = resync; hba_Num = hba; imageSize = 0L; loadInfo = 0L; ScanOffset = 0L; ScanSize = 0L; ScanYear = 0; ScanState = 0; ScanFwId = 0L; ScanMonth = 0; ScanDay = 0; memset (ScanBuild, 0, sizeof(ScanBuild)); memset (ScanVersion, 0, sizeof(ScanVersion)); memset (ScanType, 0, sizeof(ScanType)); memset (ScanDescriptionHba, 0, sizeof(ScanDescriptionHba)); ScanDescrIdx = 0; inMode0 = false; EXIT(); } Flash::Flash( const Flash &right ) { ENTER( "Flash::Flash(" ); #if defined _DPT_UNIXWARE || defined _DPT_SCO Flash( right.source, right.Resync, right.hba_Num ); #else Flash::Flash( right.source, right.Resync, right.hba_Num ); #endif EXIT(); } Flash::~Flash() { ENTER( "Flash::~Flash()" ); if (source != NULL) { delete [] source; source = (char *) NULL; } EXIT(); } Command::Dpt_Error Flash::execute( String_List **output ) { ENTER( "Command::Dpt_Error Flash::execute( String_List **output )" ); Dpt_Error err; // allocate this object once for all functions. *output = new String_List(); // Try to open the file specified. If it can't be opened then output // an error message and return. // // The stupid Borland compiler for DOS sets up an unbuffered stream by // default so under DOS attach a buffer to the stream so that we get // decent performance. Otherwise, performance is truely abysmal. std::fstream firmwareStream; #ifdef _DPT_DOS char firmwareStreamBuf[BYTES_PER_TRANSFER]; streambuf *pBuf = firmwareStream.rdbuf(); pBuf->setbuf(firmwareStreamBuf, sizeof(firmwareStreamBuf)); #endif #if defined _DPT_BSDI firmwareStream.open(source, std::ios::in | std::ios::bin); #elif defined (_DPT_SCO) || defined (_DPT_UNIXWARE) firmwareStream.open(source, std::ios::in); #else firmwareStream.open(source, std::ios::in | std::ios::binary); #endif if (!firmwareStream.good()) { (**output).add_Item(EventStrings[STR_FAILURE]); (**output).add_Item(EventStrings[STR_BLANK]); (**output).add_Item( source ); return( err ); } // Get the size of the file. firmwareStream.seekg(0, std::ios::end); imageSize = firmwareStream.tellg(); firmwareStream.seekg(0); if (imageSize == 0) { (**output).add_Item(EventStrings[STR_FAILURE]); (**output).add_Item(EventStrings[STR_BLANK]); (**output).add_Item( source ); return( err ); } m_FlashFileProcessorFamily = -1; // Determine the type of file provided. unsigned long InitialOffset = (unsigned long)-1L; unsigned long ScanFwType = 0L; //Changed because this initialization isn't supported undes SCO 3.2.4.2 // unsigned char InitialType[16] = { 0 }; unsigned char InitialType[16]; InitialType[0] = 0; unsigned long Offset = 0L; // Apparently 8K is the smallest of any flash size, which can only be NVRAM if (imageSize <= MAX_FLASH_NVRAM_SIZE) // if ( ( imageSize == 128 ) || ( imageSize == FLASH_NVRAM_SIZE ) ) { char Buffer[128]; InitialOffset = ScanOffset = FLASH_NVRAM_OFFSET; ScanSize = imageSize; strcpy ( (char *)InitialType, EventStrings[STR_NVRAM] ); strcpy ( (char *)ScanType, (const char *)InitialType ); sprintf (Buffer, EventStrings[STR_SCAN_TYPE_SIZE], ScanType, ScanSize); (**output).add_Item( Buffer ); } else for (unsigned long count = 0; count < imageSize; ++count) { uCHAR ch = firmwareStream.get(); if (( DetermineOffset(ch)) || (( ScanState == 21 ) && (count >= (Offset + ScanSize))) || ((count + 1) == imageSize)) { if (InitialOffset == (unsigned long)-1L) { InitialOffset = ScanOffset; strcpy ( (char *)InitialType, (const char *)ScanType ); } if (ScanFwType == 0L) { ScanFwType = ScanFwId; } if (( Offset += ScanSize ) > count) { count = (Offset - 1); } if (ScanType[0]) { char Buffer[128]; char date[11]; char version[sizeof(ScanVersion)+sizeof(ScanBuild)+1]; memset (date, ' ', sizeof(date)-1); date[sizeof(date)-1] = '\0'; if (ScanMonth || ScanDay || ScanYear) { sprintf (date, EventStrings[STR_FILLIN_DATE], ScanMonth, ScanDay, ScanYear); } memset (version, 0, sizeof(version)); if (ScanVersion[0]) { sprintf (version, EventStrings[STR_FILLIN_VERSION], ScanVersion, ScanBuild[0] ? "/" : "", ScanBuild); } if (Offset > imageSize) { ScanSize -= Offset - imageSize; } sprintf (Buffer, EventStrings[STR_SCAN_TYPE_SIZE_DATE_VERSION], ScanType, ScanSize, date, version); (**output).add_Item( Buffer ); } ScanOffset = 0L; ScanSize = 0L; ScanYear = 0; ScanState = 0; ScanFwId = 0L; ScanMonth = 0; ScanDay = 0; memset (ScanBuild, 0, sizeof(ScanBuild)); memset (ScanVersion, 0, sizeof(ScanVersion)); memset (ScanType, 0, sizeof(ScanType)); } } ScanOffset = InitialOffset; strcpy ( (char *)ScanType, (const char *)InitialType ); Init_Engine(1); // only scan hbas (**output).add_Item(EventStrings[STR_LIST_DEV_CTLR_HEADER]); (**output).add_Item( STR_DEV_DIVIDING_LINE ); bool anyControllerFound = false; bool more_Devs_Left = true; bool flashedData = false; for (int dev_Index = 0; more_Devs_Left; dev_Index++) { DPT_TAG_T tempHbaTag=Get_HBA_by_Index(dev_Index, &more_Devs_Left); if (more_Devs_Left) hbaTag = tempHbaTag; else break; if (( hba_Num == -1 ) || ( hba_Num == dev_Index )) { anyControllerFound = true; // if this is firmware, make sure the image matches the hba if (!memcmp(ScanType, EventStrings[STR_FIRMWARE], 8)) { // find out the hba type err = engine->Send( MSG_GET_INFO, hbaTag ); uSHORT fwType = engine->hbaInfo_P->fwType; char tempStr[7]; memset (tempStr, 0, sizeof(tempStr)); memcpy (tempStr, Strip_Trailing_Whitespace(engine->devInfo_P->productID), sizeof(tempStr)); tempStr[6] = '\0'; err = PrintHBA(**output); if (err.Success()) { if (ScanFwType != 0L) { if (ScanFwType != fwType) { err = Dpt_Error::DPT_CMD_ERR_INVALID_FLASH_IMAGE; (**output).add_Item(EventStrings[STR_FILE_NOT_MATCH_HBA]); continue; } } else if (((tempStr[0] == '1') || (tempStr[0] == '2') || (tempStr[0] == '3') || (tempStr[0] == '5')) && (tempStr[3] == '0')) { // The second digit matters if it's 2XXX series (ie. Pimento = 2400, Catapult = 2100) E.E. 3/5/2001 if (ScanDescriptionHba[1] != 'M' && ScanDescriptionHba[0] != '2') { tempStr[1] = ScanDescriptionHba[1]; } tempStr[5] = '\0'; if (!ValidFlashFileForController(ScanDescriptionHba, tempStr)) { err = Dpt_Error::DPT_CMD_ERR_INVALID_FLASH_IMAGE; (**output).add_Item(EventStrings[STR_FILE_NOT_MATCH_HBA]); continue; } } } } else { err = PrintHBA(**output); } if (err.Success()) { err |= Flash_This_HBA( **output, firmwareStream ); flashedData = true; break; } } } if (!anyControllerFound) { err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_HBA_INDEX; (**output).add_Item(EventStrings[STR_CTLR_NOT_FOUND]); } if (flashedData) { if (err.Success()) { (**output).add_Item(EventStrings[STR_FLASH_COMPLETE]); } if (inMode0) { (**output).add_Item(EventStrings[STR_REBOOT]); (**output).add_Item(EventStrings[STR_REMMODEZERO]); } if (Resync) { Dpt_Error err2; engine->Reset(); engine->Insert ((uLONG) 0x01); // perform a complete init err2 = engine->Send (MSG_I2O_RESYNC, hbaTag); if (err2.Success()){ PrintHBA(**output); (**output).add_Item(EventStrings[STR_RESYNC_SUCCESS_NO_REBOOT]); } else if (err2 == Dpt_Error::DPT_MSG_RTN_IGNORED) (**output).add_Item(EventStrings[STR_RESYNC_NOT_SUPPORTED_REBOOT]); else (**output).add_Item(EventStrings[STR_RESYNC_FAILED_REBOOT]); } } Flush ( *output ); EXIT(); return( err ); } bool Flash::ValidFlashFileForController( const char *fileDescriptionModel, const char *controllerModel ) const { bool validFlashFileForController = false; // Do the special case check if the two are the same then there is a match. if (strcmp(fileDescriptionModel, controllerModel) == 0) { validFlashFileForController = true; } else { // Loop through the mappings looking for a controller model that matches the controller // model specified. for (unsigned mapIndex = 0; mapIndex < sizeof(modelMappings)/sizeof(modelMappings[0]); mapIndex++) { if (strcmp(modelMappings[mapIndex].controllerModel, controllerModel) == 0) { if (strcmp(modelMappings[mapIndex].fileDescriptionModel, fileDescriptionModel) == 0) { validFlashFileForController = true; break; } } } #if defined _DPT_DOS if ((validFlashFileForController == false) && (inMode0 == true)) { #if defined _DPT_LEGACY // dptutil (only DOS/dptutil defines _DPT_LEGACY) if ((strcmp(controllerModel, "PM2865") == 0) && (fileDescriptionModel[0] == '3') && (fileDescriptionModel[2] == '0') && (fileDescriptionModel[3] == '0')) validFlashFileForController = true; #else // raidutil if ((strcmp(fileDescriptionModel, "PM2865") == 0) && (controllerModel[0] == '3') && (controllerModel[2] == '0') && (controllerModel[3] == '0')) validFlashFileForController = true; #endif } #endif } // Return to the caller. return(validFlashFileForController); } // The mother of all state machines. // This state machine will return a value of 1 if all the information // about the file has been determined. The information is the Offset // expected within the flash region, the size of the image (so we could // reset and look at a concatonated image) and the version of the // image. int Flash::DetermineOffset(int c) { switch (ScanState) { case 0: ScanOffset = 0L; ScanSize = FLASH_FIRMWARE_SIZE; if (c == 0x55) { ScanOffset = 180224L; // EATA Card (void)strcpy ((char *)ScanType, "SMOR"); ++ScanState; break; } if (c == 0x5A) { // SMOR image ScanOffset = 819200L; // I2O Card (void)strcpy ((char *)ScanType, "SMOR"); ScanState = 17; break; } ScanState = 21; break; case 1: if (c == 0xAA) { // ROM image, or SMOR compressed image ++ScanState; break; } ScanState = 21; break; case 2: ScanSize = (unsigned long)c; if ((c < 16) || (128 < c) || ((c & 7) != 0)) { ScanState = 156; // SMOR compressed image or FCODE image } else { ScanState = 149; // ROM image or SMOR compressed image } break; case 4: if (c == 'v') { ++ScanState; break; } --ScanState; // FALLTHRU case 3: if (c == ' ') { ++ScanState; } break; case 5: // ' v0' case 6: // ' v00' case 7: // ' v00X' case 8: // ' v00X.' case 9: // ' v00X.X' ScanVersion[ScanState-5] = c; ++ScanState; break; case 10:// ' v00X.XX' ScanVersion[5] = c; ScanVersion[6] = '\0'; ++ScanState; break; case 11: if (c == ' ') { break; } if (c == '(') { ScanYear = 0; ++ScanState; break; } ScanState = 133; return(1); case 12: if (('0' <= c) && (c <= '9')) { ScanYear *= 10; ScanYear += c - '0'; break; } if (c == '/') { ScanMonth = 0; if (ScanYear <= 12) { ScanMonth = (unsigned char)ScanYear; ScanState += 2; } ++ScanState; break; } ScanState = 133; return(1); case 13: if (('0' <= c) && (c <= '9')) { ScanMonth *= 10; ScanMonth += c - '0'; break; } if (c == '/') { ScanDay = 0; ++ScanState; } case 14: if (('0' <= c) && (c <= '9')) { ScanDay *= 10; ScanDay += c - '0'; break; } ScanState = 133; // BIOS rom has no build number (yet) return(1); case 15: if (('0' <= c) && (c <= '9')) { ScanDay *= 10; ScanDay += c - '0'; break; } ScanYear = 0; ++ScanState; break; case 16: if (('0' <= c) && (c <= '9')) { ScanYear *= 10; ScanYear += c - '0'; break; } ScanState = 133; // BIOS rom has no build number (yet) return(1); case 17: // Image if (c != 0x55) { ScanState = 21; // Some random image ... break; } ++ScanState; break; case 18: ScanSize = (unsigned long)c; ++ScanState; break; case 19: // SMOR image case 149: // ROM Image or SMOR compressed image case 156: // SMOR compressed image ScanSize |= (unsigned long)((unsigned)c << 8); ++ScanState; break; case 20: // SMOR image case 150: // ROM image or SMOR compressed image case 157: // SMOR compressed image ScanSize |= ((unsigned long)c) << 16L; ++ScanState; break; case 158: // SMOR compressed image ScanSize |= ((unsigned long)c) << 24L; ScanState = 196; break; case 196: if (c != '\0') { // Could be an FCODE image? ScanSize += 16; ScanState = 21; // unlikely that a SMOR compressed image could break; // acquire the DPTSIG structure, but hey! } ScanState = 159; // FCODE image; break; case 159: case 160: case 161: // SMOR compressed image or FCODE image? if (c != '\0') { ScanSize += 16; ScanState = 21; // SMOR compressed image. break; } ++ScanState; break; case 162: ScanSize = 0; (void)strcpy ((char *)ScanType, "?"); case 163: case 164: case 165: case 166: case 167: case 168: case 169: case 170: case 171: case 172: case 173: case 174: case 175: case 177: if (c != '\0') { ScanState = 21; break; } ++ScanState; break; case 176: if (c != '\032') { ScanState = 21; break; } ++ScanState; break; case 178: if (c != 'P') { ScanState = 21; break; } ++ScanState; break; case 179: if (c != 'C') { ScanState = 21; break; } ++ScanState; break; case 180: if (c != 'I') { ScanState = 21; break; } ++ScanState; break; case 181: if (c != 'R') { ScanState = 21; break; } case 182: case 183: case 184: case 185: case 186: case 187: case 188: case 189: case 190: case 191: case 192: case 193: ++ScanState; break; case 194: // FCODE length (void)strcpy((char *)ScanType, "FCODE"); ScanOffset = FLASH_BIOS_OFFSET; // I2O Card ScanSize = (unsigned long)c; ++ScanState; break; case 195: // FCODE length ScanSize |= ((unsigned long)c) << 8L; ScanSize <<= 9; ScanState = 21; // See if we can get more from a concatenated SIG break; case 151: // ROM image or SMOR compressed image ScanSize |= ((unsigned long)c) << 24L; ++ScanState; break; case 152: // ROM image or SMOR compressed image if (c == '\0') { // SMOR compressed image or FCODE image? ScanState = 159; break; } if (c != 'S') { ScanSize += 16; ScanState = 21; // SMOR compressed image break; } ++ScanState; break; case 153: // ROM image case 154: // ROM image if (c != ' ') { ScanSize += 16; ScanState = 21; // SMOR compressed image break; } ++ScanState; break; case 155: // ROM image if (c != '\0') { ScanSize += 16; ScanState = 21; // SMOR compressed image break; } ScanSize = (ScanSize & 0xFF) * BYTES_PER_TRANSFER; if (ScanSize > 16384L) { ScanOffset = FLASH_BIOS_OFFSET; // I2O Card } else { ScanOffset = 163840L; // EATA Card } strcpy ((char *)ScanType, "BIOS"); ScanState = 3; // Get the ROM signature if we can! break; case 22: if (c == 'P') { ++ScanState; break; } // FALLTHRU case 21: // Search for DPTSIG reset: ScanState = 21; if (c == 'd') { ++ScanState; } break; case 23: if (c != 't') { goto reset; } ++ScanState; break; case 24: if (c != 'S') { goto reset; } ++ScanState; break; case 25: if (c != 'i') { goto reset; } ++ScanState; break; case 26: if (c != 'G') { goto reset; } ++ScanState; break; case 28: // dsProcessorFamily if ((c == PROC_i960) // i960 || (c == PROC_MIPS)) // MIPS { ScanOffset = 0L; // Make doubly sure it (void)strcpy ((char *)ScanType, EventStrings[STR_FIRMWARE]); } // resides in firmware m_FlashFileProcessorFamily = c; case 27: // dsSigVersion case 29: // dsProcessor case 31: // dsFiletypeFlags case 32: // dsOEM case 33: case 34: case 35: case 36: // dsOS case 37: case 38: // dsCapabilities case 39: case 40: // dsDeviceSupp case 41: case 42: // dsAdapterSupp case 45: // dsRequirements ++ScanState; break; case 30: // dsFileType if (c == FT_FIRMWARE) { ScanOffset = 0L; // Make doubly sure it (void)strcpy ((char *)ScanType, EventStrings[STR_FIRMWARE]); } /* More FT_ flags should be used. */ ++ScanState; break; case 43: loadInfo = c; ++ScanState; break; case 44: // dsApplication loadInfo |= (c << 8); ++ScanState; break; case 46: // dsVersion ScanVersion[0] = (c / 100) + '0'; ScanVersion[1] = ((c / 10) % 10) + '0'; ScanVersion[2] = (c % 10) + '0'; ScanVersion[3] = '.'; ++ScanState; break; case 47: // dsRevision ScanVersion[4] = c; ++ScanState; break; case 48: // dsSubRevision ScanVersion[5] = c; ScanVersion[6] = '\0'; ++ScanState; break; case 49: // dsMonth ScanMonth = c; ++ScanState; break; case 50: // dsDay ScanDay = c; ++ScanState; break; case 51: // dsYear ScanYear = c + 1980; ++ScanState; break; case 52: // dsDescription if (( c == 'P' ) || ( c == 'p' )) { // ScanDescriptionHba[0] = 'P'; ScanDescriptionHba[ScanDescrIdx++] = 'P'; ++ScanState; break; } case 53: if (( c == 'M' ) || ( c == 'm' )) { // ScanDescriptionHba[1] = 'M'; ScanDescriptionHba[ScanDescrIdx++] = 'M'; ++ScanState; break; } case 54: if (isdigit(c)) { // ScanDescriptionHba[2] = c; ScanDescriptionHba[ScanDescrIdx++] = c; ++ScanState; break; } case 55: if (isdigit(c)) { // ScanDescriptionHba[3] = c; ScanDescriptionHba[ScanDescrIdx++] = c; ++ScanState; break; } case 56: { if (isdigit(c)) // ScanDescriptionHba[4] = c; ScanDescriptionHba[ScanDescrIdx++] = c; else if (c == 'A' || c == 'a') ScanDescriptionHba[ScanDescrIdx++] = 'A'; else if (c == 'S' || c == 's') ScanDescriptionHba[ScanDescrIdx++] = 'S'; ++ScanState; break; } case 57: if (isdigit(c)) { // ScanDescriptionHba[5] = c; ScanDescriptionHba[ScanDescrIdx++] = c; ++ScanState; break; } case 58: case 59: case 60: case 61: case 62: case 63: case 64: case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: case 91: case 92: case 93: case 94: case 95: case 96: case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: case 123: case 124: case 125: case 126: case 127: case 128: case 129: case 130: case 131: case 132: if (c == '\0') { ScanState = 198; break; } if ((c == 'b') || (c == 'B')) { ScanState = 134; break; } if (c == 'V') { ScanState = 144; break; } ++ScanState; break; case 134: if (c == 'u') { ++ScanState; break; } ScanState = 60; break; case 135: if (c == 'i') { ++ScanState; break; } ScanState = 61; break; case 136: if (c == 'l') { ++ScanState; break; } ScanState = 62; break; case 137: if (c == 'd') { ++ScanState; break; } ScanState = 63; break; case 138: if (c == ' ') { ++ScanState; break; } ScanState = 64; break; case 139: case 140: case 141: case 142: if (('0' <= c) && (c <= '9')) { ScanBuild[ScanState - 139] = c; ++ScanState; break; } case 143: // Convert Build Number to Base 36 value within version string. { unsigned char * cp = ScanBuild; unsigned short Value = 0; while (*cp) { Value *= 10; Value += *cp - '0'; ++cp; } // we will overflow at 1296 builds, Historically we manage up // to about 150 builds before the revision is bumped. ScanVersion[5] = (Value / 36) + '0'; ScanVersion[6] = (Value % 36) + '0'; } if (ScanVersion[6] > '9') { ScanVersion[6] += 'A' - '9' - 1; } if (ScanVersion[5] > '9') { ScanVersion[5] += 'A' - '9' - 1; } ScanVersion[7] = '\0'; ScanBuild[0] = '\0'; ScanState = 69; break; case 197: // Look for the end of the description string. if (c == '\0') { ScanState = 198; } break; case 198: // End of the Description String means FwId is here? if (c == 'F') { ++ScanState; break; } ScanState = 133; case 133: // Ignore remaining, allows us to count size now. return(1); case 199: // Discovered the F where we expect the FwId signature. if (c == 'w') { ++ScanState; break; } ScanState = 133; return (1); case 200: // Discovered the Fw where we expect the FwId signature. if (c == 'I') { ++ScanState; break; } ScanState = 133; return (1); case 201: // Discovered the FwI where we expect the FwId signature. if (c == 'd') { ++ScanState; break; } ScanState = 133; return (1); case 202: ScanFwId = c; ++ScanState; break; case 203: ScanFwId |= (unsigned short)c << 8; ++ScanState; break; case 204: ScanFwId |= (unsigned long)c << 16; ++ScanState; break; case 205: ScanFwId |= (unsigned long)c << 24; ScanState = 133; break; case 144: if ((('0' <= c) && (c <= '9')) || (c == '.')) { break; } if (c == '/') { ++ScanState; break; } ScanState = 60; break; case 145: case 146: case 147: case 148: if ((('0' <= c) && (c <= '9')) || (('A' <= c) && (c <= 'F'))) { ScanBuild[ScanState - 145] = c; ++ScanState; break; } ScanState = 197; break; } return(0); } Command::Dpt_Error Flash::GetFlashStatus( dptFlashStatus_S &flashStatus ) { // Send the command to the engine to get the flash status of the // associated controller. engine->Reset(); Dpt_Error status = engine->Send(MSG_FLASH_STATUS, hbaTag); // If the command succeeded then extract the returned data. if (status.Success()) { // There really should be a structure which describes ALL // of the data returned by this command. Like so many other // things this was apparently just hacked together (sigh...) uLONG ioOffset, fwStatus; engine->Extract(&ioOffset, sizeof(ioOffset)); engine->Extract(&fwStatus, sizeof(fwStatus)); engine->Extract(&flashStatus, sizeof(flashStatus)); } // Return the status to the caller. return(status); } Command::Dpt_Error Flash::SetFlashRegion( FlashRegion region ) { // Send the command to the engine to set the region of flash memory to use. engine->Reset(); engine->Insert((uLONG) region); engine->Insert((uLONG) loadInfo); engine->Insert((uLONG) imageSize); Dpt_Error status = engine->Send(MSG_FLASH_SET_REGION, hbaTag); // Return the status to the caller. return(status); } Command::Dpt_Error Flash::ReadFlashMemory( void *buf, uLONG offset, uLONG bytesToRead ) { // Send the command to the engine to read the flash memory. engine->Reset(); engine->Insert(offset); engine->Insert(bytesToRead); Dpt_Error status = engine->Send(MSG_FLASH_READ, hbaTag); // If the read succeeded then copy the data that was read from the flash // memory into the caller's buffer. if (status.Success()) { engine->Extract(buf, bytesToRead); } // Return the status to the caller. return(status); } Command::Dpt_Error Flash::WriteFlashMemory( void *buf, uLONG bytesToWrite ) { // Send the command to the engine to read the flash memory. engine->Reset(); engine->Insert(buf, bytesToWrite); Dpt_Error status = engine->Send(MSG_FLASH_WR_NO_VERIFY, hbaTag); // Return the status to the caller. return(status); } Command::Dpt_Error Flash::WriteFlashMemoryDone( bool failed ) { // Send the command to the engine to stop writing flash memory. engine->Reset(); if (failed) { engine->Insert((uCHAR) 1); } Dpt_Error status = engine->Send(MSG_FLASH_WRITE_DONE, hbaTag); // Return the status to the caller. return(status); } //------------------------------------------------------------------// // // // START OF BIG KLUDGE // // // // Because the 2865 has such a large region for firmware there are // // several different sizes of firmware files. Because of how the // // 2865 is implemented if a firmware file smaller than the total // // firmware address space of the controller (~1.5MB) is flashed the // // image that is flashed must be adjusted so that it is aligned // // with the end of the firmware region, not the beginning. Because // // the engine provides no mechanism for seeking when writing to // // flash the code will read data and then write that data back to // // the same location. This makes flashing faster because the flash // // chip won't have to really do anything in that situation. // // // //------------------------------------------------------------------// Command::Dpt_Error Flash::GetStartingFlashIndex( const FlashRegion flashRegion, const uLONG imageSize, const int flashFileProcessorFamily, uLONG &startingIndex ) { Dpt_Error status; // Assume the starting index is 0. Its a special case if its not. startingIndex = 0; // This is only an issue when flashing firmware. if (( flashRegion == FW ) && (loadInfo & FW_LOAD_TOP)) { // Get the flash status of the controller. This contains a field which // has the size of the firmware region of flash memory. dptFlashStatus_S flashStatus; status = GetFlashStatus(flashStatus); if (status.Success()) { // Need the 'burn size' field. This field is misnamed - it is // really the size of the firmware region of flash memory. const uLONG firmwareSize = dptFlashStatus_getBurnSize(&flashStatus); if (imageSize < firmwareSize) { // Calculate the starting index in flash memory. startingIndex = firmwareSize - imageSize; } } } // Return the status to the caller. return(status); } Command::Dpt_Error Flash::WriteSeekToIndex( uLONG seekSize ) { Dpt_Error status; // Create an I/O buffer and zero it out. char ioBuf[BYTES_PER_TRANSFER]; memset(ioBuf, 0, sizeof(ioBuf)); // Skip the necessary space by writing zeros up to the specified // index. It is ASSUMED that the index is a multiple of 512. uLONG seekIndex = 0; while (( status.Success() ) && ( seekIndex < seekSize )) { status = WriteFlashMemory(ioBuf, sizeof(ioBuf)); if (status.Success()) { seekIndex += sizeof(ioBuf); } } // Return the status to the caller. return(status); } //------------------------------------------------------------------// // // // END OF BIG KLUDGE // // // //------------------------------------------------------------------// Command::Dpt_Error Flash::PrintHBA( String_List &output ) { Dpt_Error status; const long ONE_K = 1024; status = engine->Send( MSG_GET_INFO, hbaTag ); if (status.Success()) { dptCaddr_S *addr_P = &engine->devInfo_P->addr; long cache_Size_in_Mb = -1; const int BUF_LEN = 256; char temp_Buf[ BUF_LEN ]; dptHBAinfo_S *hba_Info = engine->hbaInfo_P; long cache_Size_in_Kb; cache_Size_in_Kb = hba_Info->memSize; cache_Size_in_Mb = cache_Size_in_Kb / ONE_K / ONE_K; sprintf ( temp_Buf, "d%d", addr_P->hba ); output.add_Item( temp_Buf ); DPTControllerMap map; for (int bus = 0; bus < 3; ++bus) { char * String = map.getChannelString(addr_P->hba, bus); output.add_Item( ( *String == 'c' ) ? String : ( hba_Info->chanInfo[bus].flags ? "--" : " " )); delete [] String; } output.add_Item(Strip_Trailing_Whitespace(engine->devInfo_P->vendorID)); output.add_Item(Strip_Trailing_Whitespace(engine->devInfo_P->productID)); sprintf(temp_Buf, "%ld%s", cache_Size_in_Mb, EventStrings[STR_MB]); output.add_Item(temp_Buf); output.add_Item(hba_Info->revision); engine->Reset(); engine->Insert( (uCHAR)0x2E ); // NVRAM page engine->Insert( (uCHAR)0x40 ); // Interpret and current // get the defaults page status = engine->Send( MSG_GET_MODE_PAGE, hbaTag ); temp_Buf[0] = '\0'; if (status.Success()) { if (( engine->Extract( temp_Buf, 108 ) == 0 ) || ( engine->Extract( temp_Buf, 8 ) == 0 )) { temp_Buf[0] = '\0'; } else { temp_Buf[8] = '\0'; } } else inMode0 = true; output.add_Item( temp_Buf ); temp_Buf[0] = '\0'; if (status.Success()) { if (engine->Extract( temp_Buf, 15 ) == 0) { temp_Buf[0] = '\0'; } else { char * String = temp_Buf; temp_Buf[15] = '\0'; while (*String && ((('0' <= *String) && (*String <= '9')) || (*String == '-'))) { ++String; } *String = '\0'; } } output.add_Item( temp_Buf ); { Dpt_Status hbaStatus(hbaTag); output.add_Item((char *) hbaStatus); } output.add_Item( "\n" ); Flush ( &output ); status = Dpt_Error::DPT_MSG_RTN_COMPLETED; } return(status); } // Flash the file into the HBA Command::Dpt_Error Flash::Flash_This_HBA( String_List &output, std::istream &firmwareStream ) { ENTER( "Command::Dpt_Error Flash::Flash_This_HBA(" ); Dpt_Error status; const int BUF_LEN = 256; char temp_Buf[ BUF_LEN ]; // Raptor BIOS rewrite. char Old_PCI_ID, BIOS_rewrite = 0; unsigned long BIOSsize; unsigned PCI_Data_Table_Offset; // Now, flash this card! bool failed = false; FlashRegion flashRegion = FW; if (strcmp ((const char *)ScanType, "SMOR") == 0) { flashRegion = SMOR; } else if ((strcmp ((const char *)ScanType, "BIOS") == 0) || (strcmp ((const char *)ScanType, "FCODE") == 0)) { flashRegion = I2OBIOS; engine->Send( MSG_GET_INFO, hbaTag ); if ((strncmp ((const char *)engine->devInfo_P->productID, "2005S", 5) == 0) || (strncmp ((const char *)engine->devInfo_P->productID, "2000S", 5) == 0)) { BIOS_rewrite = 1; BIOSsize = 0L; PCI_Data_Table_Offset = 0; } } else if (strcmp ((const char *)ScanType, EventStrings[STR_NVRAM]) == 0) { flashRegion = NVRAM; } else if (strcmp ((const char *)ScanType, EventStrings[STR_FIRMWARE]) != 0) { status = Dpt_Error::DPT_CMD_ERR_INVALID_FLASH_IMAGE; } uLONG startingFlashMemoryIndex(0); if (status.Success()) { status = SetFlashRegion(flashRegion); // Kludge for 2865 and potentially other controllers that have // special needs if (status.Success()) { status = GetStartingFlashIndex(flashRegion, imageSize, m_FlashFileProcessorFamily, startingFlashMemoryIndex); if (( status.Success() ) && ( startingFlashMemoryIndex != 0 )) { // kds taken out per Mark Salyzyn // status = WriteSeekToIndex(startingFlashMemoryIndex); } } } // Copy the image file to flash memory. uLONG readSize; firmwareStream.seekg(0); for (uLONG imageIndex = 0; imageIndex < imageSize; imageIndex += readSize) { if (status.Success()) { char fileBuf[BYTES_PER_TRANSFER]; // Determine the amount of data to read from the file. // This is the minimum of the amount of data left in the // file and the size of a transfer buffer. readSize = min(sizeof(fileBuf), imageSize - imageIndex); // If the amount of data to read from the file is less // than the size of the transfer buffer then pre-read the // current contents of the flash memory. This is // necessary because data that is to be flashed must be // written in BYTES_PER_TRANSFER (512) byte chunks. if (readSize != BYTES_PER_TRANSFER) { status = ReadFlashMemory(fileBuf, startingFlashMemoryIndex + imageIndex, BYTES_PER_TRANSFER); } // Read in data from the file and if that's successful // write that data to flash memory. if (status.Success()) { firmwareStream.read(fileBuf, readSize); if (firmwareStream.good()) { /* Raptor BIOS rewrite handler */ if (BIOS_rewrite) { if (BIOS_rewrite == 1) /* Work with first signature */ { BIOSsize = (unsigned char)fileBuf[2] * 512L; Old_PCI_ID = 0x11; PCI_Data_Table_Offset = (unsigned char)fileBuf[24] + ((unsigned char)fileBuf[25] << 8); ++BIOS_rewrite; } /* I know, `oodles' of bugs on readSize boundaries */ if (BIOS_rewrite == 2) /* Work on the PCI Data table */ { if (PCI_Data_Table_Offset >= readSize) { PCI_Data_Table_Offset -= readSize; } else { if (strncmp((const char *)&fileBuf[PCI_Data_Table_Offset], "PCIR", 4) == 0) { Old_PCI_ID = fileBuf[PCI_Data_Table_Offset + 6]; fileBuf[PCI_Data_Table_Offset + 6] = 0x11; ++BIOS_rewrite; } else { BIOS_rewrite = 0; } } } /* Work on correcting the checksum */ if ((BIOS_rewrite == 3) && (BIOSsize <= readSize)) { fileBuf[BIOSsize - 1] -= 0x11 - Old_PCI_ID; BIOS_rewrite = 0; } if (BIOSsize >= readSize) { BIOSsize -= readSize; } } status = WriteFlashMemory(fileBuf, BYTES_PER_TRANSFER); } else { status = Dpt_Error::DPT_CMD_ERR_INVALID_FLASH_IMAGE; } } } if (status.Failure()) { sprintf(temp_Buf, EventStrings[STR_FLASH_ERR_MSG], imageIndex, (int)status, (char *)status); output.add_Item (temp_Buf); Flush (&output); failed = true; break; } } // for imageIndex // If we failed we don't want firmware to write a checksum // There is no reason to switch out of flash mode either // (firmware will go right back into it if there is no checksum) status |= WriteFlashMemoryDone(failed); if (status.Success() && !failed) { engine->Reset(); engine->Send( MSG_FLASH_SWITCH_OUT_OF, hbaTag ); // // Verify that the file was written properly. // /* We don't have to do this because it is done in eata2i2o */ #if 0 uLONG flashMemoryIndex = startingFlashMemoryIndex; firmwareStream.seekg(0); for ( uLONG imageIndex = 0; imageIndex < imageSize; imageIndex += BYTES_PER_TRANSFER ) { char flashMemoryBuf[BYTES_PER_TRANSFER]; memset(flashMemoryBuf, 0, BYTES_PER_TRANSFER); char fileBuf[sizeof(flashMemoryBuf)]; // // First, read data from the file. // readSize = min(sizeof(fileBuf), imageSize - imageIndex); firmwareStream.read(fileBuf, readSize); // // If that succeeds then read data from flash memory. // if ( firmwareStream.good() ) { // // Don't verify the top 16K of firmware. This is the mode 0 boot area // and according to Mark Salyzyn it shouldn't be verified. // if (( flashRegion != FW ) || ( imageIndex < imageSize - Mode0BootSize )) { status = ReadFlashMemory(flashMemoryBuf, flashMemoryIndex, sizeof(flashMemoryBuf)); } else { status = Dpt_Error::DPT_MSG_RTN_COMPLETED; break; } } else { status = Dpt_Error::DPT_ERR_FLASH_ENG_VERIFY; } // // If the necessary data was read then compare the data. // If the data doesn't compare correctly that's a failure. // if ( status.Success() ) { if ( memcmp(flashMemoryBuf, fileBuf, readSize) != 0 ) { status = Dpt_Error::DPT_ERR_FLASH_ENG_VERIFY; } flashMemoryIndex += sizeof(flashMemoryBuf); } // // If a failure occurred then inform the user. // if ( status.Failure() ) { sprintf (temp_Buf, EventStrings[STR_VERIFYING_ERR_MSG], imageIndex, (int)status, (char *)status ); output.add_Item (temp_Buf); Flush (&output); failed = true; break; } status = Dpt_Error::DPT_MSG_RTN_COMPLETED; } // for imageIndex #endif } EXIT(); return(status); } Command &Flash::Clone() const { ENTER ("Command &Flash::Clone() const"); EXIT(); return(*new Flash (this->source, this->Resync, this->hba_Num)); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/flash.hpp0000664000175000000620000001100510046160573017762 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef FLASH_HPP #define FLASH_HPP /**************************************************************************** * * Created: 10/10/98 * ***************************************************************************** * * File Name: Flash.hpp * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * * $Revision: 18 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include #if HAVE_IOSTREAM # include #else # if HAVE_IOSTREAM_H # include # endif #endif /*** CONSTANTS ***/ enum FlashRegion { FW, I2OBIOS, SMOR, NVRAM }; #define FLASH_FIRMWARE_OFFSET 0 #define FLASH_FIRMWARE_SIZE 1523712L #define FLASH_BIOS_OFFSET (FLASH_FIRMWARE_SIZE+FLASH_FIRMWARE_OFFSET) #define FLASH_BIOS_SIZE 32768 #define FLASH_SMOR_OFFSET (FLASH_BIOS_SIZE+FLASH_BIOS_OFFSET) #define FLASH_SMOR_SIZE 229376L #define FLASH_NVRAM_OFFSET (FLASH_SMOR_SIZE+FLASH_SMOR_OFFSET) #define FLASH_NVRAM_SIZE 4096 #define MAX_FLASH_NVRAM_SIZE 8192 // 8K is max size for NVRAM /* The engine can only handle this maximum transfer size */ #define BYTES_PER_TRANSFER 512 /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Flash: public Command { public: // flash an HBA with the specified image Flash( char * sourceFile, int resync, int hba = -1); Flash( const Flash &right ); virtual ~Flash(); Dpt_Error execute( String_List **output ); Command &Clone() const; private: enum { Mode0BootSize = 16 * 1024 }; Dpt_Error Flash_This_HBA( String_List &output, std::istream &firmwareStream ); Dpt_Error PrintHBA( String_List &output ); Dpt_Error SetFlashRegion( FlashRegion region ); Dpt_Error ReadFlashMemory( void *buf, uLONG offset, uLONG bytesToRead ); Dpt_Error WriteFlashMemory( void *buf, uLONG bytesToRead ); Dpt_Error WriteFlashMemoryDone( bool failed ); Dpt_Error GetFlashStatus( dptFlashStatus_S &flashStatus ); Dpt_Error GetStartingFlashIndex( const FlashRegion flashRegion, const uLONG imageSize, const int flashFileProcessorFamily, uLONG &startingOffset ); Dpt_Error WriteSeekToIndex( uLONG seekIndex ); bool ValidFlashFileForController( const char *fileDescriptionModel, const char *controllerModel ) const; int DetermineOffset(int c); int m_FlashFileProcessorFamily; char *source; int hba_Num; DPT_TAG_T hbaTag; int Resync; unsigned long imageSize; unsigned long loadInfo; unsigned long ScanOffset, ScanSize, ScanFwId; unsigned short ScanYear; unsigned char ScanState, ScanMonth, ScanDay; unsigned char ScanBuild[5], ScanVersion[8], ScanType[9]; char ScanDescriptionHba[7]; int ScanDescrIdx; bool inMode0; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/flashmem.cpp0000664000175000000620000005206210046161310020452 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 1/18/2000 * ***************************************************************************** * * File Name: FlashMem.cpp * Module: * Contributors: David Dillard * Mark Salazyn * Description: Contains the definitions of the following flash memory * related classes: * * FlashMemory - A base class for the other flash memory * classes. * * BiosFlashMemory - A class which represents the BIOS flash * memory on a particular controller. * * SmorFlashMemory - A class which represents the SMOR flash * memory on a particular controller. * * FlashMemoryStreamBuf - A streambuf subclass which is used * to treat the contents of some region of flash * memory as a stream. * * Notes: This set of classes could be improved by introducing stream * classes which could be used to handle BIOS or SMOR images * that were either in flash memory or were files (or * buffered in RAM). * * Version Control: * * $Revision: 5 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "flashmem.h" #include "lzstrbuf.h" /*** MACROS ***/ #ifndef min #define min(x, y) ((x) < (y) ? (x) : (y)) #endif // // Class variables. // DPT_TAG_T FlashMemory::m_LastTag; FlashMemory::Region FlashMemory::m_LastRegion = FlashMemory::None; //============================================================================= // //Name: mkulong // //Abstract: Makes a uLONG value from four bytes (unsigned characters). // //Parameters: The four bytes that make up a uLONG value. // //Return Values: The constructed uLONG value. // //Error Codes: None // //Global Variables Affected: None // //Notes: This really should be in some global header file, but I'm trying // to minimize changes to other files right now. Perhaps, at some // future time, this function can be moved. // //----------------------------------------------------------------------------- inline uLONG mkulong(uCHAR b3, uCHAR b2, uCHAR b1, uCHAR b0) { return(((uLONG) b3 << 24) + ((uLONG) b2 << 16) + ((uLONG) b1 << 8) + b0); } //============================================================================= // //Name: // //Abstract: // //Parameters: None // //Return Values: None // //Error Codes: None // //Global Variables Affected: None // //Notes: None // //----------------------------------------------------------------------------- DPT_RTN_T FlashMemory::Read( uLONG offset, uLONG length, void *buf ) { DPT_RTN_T rc = MSG_RTN_COMPLETED; // // See if the last region read is the same as the region to read now. // If it isn't then set the region. This allows for the reading of // different regions in an interleaved fashion. // if (( m_Tag != m_LastTag ) || ( m_Region != m_LastRegion )) { m_Engine.Reset(); m_Engine.Insert((uLONG) m_Region); rc = m_Engine.Send(MSG_FLASH_SET_REGION, m_Tag); if ( rc == MSG_RTN_COMPLETED ) { m_LastTag = m_Tag; m_LastRegion = m_Region; } } // // Read in data from the specified offset. // if ( rc == MSG_RTN_COMPLETED ) { m_Engine.Reset(); m_Engine.Insert(offset); m_Engine.Insert(length); rc = m_Engine.Send(MSG_FLASH_READ, m_Tag); if ( rc == MSG_RTN_COMPLETED ) { m_Engine.Extract(buf, length); } } // // Return to the caller. // return(rc); } //============================================================================= // //Name: BiosFlashMemory::GetLength // //Abstract: Gets the length of the BIOS in flash memory. // //Parameters: bytes - Reference to the number of bytes used by the BIOS in // flash memory. // //Return Values: MSG_RTN_COMPLETED indicates success. // DPT_RTN_T value to indicate an error. // //Error Codes: DPT_RTN_T value // //Global Variables Affected: None // //Notes: Exceptions should be used instead of returning an error code to // indicate an error, but unfortunately that's not an option because not // all of the compilers that are used support exceptions. // //----------------------------------------------------------------------------- DPT_RTN_T BiosFlashMemory::GetLength( uLONG &bytes ) { DPT_RTN_T rc = MSG_RTN_COMPLETED; // // If the length hasn't been cached then get it. // if ( m_Length == 0 ) { // // Read in the number of blocks from the image. If that doesn't fail // then calculate the number of bytes. // Properties buf; rc = Read(PropertiesOffset, sizeof(buf), &buf); if ( rc == MSG_RTN_COMPLETED ) { if (( buf.m_Signature[0] == 0x55 ) && ( buf.m_Signature[1] == 0xAA )) { m_Length = (uLONG) buf.m_Blocks * BlockSize; // // If the length is unreasonable then set it to 0. // if ( m_Length > 65536L ) { m_Length = 0; } } } } // // If we've gotten the length then return it. // if ( rc == MSG_RTN_COMPLETED ) { bytes = m_Length; } // // Return to the caller. // return(rc); } //============================================================================= // //Name: BiosFlashMemory::GetSignature // //Abstract: Gets the signature from the associated BIOS flash memory. // //Parameters: None. // //Return Values: The signature. // //Error Codes: None. // //Global Variables Affected: None // //Notes: Exceptions should be used instead of returning a zero'd structure to // indicate an error, but unfortunately that's not an option because not // all of the compilers that are used support exceptions. // //----------------------------------------------------------------------------- dpt_sig_S BiosFlashMemory::GetSignature() { FlashMemoryStreamBuf biosStreamBuf(*this); std::istream biosStream(&biosStreamBuf); return(DptSignature(biosStream)); } //============================================================================= // //Name: SmorFlashMemory::Ctor // //Abstract: Initializes an object. // //Parameters: engine - A reference to the engine object. // hba_tag - The tag of the host adapter on which the SMOR flash // memory resides. // //Return Values: None. // //Error Codes: None. // //Global Variables Affected: None // //Notes: Exceptions should be used instead of returning a zero'd structure to // indicate an error, but unfortunately that's not an option because not // all of the compilers that are used support exceptions. // // The compression state and the length of the SMOR image are cached // here for later use. // //----------------------------------------------------------------------------- SmorFlashMemory::SmorFlashMemory( DPT_EngineIO_C &engine, DPT_TAG_T hba_tag ) : FlashMemory(engine, hba_tag, FlashMemory::SMOR), m_Length(0), m_CompressionState(Unknown) { // // Determine some properties of the SMOR flash memory. // // - The length of the SMOR image in memory // - If the SMOR image is compressed // Properties buf; DPT_RTN_T rc = Read((uLONG) 0, (uLONG) sizeof(buf), &buf); if ( rc == MSG_RTN_COMPLETED ) { // // Look for the signature at the beginning of the buffer to see if // the image is compressed. // if (( buf.m_Signature[0] == 0x55 ) && ( buf.m_Signature[1] == 0xAA )) { m_CompressionState = Compressed; } else if (( buf.m_Signature[0] == 0x5A ) && ( buf.m_Signature[1] == 0x55 )) { m_CompressionState = NotCompressed; } // // If the compression state is known, i.e. a valid signature was // found, then determine the length. // if ( m_CompressionState != Unknown ) { m_Length = mkulong(buf.m_Length[3], buf.m_Length[2], buf.m_Length[1], buf.m_Length[0]); if ( m_Length > 512L * 1024L ) { m_Length = 0; } } } } //============================================================================= // //Name: SmorFlashMemory::GetLength // //Abstract: Gets the length of SMOR in flash memory. // //Parameters: bytes - Reference to the number of bytes used by SMOR in flash // memory. // //Return Values: MSG_RTN_COMPLETED indicates success. // DPT_RTN_T value to indicate an error. // //Error Codes: DPT_RTN_T value // //Global Variables Affected: None // //Notes: Exceptions should be used instead of returning an error code to // indicate an error, but unfortunately that's not an option because not // all of the compilers that are used support exceptions. // //----------------------------------------------------------------------------- DPT_RTN_T SmorFlashMemory::GetLength( uLONG &bytes ) { DPT_RTN_T rc; // // Determine the return code based upon the length. If length is 0 then // an error occurred. // if ( m_Length == 0 ) { rc = MSG_RTN_FAILED; } else { bytes = m_Length; rc = MSG_RTN_COMPLETED; } // // Return to the caller. // return(rc); } //============================================================================= // //Name: SmorFlashMemory::GetSignature // //Abstract: Gets the signature from the associated BIOS flash memory. // //Parameters: None. // //Return Values: The signature. // //Error Codes: None. // //Global Variables Affected: None // //Notes: Exceptions should be used instead of returning a zero'd structure to // indicate an error, but unfortunately that's not an option because not // all of the compilers that are used support exceptions. // //----------------------------------------------------------------------------- dpt_sig_S SmorFlashMemory::GetSignature() { // // Allocate a streambuf for the SMOR flash memory. The kind of streambuf // that is used depends on if the SMOR image is compressed or not. // // These should be auto_ptr's, but can't count on having that available. // Can't count on having templates either so can't write my own auto_ptr. // Got to do all of this manually :-( // std::streambuf *smorStreamBuf = NULL; std::istream *compressedSmorStream = NULL; switch ( GetCompressionState() ) { case Compressed: { FlashMemoryStreamBuf *compressedSmorStreamBuf = new FlashMemoryStreamBuf(*this); compressedSmorStream = new std::istream(compressedSmorStreamBuf); if ( compressedSmorStream == NULL ) { delete compressedSmorStreamBuf; } compressedSmorStream->seekg(HeaderSize, std::ios::beg); smorStreamBuf = new LzInStreamBuf(*compressedSmorStream); break; } case NotCompressed: smorStreamBuf = new FlashMemoryStreamBuf(*this); break; } // // If a streambuf was allocated then use it to set the signature for SMOR. // If no streambuf was allocated (for whatever reason) then there is no // way to get the SMOR version number. // DptSignature signature; signature.Clear(); if ( smorStreamBuf != NULL ) { std::istream smorStream(smorStreamBuf); signature.Set(smorStream); // // Free up resources // delete smorStreamBuf; delete compressedSmorStream; } // // Return the signature. // return(signature); } //============================================================================= // //Name: SmorFlashMemory::GetCompressionState // //Abstract: Gets the compression state of SMOR in flash memory. // //Parameters: None // //Return Values: Compressed - SMOR is compressed in flash memory // NotCompressed - SMOR is not compressed in flash memory // Unknown - SMOR's compression state cannot be determined // because an error occurred // //Error Codes: Unknown // //Global Variables Affected: None // //Notes: None // //----------------------------------------------------------------------------- SmorFlashMemory::CompressionState SmorFlashMemory::GetCompressionState() { return(m_CompressionState); } //============================================================================= // //Name: FlashMemoryStreamBuf::Ctor // //Abstract: Initializes the streambuf object with a buffer whose size may be // based upon the size of the flash memory that is being buffered. // //Parameters: None // //Return Values: None // //Error Codes: None // //Global Variables Affected: None // //Notes: Calls the virtual method GetLength(). Since the subclass provides // the implementation of this method and since the subclass object is // not initialized when the GetLength() method is called that method // cannot depend upon any member variables of the subclass being // initialized. // //----------------------------------------------------------------------------- FlashMemoryStreamBuf::FlashMemoryStreamBuf( FlashMemory &flashMemory ) : m_FlashMemory(flashMemory), m_BufSize(0), m_CurrentOffset(0), m_StreamLength(0) { // // Get the stream length. Use this to help determine what the maximum // buffer size is. No need to allocate a buffer larger than the flash // memory that's being buffering. // if ( m_FlashMemory.GetLength(m_StreamLength) == MSG_RTN_COMPLETED ) { size_t maxBufSize = min(m_StreamLength, MaxBufSize); m_BufSize = AllocBuf(maxBufSize, MinBufSize, BufSizeDecrement); } } //============================================================================= // //Name: FlashMemoryStreamBuf::underflow // //Abstract: Buffers the next set of data from the associated flash memory. // //Parameters: None // //Return Values: The first character in the buffer that was just read or EOF // if an error occurred. // //Error Codes: EOF // //Global Variables Affected: None // //Notes: None // //----------------------------------------------------------------------------- int FlashMemoryStreamBuf::underflow() { int rc = EOF; // // Is there any data to read? // if ( m_CurrentOffset < m_StreamLength ) { // // Determine how much data to read. // const uLONG readSize = min(m_BufSize, m_StreamLength - m_CurrentOffset); char *buf = eback(); if ( buf != NULL ) { // // Read the data from the flash memory, update the various fields, and // return the first character of the data that was read. // if ( m_FlashMemory.Read(m_CurrentOffset, readSize, buf) == MSG_RTN_COMPLETED ) { m_CurrentOffset += readSize; setg(buf, buf, buf + readSize); rc = (unsigned char) buf[0]; } } } // // Return status to the caller. // return(rc); } //============================================================================= // //Name: DptSignature::Ctor // //Abstract: Sets the signature to all zeros (except for the id string) // //Parameters: None // //Return Values: None // //Error Codes: None // //Global Variables Affected: None // //Notes: None // //----------------------------------------------------------------------------- DptSignature::DptSignature() { memset(this, 0, sizeof(*this)); dsSignature[0] = 'd'; dsSignature[1] = 'P'; dsSignature[2] = 't'; dsSignature[3] = 'S'; dsSignature[4] = 'i'; dsSignature[5] = 'G'; } //============================================================================= // //Name: DptSignature::Ctor // //Abstract: Sets the signature structure from the specified stream. // //Parameters: stream - The input stream to be searched. // //Return Values: None // //Error Codes: None // //Global Variables Affected: None // //Notes: If there was an error getting the signature then all fields of the // structure will be zero. // //----------------------------------------------------------------------------- DptSignature::DptSignature( std::istream &stream ) { Set(stream); } //============================================================================= // //Name: DptSignature::Set // //Abstract: Sets the signature structure from the specified stream. // //Parameters: stream - The input stream to be searched. // //Return Values: None // //Error Codes: None // //Global Variables Affected: None // //Notes: If there was an error getting the signature then all fields of the // structure will be zero. // //----------------------------------------------------------------------------- void DptSignature::Set( std::istream &stream ) { const int BeginningState = 0; const int FoundState = 0x7F; int state = BeginningState; while ( state != FoundState ) { int c = stream.get(); if ( c == EOF ) { break; } switch (state) { case BeginningState: if (c == 'd') state = 'd'; break; case 'd': if (c == 'P') state = 'P'; else state = BeginningState; break; case 'P': if (c == 't') state = 't'; else state = BeginningState; break; case 't': if (c == 'S') state = 'S'; else state = BeginningState; break; case 'S': if (c == 'i') state = 'i'; else state = BeginningState; break; case 'i': if (c == 'G') state = FoundState; else state = BeginningState; break; default: state = BeginningState; break; } } if (state == FoundState) { char *p = (char *) &dsSigVersion; dsSignature[0] = 'd'; dsSignature[1] = 'P'; dsSignature[2] = 't'; dsSignature[3] = 'S'; dsSignature[4] = 'i'; dsSignature[5] = 'G'; for (int j = sizeof(dpt_sig_S) - 6; j > 0; j--) *p++ = stream.get(); dsDescription[dsDescription_size - 1] = '\0'; } else { Clear(); } } //============================================================================= // //Name: DptSignature::Clear // //Abstract: Zeros out the associated instructure. // //Parameters: stream - None. // //Return Values: None // //Error Codes: None // //Global Variables Affected: None // //Notes: None. // //----------------------------------------------------------------------------- void DptSignature::Clear() { memset(this, 0, sizeof(*this)); } raidutils-0.0.6.orig/raidutil/flashmem.h0000664000175000000620000002066710046161063020132 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __FLASHMEM_H #define __FLASHMEM_H /**************************************************************************** * * Created: 1/18/2000 * ***************************************************************************** * * File Name: FlashMem.h * Module: * Contributors: David Dillard * Description: Contains the declarations of the following flash memory * related classes: * * FlashMemory - A base class for the other flash memory * classes. * * BiosFlashMemory - A class which represents the BIOS flash * memory on a particular controller. * * SmorFlashMemory - A class which represents the SMOR flash * memory on a particular controller. * * FlashMemoryStreamBuf - A streambuf subclass which is used * to treat the contents of some region of flash * memory as a stream. * * DptSignature - Base class used to better manage the * dpt_sig_S structure. * * * Version Control: * * $Revision: 4 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "engiface.hpp" #include "dynsize.h" //Class - FlashMemory //=========================================================================== // //Description: // // This class is a base class for the specific flash memory classes which // are used to represent the BIOS and SMOR. // //--------------------------------------------------------------------------- class FlashMemory { public: // // Enum for the regions of flash memory that are available on a // controller. // enum Region { None = 0, BIOS = 1, SMOR = 2 }; protected: // // Constructor // inline FlashMemory( DPT_EngineIO_C &engine, DPT_TAG_T tag, Region region ) : m_Engine(engine), m_Region(region), m_Tag(tag) { // This method intentionally left blank } public: // // Reads data from the associated flash memory starting at the specified // offset for the specified length in bytes. The data read is placed // into the specified buffer. // virtual DPT_RTN_T Read( uLONG offset, uLONG length, void *buf ); // // Gets the length, in bytes, of the associated flash memory. // virtual DPT_RTN_T GetLength( uLONG &bytes ) = 0; // // Gets the signature for the associated flash memory. // virtual dpt_sig_S GetSignature() = 0; private: // // Private data for implementing the class. // DPT_EngineIO_C &m_Engine; const DPT_TAG_T m_Tag; Region m_Region; static DPT_TAG_T m_LastTag; static Region m_LastRegion; }; //Class - BiosFlashMemory //=========================================================================== // //Description: // // This class is used to read the contents of the BIOS flash memory of // a controller. // //--------------------------------------------------------------------------- class BiosFlashMemory : public FlashMemory { public: // // Constructor // inline BiosFlashMemory( DPT_EngineIO_C &engine, DPT_TAG_T hba_tag ) : FlashMemory(engine, hba_tag, FlashMemory::BIOS), m_Length(0) { // This method intentionally left blank } // // Gets the length, in bytes, of the associated flash memory. // DPT_RTN_T GetLength(uLONG &bytes); // // Gets the signature for the associated flash memory. // dpt_sig_S GetSignature(); private: // // Private data used to implement the class. // enum { PropertiesOffset = 0, BlockSize = 512 }; struct Properties { uCHAR m_Signature[2]; uCHAR m_Blocks; }; uLONG m_Length; }; //Class - SmorFlashMemory //=========================================================================== // //Description: // // This class is used to read the contents of the SMOR flash memory of // a controller. // //--------------------------------------------------------------------------- class SmorFlashMemory : public FlashMemory { public: // // Constructor // SmorFlashMemory( DPT_EngineIO_C &engine, DPT_TAG_T tag ); // // Gets the length, in bytes, of the associated flash memory. // DPT_RTN_T GetLength(uLONG &bytes); // // Gets the signature for the associated flash memory. // dpt_sig_S GetSignature(); // // Enum for the various compression states of SMOR flash memory. // enum CompressionState { Unknown, Compressed, NotCompressed }; // // Gets the compression state of the associated SMOR flash memory. // CompressionState GetCompressionState(); private: // // Private data used to implement the class. // enum { PropertiesOffset = 0, HeaderSize = 16 // LZSS_HEADER_SIZE }; struct Properties { uCHAR m_Signature[2]; uCHAR m_Length[4]; }; uLONG m_Length; CompressionState m_CompressionState; }; //Class - FlashMemoryStreamBuf //=========================================================================== // //Description: // // This class is used to read the contents of the SMOR flash memory of // a controller. // // Currently, this class doesn't allow seeking within the stream. // //--------------------------------------------------------------------------- class FlashMemoryStreamBuf : public DynamicSizeInStreamBuf { public: // // Constructor // FlashMemoryStreamBuf( FlashMemory &flashMemory ); // // Returns EOF (error). // int overflow(int ch = EOF) { return(EOF); } // // Fills in the // int underflow(); private: // // Private data used to implement the class. // FlashMemory &m_FlashMemory; uLONG m_BufSize; uLONG m_CurrentOffset; uLONG m_StreamLength; }; //Class - DptSignature //=========================================================================== // //Description: // // This class is used to better manage the dpt_sig_S structure. // //--------------------------------------------------------------------------- class DptSignature : public dpt_sig_S { public: // // Default constructor // DptSignature(); // // Constructor from a stream. // DptSignature(std::istream &stream); // // Set the signature from the specified stream. // void Set(std::istream &stream); // // Zeros out the structure. // void Clear(); }; #endif raidutils-0.0.6.orig/raidutil/forcest.cpp0000664000175000000620000002256210044153333020331 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/20/99 * ***************************************************************************** * * File Name: ForceSt.cpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 10 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "forcest.hpp" #include "rustring.h" #include "status.hpp" #include "rscenum.h" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ extern char* EventStrings[]; /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ ForceState::ForceState( SCSI_Addr_List *deviceList, ForceStateOptions cmd) :objsToCtrl (deviceList), toState (cmd) { ENTER( "ForceState::ForceState(" ); EXIT(); } ForceState::ForceState( const ForceState &new_ForceState ) { ENTER( "ForceState::ForceState( const ForceState &new_ForceState ):" ); toState = new_ForceState.toState; objsToCtrl = new SCSI_Addr_List (*(new_ForceState.objsToCtrl)); EXIT(); } ForceState::~ForceState() { ENTER( "ForceState::~ForceState()" ); delete objsToCtrl; EXIT(); } Command::Dpt_Error ForceState::execute(String_List **output) { ENTER("Command::Dpt_Error ForceState::execute(String_List **output)"); String_List *out; Dpt_Error err; Int_List obj_List; DPT_TAG_T parentTag; get_Devs_Type devs_Type, typeWanted; Dpt_Status::dpt_Status tempStatus; bool stateForced = false; char *obj_Type_Str = EventStrings[STR_UNKNOWN]; Init_Engine(); *output = out = new String_List(); if (toState == Current) { out->add_Item(EventStrings[STR_LIST_DEV_STATUS_HEADER]); out->add_Item( STR_DEV_DIVIDING_LINE ); } while (objsToCtrl->num_Left()) { bool more_Devs_Left = true; bool devFound = true; SCSI_Address obj_Address = objsToCtrl->get_Next_Item(); if (toState == Optimal) typeWanted = GET_RAID; else typeWanted = GET_SCSI_DASD; for (int dev_Index = 0; more_Devs_Left; dev_Index++) { DPT_TAG_T obj_Tag = Get_Address_by_Index(obj_Address, dev_Index, &more_Devs_Left, &devs_Type); if (((devs_Type == GET_RAID_HOT_SPARE) || (devs_Type == GET_RAID)) && toState == Optimal) typeWanted = devs_Type; if (!more_Devs_Left) break; if ((toState == Current) && ((devs_Type == GET_RAID_HOT_SPARE) || (devs_Type == GET_RAID) || (devs_Type == GET_SCSI_DASD))); else if (devs_Type != typeWanted) continue; // we have the correct device, get more info engine->Reset(); err = engine->Send(MSG_GET_INFO, obj_Tag); if (err.Is_Error()) return(err); parentTag = engine->devInfo_P->raidParent; // Checks to see if there are any reserved devices that are trying to be deleted if (!(engine->devInfo_P->flags3 & FLG_DEV_RES_CONFLICT)){ switch (devs_Type) { // fail a drive case GET_SCSI_DASD: // we only want to change the state of this drive // if it is a member (not a standalone) if (parentTag != -1) { Dpt_Status status(obj_Tag); tempStatus = status; if (toState == Current) { PrintRaidAddress(obj_Tag, out); obj_Type_Str = EventStrings[STR_SCSI_DASD]; out->add_Item(obj_Type_Str); out->add_Item ((char *)status); out->add_Item("\n"); } else { if (tempStatus != DSPLY_STAT_OPTIMAL) { out->add_Item(EventStrings[STR_DRIVE_NOT_OPT_CANT_CHG]); EXIT(); return(err); } PrintRaidAddress(obj_Tag, out); #if !defined _DPT_NETWARE // Are you SURE? char answer = PrintAQuestion(STR_FORCE_FAIL_WARNING); if ((answer != 'y') && (answer != 'Y')) { out->add_Item(EventStrings[STR_UNCHANGED_OPTIMAL]); EXIT(); return(err); } #endif // OK, FORCE IT engine->Reset(); engine->Insert((uCHAR) FORCE_FAILED); engine->Send(MSG_FORCE_STATE, obj_Tag); out->add_Item(" "); out->add_Item(EventStrings[STR_FAILED]); out->add_Item("\n"); more_Devs_Left = false; stateForced = true; } } break; // make an array optimal case GET_RAID_HOT_SPARE: case GET_RAID: // we only want to change the state of an array if (parentTag == -1) { Dpt_Status status(obj_Tag); tempStatus = status; if (toState == Current) { PrintRaidAddress(obj_Tag, out); switch ( engine->devInfo_P->raidType ) { case RAID_TYPE_0: obj_Type_Str = EventStrings[STR_RAID_0]; break; case RAID_TYPE_1: obj_Type_Str = EventStrings[STR_RAID_1]; break; case RAID_TYPE_5: obj_Type_Str = EventStrings[STR_RAID_5]; break; case RAID_TYPE_HOT_SPARE: obj_Type_Str = EventStrings[STR_RAID_HOT_SPARE]; break; } out->add_Item(obj_Type_Str); out->add_Item ((char *)status); out->add_Item("\n"); } else { if ((tempStatus != DSPLY_STAT_FAILED) && (tempStatus != DSPLY_STAT_WARNING)) { out->add_Item(EventStrings[STR_RAID_NOT_FAIL_CANT_CHG]); EXIT(); return(err); } PrintRaidAddress(obj_Tag, out); #if !defined _DPT_NETWARE // Are you SURE? char answer = PrintAQuestion(STR_FORCE_OPTIMAL_WARNING); if ((answer != 'y') && (answer != 'Y')) { out->add_Item(EventStrings[STR_UNCHANGED_FAILED]); EXIT(); return(err); } #endif // OK, FORCE IT MakeArrayOptimal(obj_Tag); out->add_Item(" "); out->add_Item(EventStrings[STR_OPTIMAL]); out->add_Item("\n"); more_Devs_Left = false; stateForced = true; } } break; } } } } if (engine->devInfo_P->flags3 & FLG_DEV_RES_CONFLICT){ out->add_Item( EventStrings[STR_RESCONFLICT] ); err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; } else if (!stateForced && toState != Current) { err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; out->add_Item((char *) err); } return (err); } Command &ForceState::Clone() const { ENTER("Command &ForceState::Clone() const"); EXIT(); return(*new ForceState(*this)); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/forcest.hpp0000664000175000000620000000561710044153336020343 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef FORCEST_HPP #define FORCEST_HPP /**************************************************************************** * * Created: 7/20/99 * ***************************************************************************** * * File Name: ForceSt.hpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "scsilist.hpp" #include "intlist.hpp" /*** CONSTANTS ***/ #define STR_FORCE_FAIL_WARNING "This action will fail this drive. Are you sure you want to do this? [yN]" #define STR_FORCE_OPTIMAL_WARNING "Forcing an array to optimal will not reconstruct any data and could lead to corruption or data loss! Are you sure you want to make this array optimal? [yN]" /*** TYPES ***/ enum ForceStateOptions { Optimal, Fail, Current }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class ForceState:public Command { public: ForceState::ForceState(SCSI_Addr_List *deviceList, ForceStateOptions cmd); ForceState(const ForceState &new_ForceState); virtual ~ForceState(); Dpt_Error execute(String_List **output); Command &Clone() const; private: ForceStateOptions toState; SCSI_Addr_List *objsToCtrl; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/id_list.cpp0000664000175000000620000004566210044153335020323 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - ID_LIST.CPP //*************************************************************************** // //Description: This is the code for all the members of DPT_IDlist_C // // // //Author: Bill Smith //Date: 10/17/94 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "dpt_api.h" #include "id_list.hpp" //Definitions - Defines & Constants ----------------------------------------- #define TRUE 1 #define FALSE 0 //Definitions - Structure & Typedef ----------------------------------------- //Variables - External ------------------------------------------------------ //Variables - Global -------------------------------------------------------- //Variables - Static -------------------------------------------------------- //Prototypes - function ----------------------------------------------------- //Function - DPT_IDlist_C::DPT_IDlist_C - start //=========================================================================== // //Description: Init the object // // //Parameters: uLONG // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_IDlist_C::DPT_IDlist_C(uLONG buffSize) { id_P = NULL; maxIDs = (uSHORT) buffSize; SetBuffSize((uSHORT) buffSize); Reset(); } // - end //Function - DPT_IDlist_C::SetBuffSize - start //=========================================================================== // //Description: (re)alloc an ID buffer // // //Parameters: uLONG // //Return Value: DPT_RTN_T // //Global Variables Affected: id_P, idBuffSize // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T DPT_IDlist_C::SetBuffSize(uSHORT numToAlloc) { DPT_RTN_T rtnVal = MSG_RTN_COMPLETED; // If we want to alloc something if (numToAlloc) { rtnVal = MSG_RTN_FAILED; // if there was already a buffer if (id_P != NULL) { // Throw it away delete[] id_P; id_P = NULL; } // If the new ID buffer size was allocated... if ((id_P = new dptID_S[numToAlloc]) != NULL) { numIDs = numToAlloc; rtnVal = MSG_RTN_COMPLETED; } else if (numIDs) { // Try to re-allocate the old ID buffer size if ((id_P = new dptID_S[numIDs]) == NULL) numIDs = 0; } } return (rtnVal); } // - end //Function - DPT_IDlist_C::SetCurIDnum - start //=========================================================================== // //Description: Tries to change the currentID to the one the user specifies // // //Parameters: uSHORT // //Return Value: uSHORT // //Global Variables Affected: type, tag, currentID // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT DPT_IDlist_C::SetCurIDnum(uSHORT x) { uSHORT rtnVal = TRUE; // We can't go beyond numIDs or 0 if (x >= numIDs) rtnVal = FALSE; else { // Set up the easy access stuff current_P = id_P + x; #ifndef _DPT_STRICT_ALIGN type = current_P->type; tag = current_P->tag; #else // here's the story. "type" is of type DPT_TAG_T, current_P->type is of // type uSHORT. On a big endian machine, we would be copying these two bytes // into the high end position if we memcpy'ed straight into type from current_P->type, // since it assumes the type's sizes to be the same. Ok, // so now instead we memcpy to the same type (this gets away from the initial // problem on Solaris, the bus error that occurs when copying from a boundary // that isn't divisible by four). Then we move // the temp_Type to the "type" variable, and the endianess is correct. uSHORT temp_Type; memcpy(&temp_Type, ¤t_P->type, sizeof(current_P->type)); type = temp_Type; memcpy(&tag, ¤t_P->tag, sizeof(current_P->tag)); #endif } return(rtnVal); } // - end //Function - DPT_IDlist_C::GetID - start //=========================================================================== // //Description: Try to get the current ID info // // //Parameters: int // //Return Value: dptID_S * // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptID_S * DPT_IDlist_C::GetID(int which) { dptID_S *rtnVal; // If we want to get the current one if (which == -1) { // If there is one to get if (numIDs) rtnVal = &id_P[GetCurIDnum()]; // Otherwise give them zip else rtnVal = NULL; // If we are trying to go beyond numIDs } else if (which >= numIDs) rtnVal = NULL; // otherwise its cool else rtnVal = id_P + which; return(rtnVal); } // - end //Function - DPT_IDlist_C::Next - start //=========================================================================== // //Description: try to go to the next ID in the list // // //Parameters: none // //Return Value: dptID_S * // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptID_S * DPT_IDlist_C::Next() { dptID_S *rtnVal = NULL; if (SetCurIDnum(GetCurIDnum()+1)) rtnVal = GetID(); return(rtnVal); } // - end //Function - DPT_IDlist_C::Prev - start //=========================================================================== // //Description: Try to move backwards in the list // // //Parameters: none // //Return Value: dptID_S * // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- dptID_S * DPT_IDlist_C::Prev() { dptID_S *rtnVal = NULL; if (SetCurIDnum(GetCurIDnum()-1)) rtnVal = GetID(); return(rtnVal); } // - end //Function - DPT_IDlist_C::CopyBuffer - start //=========================================================================== // //Description: Copy an ID buffer from fromEng_P // // //Parameters: dptBuffer_S * // //Return Value: DPT_RTN_T // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T DPT_IDlist_C::CopyBuffer(const dptBuffer_S *frmEng) { DPT_RTN_T rtnVal = MSG_RTN_FAILED; uSHORT numberIDs; // if its not NULL if (frmEng) { // figure out # of ids #if (defined(SNI_MIPS) || defined(__GNUC__)) int dptID_S_sz = sizeof(uLONG) + sizeof(uSHORT); numberIDs = (uSHORT) (frmEng->writeIndex / dptID_S_sz); #else numberIDs = (uSHORT) (frmEng->writeIndex / sizeof(dptID_S)); #endif // Go go gadget copy rtnVal = CopyBuffer((uCHAR *) frmEng->data, numberIDs); } return(rtnVal); } // - end //Function - DPT_IDlist_C::CopyBuffer - start //=========================================================================== // //Description: This does all the acutal work, copyies an ID list from // a most basic level // // //Parameters: dptBuffer_S *, uSHORT // //Return Value: DPT_RTN_T // //Global Variables Affected: id_P, numIDs // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T DPT_IDlist_C::CopyBuffer(const uCHAR *buf, uSHORT numberIDs) { DPT_RTN_T rtnVal = MSG_RTN_COMPLETED; // Determine if we need to resize if (numberIDs > maxIDs) { rtnVal = SetBuffSize(numberIDs); maxIDs = numberIDs; } if (rtnVal == MSG_RTN_COMPLETED) { #if (defined(SNI_MIPS) || defined(__GNUC__)) int dptID_S_sz = sizeof(uLONG) + sizeof(uSHORT); dptID_S *current_P = id_P; for (uLONG i=0; i < numberIDs; i++, current_P++) { memcpy(current_P, &buf[i*dptID_S_sz], dptID_S_sz); } #else memcpy(id_P, buf, numberIDs * sizeof(dptID_S)); #endif numIDs = numberIDs; Rewind(); } return(rtnVal); } // - end //Function - DPt_IDlist_C::Add - start //=========================================================================== // //Description: Adds a dptID_S to the END of the list // // //Parameters: dptID_S * // //Return Value: dpt_RTN_T // //Global Variables Affected: numIDs, id_P // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T DPT_IDlist_C::Add(dptID_S *src) { DPT_RTN_T rtnVal = MSG_RTN_FAILED; if (numIDs >= maxIDs) { dptID_S *temp = new dptID_S[numIDs + 1]; if (temp != NULL) { memcpy(temp, id_P, numIDs * sizeof(dptID_S)); delete[] id_P; id_P = temp; memcpy(id_P + numIDs++, src, sizeof(dptID_S)); rtnVal = MSG_RTN_COMPLETED; } // we have room at the end } else memcpy(&id_P[numIDs++], src, sizeof(dptID_S)); return(rtnVal); } // - end //Function - DPT_IDlist_C::Delete - start //=========================================================================== // //Description: Deletes either the current element or the one given // // //Parameters: uSHORT // //Return Value: void // //Global Variables Affected: numIDs, id_P // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void DPT_IDlist_C::Delete(int which) { // If its the current, get the current if (which == - 1) which = GetCurIDnum(); // now copy from a+1 thru the end and place it at a else if (which < numIDs) { memmove((id_P + which), (id_P + which + 1), ((numIDs) - (which + 1)) * sizeof(dptID_S)); numIDs--; Rewind(); } } // - end //Function - DPT_LoggerIDlist_C::DPT_LoggerIDlist_C - start //=========================================================================== // //Description: Init the object // // //Parameters: uLONG // //Return Value: // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_LoggerIDlist_C::DPT_LoggerIDlist_C(uLONG buffSize) { id_P = NULL; maxIDs = (uSHORT) buffSize; SetBuffSize((uSHORT) buffSize); Reset(); } // - end //Function - DPT_LoggerIDlist_C::SetBuffSize - start //=========================================================================== // //Description: (re)alloc an ID buffer // // //Parameters: uLONG // //Return Value: DPT_RTN_T // //Global Variables Affected: id_P, idBuffSize // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T DPT_LoggerIDlist_C::SetBuffSize(uSHORT numToAlloc) { DPT_RTN_T rtnVal = MSG_RTN_COMPLETED; // If we want to alloc something if (numToAlloc) { rtnVal = MSG_RTN_FAILED; // if there was already a buffer if (id_P != NULL) { // Throw it away delete[] id_P; id_P = NULL; } // If the new ID buffer size was allocated... if ((id_P = new LoggerID_S[numToAlloc]) != NULL) { numIDs = numToAlloc; rtnVal = MSG_RTN_COMPLETED; } else if (numIDs) { // Try to re-allocate the old ID buffer size if ((id_P = new LoggerID_S[numIDs]) == NULL) numIDs = 0; } } return (rtnVal); } // - end //Function - DPT_LoggerIDlist_C::SetCurIDnum - start //=========================================================================== // //Description: Tries to change the currentID to the one the user specifies // // //Parameters: uSHORT // //Return Value: uSHORT // //Global Variables Affected: type, tag, currentID // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT DPT_LoggerIDlist_C::SetCurIDnum(uSHORT x) { uSHORT rtnVal = TRUE; // We can't go beyond numIDs or 0 if (x >= numIDs) rtnVal = FALSE; else { // Set up the easy access stuff current_P = id_P + x; type = current_P->type; tag = current_P->tag; } return(rtnVal); } // - end //Function - DPT_LoggerIDlist_C::GetID - start //=========================================================================== // //Description: Try to get the current ID info // // //Parameters: int // //Return Value: LoggerID_S * // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- LoggerID_S * DPT_LoggerIDlist_C::GetID(int which) { LoggerID_S *rtnVal; // If we want to get the current one if (which == -1) { // If there is one to get if (numIDs) rtnVal = &id_P[GetCurIDnum()]; // Otherwise give them zip else rtnVal = NULL; // If we are trying to go beyond numIDs } else if (which >= numIDs) rtnVal = NULL; // otherwise its cool else rtnVal = id_P + which; return(rtnVal); } // - end //Function - DPT_LoggerIDlist_C::Next - start //=========================================================================== // //Description: try to go to the next ID in the list // // //Parameters: none // //Return Value: LoggerID_S * // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- LoggerID_S * DPT_LoggerIDlist_C::Next() { LoggerID_S *rtnVal = NULL; if (SetCurIDnum(GetCurIDnum()+1)) rtnVal = GetID(); return(rtnVal); } // - end //Function - DPT_LoggerIDlist_C::Prev - start //=========================================================================== // //Description: Try to move backwards in the list // // //Parameters: none // //Return Value: LoggerID_S * // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- LoggerID_S * DPT_LoggerIDlist_C::Prev() { LoggerID_S *rtnVal = NULL; if (SetCurIDnum(GetCurIDnum()-1)) rtnVal = GetID(); return(rtnVal); } // - end //Function - DPT_LoggerIDlist_C::CopyBuffer - start //=========================================================================== // //Description: Copy an ID buffer from fromEng_P // // //Parameters: dptBuffer_S * // //Return Value: DPT_RTN_T // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T DPT_LoggerIDlist_C::CopyBuffer(const dptBuffer_S *frmEng) { DPT_RTN_T rtnVal = MSG_RTN_FAILED; uSHORT numberIDs; // if its not NULL if (frmEng) { // figure out # of ids #if (defined(SNI_MIPS) || defined(__GNUC__)) int LoggerID_S_sz = sizeof(uLONG) + sizeof(uSHORT); numberIDs = (uSHORT) (frmEng->writeIndex / LoggerID_S_sz); #else numberIDs = (uSHORT) (frmEng->writeIndex / sizeof(LoggerID_S)); #endif // Go go gadget copy rtnVal = CopyBuffer((uCHAR *) frmEng->data, numberIDs); } return(rtnVal); } // - end //Function - DPT_LoggerIDlist_C::CopyBuffer - start //=========================================================================== // //Description: This does all the acutal work, copyies an ID list from // a most basic level // // //Parameters: dptBuffer_S *, uSHORT // //Return Value: DPT_RTN_T // //Global Variables Affected: id_P, numIDs // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T DPT_LoggerIDlist_C::CopyBuffer(const uCHAR *buf, uSHORT numberIDs) { DPT_RTN_T rtnVal = MSG_RTN_COMPLETED; // Determine if we need to resize if (numberIDs > maxIDs) { rtnVal = SetBuffSize(numberIDs); maxIDs = numberIDs; } if (rtnVal == MSG_RTN_COMPLETED) { #if (defined(SNI_MIPS) || defined(__GNUC__)) int LoggerID_S_sz = sizeof(uLONG) + sizeof(uSHORT); LoggerID_S *current_P = id_P; for (uLONG i=0; i < numberIDs; i++, current_P++) { memcpy(current_P, &buf[i*LoggerID_S_sz], LoggerID_S_sz); } #else memcpy(id_P, buf, numberIDs * sizeof(LoggerID_S)); #endif numIDs = numberIDs; Rewind(); } return(rtnVal); } // - end //Function - DPT_LoggerIDlist_C::Add - start //=========================================================================== // //Description: Adds a LoggerID_S to the END of the list // // //Parameters: LoggerID_S * // //Return Value: dpt_RTN_T // //Global Variables Affected: numIDs, id_P // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- DPT_RTN_T DPT_LoggerIDlist_C::Add(LoggerID_S *src) { DPT_RTN_T rtnVal = MSG_RTN_FAILED; if (numIDs >= maxIDs) { LoggerID_S *temp = new LoggerID_S[numIDs + 1]; if (temp != NULL) { memcpy(temp, id_P, numIDs * sizeof(LoggerID_S)); delete[] id_P; id_P = temp; memcpy(id_P + numIDs++, src, sizeof(LoggerID_S)); rtnVal = MSG_RTN_COMPLETED; } // we have room at the end } else memcpy(&id_P[numIDs++], src, sizeof(LoggerID_S)); return(rtnVal); } // - end //Function - DPT_LoggerIDlist_C::Delete - start //=========================================================================== // //Description: Deletes either the current element or the one given // // //Parameters: uSHORT // //Return Value: void // //Global Variables Affected: numIDs, id_P // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- void DPT_LoggerIDlist_C::Delete(int which) { // If its the current, get the current if (which == - 1) which = GetCurIDnum(); // now copy from a+1 thru the end and place it at a else if (which < numIDs) { memmove((id_P + which), (id_P + which + 1), ((numIDs) - (which + 1)) * sizeof(LoggerID_S)); numIDs--; Rewind(); } } // - end raidutils-0.0.6.orig/raidutil/id_list.hpp0000664000175000000620000001450610044153337020323 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef DPT_IDLIST_HPP #define DPT_IDLIST_HPP //File - ID_LIST.HPP //*************************************************************************** // //Description: Header file for ID Class. Manipulation of ids that come // out of the engine // // //Author: Bill Smith //Date: 10/17/94 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "dpt_api.h" #include "log_core.hpp" //class - DPT_IDlist_C - start //=========================================================================== // //Description: Manipulation of IDs returned by the engine // // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class DPT_IDlist_C { public: // Data..................................................... // pointer to our IDs dptID_S *id_P, *current_P; // For easy access to the current ID DPT_TAG_T type, tag; // The number of IDs we just got uSHORT numIDs; uSHORT maxIDs; // Functions................................................ // Constructor/Destructor // Set up for a default of 30 IDs DPT_IDlist_C(uLONG=30); DPT_IDlist_C(const DPT_IDlist_C &right) { *this = right; } // Leaving ~DPT_IDlist_C() { if (id_P) delete[] id_P; } // Wipeouot and realloc our ID buffer DPT_RTN_T SetBuffSize(uSHORT); // current ID manipulation //What is the current ID num we are looking at uSHORT GetCurIDnum() { return((uSHORT) (current_P - id_P)); } // Try to move the current ID to another uSHORT SetCurIDnum(uSHORT); // Go back to the beginning and try again void Rewind() { SetCurIDnum(0); } // Lets effectively delete the buffer void Reset() { type = tag = numIDs = 0; } // Adding/deleteing IDS // Add an ID to the END of the list DPT_RTN_T Add(dptID_S*); // Remove an ID from the list void Delete(int=-1); // Retrieving IDs // Either we get the current or one specified dptID_S * GetID(int = -1); // Move to the next ID dptID_S * Next(); // Move to the prev ID dptID_S * Prev(); // Adding IDs // Copy an ID list either from the engine or another obj DPT_RTN_T CopyBuffer(const dptBuffer_S *); DPT_RTN_T CopyBuffer(const DPT_IDlist_C& src) { return(CopyBuffer((uCHAR *) src.id_P, src.numIDs)); } DPT_RTN_T CopyBuffer(const uCHAR *buf, uSHORT numberIDs); // make this obj = to that obj void operator =(const DPT_IDlist_C& src) { CopyBuffer(src); } void operator =( dptBuffer_S *src) { CopyBuffer(src); } }; // - end //class - DPT_LoggerIDlist_C - start //=========================================================================== // //Description: Manipulation of Logger IDs returned by the engine // // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- class DPT_LoggerIDlist_C { protected: // Functions................................................ // Wipeouot and realloc our ID buffer DPT_RTN_T SetBuffSize(uSHORT); public: // Data..................................................... // For easy access to the current ID DPT_TAG_T type, tag; // pointer to our IDs LoggerID_S *id_P, *current_P; // The number of IDs we just got uSHORT numIDs; uSHORT maxIDs; // Functions................................................ // Constructor/Destructor // Set up for a default of 30 IDs DPT_LoggerIDlist_C(uLONG=30); DPT_LoggerIDlist_C(const DPT_LoggerIDlist_C &right) { *this = right; } // Leaving ~DPT_LoggerIDlist_C() { if (id_P) delete[] id_P; } // current ID manipulation //What is the current ID num we are looking at uSHORT GetCurIDnum() { return((uSHORT) (current_P - id_P)); } // Try to move the current ID to another uSHORT SetCurIDnum(uSHORT); // Go back to the beginning and try again void Rewind() { SetCurIDnum(0); } // Lets effectively delete the buffer void Reset() { type = tag = numIDs = 0; } // Adding/deleteing IDS // Add an ID to the END of the list DPT_RTN_T Add(LoggerID_S*); // Remove an ID from the list void Delete(int=-1); // Retrieving IDs // Either we get the current or one specified LoggerID_S * GetID(int = -1); // Move to the next ID LoggerID_S * Next(); // Move to the prev ID LoggerID_S * Prev(); // Adding IDs // Copy an ID list either from the engine or another obj DPT_RTN_T CopyBuffer(const dptBuffer_S *); DPT_RTN_T CopyBuffer(const DPT_LoggerIDlist_C& src) { return(CopyBuffer((uCHAR *) src.id_P, src.numIDs)); } DPT_RTN_T CopyBuffer(const uCHAR *buf, uSHORT numberIDs); // make this obj = to that obj void operator =(const DPT_LoggerIDlist_C& src) { CopyBuffer(src); } void operator =( dptBuffer_S *src) { CopyBuffer(src); } }; // - end #endif raidutils-0.0.6.orig/raidutil/intlist.cpp0000664000175000000620000002072710044153334020354 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/17/98 * ***************************************************************************** * * File Name: IntList.cpp * Module: * Contributors: Lee Page * Description: Encapsulates an array of items. Used as a least-common denominator solution in coding C++ without STL. * Version Control: * * $Revision: 7 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "debug.hpp" #include "intlist.hpp" #include /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Int_List::Int_List(): num_Items( 0 ), items( 0 ), next_Item_Index( 0 ) { ENTER( "Int_List::Int_List():" ); EXIT(); } Int_List::Int_List( const Int_List &right ) { ENTER( "Int_List::Int_List( const Int_List &right )" ); Copy_Items( right ); num_Items = right.num_Items; next_Item_Index = right.next_Item_Index; EXIT(); } Int_List::~Int_List() { ENTER( "Int_List::~Int_List()" ); Destroy_Items(); EXIT(); } Int_List &Int_List::operator += ( const Int_List &right ) { ENTER( "Int_List &Int_List::operator += ( const Int_List &right )" ); int int_Index; long *temp_Items; // allocate a larger buffer and copy over the existing entries temp_Items = new long[ num_Items + right.num_Items ]; memcpy( temp_Items, items, num_Items * sizeof( long ) ); delete items; items = temp_Items; // now copy over the ones being added for( int_Index = 0; int_Index < right.num_Items; int_Index++ ) { items[ int_Index + num_Items ] = right.get_Item( int_Index ); } num_Items += right.num_Items; EXIT(); return( *this ); } const Int_List &Int_List::operator = ( const Int_List &right ) { ENTER( "const Int_List &Int_List::operator = ( const Int_List &right )" ); Destroy_Items(); Copy_Items( right ); num_Items = right.num_Items; next_Item_Index = right.next_Item_Index; EXIT(); return( *this ); } /**************************************************************************** * * Function Name: add_Int(), Created:7/17/98 * * Description: Appends a int to the end of the list of items. * * Notes: * *****************************************************************************/ void Int_List::add_Item( const long new_Int ) { ENTER( "void Int_List::add_Item( const long new_Int )" ); long *temp_Ints; // create a new table large enough to contain the previously entered items // plus this new one. temp_Ints = new long[ num_Items + 1 ]; if( temp_Ints ) { num_Items++; if( items ) { //Copy all the previous items over to the new array memcpy( temp_Ints, items, num_Items * sizeof( long ) ); // we don't need this old one any more. delete[] items; } items = temp_Ints; items[ num_Items - 1 ] = new_Int; } EXIT(); } /**************************************************************************** * * Function Name: set_Int(), Created:7/17/98 * * Description: Sets a particular item in the list * * Notes: * *****************************************************************************/ void Int_List::set_Item(int item_pos, long item_value) { ENTER( "void Int_List::set_Item(unsigned short item_pos, long item_val)" ); items[item_pos] = item_value; EXIT(); } /**************************************************************************** * * Function Name: get_Int(), Created:7/17/98 * * Description: Fetches the nth int (0 based). The user should not deallocate the returned int. It is owned by the object. * * Notes: * *****************************************************************************/ long Int_List::get_Item( int index ) const { ENTER( "long Int_List::get_Item( int index ) const" ); long ret_Int = 0; if( index < num_Items ) { ret_Int = items[ index ]; } EXIT(); return( ret_Int ); } /**************************************************************************** * * Function Name: get_Next_Int(), Created:7/17/98 * * Description: Fetches the next int. The user should not deallocate the returned int. It is owned by the object. * * Return: C-int * * Notes: * *****************************************************************************/ long Int_List::get_Next_Item() { ENTER( "long Int_List::get_Next_Item()" ); long ret_Int = 0; if( next_Item_Index < num_Items ) { ret_Int = items[ next_Item_Index ]; next_Item_Index++; } EXIT(); return( ret_Int ); } /**************************************************************************** * * Function Name: get_Num_Uniques(), Created:11/5/99 * * Description: Fetches the number of unique items in the list. * The user should not deallocate the returned int. * It is owned by the object. * * Return: C-int * * Notes: * *****************************************************************************/ long Int_List::get_Num_Uniques() { ENTER( "long Int_List::get_Num_Uniques()" ); long ret_Int = 1; long currInt, oldInt; oldInt = items[0]; for (int i = 1; i < num_Items; i++) { currInt = items[i]; if (currInt != oldInt) { ret_Int++; oldInt = currInt; } } EXIT(); return( ret_Int ); } /**************************************************************************** * * Function Name: shift_Item(), Created:7/28/98 * * Description: FIFO. Removes the first item from the list, and returns it. * * Return: The first item in the list. * * Notes: This is a destructive read. * *****************************************************************************/ long Int_List::shift_Item() { ENTER( "long Int_List::shift_Item()" ); long ret_Item( items[ 0 ] ); int copy_Index; for( copy_Index = 0; copy_Index < num_Items - 1; copy_Index++ ) { items[ copy_Index ] = items[ copy_Index + 1 ]; } num_Items--; next_Item_Index = ( next_Item_Index > 0 )?next_Item_Index - 1:0; EXIT(); return( ret_Item ); } /**************************************************************************** * * Function Name: reset_Next_Index(), Created:7/17/98 * * Description: Resets the get_Next_Int index to point to the first item. * * Notes: * *****************************************************************************/ void Int_List::reset_Next_Index() { ENTER( "void Int_List::reset_Next_Index()" ); next_Item_Index = 0; EXIT(); } int Int_List::num_Left() const { ENTER( "int Int_List::num_Left() const" ); EXIT(); return( num_Items - next_Item_Index ); } void Int_List::Destroy_Items() { ENTER( "void Int_List::Destroy_Items()" ); delete[] items; EXIT(); } void Int_List::Copy_Items( const Int_List &right ) { ENTER( "void Int_List::Copy_Items( const Int_List &right )" ); int int_Index; items = new long[ right.num_Items ]; num_Items = right.num_Items; for( int_Index = 0; int_Index < num_Items; int_Index++ ) { items[ int_Index ] = right.get_Item( int_Index ); } EXIT(); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/intlist.hpp0000664000175000000620000000657010044153336020363 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef INTLIST_HPP #define INTLIST_HPP /**************************************************************************** * * Created: 7/20/98 * ***************************************************************************** * * File Name: IntList.hpp * Module: * Contributors: Lee Page * Description: This file serves as a container class, holding a list of items. * Version Control: * * $Revision: 7 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Int_List { public: Int_List(); Int_List( const Int_List &right ); ~Int_List(); Int_List &operator += ( const Int_List &right ); const Int_List &operator = ( const Int_List &right ); void add_Item( const long new_Int ); void set_Item(int item_pos, long item_value); // Fetches the nth str (0 based). The user should not // deallocate the returned int. It is owned by the // object. long get_Item( int index ) const; // Fetches the next int. The user should not deallocate // the returned int. It is owned by the object. long get_Next_Item(); // Fetches the number of unique items. The user should not deallocate // the returned int. It is owned by the object. long get_Num_Uniques(); // FIFO. Removes the first item from the list, and returns it. long shift_Item(); // Resets the get_Next_Int index to point to the first item. void reset_Next_Index(); // returns the number of entries minus the index int num_Left() const; int get_Num_Items() const { return( num_Items ); } private: void Destroy_Items(); void Copy_Items( const Int_List &right ); int num_Items; long *items; int next_Item_Index; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/listdev.cpp0000664000175000000620000020433510044153335020340 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/17/98 * ***************************************************************************** * * File Name: ListDev.cpp * Module: * Contributors: Lee Page * Description: This command lists all * Version Control: * * $Revision: 97 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "listdev.hpp" #include "rustring.h" #include "ctlr_map.hpp" #include "status.hpp" #include "rscenum.h" #include "flashmem.h" //#include "eventlog.hpp" #include #include #include "dpt_eata.h" /*** CONSTANTS ***/ const int BUF_LEN = 256; extern char* EventStrings[]; extern void GetBatteryEventString(uSHORT, char *); #define CACHE_MODE_LEVELS 2 // These aren't used [ks] //#define DefaultSmorSignature "DPT Signature Unavailable" //#define DefaultBiosSignature DefaultSmorSignature //#define DefaultBadMemoryAddress 0 extern int FID_RESET_OUTBUFF; extern uSHORT PHYS_LIST_SIZE; extern dpt_sig_S mysig; extern int DptLegacy; //DEBUG CODE:HITACHI #define NV_HIDE_CACHE 0x80 bool showCache = true; bool showvendor = false; /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ List_Device::List_Device( list_Type what, SCSI_Address &address_to_List ): list_What( what ), obj_Root( address_to_List ) { ENTER( "List_Device::List_Device(" ); EXIT(); } List_Device::List_Device( list_Type what ): list_What( what ), obj_Root( -1 ) // this is bogus, it won't be used because they aren't listing // devices hanging off a device { ENTER( "List_Device::List_Device( list_Type what ): list_What( what )," ); EXIT(); } List_Device::List_Device( const List_Device &right ): list_What( right.list_What ), obj_Root( right.obj_Root ) { ENTER( "List_Device::List_Device( const List_Device &right ):" ); EXIT(); } List_Device::~List_Device() { ENTER( "List_Device::~List_Device()" ); EXIT(); } Command::Dpt_Error List_Device::execute( String_List **output ) { ENTER( "Command::Dpt_Error List_Device::execute( String_List **output )" ); Dpt_Error err; printDummyStr = false; char temp [100]; char temp2 [sizeof(dpt_sig_S)]; dpt_sig_S engSig; // allocate this object once for all functions. *output = new String_List(); if ((list_What == LIST_VERSION) || (list_What == LIST_CONTROLLERS) || (list_What == LIST_BATTERY)) Init_Engine(1); // scan hbas only else Init_Engine(); switch( list_What ) { case LIST_ARRAY: // get visibles err = List_Log_Devices( **output, GET_ARRAY); break; case LIST_LOGICALS: // get visibles err = List_Log_Devices( **output, GET_RAID); break; case LIST_CACHE: // list write cache mode err = List_LSU_Devices( **output); break; case LIST_VERSION: // list version - controller info plus bios/smor err = List_Devices( **output); break; case LIST_PHYSICALS: err = List_Devices( **output); break; case LIST_INQUIRY_VENDOR: showvendor = true; case LIST_INQUIRY: err = List_Inquiry( **output); break; case LIST_CONTROLLERS: err = List_Devices( **output); break; case LIST_HOT_SPARES: // get hiddens err = List_Log_Devices( **output, GET_RAID_HOT_SPARE); break; case LIST_ARRAYNAME: // get visibles err = List_Log_Devices( **output, GET_ARRAYNAME); break; case LIST_TAGS: err = List_Tags(**output); break; case LIST_ALL_VENDOR: showvendor = true; case LIST_ALL: printDummyStr = true; // show dptutil version and date and description if (DptLegacy) (*output)->add_Item (EventStrings[STR_DPTUTIL_ALL_CAPS]); else (*output)->add_Item (EventStrings[STR_RAIDUTIL_ALL_CAPS]); sprintf (temp, EventStrings[STR_VERSION_DATE], mysig.dsVersion, mysig.dsRevision, mysig.dsSubRevision, mysig.dsMonth, mysig.dsDay, mysig.dsYear + 1980, mysig.dsDescription); (*output)->add_Item (temp); (*output)->add_Item ("\n"); // show engine version and date and description err = engine->Send( MSG_GET_ENGINE_SIG); engine->Extract (temp2, sizeof(dpt_sig_S)); memcpy (&engSig, temp2, sizeof(dpt_sig_S)); if (DptLegacy) (*output)->add_Item (EventStrings[STR_DPT_ENGINE]); else (*output)->add_Item (EventStrings[STR_ADPT_ENGINE]); sprintf (temp, EventStrings[STR_VERSION_DATE], engSig.dsVersion, engSig.dsRevision, engSig.dsSubRevision, engSig.dsMonth, engSig.dsDay, engSig.dsYear + 1980, engSig.dsDescription); (*output)->add_Item (temp); (*output)->add_Item ("\n\n"); // show controller list_What = LIST_CONTROLLERS; err = List_Devices( **output); (*output)->add_Item( "\n" ); // show physical list_What = LIST_PHYSICALS; err = List_Devices( **output); (*output)->add_Item( "\n" ); // show arrays list_What = LIST_ARRAY; err = List_Log_Devices( **output, GET_ARRAY); (*output)->add_Item( "\n" ); // show hot spares list_What = LIST_HOT_SPARES; err = List_Log_Devices( **output, GET_RAID_HOT_SPARE); (*output)->add_Item( "\n" ); // kmc - Adding speed support listing. list_What = LIST_SPEED; err = List_Device_Speeds( **output ); (*output)->add_Item( "\n" ); // show cache list_What = LIST_CACHE; err = List_LSU_Devices( **output); (*output)->add_Item( "\n" ); // list version - controller info plus bios/smor list_What = LIST_VERSION; err = List_Devices( **output); (*output)->add_Item( "\n" ); // list battery info list_What = LIST_BATTERY; err = List_Devices( **output); (*output)->add_Item( "\n" ); // list inquiry list_What = LIST_INQUIRY; err = List_Inquiry( **output); (*output)->add_Item( "\n" ); // add next here err = Dpt_Error::DPT_CMD_ERR_NO_ERROR; break; case LIST_SPEED: err = List_Device_Speeds( **output ); (*output)->add_Item( "\n" ); err = Dpt_Error::DPT_CMD_ERR_NO_ERROR; break; case LIST_REDIRECT: err = List_Log_Devices( **output, GET_RAID_REDIRECT); break; case LIST_BATTERY: err = List_Devices( **output); break; default: err = Dpt_Error::DPT_CMD_ERR_INVALID_LIST_TYPE; break; } if( err.Is_Error() ) { char buf[2]; buf[0] = TABULATION_PLACE_HOLDER; buf[1] = '\0'; (**output).add_Item(buf); (**output).add_Item (EventStrings[STR_FAILURE]); (**output).add_Item( (char *) err ); } else { if( (**output).get_Num_Items() == 0 ) { (**output).add_Item(EventStrings[STR_NO_ITEMS_FOUND]); (**output).add_Item( "\n" ); } } EXIT(); return( err ); } // kmc - added method to print the negogiated xfer speed of the devices. Command::Dpt_Error List_Device::List_Device_Speeds (String_List& output) { ENTER( "Command::Dpt_Error List_Device::List_Device_Speeds(" ); int dev_Index; bool more_Devs_Left = true; Dpt_Error err; DPT_TAG_T this_Objs_Tag; bool first_time_through = true; for (dev_Index = 0; more_Devs_Left && !err.Is_Error(); dev_Index++) { get_Devs_Type devs_Type; this_Objs_Tag = Get_Dev_by_Index( obj_Root.hba, dev_Index, &more_Devs_Left, &devs_Type ); if (more_Devs_Left) { if (first_time_through == true) { output.add_Item(EventStrings[STR_LIST_DEV_SPEED_HEADER]); output.add_Item( STR_DEV_DIVIDING_LINE ); first_time_through = false; } // print out speed of all SCSI physical devices -kds if (devs_Type != GET_SCSI_HBA) { bool trashValid; SCSI_Address objAddr = DPT_Tag_to_Address (this_Objs_Tag, &trashValid); hba_Tag = Get_HBA_by_Index (objAddr.hba, &trashValid); err |= List_This_Devices_Speed (objAddr.bus, output, this_Objs_Tag); } } } if ( first_time_through == true ) { err |= Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; } EXIT(); return( err ); } Command::Dpt_Error List_Device::List_This_Devices_Speed( int dev_chan, String_List &output, DPT_TAG_T this_Objs_Tag) { ENTER( "Command::Dpt_Error List_Device::List_This_Devices_Speed(" ); DPT_TAG_T currTag = engine->hbaInfo_P->myTag; Dpt_Error err; uSHORT speed; engine->Reset(); err = engine->Send( MSG_GET_INFO, this_Objs_Tag ); if (!err.Is_Error()) { // Print the device addrs dptCaddr_S *addr_P = &engine->devInfo_P->addr; DPTControllerMap map; char * String = map.getTargetString( addr_P->hba, addr_P->chan, addr_P->id, addr_P->lun ); output.add_Item( String ); delete [] String; char speedString[16]; sprintf(speedString, "%s", "?"); char widthString[16]; widthString[0] = '\0'; engine->Reset (); engine->Send( MSG_GET_INFO, currTag ); // Added by Qi Zhu, for SATA int SataController = 0; dptChanInfo2_S ChanInfo2[5]; if (engine->Send(MSG_GET_CHAN_INFO, currTag)== MSG_RTN_COMPLETED) { uLONG NumChanInfo2=0; engine->Extract ((char *)&NumChanInfo2, sizeof(NumChanInfo2)); engine->Extract ((char *)ChanInfo2, sizeof(ChanInfo2)); if((NumChanInfo2)&&(ChanInfo2[0].pc13Flags4 & FLG_CHAN2_SATA)) { SataController = 1; } } if(SataController) { engine->Reset(); err = engine->Send( MSG_GET_INFO, this_Objs_Tag ); int SataSpeed; // // Calculate the transfer speed in MBS. We had to put the speed // into the log page and set the wide bit because the field // isn't big enough so by setting wide we could cut the value in // half and it would fit. The busSpeed field comes back in MHz. Since // wide is set we multiply this value by two to get Megabytes/sec. We // will have to kludge here for those odd speeds (33,45, and 133) that // get truncated in the engine when converting from Hz to MHz. // SataSpeed = engine->devInfo_P->busSpeed * 2; if((SataSpeed == 32)||(SataSpeed == 44)||(SataSpeed == 132)) { ++SataSpeed; } // // Now set up the type // switch(SataSpeed) { case 150: strcpy (speedString, EventStrings[STR_SATA1500]); break; case 300: strcpy (speedString, EventStrings[STR_SATA3000]); break; case 600: strcpy (speedString, EventStrings[STR_SATA6000]); break; // // If we don't recognize it, just call it SATA // default: strcpy (speedString, EventStrings[STR_SATA]); break; } //switch(engine->devInfo_P->busSpeed) } //else if(SataController) else { if (engine->hbaInfo_P->chanInfo[0].flags & FLG_CHAN_UDMA) { engine->Reset(); err = engine->Send( MSG_GET_INFO, this_Objs_Tag ); int AtaSpeed; switch(engine->devInfo_P->udmaModeSupported) { case UDMA_MODE_33 : AtaSpeed = 33; break; case UDMA_MODE_45 : AtaSpeed = 45; break; case UDMA_MODE_66 : AtaSpeed = 66; break; case UDMA_MODE_100 : AtaSpeed = 100; break; case UDMA_MODE_133 : AtaSpeed = 133; break; // // For older engines that didn't support the udmaModeSelected field // or new modes we don't support yet, the MHz still comes back in the // busSpeed field. UDMA is wide so we multiply this value by two to // get Megabytes/sec. We will have to kludge here for those odd speeds // (33 and 45) that get truncated in the engine when converting from // Hz to MHz. // default: AtaSpeed = engine->devInfo_P->busSpeed * 2; if((AtaSpeed == 32)||(AtaSpeed == 44)||(AtaSpeed == 132)) { ++AtaSpeed; } break; } //switch(gInfo_P->udmaModeSelected) // // Set up the Ultra mode string // switch(AtaSpeed) { case 33 : strcpy (speedString, EventStrings[STR_ATA33]); break; case 45 : strcpy (speedString, EventStrings[STR_ATA45]); AtaSpeed = 45; break; case 66 : strcpy (speedString, EventStrings[STR_ATA66]); AtaSpeed = 66; break; case 100 : strcpy (speedString, EventStrings[STR_ATA100]); AtaSpeed = 100; break; case 133 : strcpy (speedString, EventStrings[STR_ATA133]); AtaSpeed = 133; break; // // If we don't recognize it, just call it ATA // default: strcpy (speedString, EventStrings[STR_ATA]); break; } //switch(AtaSpeed) output.add_Item (speedString); } //else if(UdmaController) else { // Get the MAXIMUM speed here. // As the max speed, we are going to take the LOWER // of the max speeds as reported by the NVRAM and the HW // SO ... get both then choose the lower to report NvramMegaHertz = 0; // unknown HwMegaHertz = 0; // unknown uSHORT slowerSpeed; err = GetSpeedFromNvram (this_Objs_Tag); err = GetSpeedFromHW (dev_chan); if (NvramMegaHertz == 0) // if unknown, use Hw... slowerSpeed = HwMegaHertz; else slowerSpeed = (NvramMegaHertz < HwMegaHertz ? NvramMegaHertz : HwMegaHertz); engine->Reset (); if (engine->Send(MSG_GET_CHAN_INFO, currTag)== MSG_RTN_COMPLETED) { dptChanInfo2_S ChanInfo2[5]; uLONG NumChanInfo2; engine->Extract ((char *)&NumChanInfo2, sizeof(NumChanInfo2)); engine->Extract ((char *)ChanInfo2, sizeof(ChanInfo2)); if((NumChanInfo2)&&(ChanInfo2[0].pc13Flags4 & FLG_CHAN2_ULTR160)) { slowerSpeed = 320; } } if (HwMegaHertz == 0xffff) // if fibre strcpy (speedString, EventStrings[STR_FIBRE]); else { switch (slowerSpeed) { case 0: strcpy (speedString, EventStrings[STR_UNKNOWN]); break; case 1: strcpy (speedString, EventStrings[STR_ASYNC]); break; case 20: strcpy (speedString, EventStrings[STR_ULTRA]); break; case 40: strcpy (speedString, EventStrings[STR_ULTRA2]); break; case 80: strcpy (speedString, EventStrings[STR_ULTRA3]); break; case 160: strcpy (speedString, EventStrings[STR_ULTRA160]); break; case 320: strcpy (speedString, EventStrings[STR_ULTRA320]); break; default: sprintf(speedString, EventStrings[STR_FILLIN_MHZ], slowerSpeed); break; } } } } output.add_Item (speedString); // Get the NEGOTIATED speed and width bit here. engine->Reset (); err = engine->Send (MSG_GET_INFO, this_Objs_Tag); if (!err.Is_Error() && engine->devInfo_P #if (defined(FLG_DEV_SPEED_VALID)) && ( engine->devInfo_P->flags3 & FLG_DEV_SPEED_VALID ) #endif // kds - need this line? && (engine->devInfo_P->objType != DPT_SCSI_PROCESSOR) ) { speed = engine->devInfo_P->busSpeed; if ( engine->devInfo_P->flags3 & FLG_DEV_FIBRE ) { sprintf(speedString, EventStrings[STR_FILLIN_GHZ], speed / 1000); strcpy( widthString, EventStrings[STR_FIBRE]); } else { if (speed != 0) { // Do some math based on the device width/type to get the xfer rate in MB/Second. // If we are a wide device... if (engine->devInfo_P->flags3 & FLG_DEV_WIDE16) { // Compute the MB/Second rate for a wide device, multiplying // by 2 to double the width pass-thru. sprintf (speedString, EventStrings[STR_FILLIN_MB_PER_SEC], (speed * 2)); } else if (engine->devInfo_P->flags3 & FLG_DEV_FIBRE) { // Compute the MB/Second rate for fibre, we'll get back 1000 MHz or 2000 MHz // Dividing my 10 gives us the MB/Second rate. sprintf (speedString, EventStrings[STR_FILLIN_MB_PER_SEC], (speed / 10)); } else { // Compute the MB/Second rate. sprintf (speedString, EventStrings[STR_FILLIN_MB_PER_SEC], speed); } } else { strcpy(speedString, EventStrings[STR_ASYNC]); } // print the width if ( engine->devInfo_P->flags3 & FLG_DEV_WIDE16 ) { strcpy( widthString, EventStrings[STR_WIDE]); } else { strcpy( widthString, EventStrings[STR_NARROW]); } } } else { // if we can't get the speed then report a ? sprintf(speedString, "%s", "?"); } output.add_Item( speedString ); output.add_Item( widthString ); output.add_Item( "\n" ); } EXIT(); return( err ); } Command::Dpt_Error List_Device::GetSpeedFromNvram ( DPT_TAG_T this_Objs_Tag) { ENTER( "Command::Dpt_Error List_Device::(GetSpeedFromNvram("); Dpt_Error err; // get the NVRAM page engine->Reset(); engine->Insert ((uCHAR)0x2E); // NVRAM page engine->Insert ((uCHAR)0x40); // Interpret and current err = engine->Send (MSG_GET_MODE_PAGE, hba_Tag); uCHAR speeds[4]; speeds[0] = (uCHAR) -1; speeds[1] = (uCHAR) -1; speeds[2] = (uCHAR) -1; speeds[3] = (uCHAR) -1; if (!err.Is_Error()) { dptNVRAM_S NVRAM; if ((engine->Extract ((uCHAR *) &NVRAM, 4) != 0) && (engine->Extract ((uCHAR *) &NVRAM, sizeof (NVRAM)) != 0 )) { speeds[0] = NVRAM.getXfrRate(0); speeds[1] = NVRAM.getXfrRate(1); speeds[2] = NVRAM.getXfrRate(2); speeds[3] = NVRAM.getXfrRate(3); } } engine->Reset(); err = engine->Send( MSG_GET_INFO, this_Objs_Tag ); if (!err.Is_Error()) { dptCaddr_S *addr_P = &engine->devInfo_P->addr; uSHORT speed = speeds[addr_P->chan]; switch (speed) { case 0: NvramMegaHertz = 10; break; case 1: NvramMegaHertz = 8; break; case 2: NvramMegaHertz = 5; break; case 3: NvramMegaHertz = 1; // async break; case 4: NvramMegaHertz = 20; break; case 5: NvramMegaHertz = 40; break; case 6: NvramMegaHertz = 80; break; case 7: NvramMegaHertz = 160; break; case 8: NvramMegaHertz = 320; break; default: NvramMegaHertz = 0; // unknown break; } } return err; } Command::Dpt_Error List_Device::GetSpeedFromHW ( int dev_chan) { ENTER( "Command::Dpt_Error List_Device::(GetSpeedFromHW("); Dpt_Error err; engine->Reset(); engine->Insert ((uCHAR)0x33); // HW page engine->Insert ((uCHAR)0x01); // Read, do not clear err = engine->Send (MSG_GET_LOG_PAGE, hba_Tag); char temp_Buf[BUF_LEN]; temp_Buf[0] = '\0'; uSHORT pageLen; if (!err.Is_Error()) { engine->Extract (temp_Buf, 4); pageLen = (((temp_Buf[2] & 0xff) * 256) + (temp_Buf[3] & 0xff)); // search for Parameter Code 0x0d uSHORT index = 4; uSHORT parmLen; bool foundD = false; while (index < pageLen && !foundD) { engine->Extract (temp_Buf, 4); if (temp_Buf[1] == 0x0d) { parmLen = temp_Buf[3] & 0xff; engine->Extract (temp_Buf, parmLen); if (temp_Buf[0] == dev_chan) foundD = true; } else { parmLen = temp_Buf[3] & 0xff; engine->Skip (parmLen); index += parmLen; } } temp_Buf[parmLen] = '\0'; // if fibre if (temp_Buf[2] & 0x01) HwMegaHertz = 0xffff; else HwMegaHertz = temp_Buf[3]; } return err; } Command::Dpt_Error List_Device::List_Log_Devices( String_List &output, get_Devs_Type devs_Type) { ENTER( "Command::Dpt_Error List_Device::List_Log_Devices(" ); int dev_Index; Dpt_Error err; bool more_Devs_Left = true; bool retrieve_Hiddens = false; bool first_time_through = true; switch( devs_Type ) { case GET_RAID_HOT_SPARE: // case GET_RAID_REDIRECT: retrieve_Hiddens = true; break; } for( dev_Index = 0; more_Devs_Left; dev_Index++ ) { DPT_TAG_T this_Objs_Tag; this_Objs_Tag = Get_Log_Dev_by_Index( dev_Index, retrieve_Hiddens, &more_Devs_Left, obj_Root.hba); // for REDIRECT, make sure the type is correct, otherwise the // header is printed and no devices if ((devs_Type == GET_RAID_REDIRECT) && (more_Devs_Left)) { err = engine->Send(MSG_GET_INFO, this_Objs_Tag); if (engine->devInfo_P->raidType != RAID_TYPE_REDIRECT) continue; } // do not print bottom of dual level array (is done when // top level is found) if ((devs_Type != GET_RAID_REDIRECT) && (engine->devInfo_P->raidParent != -1)) continue; if( more_Devs_Left ) { if( first_time_through == true ) { switch( devs_Type ) { case GET_SCSI_DASD: case GET_SCSI_SASD: case GET_SCSI_PRINTER: case GET_SCSI_PROCESSOR: case GET_SCSI_WORM: case GET_SCSI_JUKEBOX: case GET_SCSI_CD_ROM: case GET_SCSI_SCANNER: case GET_SCSI_OPTICAL: case GET_SCSI_PRO_ROOT: case GET_SCSI_PRO_CONNECTION: case GET_RAID_REDIRECT: output.add_Item(EventStrings[STR_LIST_DEV_PHYS_HEADER]); break; case GET_ARRAY: if (printDummyStr) { output.add_Item(EventStrings[STR_LOGICAL_VIEW]); } output.add_Item(EventStrings[STR_LIST_DEV_ARRAY_HEADER]); break; case GET_SCSI_HBA: if (showCache) output.add_Item(EventStrings[STR_LIST_DEV_CTLR_HEADER]); else output.add_Item(EventStrings[STR_LIST_DEV_CTLR_HEADER_NO_CACHE]); break; case GET_RAID: output.add_Item(EventStrings[STR_LIST_DEV_PHYS_HEADER]); break; case GET_RAID_HOT_SPARE: output.add_Item(EventStrings[STR_LIST_DEV_HOT_SPARE_HEADER]); retrieve_Hiddens = true; break; case GET_ARRAYNAME: output.add_Item(EventStrings[STR_LIST_ARRAYNAME_HEADER]); case GET_SCSI_BCD: case GET_RAID_BCD: default: // _asm int 3; break; } output.add_Item( STR_DEV_DIVIDING_LINE ); first_time_through = false; } err |= List_This_Device(output, this_Objs_Tag, devs_Type); output.add_Item( "\n" ); // GET_RAID_HOT_SPARE is Added by Qi Zhu if ((devs_Type == GET_ARRAY) || (devs_Type ==GET_RAID_HOT_SPARE)) { int comp_Index; uLONG smallLBA = 0; int dataDrives; int prev_level = 0; dptID_S *idlist = new dptID_S[PHYS_LIST_SIZE]; dptID_S *idlist2 = new dptID_S[PHYS_LIST_SIZE]; // get number of components in this array int numComps = EngineFindIDs(FID_RESET_OUTBUFF, MSG_ID_ALL_COMPONENTS, this_Objs_Tag, idlist, PHYS_LIST_SIZE); // if level is 1 and raid is 1 or 5, this array may // be protected by hot spare(s) err |= engine->Send(MSG_GET_INFO, this_Objs_Tag); if ((engine->devInfo_P->level == 1) && ((engine->devInfo_P->raidType == RAID_5) || (engine->devInfo_P->raidType == RAID_1))) { // get the info for this raid dataDrives = EngineFindIDs(FID_RESET_OUTBUFF, MSG_ID_ALL_COMPONENTS, this_Objs_Tag, idlist2, PHYS_LIST_SIZE) - 1; smallLBA = engine->devInfo_P->capacity.maxLBA / dataDrives; } for (comp_Index = 0; comp_Index < numComps; ++comp_Index) { err |= engine->Send(MSG_GET_INFO, idlist[comp_Index].tag); // look for hot spares if done printing array if ((prev_level == 2) && (engine->devInfo_P->level == 1) && (smallLBA > 0)) Look_for_Hot_Spares (output, smallLBA, devs_Type); // list this raid err |= List_This_Device(output, idlist[comp_Index].tag, devs_Type); output.add_Item( "\n" ); // if level is 1 and raid is 1 or 5, this array may // be protected by hot spare(s) err |= engine->Send(MSG_GET_INFO, idlist[comp_Index].tag); if ((engine->devInfo_P->level == 1) && ((engine->devInfo_P->raidType == RAID_5) || (engine->devInfo_P->raidType == RAID_1))) { // get the info for this raid dataDrives = EngineFindIDs(FID_RESET_OUTBUFF, MSG_ID_ALL_COMPONENTS, idlist[comp_Index].tag, idlist2, PHYS_LIST_SIZE) - 1; smallLBA = engine->devInfo_P->capacity.maxLBA / dataDrives; } prev_level = engine->devInfo_P->level; } if ((prev_level == 2) && (smallLBA > 0)) { Look_for_Hot_Spares (output, smallLBA, devs_Type); } delete [] idlist; delete [] idlist2; } } } if( first_time_through == true ) { err |= Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; } EXIT(); return( err ); } Command::Dpt_Error List_Device::Look_for_Hot_Spares( String_List &output, uLONG smallLBA, get_Devs_Type devs_Type) { int comp_Index; dptID_S *idlist2 = new dptID_S[PHYS_LIST_SIZE]; Dpt_Error err; // get siblings, loop through for hotspares int numSibs = EngineFindIDs(FID_RESET_OUTBUFF, MSG_ID_LOGICALS, engine->hbaInfo_P->attachedTo, idlist2, PHYS_LIST_SIZE); for(comp_Index = 0; comp_Index < numSibs; ++comp_Index) { err |= engine->Send(MSG_GET_INFO, idlist2[comp_Index].tag); if ((engine->devInfo_P->raidType == RAID_HOT_SPARE) && (engine->devInfo_P->capacity.maxLBA >= smallLBA)) // RAID is protected - print hot spare (it protects the above printed RAID) { err |= List_This_Device(output, idlist2[comp_Index].tag, devs_Type); output.add_Item( "\n" ); } } delete [] idlist2; return (err); } // in the beginning... this just printed LSUs. Since it only is used // to list cache settings, it was changed to print LSUs and member // drives, but I didn't change the name, so it is misleading. Command::Dpt_Error List_Device::List_LSU_Devices( String_List &output) { ENTER( "Command::Dpt_Error List_Device::List_LSU_Devices(" ); int dev_Index; Dpt_Error err; get_Devs_Type dev_Type; bool obj_Found = true; SCSI_Address obj_Address; SCSI_Address null_Address; bool first_time_through = true; bool tag_Valid; // set each field to -1 to find all devices null_Address.hba = -1; null_Address.bus = -1; null_Address.id = -1; null_Address.lun = -1; null_Address.level = -1; for (dev_Index = 0; obj_Found; dev_Index++) { DPT_TAG_T obj_Tag = Get_Address_by_Index( null_Address, dev_Index, &obj_Found, &dev_Type); // for REDIRECT, make sure the type is correct, otherwise the // header is printed and no devices if ((dev_Type == GET_RAID_REDIRECT) && (obj_Found)) { err = engine->Send(MSG_GET_INFO, obj_Tag); if (engine->devInfo_P->raidType != RAID_TYPE_REDIRECT) continue; } if (obj_Found) { obj_Address = DPT_Tag_to_Address(obj_Tag, &tag_Valid); if (!tag_Valid) continue; // send msg to device to get the raid parent info engine->Send(MSG_GET_INFO, obj_Tag); // if raid parent is not 0xffffffff, then this device // is the member of an array if (engine->devInfo_P->raidParent != -1) continue; switch(dev_Type) { case GET_RAID: dev_Type = GET_ARRAY; case GET_SCSI_DASD: case GET_RAID_REDIRECT: case GET_ARRAY: case GET_RAID_HOT_SPARE: case GET_SCSI_CD_ROM: case GET_SCSI_SASD: if (first_time_through) { output.add_Item (EventStrings[STR_LIST_CACHE_HEADER]); output.add_Item (STR_DEV_DIVIDING_LINE); first_time_through = false; } err |= List_This_Device(output, obj_Tag, dev_Type); output.add_Item( "\n" ); // print elements of the array if (dev_Type == GET_ARRAY) { int comp_Index; dptID_S *idlist = new dptID_S[PHYS_LIST_SIZE]; // get number of components in this array int numComps = EngineFindIDs(FID_RESET_OUTBUFF, MSG_ID_ALL_COMPONENTS, obj_Tag, idlist, PHYS_LIST_SIZE); for (comp_Index = 0; comp_Index < numComps; ++comp_Index) { err |= engine->Send(MSG_GET_INFO, idlist[comp_Index].tag); // list this raid err |= List_This_Device(output, idlist[comp_Index].tag, dev_Type); output.add_Item( "\n" ); } delete [] idlist; } break; } } } if( first_time_through == true ) { err |= Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; } EXIT(); return( err ); } Command::Dpt_Error List_Device::List_Devices( String_List &output) { ENTER( "Command::Dpt_Error List_Device::List_Devices(" ); int dev_Index; bool more_Devs_Left = true; Dpt_Error err; bool filter_This_Out = false; bool first_time_through = true; for( dev_Index = 0; more_Devs_Left && !err.Is_Error(); dev_Index++ ) { DPT_TAG_T hba_Tag; hba_Tag = Get_HBA_by_Index(dev_Index, &more_Devs_Left); dptNVRAM_S nvram_Buf; if (hba_Tag != -1) { engine->Reset(); err = engine->Send( MSG_GET_NV_INFO, hba_Tag ); if( !err.Is_Error() ) { engine->Extract( &nvram_Buf, sizeof( nvram_Buf )) ; unsigned char NvOemFlags; // // Pull out the flags field where the bit resides // NvOemFlags = nvram_Buf.getOEMflags(); // // If the bit is set, clear our show cache flag // if(NvOemFlags & NV_HIDE_CACHE) showCache = false; else { showCache = true; break; } } } } more_Devs_Left = true; for( dev_Index = 0; more_Devs_Left && !err.Is_Error(); dev_Index++ ) { get_Devs_Type devs_Type; DPT_TAG_T this_Objs_Tag; switch(list_What) { case LIST_VERSION: case LIST_CONTROLLERS: case LIST_BATTERY: devs_Type = GET_SCSI_HBA; // CR2072 - can specify hba or get all if (obj_Root.hba != -1) this_Objs_Tag = Get_HBA_by_Index( obj_Root.hba, &more_Devs_Left); else this_Objs_Tag = Get_HBA_by_Index( dev_Index, &more_Devs_Left); filter_This_Out = false; break; default: this_Objs_Tag = Get_Dev_by_Index( obj_Root.hba, dev_Index, &more_Devs_Left, &devs_Type ); if (devs_Type == GET_SCSI_HBA) { filter_This_Out = true; } else { filter_This_Out = false; } break; } if( more_Devs_Left && !filter_This_Out ) { if( first_time_through == true ) { switch(list_What) { case LIST_VERSION: { if (showCache) output.add_Item(EventStrings[STR_LIST_DEV_VERSION_HEADER]); else output.add_Item(EventStrings[STR_LIST_DEV_VERSION_HEADER_NO_CACHE]); // CR2072 - if hba specified, get out of for() if (obj_Root.hba != -1) more_Devs_Left = false; } break; case LIST_CONTROLLERS: { if (showCache) output.add_Item(EventStrings[STR_LIST_DEV_CTLR_HEADER]); else output.add_Item(EventStrings[STR_LIST_DEV_CTLR_HEADER_NO_CACHE]); // CR2072 - if hba specified, get out of for() if (obj_Root.hba != -1) more_Devs_Left = false; } break; case LIST_BATTERY: output.add_Item(EventStrings[STR_LIST_BATTERY_HEADER]); if (obj_Root.hba != -1) more_Devs_Left = false; break; default: if (printDummyStr) output.add_Item(EventStrings[STR_PHYSICAL_VIEW]); output.add_Item(EventStrings[STR_LIST_DEV_PHYS_HEADER]); break; } output.add_Item( STR_DEV_DIVIDING_LINE ); first_time_through = false; } if (list_What == LIST_BATTERY) err |= List_Battery_Info( output, this_Objs_Tag); else err |= List_This_Device( output, this_Objs_Tag, devs_Type); output.add_Item( "\n" ); } } if ( first_time_through == true ) { err |= Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; } EXIT(); return( err ); } Command::Dpt_Error List_Device::List_Inquiry( String_List &output) { ENTER( "Command::Dpt_Error List_Device::List_Inquiry(" ); int dev_Index; bool more_Devs_Left = true; Dpt_Error err; bool filter_This_Out = false; bool first_time_through = true; for( dev_Index = 0; more_Devs_Left && !err.Is_Error(); dev_Index++ ) { get_Devs_Type devs_Type; DPT_TAG_T this_Objs_Tag; this_Objs_Tag = Get_Dev_by_Index( obj_Root.hba, dev_Index, &more_Devs_Left, &devs_Type ); if( devs_Type == GET_SCSI_HBA ) filter_This_Out = true; else filter_This_Out = false; if( more_Devs_Left && !filter_This_Out ) { if( first_time_through == true ) { output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER]); output.add_Item( STR_DEV_DIVIDING_LINE ); first_time_through = false; } err |= List_This_Device( output, this_Objs_Tag, devs_Type); output.add_Item( "\n" ); } } if ( first_time_through == true ) { err |= Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; } else { output.add_Item( "\n"); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP1]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP2]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP3]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP4]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP5]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP6]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP7]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP8]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP9]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP10]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP11]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_MAP12]); output.add_Item(EventStrings[STR_LIST_INQUIRY_HEADER_KEY]); } EXIT(); return( err ); } Command::Dpt_Error List_Device::List_Battery_Info( String_List &output, DPT_TAG_T hbaTag) { Dpt_Error err; Dpt_Error tempErr; dptBatteryInfo_S batteryInfo; char temp_Buf[BUF_LEN]; err = engine->Send (MSG_GET_INFO, hbaTag); if (!err.Is_Error ()) { dptCaddr_S *addr_P = &engine->devInfo_P->addr; sprintf (temp_Buf, "d%d", addr_P->hba); output.add_Item (temp_Buf); output.add_Item (Strip_Trailing_Whitespace (engine->devInfo_P->vendorID)); output.add_Item (Strip_Trailing_Whitespace (engine->devInfo_P->productID)); // if board doesn't have battery, will return err tempErr = engine->Send (MSG_GET_BATTERY_INFO, hbaTag); if (tempErr.Is_Error() || (engine->Extract(&batteryInfo, sizeof(batteryInfo)) == 0)) { output.add_Item (EventStrings[STR_NO_BATTERY]); memset (&batteryInfo, 0, sizeof(batteryInfo)); return (err); // return no error } // status - battery status values (from get_info.h) GetBatteryEventString((uSHORT) batteryInfo.status, temp_Buf); output.add_Item (temp_Buf); /* switch (batteryInfo.status) { // No battery was detected case BATTERY_STAT_NO_BATTERY: output.add_Item (EventStrings[STR_NO_BATTERY]); break; // Battery is charging case BATTERY_STAT_FAST_CHARGE: output.add_Item (EventStrings[STR_BBU_CHARGING]); break; // Battery is discharging case BATTERY_STAT_DISCHARGE: output.add_Item (EventStrings[STR_BBU_DISCHARGING]); break; // A full-charge is less than predictive failure threshold case BATTERY_STAT_BAD: output.add_Item (EventStrings[STR_BBU_BAD]); break; // Battery is fully charged case BATTERY_STAT_FULL: case BATTERY_STAT_TRICKLE_CHARGE: output.add_Item (EventStrings[STR_BBU_FULL]); break; // Initial calibration charge case BATTERY_STAT_INIT_CHARGE: output.add_Item (EventStrings[STR_BBU_INIT_CHARGE]); break; // Initial calibration discharge case BATTERY_STAT_INIT_DISCHARGE: output.add_Item (EventStrings[STR_BBU_INIT_DISCHARGE]); break; // Initial calibration recharge case BATTERY_STAT_INIT_RECHARGE: output.add_Item (EventStrings[STR_BBU_INIT_RECHARGE]); break; // Maintenance calibration charge case BATTERY_STAT_MAINTENANCE_CHARGE: output.add_Item (EventStrings[STR_BBU_MAINT_CHARGE]); break; // Maintenence calibration discharge case BATTERY_STAT_MAINTENANCE_DISCHARGE: output.add_Item (EventStrings[STR_BBU_MAINT_DISCHARGE]); break; // unknown/invalid default: output.add_Item (EventStrings[STR_UNKNOWN]); break; }*/ // voltage sprintf (temp_Buf, EventStrings[STR_FILLIN_MV], batteryInfo.voltage); output.add_Item (temp_Buf); // current sprintf (temp_Buf, EventStrings[STR_FILLIN_MA], batteryInfo.current); output.add_Item (temp_Buf); // full capacity sprintf (temp_Buf, EventStrings[STR_FILLIN_MAH], batteryInfo.fullChargeCapacity); output.add_Item (temp_Buf); // remaining capacity sprintf (temp_Buf, EventStrings[STR_FILLIN_MAH], batteryInfo.remainingCapacity); output.add_Item (temp_Buf); // remaining time int nHours = batteryInfo.remainingTime / 60; sprintf (temp_Buf, EventStrings[STR_FILLIN_HRS], nHours); output.add_Item (temp_Buf); } return (err); } Command::Dpt_Error List_Device::List_This_Device( String_List &output, DPT_TAG_T this_Objs_Tag, get_Devs_Type devs_Type ) { ENTER( "Command::Dpt_Error List_Device::List_This_Device(" ); Dpt_Error err; const long ONE_K = 1024; add_plus = false; err = engine->Send (MSG_GET_INFO, this_Objs_Tag); if( !err.Is_Error() ) { dptCaddr_S *addr_P = &engine->devInfo_P->addr; char *obj_Type_Str = EventStrings[STR_UNKNOWN]; char *raid_Type_Ptr = 0; bool show_Capacity = false; long capacity_in_Mb; long cache_Size_in_Mb = -1; char temp_Buf[BUF_LEN]; int indent = 0; { long capacity_in_Kb; capacity_in_Kb = (engine->devInfo_P->capacity.maxLBA + 1) / 2; capacity_in_Mb = capacity_in_Kb / ONE_K; } switch( devs_Type ) { case GET_ARRAY: SHOW_REDIRECT_DASD: if ( engine->devInfo_P->raidParent != (DPT_TAG_T)-1 ) { indent = 1; err = engine->Send( MSG_GET_INFO, engine->devInfo_P->raidParent ); if(( !err.Is_Error() ) && ( engine->devInfo_P->raidParent != (DPT_TAG_T)-1 )) { indent = 2; } // Reread err = engine->Send( MSG_GET_INFO, this_Objs_Tag ); save_indent = indent; } else { if ((engine->devInfo_P->raidType == RAID_TYPE_HOT_SPARE) && (save_indent > 0)) indent = save_indent; } switch ( engine->devInfo_P->raidType ) { case RAID_TYPE_0: obj_Type_Str = EventStrings[STR_RAID_0]; show_Capacity = true; goto SHOW_PHYSICAL; break; case RAID_TYPE_1: obj_Type_Str = EventStrings[STR_RAID_1]; show_Capacity = true; goto SHOW_PHYSICAL; break; case RAID_TYPE_5: obj_Type_Str = EventStrings[STR_RAID_5]; show_Capacity = true; goto SHOW_PHYSICAL; break; case RAID_TYPE_HOT_SPARE: obj_Type_Str = EventStrings[STR_RAID_HOT_SPARE]; add_plus = true; break; // what is going on here? this is never reached! kds goto SHOW_PHYSICAL; case RAID_TYPE_REDIRECT: if (engine->devInfo_P->flags2 & FLG_DEV_MANUAL_JBOD_CONFIGURED) obj_Type_Str = EventStrings[STR_RAID_JBOD]; else obj_Type_Str = EventStrings[STR_RAID_REDIRECT]; show_Capacity = true; goto SHOW_PHYSICAL; break; default: obj_Type_Str = EventStrings[STR_SCSI_DASD]; break; } show_Capacity = true; case GET_SCSI_DASD: //if ((engine->devInfo_P->raidType & RAID_TYPE_REDIRECT) && (engine->devInfo_P->flags2 & FLG_DEV_MANUAL_JBOD_CONFIGURED)) obj_Type_Str = EventStrings[STR_SCSI_DASD]; show_Capacity = true; SHOW_PHYSICAL: Show_Physical(output, obj_Type_Str, indent, show_Capacity, capacity_in_Mb, this_Objs_Tag, devs_Type); break; case GET_SCSI_SASD: obj_Type_Str = EventStrings[STR_SCSI_SASD]; show_Capacity = false; goto SHOW_PHYSICAL; case GET_SCSI_WORM: obj_Type_Str = EventStrings[STR_SCSI_WORM]; show_Capacity = true; goto SHOW_PHYSICAL; case GET_SCSI_JUKEBOX: obj_Type_Str = EventStrings[STR_SCSI_JUKEBOX]; show_Capacity = false; goto SHOW_PHYSICAL; case GET_SCSI_CD_ROM: obj_Type_Str = EventStrings[STR_SCSI_CD_ROM]; show_Capacity = false; goto SHOW_PHYSICAL; case GET_SCSI_OPTICAL: obj_Type_Str = EventStrings[STR_SCSI_OPTICAL]; show_Capacity = true; goto SHOW_PHYSICAL; case GET_SCSI_PRINTER: obj_Type_Str = EventStrings[STR_SCSI_PRINTER]; output.add_Item( obj_Type_Str ); break; case GET_SCSI_PROCESSOR: if (strstr(engine->devInfo_P->vendorExtra, EventStrings[STR_SAFTE])) obj_Type_Str = EventStrings[STR_SAFTE]; else obj_Type_Str = EventStrings[STR_SCSI_PROCESSOR]; goto SHOW_PHYSICAL; break; case GET_SCSI_SCANNER: obj_Type_Str = EventStrings[STR_SCSI_SCANNER]; output.add_Item( obj_Type_Str ); break; case GET_SCSI_PRO_ROOT: obj_Type_Str = EventStrings[STR_SCSI_PRO_ROOT]; output.add_Item( obj_Type_Str ); break; case GET_SCSI_PRO_CONNECTION: obj_Type_Str = EventStrings[STR_SCSI_PRO_CONNECTION]; output.add_Item( obj_Type_Str ); break; case GET_SCSI_HBA: { dptHBAinfo_S *hba_Info = engine->hbaInfo_P; obj_Type_Str = EventStrings[STR_HBA]; { long cache_Size_in_Kb; cache_Size_in_Kb = hba_Info->memSize; cache_Size_in_Mb = cache_Size_in_Kb / ONE_K / ONE_K; } sprintf ( temp_Buf, "d%d", addr_P->hba ); output.add_Item( temp_Buf ); switch (list_What) { case LIST_VERSION: case LIST_TAGS: break; default: { DPTControllerMap map; for ( int bus = 0; bus < 3; ++bus ) { char * String = map.getChannelString( addr_P->hba, bus ); output.add_Item( ( *String == 'c' ) ? String : ( hba_Info->chanInfo[bus].flags ? "--" : " " )); delete [] String; } } break; } output.add_Item( Strip_Trailing_Whitespace( engine->devInfo_P->vendorID ) ); output.add_Item( Strip_Trailing_Whitespace( engine->devInfo_P->productID ) ); if (list_What == LIST_TAGS) return (err); char hbaRevision[5]; strcpy(hbaRevision,hba_Info->revision); dptNVRAM_S nvram_Buf; uCHAR NvOemFlags = 0; engine->Reset(); err = engine->Send( MSG_GET_NV_INFO, this_Objs_Tag ); if( !err.Is_Error() ) { engine->Extract( &nvram_Buf, sizeof( nvram_Buf )) ; // // Pull out the flags field where the bit resides // NvOemFlags = nvram_Buf.getOEMflags(); } // // If the bit is set, clear our show cache flag // if(NvOemFlags & NV_HIDE_CACHE) { sprintf(temp_Buf, " "); output.add_Item( temp_Buf ); } else { sprintf(temp_Buf, "%ld%s", cache_Size_in_Mb, EventStrings[STR_MB]); output.add_Item( temp_Buf ); } output.add_Item(hbaRevision); engine->Reset(); engine->Insert( (uCHAR)0x2E ); // NVRAM page engine->Insert( (uCHAR)0x40 ); // Interpret and current // get the defaults page Dpt_Error status; status = engine->Send( MSG_GET_MODE_PAGE, this_Objs_Tag ); temp_Buf[0] = '\0'; if( status.Success() ) { if (( engine->Extract( temp_Buf, 108 ) == 0 ) || ( engine->Extract( temp_Buf, 8 ) == 0 )) { temp_Buf[0] = '\0'; } else { temp_Buf[8] = '\0'; } } output.add_Item( temp_Buf ); temp_Buf[0] = '\0'; if( status.Success() ) { if ( engine->Extract( temp_Buf, 15 ) == 0 ) { temp_Buf[0] = '\0'; } else { char * String = temp_Buf; temp_Buf[15] = '\0'; while (*String && ((('0' <= *String) && (*String <= '9')) || (('A' <= *String) && (*String <= 'Z')) || (*String == '-'))) { ++String; } *String = '\0'; } } } switch (list_What) { case LIST_VERSION: // print BIOS and SMOR versions GetSmorBiosSignatures(this_Objs_Tag, output); // print serial # output.add_Item( temp_Buf ); break; default: // print serial # output.add_Item( temp_Buf ); // print controller status dptHBAinfo_S hbaInfo; engine->Reset(); err |= engine->Send( MSG_GET_INFO, this_Objs_Tag ); if ( !err.Is_Error() ) engine->Extract( &hbaInfo, sizeof(dptHBAinfo_S) ); { Dpt_Status status(this_Objs_Tag); if ( ( !err.Is_Error() ) && ( hbaInfo.status.flags & FLG_STAT_ALARM_ON ) ) { #if defined _DPT_SOLARIS output.add_Item(EventStrings[STR_ALARM]); output.add_Item(" "); output.add_Item(EventStrings[STR_ON]); #else output.add_Item(EventStrings[STR_DEGRADED]); #endif } else output.add_Item ((char *)status); } break; } break; case GET_SCSI_BCD: obj_Type_Str = EventStrings[STR_SCSI_BRIDGE_CTLR]; break; case GET_RAID_BCD: obj_Type_Str = EventStrings[STR_RAID_BRIDGE_CTLR]; break; case GET_RAID_REDIRECT: obj_Type_Str = EventStrings[STR_RAID_REDIRECT]; switch( engine->devInfo_P->raidType ) { case RAID_TYPE_REDIRECT: { show_Capacity = true; Show_Physical(output, obj_Type_Str, indent, show_Capacity, capacity_in_Mb, this_Objs_Tag, devs_Type); output.add_Item( "\n" ); int comp_Index; bool more_Comp_Left = true; get_Devs_Type comp_Type; DPT_TAG_T this_Comp_Tag; for(comp_Index = 0; more_Comp_Left; ++comp_Index) { this_Comp_Tag = Get_Component(this_Objs_Tag, comp_Index, &more_Comp_Left, &comp_Type); if((more_Comp_Left) && (comp_Type == GET_SCSI_DASD)) { err |= List_This_Device(output, this_Comp_Tag, devs_Type); output.add_Item( "\n" ); } } } break; case RAID_TYPE_0: case RAID_TYPE_1: case RAID_TYPE_5: case RAID_TYPE_HOT_SPARE: return (err); default: goto SHOW_REDIRECT_DASD; } break; case GET_RAID: case GET_RAID_HOT_SPARE: case GET_ARRAYNAME: obj_Type_Str = EventStrings[STR_RAID]; switch( engine->devInfo_P->raidType ) { case RAID_TYPE_0: raid_Type_Ptr = EventStrings[STR_RAID_0]; { bool obj_Found = false; get_Devs_Type dev_Type; DPT_TAG_T component; component = Get_Component(this_Objs_Tag, 0, &obj_Found, &dev_Type); if (( obj_Found ) && ( dev_Type == GET_RAID )) { err |= engine->Send( MSG_GET_INFO, component ); switch( engine->devInfo_P->raidType ) { case RAID_TYPE_1: raid_Type_Ptr = EventStrings[STR_RAID_10]; break; case RAID_TYPE_5: raid_Type_Ptr = EventStrings[STR_RAID_50]; break; } } } // Re-Read the device information. err |= engine->Send( MSG_GET_INFO, this_Objs_Tag ); goto PRINT_RAID; case RAID_TYPE_1: if ( engine->devInfo_P->raidParent != (DPT_TAG_T)-1 ) { return (err); } raid_Type_Ptr = EventStrings[STR_RAID_1]; goto PRINT_RAID; case RAID_TYPE_5: if ( engine->devInfo_P->raidParent != (DPT_TAG_T)-1 ) { return (err); } raid_Type_Ptr = EventStrings[STR_RAID_5]; goto PRINT_RAID; PRINT_RAID: // we don't support logical drive numbers (yet) if (devs_Type == GET_ARRAYNAME) obj_Type_Str = (char *)engine->devInfo_P->dptName; else obj_Type_Str = raid_Type_Ptr; show_Capacity = true; goto SHOW_PHYSICAL; #if 0 output.add_Item( "?" ); output.add_Item( Strip_Trailing_Whitespace( engine->devInfo_P->productID ) ); { DPTControllerMap map; char * String = map.getTargetString( addr_P->hba, addr_P->chan, addr_P->id, addr_P->lun ); output.add_Item( String ); delete [] String; } sprintf( temp_Buf, "%ld%s", capacity_in_Mb, EventStrings[STR_MB]); output.add_Item( temp_Buf ); { Dpt_Status status(this_Objs_Tag); output.add_Item ( (char *)status ); } output.add_Item( raid_Type_Ptr ); break; #endif case RAID_TYPE_HOT_SPARE: raid_Type_Ptr = EventStrings[STR_RAID_HOT_SPARE]; goto PRINT_STANDALONE; case RAID_TYPE_REDIRECT: if (engine->devInfo_P->flags2 & FLG_DEV_MANUAL_JBOD_CONFIGURED) raid_Type_Ptr = EventStrings[STR_RAID_JBOD]; else raid_Type_Ptr = EventStrings[STR_RAID_REDIRECT]; goto PRINT_RAID; PRINT_STANDALONE: { DPTControllerMap map; char * String = map.getTargetString( addr_P->hba, addr_P->chan, addr_P->id, addr_P->lun ); output.add_Item( String ); delete [] String; } sprintf( temp_Buf, "%ld%s", capacity_in_Mb, EventStrings[STR_MB]); output.add_Item( temp_Buf ); output.add_Item( raid_Type_Ptr ); break; default: // Added by Qi Zhu (Show the physical address of Hot spare) if (engine->devInfo_P->raidParent!=(DPT_TAG_T)-1) { { DPTControllerMap map; char * String = map.getTargetString( addr_P->hba, addr_P->chan, addr_P->id, addr_P->lun); sprintf(temp_Buf, "%*s%s", 1, "", String); output.add_Item(temp_Buf); delete [] String; } sprintf( temp_Buf, "%ld%s",capacity_in_Mb, EventStrings[STR_MB]); output.add_Item( temp_Buf ); output.add_Item( EventStrings[STR_RAID_HOT_SPARE]); }else { raid_Type_Ptr = EventStrings[STR_UNKNOWN]; } break; } break; } } EXIT(); return( err ); } //============================================================================= // //Name: DeviceMibInterface_C::GetSmorBiosSignatures // //Abstract: Searches HBA's flash memory for DPT SIG structures to create // signature strings for the BIOS and SMOR's versions // //Parameters: hbaNumber_in - index into global HBA table structures // //Return Values: None // //Error Codes: // //Global Variables Affected: // //Notes: // //----------------------------------------------------------------------------- void List_Device::GetSmorBiosSignatures(DPT_TAG_T hba_Tag, String_List &output) { // // Save some data from the engine (I have no idea what this data is). // size_t saveSize = engine->fromEng_P->allocSize + sizeof(dptData_S) - 1; void *saveData = new char[saveSize]; if ( saveData != NULL ) { memcpy(saveData, engine->fromEng_P, saveSize); } // // Get the BIOS version number from flash memory. No exceptions so check the // first byte of the signature and make sure it isn't zero. // BiosFlashMemory biosFlash(*engine, hba_Tag); dpt_sig_S biosSignature = biosFlash.GetSignature(); if ( biosSignature.dsSignature[0] != 0 ) { char version[10]; sprintf(version, "%d.%c%c", biosSignature.dsVersion, biosSignature.dsRevision, biosSignature.dsSubRevision); output.add_Item(version); } else { output.add_Item(""); } // // Get the SMOR version number from flash memory. No exceptions so check the // first byte of the signature and make sure it isn't zero. // SmorFlashMemory smorFlash(*engine, hba_Tag); dpt_sig_S smorSignature = smorFlash.GetSignature(); if ( smorSignature.dsSignature[0] != 0 ) { dpt_sig_S &sig = smorSignature; char build[8]; build[0] = '\0'; // Look to see if we've got something like // "xxxx xxxx xxx Vn.nn/bbb mm/dd/yyyy" and if so get the build string // out and chop off all but the textual part of description for (int i = 0; i < (int) strlen(sig.dsDescription) - 3; i++) { if (sig.dsDescription[i] == 'V' && isdigit(sig.dsDescription[i+1]) && sig.dsDescription[i+2] == '.') { int j; // Back up and terminated textual part of description for (j = i - 1; j > 0; j--) { if (sig.dsDescription[j] != ' ') { sig.dsDescription[j + 1] = '\0'; break; } } // See if we can find the build number (after a '/' and // before a space) for (j = i; sig.dsDescription[j] != '\0'; j++) { if (sig.dsDescription[j] == ' ') break; if (sig.dsDescription[j] == '/') { int k; for (k = 0; k < sizeof(build) && sig.dsDescription[j + k] != ' ' && sig.dsDescription[j + k] != '\0'; k++) { build[k] = sig.dsDescription[j + k]; } build[k] = '\0'; break; } } break; } } char version[10]; sprintf(version, "%d.%c%c%s", sig.dsVersion, sig.dsRevision, sig.dsSubRevision, build); output.add_Item(version); } else { output.add_Item(""); } // Restore the information we saved if (saveData != 0) memcpy(engine->fromEng_P, saveData, saveSize); // Deallocate Memory delete [] saveData; } //List_Device::GetSmorBiosSignatures Command &List_Device::Clone() const { ENTER( "Command &List_Device::Clone() const" ); EXIT(); return( *new List_Device( *this ) ); } void List_Device::Show_Physical(String_List &output, char * obj_Type_Str, int indent, bool show_Capacity, long capacity_in_Mb, DPT_TAG_T this_Objs_Tag, get_Devs_Type devs_Type) { dptCaddr_S *addr_P = &engine->devInfo_P->addr; int i = 0; char temp_Buf[BUF_LEN]; char temp2[21]; uCHAR caps = engine->devInfo_P->inqFlag2; Dpt_Error err; DPTControllerMap map; char * String = map.getTargetString( addr_P->hba, addr_P->chan, addr_P->id, addr_P->lun); if (add_plus) sprintf(temp_Buf, "%*s+%s", indent, "", String); else sprintf(temp_Buf, "%*s%s", indent, "", String); delete [] String; output.add_Item(temp_Buf); switch (list_What) { case LIST_INQUIRY_VENDOR: case LIST_INQUIRY: case LIST_CACHE: break; default: output.add_Item(obj_Type_Str); break; } if (list_What == LIST_TAGS) return; output.add_Item(Strip_Trailing_Whitespace(engine->devInfo_P->vendorID)); if (strcmp(obj_Type_Str, "Redirect")) output.add_Item(Strip_Trailing_Whitespace(engine->devInfo_P->productID)); else output.add_Item(" "); // output.add_Item(vendor_Product_Info_Buf); switch (list_What) { case LIST_CACHE: Show_Cache_Mode(this_Objs_Tag, devs_Type, output); break; case LIST_INQUIRY_VENDOR: case LIST_INQUIRY: { uCHAR ScsiCmd[12]; // print FW version // Added by Qi Zhu: 8 bytes for Maxtor if (showvendor==true) { char maxtor_buf[9]; memset(maxtor_buf,0,sizeof(maxtor_buf)); memcpy(maxtor_buf, engine->devInfo_P->vendorExtra+8, sizeof(maxtor_buf)); output.add_Item(maxtor_buf); }else { output.add_Item(engine->devInfo_P->revision); } // print serial number engine->Reset(); engine->Insert((uSHORT)CP_DATA_IN); engine->Insert((uLONG)255); // inquiry length ScsiCmd[0] = SC_INQUIRY; ScsiCmd[1] = FLG_SCSI_EVPD; ScsiCmd[2] = 0x80; ScsiCmd[3] = 0; ScsiCmd[4] = 255; // inquiry length ScsiCmd[5] = 0; engine->Insert(ScsiCmd, 12); err = engine->Send (MSG_SCSI_CMD, this_Objs_Tag); if (!err.Is_Error()) { uCHAR result[255]; engine->Extract (result, 255); // length of result message is in result[3], regardless, // stop at 20 b/c that is all the room allocated in output for (i = 0; i < result[3] && (i < 20); i++) { if (isprint(result[i + 4])) temp2[i] = result[i + 4]; else break; } } else { strcpy(temp2, "-------"); i = 7; } temp2[i] = '\0'; output.add_Item(temp2); // end, reset to continue engine->Reset(); engine->Send (MSG_GET_INFO, this_Objs_Tag); // Mark X or - or O for Capabilities // Order of these capabilities (in "caps"): // soft reset, command queueing, --, linked commands, // synch, Wide 16, wide 32, Relative Address int check; for (check = 1, i = 0; i < 8; i++, check = 1 << i) { if (check == 4) continue; if (caps & check) output.add_Item("X"); else output.add_Item("-"); } // SCSI II if (engine->devInfo_P->version == 2) output.add_Item("X"); else output.add_Item("-"); // SMART if (engine->devInfo_P->flags2 & FLG_DEV_SMART_ACTIVE) output.add_Item("X"); else output.add_Item("-"); // SCAM // if adapter doesn't support, put O if (!(engine->hbaInfo_P->flags2 & FLG_HBA_SCAM)) output.add_Item("O"); // else get the capability else { dptChanInfo_S *ChanInfo_P; // this is for future 4th channel if (engine->devInfo_P->addr.chan < 3) ChanInfo_P = &engine->hbaInfo_P->chanInfo[engine->devInfo_P->addr.chan]; else ChanInfo_P = &engine->hbaInfo_P->chan4; if (ChanInfo_P->scamIdMap & (1 << engine->devInfo_P->addr.id)) output.add_Item("X"); else output.add_Item("-"); } // SCSI-3 if (engine->devInfo_P->version == 3) output.add_Item("X"); else output.add_Item("-"); // SAF-TE if (engine->devInfo_P->flags2 & FLG_DEV_SAFTE) output.add_Item("X"); else output.add_Item("-"); } break; default: if(show_Capacity) { // show NO capacity if reserve conflict flag is set (usually during cluster environment on secondary node) if (capacity_in_Mb == 0 && (engine->devInfo_P->flags3 & FLG_DEV_RES_CONFLICT)){ output.add_Item(" "); } else{ sprintf( temp_Buf, "%ld%s", capacity_in_Mb, EventStrings[STR_MB]); output.add_Item(temp_Buf); } } else { output.add_Item("-----"); } { // show a Reserve State if reserve conflict flag is set (usually during cluster environment on secondary node) if (engine->devInfo_P->flags3 & FLG_DEV_RES_CONFLICT) output.add_Item("Reserved"); else{ Dpt_Status status(this_Objs_Tag); output.add_Item((char *)status); } } break; } } void List_Device::Show_Cache_Mode(DPT_TAG_T obj_Tag, get_Devs_Type devs_Type, String_List &output) { char Buffer[256]; for (int i = 0; i < CACHE_MODE_LEVELS; i++) { // SetCache the drive engine->Reset(); engine->Insert((uCHAR) 0x08); if (i == 0) // get info from hba (logical) engine->Insert((uCHAR) 0x60); else // get info from device (physical) engine->Insert((uCHAR) 0x40); // get the page Dpt_Error err = engine->Send(MSG_GET_MODE_PAGE, obj_Tag); if (err.Is_Error()) { output.add_Item(EventStrings[STR_ER]); } else { // i=0 is from the logical, i=1 is from the physical if (((devs_Type == GET_ARRAY) && (i > 0) && (engine->devInfo_P->raidParent == -1)) || ((devs_Type == GET_ARRAY) && (i == 0) && (engine->devInfo_P->raidParent != -1)) || ((devs_Type != GET_ARRAY) && (i > 0))) continue; engine->Extract(Buffer, sizeof(Buffer)); output.add_Item((Buffer[4] & 4) ? EventStrings[STR_WRITE_BACK] : EventStrings[STR_WRITE_THRU]); // If it is on, then check if the battery is affecting this if (Buffer[4] & 4) { // Only display a message if we have a forced write // through bit set. // Find the parent adapter, and ask it if it's battery // is OK. dptBatteryInfo_S batteryInfo; DPT_TAG_T hbaTag; if ((hbaTag = engine->devInfo_P->hbaTag) == 0) { hbaTag = engine->devInfo_P->attachedTo; } err = engine->Send( MSG_GET_BATTERY_INFO, hbaTag ); // don't save in totalErr - if board doesn't have battery, will return err //totalErr |= err; if (err.Is_Error() || (engine->Extract(&batteryInfo, sizeof(batteryInfo)) == 0)) { memset (&batteryInfo, 0, sizeof(batteryInfo)); } if(!err.Is_Error() && (batteryInfo.flags & BATTERY_FLAG_FORCED_WRITE_THROUGH)) { // Based on whether or not we are in one of the // following states display a message. switch (batteryInfo.status) { case BATTERY_STAT_MAINTENANCE_DISCHARGE: case BATTERY_STAT_MAINTENANCE_CHARGE: case BATTERY_STAT_INIT_CHARGE: case BATTERY_STAT_INIT_DISCHARGE: case BATTERY_STAT_INIT_RECHARGE: // Let the user know that the controller's // cache is in write through mode because we // are in a maint. or initial calibration // operation. output.add_Item (EventStrings[STR_OFF_DUE2_MAINT_OPER]); break; default: // Let the user know that their battery is // crapping out on them, because it has dropped // below the Auto write through threshold and // we are not in any type of calibration // operation. output.add_Item (EventStrings[STR_OFF_DUE2_BATTERY_COND]); } } } } // remove this line because going from 2 columns to 1 column // the column removed was the one that had "--" // if (i == 0) output.add_Item (" / "); } } Command::Dpt_Error List_Device::List_Tags( String_List &output) { ENTER( "Command::Dpt_Error List_Device::List_Tags(" ); int dev_Index; bool more_Devs_Left = true; Dpt_Error err; get_Devs_Type devs_Type; SCSI_Address addr; addr.hba = -1; addr.bus = -1; addr.id = -1; addr.lun = -1; output.add_Item(EventStrings[STR_LIST_TAGS_HEADER]); output.add_Item( STR_DEV_DIVIDING_LINE ); for (dev_Index = 0; more_Devs_Left && !err.Is_Error(); dev_Index++) { DPT_TAG_T this_Objs_Tag = Get_Address_by_Index (addr, dev_Index, &more_Devs_Left, &devs_Type ); if (more_Devs_Left) { char tempBuf[5]; sprintf (tempBuf, "%d", this_Objs_Tag); output.add_Item (tempBuf); err |= List_This_Device (output, this_Objs_Tag, devs_Type); output.add_Item ("\n"); } } EXIT(); return( err ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/listdev.hpp0000664000175000000620000001123410044153336020340 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LISTDEV_HPP #define LISTDEV_HPP /**************************************************************************** * * Created: 7/21/98 * ***************************************************************************** * * File Name: ListDev.hpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 23 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "scsiaddr.hpp" #include "bufio.h" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class List_Device: public Command { public: enum list_Type { LIST_INVALID_DEVICE_TYPE, LIST_LOGICALS, LIST_PHYSICALS, LIST_CONTROLLERS, LIST_HOT_SPARES, LIST_ARRAY, LIST_ALL, LIST_SPEED, LIST_REDIRECT, LIST_CACHE, LIST_VERSION, LIST_INQUIRY, LIST_BATTERY, LIST_TAGS, // Added by Qi Zhu, for disk Maxtor FW showing LIST_INQUIRY_VENDOR, LIST_ALL_VENDOR, LIST_ARRAYNAME }; // list all devices of this type... List_Device( list_Type what ); // list devices connected to this device... List_Device( list_Type what, SCSI_Address &address_to_List ); List_Device( const List_Device &right ); Dpt_Error List_Device_Speeds( String_List& output ); virtual ~List_Device(); Dpt_Error execute( String_List **output ); Command &Clone() const; private: Dpt_Error List_Log_Devices( String_List &output, get_Devs_Type devs_Type); Dpt_Error List_LSU_Devices( String_List &output); Dpt_Error List_Devices (String_List &output); Dpt_Error List_Tags(String_List &output); Dpt_Error List_Battery_Info( String_List &output, DPT_TAG_T hbaTag); Dpt_Error List_This_Device( String_List &output, DPT_TAG_T this_Objs_Tag, get_Devs_Type devs_Type); Dpt_Error List_This_Devices_Speed( int dev_chan, String_List &output, DPT_TAG_T this_Objs_Tag); Dpt_Error GetSpeedFromNvram (DPT_TAG_T this_Objs_Tag); Dpt_Error GetSpeedFromHW (int dev_chan); void Show_Physical(String_List &output, char * obj_Type_Str, int indent, bool show_Capacity, long capacity_in_Mb, DPT_TAG_T this_Objs_Tag, get_Devs_Type devs_Type); Dpt_Error List_Inquiry(String_List &output); void Show_Cache_Mode(DPT_TAG_T obj_Tag, get_Devs_Type devs_Type, String_List &output); void GetSmorBiosSignatures(DPT_TAG_T this_Objs_Tag, String_List &output); Dpt_Error Look_for_Hot_Spares (String_List &output, uLONG smallLBA, get_Devs_Type devs_Type); SCSI_Address obj_Root; list_Type list_What; bool printDummyStr; DPT_TAG_T hba_Tag; int save_indent; bool add_plus; uSHORT NvramMegaHertz; uSHORT HwMegaHertz; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/log_core.hpp0000664000175000000620000002331510044153336020462 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __LOG_CORE_HPP #define __LOG_CORE_HPP //File - LOG_CORE.HPP //*************************************************************************** // //Description: some of the most common things for the logger // // //Author: Bill Smith //Date: 10/3/95 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "eng_std.h" #include "osd_util.h" // SNMP trap event info #include "trapdef.h" #ifdef _DPT_NETWARE #include #endif #ifdef __UNIX__ #include "funcs.h" #endif //Definitions - Defines & Constants ----------------------------------------- #define TRUE 1 #define FALSE 0 #if !defined __MWERKS__ #if !defined false #define false FALSE #endif #if !defined true #define true TRUE # endif #endif // ini file string constants // name of the ini file #define INI_NAME "dptelog.ini" #define GLOBAL_GROUP_STR "Global Group" // max length of a filename const uSHORT MAX_FILENAME_LEN = 129; // the size of the to engine buffers const uLONG TO_ENG_BUFF_SIZE = 0x4000; // size of the global engine buffer, this is the max size // we should ever try to use, its big... 16k const uLONG GLOB_ENG_BUFF_SIZE = 0x4000; // // Logger_C types // const uLONG MGR_TYPE = 0x80000000; // event logging object types const uLONG LOGGER_TYPE_EVENT = 0x00000000; // event logger mgr const uLONG LOGGER_TYPE_EVENT_MGR = LOGGER_TYPE_EVENT | MGR_TYPE; // stats logger const uLONG LOGGER_TYPE_STATS = 0x00000001; // stats mgr const uLONG LOGGER_TYPE_STATS_MGR = LOGGER_TYPE_STATS | MGR_TYPE; // heart bet logger const uLONG LOGGER_TYPE_HB = 0x00000002; // heartbeat log mgr const uLONG LOGGER_TYPE_HB_MGR = LOGGER_TYPE_HB | MGR_TYPE; // unknown logger type const uLONG LOGGER_TYPE_UNKNOWN = 0xffffffff; // broadcaster types // debug broadcaster const uLONG BROADCASTER_TYPE_DEBUG = 0x0000000A; // debug broadcaster MGR const uLONG BROADCASTER_TYPE_DEBUG_MGR = BROADCASTER_TYPE_DEBUG | MGR_TYPE; // sys log broadcasters const uLONG BROADCASTER_TYPE_SYSLOG = 0x0000000B; const uLONG BROADCASTER_TYPE_SYSLOG_MGR = BROADCASTER_TYPE_SYSLOG | MGR_TYPE; // window broadcasters const uLONG BROADCASTER_TYPE_WINDOW = 0x0000000C; const uLONG BROADCASTER_TYPE_WINDOW_MGR = BROADCASTER_TYPE_WINDOW | MGR_TYPE; // a broadcast module interface opject const uLONG BROADCAST_TYPE_MODULE = 0x0000000D; // the NT event viewer broadcaster const uLONG BROADCASTER_TYPE_NT_EVENT = 0x0000000E; const uLONG BROADCASTER_TYPE_NT_EVENT_MGR = BROADCASTER_TYPE_NT_EVENT | MGR_TYPE; // the nt message broadcaster const uLONG BROADCASTER_TYPE_NT_MSG = 0x0000000F; const uLONG BROADCASTER_TYPE_NT_MSG_MGR = BROADCASTER_TYPE_NT_MSG | MGR_TYPE; // the netware message broadcaster const uLONG BROADCASTER_TYPE_NW_MSG = 0x00000010; const uLONG BROADCASTER_TYPE_NW_MSG_MGR = BROADCASTER_TYPE_NW_MSG | MGR_TYPE; // the nw console printf mananger const uLONG BROADCASTER_TYPE_CONSOLE = 0x00000011; const uLONG BROADCASTER_TYPE_CONSOLE_MGR = BROADCASTER_TYPE_CONSOLE | MGR_TYPE; // the mail broadcaster const uLONG BROADCASTER_TYPE_MAIL = 0x00000012; const uLONG BROADCASTER_TYPE_MAIL_MGR = BROADCASTER_TYPE_MAIL | MGR_TYPE; // the mail broadcaster const uLONG BROADCASTER_TYPE_DEVICE_WRITE = 0x00000013; const uLONG BROADCASTER_TYPE_DEVICE_WRITE_MGR = BROADCASTER_TYPE_DEVICE_WRITE | MGR_TYPE; // the mail broadcaster const uLONG BROADCASTER_TYPE_USER_WRITE = 0x00000014; const uLONG BROADCASTER_TYPE_USER_WRITE_MGR = BROADCASTER_TYPE_USER_WRITE | MGR_TYPE; // the MAPI broadcaster const uLONG BROADCASTER_TYPE_MAPI = 0x00000015; const uLONG BROADCASTER_TYPE_MAPI_MGR = BROADCASTER_TYPE_MAPI | MGR_TYPE; // the SNMP broadcaster const uLONG BROADCASTER_TYPE_SNMP = 0x00000016; const uLONG BROADCASTER_TYPE_SNMP_MGR = BROADCASTER_TYPE_SNMP | MGR_TYPE; // the AIX log file broadcaster const uLONG BROADCASTER_TYPE_AIXLOG = 0x00000017; const uLONG BROADCASTER_TYPE_AIXLOG_MGR = BROADCASTER_TYPE_AIXLOG | MGR_TYPE; // the NT audio file broadcaster const uLONG BROADCASTER_TYPE_AUDIO = 0x00000018; const uLONG BROADCASTER_TYPE_AUDIO_MGR = BROADCASTER_TYPE_AUDIO | MGR_TYPE; // the MAPI broadcaster const uLONG BROADCASTER_TYPE_TAPI = 0x00000019; const uLONG BROADCASTER_TYPE_TAPI_MGR = BROADCASTER_TYPE_TAPI | MGR_TYPE; // the XMT_EVT broadcaster const uLONG BROADCASTER_TYPE_XMT_EVT = 0x0000001b; const uLONG BROADCASTER_TYPE_XMT_EVT_MGR = BROADCASTER_TYPE_XMT_EVT | MGR_TYPE; // // errors // // error creating an object const uLONG ERR_LOGGER_MEM = 0x00000001; // error opening a log file const uLONG ERR_OPEN_LOG_FILE = 0x00000002; // required deivce for this log mgr to operate properly does // not exists const uLONG ERR_REQUIRED_DEVICE = 0x00000004; // errors initializing the engine // incompatablie const uLONG ERR_NOT_COMPAT = 0x00000008; // can't open, ie find const uLONG ERR_OPEN_ENGINE = 0x00000010; // modules didn't load const uLONG ERR_LOADING_MODULE = 0x00000020; // the FW in the hba was less that what is required for stats logging const uLONG ERR_SLOG_FW_VERSION = 0x00000040; // there was an error creating a semaphore const uLONG ERR_SEM_CREATE = 0x00000080; // could not create the AIX error template const uLONG ERR_AIX_LOGGER = 0x00000100; // // broadcaster specialty flags const uLONG SPFLG_OS2_WININTIALIZE = 0x00000001; // the number of possible machines/users we will broadcast to #define MAX_NUM_BROADCAST_USERS 10 #define MAX_USERNAME_LEN 50 //Definitions - Structure & Typedef ----------------------------------------- //struct - LoggerID_S - start //=========================================================================== // //Description: this is the Logger ID structure // // // //--------------------------------------------------------------------------- struct LoggerID_S { // tag and a type similar to dptID_S uLONG tag, type; }; // - end //class - LogError_C - start //=========================================================================== // //Description: goes the error handling // // // //--------------------------------------------------------------------------- class LogError_C { public: LogError_C() { errorFlags = 0; }; virtual ~LogError_C() {}; // get errors uLONG GetError() { return(errorFlags); }; // set the error flag void SetError(uLONG x) { errorFlags |= x; } private: // error flags uLONG errorFlags; }; // - end //class - LoggerCore_C - start //=========================================================================== // //Description: used to have logger tags and logger types // // // //--------------------------------------------------------------------------- class LoggerCore_C : public LogError_C { public: // used to assign the logger type LoggerCore_C(uLONG newType) { // assign the tag and increment it id.tag = nextTag++; //assign the type id.type = newType; } // returns the tag assigned by the logger DPT_TAG_T GetLoggerTag() { return(id.tag); }; // return the logger type uLONG GetLoggerType() { return(id.type); }; // return the id LoggerID_S * GetID() // possibly pass in engine buffer or memcpy passed { return(&id); }; // in pointer private: // logger id structure LoggerID_S id; // the number of the next tag to be assigned static DPT_TAG_T nextTag; }; //struct - AdditionEventInfo_S - start //=========================================================================== // //Description: this is additional event info sent to the broadcaster that needs // to be filled in before they get it // // // //--------------------------------------------------------------------------- struct AdditionalEventInfo_S { // SNMP trap info for both the actual and resultant events snmpTrapVars_S actualTrap; snmpTrapVars_S resultantTrap; }; // - end //Variables - External ------------------------------------------------------ //Variables - Global -------------------------------------------------------- //Variables - File Scope ---------------------------------------------------- //Prototypes - function ----------------------------------------------------- #endif raidutils-0.0.6.orig/raidutil/log_osd.h0000664000175000000620000001103310044153334017747 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __LOGGER_OSD #define __LOGGER_OSD //File - LOG_OSD.H //*************************************************************************** // //Description: osd layer functions for the logger // // //Author: Bill Smith //Date: 7/7/95 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "osd_util.h" //Definitions - Defines & Constants ----------------------------------------- // there are 1000 milliseconds in a second const uLONG MILLI = 1000; //Definitions - Structure & Typedef ----------------------------------------- //Variables - External ------------------------------------------------------ //Variables - Global -------------------------------------------------------- //Variables - File Scope ---------------------------------------------------- //Prototypes - function ----------------------------------------------------- #ifdef __cplusplus extern "C" { #endif // osd logger init stuff uLONG osdLoggerInit(); // osd engine message handler and is the main thread, it sends a // MSG_LOG_REGISTER with any OSD input. When a MSG_LOG_UNLOAD // comes from the engine this function will send a MSG_LOG_UNREIGSTER // and return back into main for thread clean up // if the parameter is true then a MSG_SLOG_REGISTER is sent as well void osdLoggerMessageHandler(uLONG); // osd exit function void osdLoggerExit(); // get the directory which th elogger is executing from void osdGetExecutingDir(char *, void *); // thread cleanup void osdThreadCleanup(); // stops and unloads the logger, should fire off a thread to sleep // for a few seconds after it gets control of the loggerAccessSem // then do what it needs to stop the logger void osdHaltLogger(); // used for time debugging void osdStartStopWatch(); void osdStopStopWatch(); // get the name of the machine we are currently running on. right now // OS/2 is the only one that can not get the name void osdGetMachineName(char *); // checks to see if there is another instance of the logger already running, basically // tries to create a named semaphore, if there is not one out there then it is the first int AnotherInstance(); // shutsdown the host OS void osdShutdownSystem(); // get the version of the OS that we are running on. It must fit into a 10 byte NULL terminated string void osdGetOSversion(char *); #ifndef _DPT_OS2 // sets the exception handler for the program, or on a thread basis void osdSetExceptionHandler(); #else void os2SetExceptionHandler(PEXCEPTIONREGISTRATIONRECORD err_P); #define osdSetExceptionHandler() {}\ EXCEPTIONREGISTRATIONRECORD err; \ if (runFlags & (FLG_TURN_ON_JARVIS | FLG_ENABLE_EXCEPTION_HANDLING)) \ os2SetExceptionHandler(&err); #endif #ifdef _DPT_WIN_NT void SendInformationEvent(char *); void SendWarningEvent(char *); void SendNTEvent(char *, uCHAR eType, uLONG eID, uLONG category); #endif #ifdef __cplusplus }; #endif #endif raidutils-0.0.6.orig/raidutil/lzssdon.cpp0000664000175000000620000001140210044153336020352 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * This is the LZSS module, which implements an LZ77 style compression * algorithm. As iplemented here it uses a 12 bit index into the sliding * window, and a 4 bit length, which is adjusted to reflect phrase lengths * of between 2 and 17 bytes. */ #include "osd_util.h" #include #include #include #include #if defined(_DPT_MSDOS) && !defined (NO_EXPAND_FILE) #include "diskio.h" #endif #include "bufio.h" #ifndef INDEX_BIT_COUNT #define INDEX_BIT_COUNT 12 /* bits to use for indeces into text window */ #endif #ifndef LENGTH_BIT_COUNT #define LENGTH_BIT_COUNT 4 /* bits to use for length of an encoded phrase */ #endif #define WINDOW_SIZE ( 1 << INDEX_BIT_COUNT ) #define BREAK_EVEN ( ( 1 + INDEX_BIT_COUNT + LENGTH_BIT_COUNT ) / 9 ) #define END_OF_STREAM 0 /* index used to flag end of encoded file */ #define MOD_WINDOW( a ) ( ( a ) & ( WINDOW_SIZE - 1 ) ) /* * This is the expansion routine for the LZSS algorithm. All it has * to do is read in flag bits, decide whether to read in a character or * an index/length pair, and take the appropriate action. */ #if defined(_DPT_MSDOS) && !defined (NO_EXPAND_FILE) int ExpandFile( IOBUF *input, DISK *output) { int i, result; int current_position; int c; int match_length; int match_position; unsigned char *window; window = new unsigned char[WINDOW_SIZE]; if(window == NULL) return 99; current_position = 1; for ( ; ; ) { if ( InputBufBit( input ) ) { c = (int) InputBufBits( input, 8 ); result = putdiskc( c, output ); if(result) return result; window[ current_position ] = (unsigned char) c; current_position = MOD_WINDOW( current_position + 1 ); } else { match_position = (int) InputBufBits( input, INDEX_BIT_COUNT ); if ( match_position == END_OF_STREAM ) break; match_length = (int) InputBufBits( input, LENGTH_BIT_COUNT ); match_length += BREAK_EVEN; for ( i = 0 ; i <= match_length ; i++ ) { c = window[ MOD_WINDOW( match_position + i ) ]; result = putdiskc( c, output ); if(result) return result; window[ current_position ] = (unsigned char) c; current_position = MOD_WINDOW( current_position + 1 ); } } } delete[] window; // return success return 0; } #endif void ExpandBuffer( IOBUF *input, IOBUF *output) { int i; int current_position; int c; int match_length; int match_position; unsigned char *window; window = new unsigned char[WINDOW_SIZE]; if(window == NULL) return; current_position = 1; for ( ; ; ) { if ( InputBufBit( input ) ) { c = (int) InputBufBits( input, 8 ); putbufc( c, output ); window[ current_position ] = (unsigned char) c; current_position = MOD_WINDOW( current_position + 1 ); } else { match_position = (int) InputBufBits( input, INDEX_BIT_COUNT ); if ( match_position == END_OF_STREAM ) break; match_length = (int) InputBufBits( input, LENGTH_BIT_COUNT ); match_length += BREAK_EVEN; for ( i = 0 ; i <= match_length ; i++ ) { c = window[ MOD_WINDOW( match_position + i ) ]; putbufc( c, output ); window[ current_position ] = (unsigned char) c; current_position = MOD_WINDOW( current_position + 1 ); } } } delete[] window; } raidutils-0.0.6.orig/raidutil/lzstrbuf.cpp0000664000175000000620000001744210046161363020544 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 1/18/2000 * ***************************************************************************** * * File Name: FlashMem.cpp * Module: * Contributors: David Dillard * Description: Contains the definitions of the LzInStreamBuf class. * This class is a subclass of streambuf and is used to * decompress an input stream that was compressed with LZ77. * * Version Control: * * $Revision: 3 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "lzstrbuf.h" //============================================================================= // //Name: LzInStreamBuf::Ctor // //Abstract: Creates an object given an input stream. // //Parameters: None // //Return Values: None // //Error Codes: None // //Global Variables Affected: None // //Notes: Allocates a buffer for // //----------------------------------------------------------------------------- LzInStreamBuf::LzInStreamBuf( std::istream &stream ) : m_Stream(stream), m_BufSize(0), m_Mask(1), m_Rack(0), m_CurChar(EOF), m_CurrentIndex(1), m_Window(NULL) { // // Allocate the window buffer BEFORE the get buffer. The window buffer must // be of the necessary size while the size of the get buffer can vary. // m_Window = new unsigned char[WINDOW_SIZE]; if ( m_Window != NULL ) { m_BufSize = AllocBuf(); } } //============================================================================= // //Name: LzInStreamBuf::Dtor // //Abstract: Merely deletes the window buffer. // //Parameters: None // //Return Values: None // //Error Codes: None // //Global Variables Affected: None // //Notes: None // //----------------------------------------------------------------------------- LzInStreamBuf::~LzInStreamBuf() { delete [] m_Window; } //============================================================================= // //Name: LzInStreamBuf::underflow // //Abstract: Fills the get area of the streambuf. // //Parameters: None // //Return Values: The first character in the get area. // //Error Codes: EOF // //Global Variables Affected: None // //Notes: The only real trick in this is that because the compressed data can // result in a variable amount of decompressed data when getting close // to filling the get area the method must check that if the next // decompressed data COULD overflow the get area then decompression must // stop. // //----------------------------------------------------------------------------- int LzInStreamBuf::underflow() { int rc = EOF; // // Make sure the constructor successfully initialized the object. If // it didn't then we'll crash if we proceed. // if ( m_Window != NULL ) { // // Get a pointer to the get area. // char *startGetArea = eback(); char *buf = startGetArea; // // Determine the end of the buffer that we want to use. Because of // the possibility of a couple of input bytes expanding into a number // of output bytes we have to guard against having expanded data that // cannot fit into the output buffer, but must because all context // will be lost otherwise. // const unsigned maximumMatchLength = (1 << LENGTH_BIT_COUNT) + BREAK_EVEN; const char *lastDecompressStartPoint = buf + m_BufSize - maximumMatchLength; // // Decompress the next set of data. // while ( buf < lastDecompressStartPoint ) { int ch; if ( GetBit() ) { ch = GetBits(8); m_Window[m_CurrentIndex] = (unsigned char) ch; m_CurrentIndex = NextWindowIndex(m_CurrentIndex + 1); *buf++ = (char) ch; } else { const int matchIndex = GetBits(INDEX_BIT_COUNT); if ( matchIndex == END_OF_STREAM ) { break; } const int matchLength = GetBits(LENGTH_BIT_COUNT) + BREAK_EVEN; for ( int i = 0; i <= matchLength; i++ ) { ch = m_Window[NextWindowIndex(matchIndex + i)]; m_Window[m_CurrentIndex] = (unsigned char) ch; m_CurrentIndex = NextWindowIndex(m_CurrentIndex + 1); *buf++ = (char) ch; } } } // // Set the get pointers appropriately. // setg(startGetArea, startGetArea, buf); // // Determine the return value. // if ( buf != startGetArea ) { rc = *startGetArea; } } // // Determine the return value. // return(rc); } //============================================================================= // //Name: LzInStreamBuf::GetBit // //Abstract: Gets the next bit from the input stream. // //Parameters: None // //Return Values: 1 or 0, depending on the value of the next bit. // //Error Codes: None // //Global Variables Affected: None // //Notes: None // //----------------------------------------------------------------------------- int LzInStreamBuf::GetBit() { if ( m_Mask == 1 ) { m_Rack = m_Stream.get(); } int value = m_Rack & m_Mask; m_Mask <<= 1; if ( m_Mask == 0 ) { m_Mask = 1; } return(value ? 1 : 0); } //============================================================================= // //Name: LzInStreamBuf::GetBits // //Abstract: Gets the next number of bits specified from the input stream. // //Parameters: None // //Return Values: The value of the number of bits specified. // //Error Codes: None // //Global Variables Affected: None // //Notes: None // //----------------------------------------------------------------------------- unsigned long LzInStreamBuf::GetBits( int bitCount ) { unsigned long mask = 1; unsigned long value = 0; while ( bitCount-- > 0 ) { if ( m_Mask == 1 ) { m_Rack = m_Stream.get(); } if ( m_Rack & m_Mask ) { value |= mask; } mask <<= 1; m_Mask <<= 1; if ( m_Mask == 0 ) { m_Mask = 1; } } return(value); } raidutils-0.0.6.orig/raidutil/lzstrbuf.h0000664000175000000620000001024310046161137020200 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __LZSTRBUF_H #define __LZSTRBUF_H /**************************************************************************** * * Created: 1/19/2000 * ***************************************************************************** * * File Name: LzStrBuf.h * Module: Generic * Contributors: David Dillard * Description: Contains the declaration of the LzInStreamBuf class. * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "dynsize.h" //Class - LzInStreamBuf //=========================================================================== // //Description: // // This class decompresses an LZ77 compressed stream. The class could // be improved by adding a constructor which allowed the caller to specify // the number of index bits and length bits to use when decompressing the // compressed input stream. Of course, this require some changes to the // implementation of the class // //--------------------------------------------------------------------------- class LzInStreamBuf : public DynamicSizeInStreamBuf { public: // // Constructor // LzInStreamBuf( std::istream &stream ); // // Destructor // ~LzInStreamBuf(); // // Fills the output buffer (this is an input stream so this call always // fails). // int overflow(int ch = EOF) { return(EOF); } // // Fills the streambuf's buffer with data. // int underflow(); private: // // Determines the next index into the compression window give the current // index. // inline int NextWindowIndex(int index) { return(index & (WINDOW_SIZE - 1)); } // // Get the next bit from the compressed input stream. // int GetBit(); // // Get the next number of specified bits from the compressed input stream. // unsigned long GetBits( int bitCount ); private: // // Private data used to implement the class. // enum { INDEX_BIT_COUNT = 11, // Bits to use for indices into text window LENGTH_BIT_COUNT = 2, // Bits to use for length of an encoded phrase WINDOW_SIZE = (1 << INDEX_BIT_COUNT), BREAK_EVEN = ((1 + INDEX_BIT_COUNT + LENGTH_BIT_COUNT)/9), END_OF_STREAM = 0 }; std::istream &m_Stream; unsigned long m_BufSize; unsigned long m_Rack; int m_CurChar; int m_CurrentIndex; unsigned char *m_Window; unsigned char m_Mask; }; #endif raidutils-0.0.6.orig/raidutil/modnvram.cpp0000664000175000000620000001026510044153336020507 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 8/4/98 * ***************************************************************************** * * File Name: ModNVRam.cpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 6 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "modnvram.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ // const int Modify_NVRam::SIZE_OF_NVRAM = 128; /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Modify_NVRam::Modify_NVRam( int which_Hba_Num ): hba_Num( which_Hba_Num ) { ENTER( "Modify_NVRam::Modify_NVRam( int which_Hba_Num ): hba_Num( which_Hba_Num )" ); // clear it in case someone wants to use it without reading first. memset( &nvram_Buf, 0, sizeof( nvram_Buf ) ); EXIT(); } Modify_NVRam::~Modify_NVRam() { ENTER( "Modify_NVRam::~Modify_NVRam()" ); EXIT(); } Command::Dpt_Error Modify_NVRam::Read_NVRam_to_Buf() { ENTER( "Command::Dpt_Error Modify_NVRam::Read_NVRam_to_Buf()" ); Dpt_Error err; DPT_TAG_T this_HBAs_Tag; err = get_HBA_Tag( &this_HBAs_Tag ); if( !err.Is_Error() ) { engine->Reset(); err = engine->Send( MSG_GET_NV_INFO, this_HBAs_Tag ); } if(( !err.Is_Error() ) && ( engine->Extract( &nvram_Buf, sizeof( nvram_Buf ) ) == 0 )) { err = MSG_RTN_DATA_UNDERFLOW; } EXIT(); return( err ); } Command::Dpt_Error Modify_NVRam::Write_NVRam_from_Buf( bool compute_Chksum ) { ENTER( "Command::Dpt_Error Modify_NVRam::Write_NVRam_from_Buf( bool compute_Chksum )" ); Dpt_Error err; DPT_TAG_T this_HBAs_Tag; err = get_HBA_Tag( &this_HBAs_Tag ); if( !err.Is_Error() && compute_Chksum ) { nvram_Buf.computeChecksum(); } if( !err.Is_Error() ) { engine->Reset(); if ( engine->Insert( &nvram_Buf, sizeof( nvram_Buf ) ) == 0 ) { err = MSG_RTN_DATA_OVERFLOW; } } if( !err.Is_Error() ) { err = engine->Send( MSG_SET_NV_INFO, this_HBAs_Tag ); } EXIT(); return( err ); } Command::Dpt_Error Modify_NVRam::get_HBA_Tag( DPT_TAG_T *this_HBAs_Tag ) { ENTER( "Command::Dpt_Error Modify_NVRam::get_HBA_Tag( DPT_TAG_T *this_HBAs_Tag )" ); bool hba_Num_Found; Dpt_Error err; // translate the hba index passed in into the address for this hba *this_HBAs_Tag = Get_HBA_by_Index( hba_Num, &hba_Num_Found ); if( !hba_Num_Found ) { err = Command::Dpt_Error::DPT_CMD_ERR_CANT_FIND_HBA_INDEX_NVRAM; } EXIT(); return( err ); } dptNVRAM_S *Modify_NVRam::get_NVRam_Buf() { ENTER( "dptNVRAM_S *Modify_NVRam::get_NVRam_Buf()" ); EXIT(); return( &nvram_Buf ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/modnvram.hpp0000664000175000000620000000510610044153334020510 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef MODNVRAM_HPP #define MODNVRAM_HPP /**************************************************************************** * * Created: 8/3/98 * ***************************************************************************** * * File Name: ModNVRam.hpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 8 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ class Modify_NVRam: public Command { public: Modify_NVRam( int which_Hba_Num ); virtual ~Modify_NVRam(); protected: Dpt_Error Read_NVRam_to_Buf(); Dpt_Error Write_NVRam_from_Buf( bool compute_Chksum = (bool)true ); dptNVRAM_S *get_NVRam_Buf(); Dpt_Error get_HBA_Tag( DPT_TAG_T *this_HBAs_Tag ); int hba_Num; private: dptNVRAM_S nvram_Buf; // static const int SIZE_OF_NVRAM; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/module.c0000664000175000000620000000437410044153335017614 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include // Loads the specified run-time loadable DLL DLL_HANDLE_T osdLoadModule(uCHAR *name) { DLL_HANDLE_T rtnVal; if ((rtnVal = (unsigned int*)LoadLibrary(name)) == 0) rtnVal = (DLL_HANDLE_T) -1; return(rtnVal); } // Unloads the specified run-time loadable DLL uSHORT osdUnloadModule(DLL_HANDLE_T handle) { return((uSHORT) !FreeLibrary((HMODULE)handle)); } // Returns a pointer to a function inside a run-time loadable DLL #if defined(_DPT_NETWARE) || defined(_WIN32) void * osdGetFnAddr(DLL_HANDLE_T handle,uCHAR *fnName) #else dummyFn osdGetFnAddr(DLL_HANDLE_T handle,uCHAR *fnName) #endif { return((void *) GetProcAddress((HMODULE)handle, fnName)); } raidutils-0.0.6.orig/raidutil/namarray.cpp0000664000175000000620000001022610044153336020473 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/7/00 * ***************************************************************************** * * File Name: namearray.cpp * Module: * Contributors: Edrick Estrada * Description: * Version Control: * * $Revision: 1 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "namarray.hpp" #include "rscenum.h" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ extern char* EventStrings[]; /*** FUNCTIONS ***/ NameArray::NameArray (SCSI_Address arrayToName, char *arrayName) :inArray (arrayToName), inName (arrayName) { ENTER("NameArray::NameArray("); EXIT(); } NameArray::NameArray (const NameArray &new_NameArray) { ENTER("NameArray::NameArray (const NameArray &new_NameArray):"); inArray = new_NameArray.inArray; inName = new_NameArray.inName; EXIT(); } NameArray::~NameArray() { ENTER( "NameArray::~NameArray()" ); EXIT(); } /******************************************************* Main exe loop *******************************************************/ Command::Dpt_Error NameArray::execute(String_List **output) { ENTER("Command::Dpt_Error NameArray::execute(String_List **output)"); String_List *out; Dpt_Error err; *output = out = new String_List(); char* arrayName; strcpy(arrayName, inName); uLONG raidToNameTag; bool getHidden = false; bool objFound = false; //DON'T FORGET TO RESET THE ENGINE BEFORE YOU USE IT... .JUST IN CASE Init_Engine(); raidToNameTag = Get_Log_Dev_by_Address (inArray,getHidden, &objFound); engine->Reset(); engine->Send(MSG_GET_INFO, raidToNameTag); engine->Reset(); engine->Insert(arrayName,strlen(arrayName+1)); engine->Send(MSG_ID_BY_DPT_NAME); if (engine->fromEng_P->writeIndex) { err |=Dpt_Error::DPT_ERR_NAME_ALREADY_USED; } else { engine->Reset(); strcpy(inName, arrayName); if (inName[0] != '\0') { for(int i=strlen(arrayName); i < 16; i++) inName[i]='\x20'; inName[16]='\0'; } else { for(int i=0; i<16;i++) inName[i]='\0'; } engine->Insert(inName,17); err = engine->Send(MSG_SET_DPT_NAME, raidToNameTag); } engine->Reset(); engine->Send( MSG_RAID_HW_ENABLE ); if (err.Is_Error()) { out->add_Item((char *) err); out->add_Item("\n"); } else { out->add_Item(EventStrings[STR_ARRAY_NAME_CHANGED]); out->add_Item("\n"); } return (err); } Command &NameArray::Clone() const { ENTER("Command &NameArray::Clone() const"); EXIT(); return(*new NameArray(*this)); } raidutils-0.0.6.orig/raidutil/namarray.hpp0000664000175000000620000000471610046161416020507 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef NameArray_HPP #define NameArray_HPP /**************************************************************************** * * Created: 7/7/00 * ***************************************************************************** * * File Name: namearray.hpp * Module: * Contributors: Edrick Estrada * Description: * Version Control: * * $Revision: 1 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ /*** PROTOTYPES ***/ class NameArray:public Command { public: NameArray::NameArray(SCSI_Address arrayToName, char *arrayName); NameArray(const NameArray &new_NameArray); virtual ~NameArray(); Dpt_Error execute(String_List **output); Command &Clone() const; private: SCSI_Address inArray; char *inName; }; #endif raidutils-0.0.6.orig/raidutil/nvrambit.cpp0000664000175000000620000002545010044153336020510 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 10/13/99 * ***************************************************************************** * * File Name: NvramBit.cpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 5 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "nvrambit.hpp" #include "rustring.h" #include "rscenum.h" /*** CONSTANTS ***/ #define DPT_DEFAULT_CACHE_STALE_PERIOD 4 #define CACHE_STALE_OFFSET 0x1b // NVSTALEPER #define NVOEMFLAGS3 0x30 /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ extern char* EventStrings[]; /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ NvramBit::NvramBit (NvramOffset offset, int hba, int new_val) { ENTER( "NvramBit::NvramBit(" ); Nvram_offset = offset; whichHBA = hba; newValue = new_val; EXIT(); } NvramBit::NvramBit (const NvramBit &new_NvramBit) { ENTER( "NvramBit::NvramBit (const NvramBit &new_NvramBit):"); Nvram_offset = new_NvramBit.Nvram_offset; whichHBA = new_NvramBit.whichHBA; newValue = new_NvramBit.newValue; EXIT(); } NvramBit::~NvramBit() { ENTER( "NvramBit::~NvramBit()" ); EXIT(); } Command::Dpt_Error NvramBit::execute (String_List **output) { ENTER("Command::Dpt_Error NvramBit::execute (String_List **output)"); Dpt_Error err; bool hbaIndexFound = true; DPT_TAG_T thisHBATag; Init_Engine(1); // only scan hbas *output = new String_List(); switch (Nvram_offset) { case Cache_Stale: // verify the stale period value if ((newValue != -1) && ((newValue < 0) || (newValue > 255))) { err = Dpt_Error::DPT_ERR_VALUE_OUT_OF_RANGE; (**output).add_Item((char *) err); return(err); } // set to defaule value if 0 else if (newValue == 0) newValue = DPT_DEFAULT_CACHE_STALE_PERIOD; // print header (**output).add_Item (EventStrings[STR_LIST_CACHE_STALE_HEADER]); break; case Cluster: // verify the value if ((newValue != -1) && ((newValue != 0) && (newValue != 1))) { err = Dpt_Error::DPT_ERR_VALUE_OUT_OF_RANGE; (**output).add_Item((char *) err); return(err); } if (newValue == -1) (**output).add_Item (EventStrings[STR_LIST_CLUSTER_HEADER]); else (**output).add_Item (EventStrings[STR_LIST_CLUSTER_FUA_HEADER]); break; case Cluster_FUA: // verify the value if ((newValue != -1) && ((newValue != 0) && (newValue != 1))) { err = Dpt_Error::DPT_ERR_VALUE_OUT_OF_RANGE; (**output).add_Item((char *) err); return(err); } (**output).add_Item (EventStrings[STR_LIST_CLUSTER_FUA_HEADER]); break; case HS_Same_Channel: // verify the value if ((newValue != -1) && ((newValue != 0) && (newValue != 1))) { err = Dpt_Error::DPT_ERR_VALUE_OUT_OF_RANGE; (**output).add_Item((char *) err); return(err); } (**output).add_Item (EventStrings[STR_LIST_HS_SAME_CHANNEL_HEADER]); break; } (**output).add_Item (STR_DEV_DIVIDING_LINE); // If our HBA is -1 then do all HBAs if (whichHBA != -1) { // Determine the hba address from the index. thisHBATag = Get_HBA_by_Index (whichHBA, &hbaIndexFound); err |= DoEachHBA (output, thisHBATag); } else { // We want to process all the HBA's on the system. for (int hbaIndex = 0; hbaIndexFound ; hbaIndex++) { thisHBATag = Get_HBA_by_Index(hbaIndex, &hbaIndexFound); if (hbaIndexFound) { err |= DoEachHBA (output, thisHBATag); } } } return ( err ); } Command::Dpt_Error NvramBit::DoEachHBA (String_List **output, DPT_TAG_T thisHBATag) { Dpt_Error err; char temp_Buf[256]; dptHBAinfo_S hbaInfo; // get info from the hba err |= engine->Send( MSG_GET_INFO, thisHBATag ); if (err.Is_Error() || (engine->Extract( &hbaInfo, sizeof(dptHBAinfo_S)) == 0)) { memset ( &hbaInfo, 0, sizeof(dptHBAinfo_S) ); } else { // print hba info dptCaddr_S *addr_P = &engine->devInfo_P->addr; sprintf (temp_Buf, "d%d", addr_P->hba); (**output).add_Item(temp_Buf); (**output).add_Item(Strip_Trailing_Whitespace( engine->devInfo_P->vendorID)); (**output).add_Item(Strip_Trailing_Whitespace( engine->devInfo_P->productID)); (**output).add_Item(Strip_Trailing_Whitespace( engine->hbaInfo_P->revision)); switch (Nvram_offset) { case Cache_Stale: // set the stale period if (newValue != -1) { SetNvramValue (thisHBATag); } // print the stale period GetNvramValue (thisHBATag); sprintf (temp_Buf, "%d", currentStatus); (**output).add_Item(temp_Buf); break; case Cluster: // set the new value if (newValue != -1) { SetNvramValue (thisHBATag); } GetNvramValue (thisHBATag); // bit 3 (0-7) is cluster support if (((currentStatus & 0x08) >> 3) == 0) (**output).add_Item(EventStrings[STR_DISABLED]); else (**output).add_Item(EventStrings[STR_ENABLED]); if (newValue != -1) { // bit 4 (0-7) is cluster FUA if (((currentStatus & 0x10) >> 4) == 0) (**output).add_Item(EventStrings[STR_OFF]); else (**output).add_Item(EventStrings[STR_ON]); } break; case Cluster_FUA: // set the new fua setting if (newValue != -1) { SetNvramValue (thisHBATag); } GetNvramValue (thisHBATag); // bit 3 (0-7) is cluster support if (((currentStatus & 0x08) >> 3) == 0) (**output).add_Item(EventStrings[STR_DISABLED]); else (**output).add_Item(EventStrings[STR_ENABLED]); // bit 4 (0-7) is cluster FUA if (((currentStatus & 0x10) >> 4) == 0) (**output).add_Item(EventStrings[STR_OFF]); else (**output).add_Item(EventStrings[STR_ON]); break; case HS_Same_Channel: // set the new value if (newValue != -1) { SetNvramValue (thisHBATag); } GetNvramValue (thisHBATag); // bit 5 (0-7) is hot spare same channel if (((currentStatus & 0x20) >> 5) == 0) (**output).add_Item(EventStrings[STR_DISABLED]); else (**output).add_Item(EventStrings[STR_ENABLED]); break; } (**output).add_Item("\n"); } EXIT(); return( err ); } //////////////////////////////////////////////////////////////// // GetNvramValue // Using this to get some initial status //////////////////////////////////////////////////////////////// Command::Dpt_Error NvramBit::GetNvramValue (DPT_TAG_T hba) { Dpt_Error err; uCHAR buf[128]; engine->Reset(); // Grab the NVRAM info into a local buffer. err |= engine->Send( MSG_GET_NV_INFO, hba ); if (!err.Is_Error()) { engine->Extract (buf, sizeof(buf)); switch (Nvram_offset) { case Cache_Stale: currentStatus = buf[CACHE_STALE_OFFSET]; break; case Cluster: currentStatus = buf[NVOEMFLAGS3]; break; case Cluster_FUA: currentStatus = buf[NVOEMFLAGS3]; break; case HS_Same_Channel: currentStatus = buf[NVOEMFLAGS3]; break; } } return (err); } //////////////////////////////////////////////////////////////// // SetNvramValue //////////////////////////////////////////////////////////////// void NvramBit::SetNvramValue (DPT_TAG_T hba) { Dpt_Error err; uCHAR buf[128]; engine->Reset(); err |= engine->Send (MSG_GET_NV_INFO, hba); if (!err.Is_Error ()) { engine->Extract (buf, sizeof(buf)); switch (Nvram_offset) { case Cache_Stale: buf[CACHE_STALE_OFFSET] = newValue; break; case Cluster: // bit 3 (0-7) is cluster if (newValue == 1) buf[NVOEMFLAGS3] |= 0x08; else buf[NVOEMFLAGS3] &= 0xf7; break; case Cluster_FUA: // bit 4 (0-7) is cluster FUA if (newValue == 1) buf[NVOEMFLAGS3] |= 0x10; else buf[NVOEMFLAGS3] &= 0xef; break; case HS_Same_Channel: // bit 5 (0-7) is hot spare same channel if (newValue == 1) buf[NVOEMFLAGS3] |= 0x20; else buf[NVOEMFLAGS3] &= 0xdf; break; } engine->Insert (buf, sizeof(buf)); err |= engine->Send (MSG_SET_NV_INFO, hba); } } Command &NvramBit::Clone() const { ENTER ("Command &NvramBit::Clone() const"); EXIT(); return (*new NvramBit (*this)); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/nvrambit.hpp0000664000175000000620000000546410044153334020516 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef NVRAMBIT_HPP #define NVRAMBIT_HPP /**************************************************************************** * * Created: 10/13/99 * ***************************************************************************** * * File Name: NvramBit.hpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "scsilist.hpp" #include "intlist.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ enum NvramOffset { Cache_Stale, Cluster, Cluster_FUA, HS_Same_Channel }; class NvramBit:public Command { public: NvramBit (NvramOffset offset, int hba, int new_val); NvramBit (const NvramBit &new_NvramBit); virtual ~NvramBit(); NvramBit &operator = (NvramBit &right); Dpt_Error execute (String_List **output); Dpt_Error DoEachHBA (String_List **output, DPT_TAG_T hba); Dpt_Error GetNvramValue (DPT_TAG_T hba); void SetNvramValue (DPT_TAG_T hba); Command &Clone() const; private: NvramOffset Nvram_offset; int whichHBA; int currentStatus; int newValue; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/pagemod.hpp0000664000175000000620000000560010044153335020301 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef PAGEMOD_HPP #define PAGEMOD_HPP /**************************************************************************** * * Created: 11/8/99 * ***************************************************************************** * * File Name: PageMod.hpp * Module: * Contributors: Karla Summers * Description: This toggles pagenation mode on and off. * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Pagenation_Mode { public: Pagenation_Mode (void) {}; ~Pagenation_Mode (void) {}; bool GetPagenationMode(void) { return (pagenation_Mode); }; void SetPagenationMode(bool value) { pagenation_Mode = value; }; private: static bool pagenation_Mode; #ifdef _SCO_UNIX // // This filler is necessary under SCO OpenDesktop. For // some reason using this static bool in this structure // causes a size problem and the application will core // dump upon exit. 5 bytes is required. // char filler[5]; #endif //_SCO_UNIX }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/parsargv.cpp0000664000175000000620000000764110044153334020513 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/24/98 * ***************************************************************************** * * File Name: ParsArgv.cpp * Module: * Contributors: Lee Page * Description: This specialization class accepts an argv parameter and converts it to a concatenated string, that is then passed in to the Parser ctor to construct that. * Version Control: * * $Revision: 6 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "parsargv.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Parse_Argv::Parse_Argv( char *argv[], bool *new_Quiet_Mode ): Parser( Concatenate_Argv( argv ), new_Quiet_Mode ) { ENTER( "Parse_Argv::Parse_Argv(" ); EXIT(); } Parse_Argv::~Parse_Argv() { ENTER( "Parse_Argv::~Parse_Argv()" ); EXIT(); } /**************************************************************************** * * Function Name: Concatenate_Argv(), Created:7/24/98 * * Description: Convert the argv array into a single string. * * Return: char * containing the concatenated argv array. * * Notes: * *****************************************************************************/ char *Parse_Argv::Concatenate_Argv( char *argv[] ) { ENTER( "char *Parse_Argv::Concatenate_Argv( char *argv[] )" ); int argv_Index; concatenated_Argv_Buf[ 0 ] = 0; for( argv_Index = 0; argv[ argv_Index ]; argv_Index++ ) { char * is_white_space = argv[ argv_Index ]; /* If an argument has embedded white space, lets quote it */ if ((*is_white_space != '\'') && (*is_white_space != '"') && (*is_white_space != '`')) for (;*is_white_space && (*is_white_space != ' ') && (*is_white_space != '\t') && (*is_white_space != '\n') && (*is_white_space != '\r'); ++is_white_space); if ((is_white_space != argv[ argv_Index ]) && (*is_white_space != '\0')) { strcat( concatenated_Argv_Buf, "\""); strcat( concatenated_Argv_Buf, argv[ argv_Index ] ); strcat( concatenated_Argv_Buf, "\""); } else strcat( concatenated_Argv_Buf, argv[ argv_Index ] ); // make sure that we have whitespace delimiting separate arguments strcat( concatenated_Argv_Buf, " " ); } EXIT(); return( concatenated_Argv_Buf ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/parsargv.hpp0000664000175000000620000000506010044153336020513 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef PARSARGV_HPP #define PARSARGV_HPP /**************************************************************************** * * Created: 7/24/98 * ***************************************************************************** * * File Name: ParsArgv.hpp * Module: * Contributors: Lee Page * Description: This specialization class accepts an argv parameter and converts it to a concatenated string, that is then passed in to the Parser ctor to construct that. * Version Control: * * $Revision: 5 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "parser.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Parse_Argv: public Parser { public: Parse_Argv( char *argv[], bool *quiet_Mode ); virtual ~Parse_Argv(); private: char *Concatenate_Argv( char *argv[] ); char concatenated_Argv_Buf[ 1024 ]; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/parser.cpp0000664000175000000620000033161610044153334020164 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/20/98 * ***************************************************************************** * * File Name: Parser.cpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 101 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "parser.hpp" #include "parserr.hpp" #include "listdev.hpp" #include "flash.hpp" #include "setrate.hpp" #include "quietmod.hpp" #include "pagemod.hpp" #include "creatrad.hpp" #include "deletrad.hpp" #include "zap.hpp" #include "setcache.hpp" #include "usage.hpp" #include "showinq.hpp" #include "rstnvram.hpp" #include "rustring.h" #include "ctlr_map.hpp" #include "alarm.hpp" // kmc #include "nvrambit.hpp" #include "setspeed.hpp" #include "taskctrl.hpp" #include "eventlog.hpp" #include "forcest.hpp" #include "config.hpp" #include "expand.hpp" #include "uartdmp.hpp" #include "rmwflash.hpp" #include "setscfg.hpp" #include "rscenum.h" #include "segment.hpp" #include "namarray.hpp" #include "rawdata.hpp" #include #include #include #ifdef _DPT_SOLARIS #include #endif // _DPT_SOLARIS #ifndef min #define min(a,b) ((a) < (b) ? (a) : (b)) #endif /*** CONSTANTS ***/ extern char* EventStrings[]; /*** TYPES ***/ /*** STATIC DATA ***/ /*const unsigned long Parser::RAID_0_DEFAULT_STRIPE_SIZE = 128 * 1024L; //const unsigned long Parser::RAID_1_DEFAULT_STRIPE_SIZE = 64 * 1024L; const unsigned long Parser::RAID_5_DEFAULT_STRIPE_SIZE = 32 * 1024L;*/ const unsigned long Parser::BLOCK_SIZE = 512L; /*** EXTERNAL DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Parser::Parser( char *command_Line, bool *quiet_Mode_Ptr // A pointer to the quiet mode boolean ): cmd_List( 0 ), quiet_Mode( quiet_Mode_Ptr ) { ENTER( "Parser::Parser(" ); bool ignoreNonfatalErrors = false; cmd_List = new Command_List(); // make sure this is all inited to '0' memset( ¶ms, 0, sizeof( params ) ); // preserve original command line so we can display it in case of error. // char *original_Command_Line = command_Line; bool done = false; // init all params to defaults. Reset_Params_to_Defaults(); while( command_Line && *command_Line && ( command_Line = Skip_White( command_Line ) ) && !done ) { // make sure we can show the user where we choked if the parser fails. char *this_Commands_Text = command_Line; const int LEN_OF_SW_AND_CMD = 2; // Handle the `hack' of specifying the controller sans flags if(( command_Line[0] == 'c' ) || ( command_Line[0] == 'd' )) { SCSI_Address controller; char *begin_cmd_line = command_Line; int count = strlen(command_Line); command_Line = Get_Address (command_Line, &controller); if( controller.hba != -1 ) { // shift string down for (int counter = count + 1; counter > 0; counter--) begin_cmd_line[counter] = begin_cmd_line[counter - 1]; // kds command_Line -= 2; command_Line -= (command_Line - begin_cmd_line); command_Line[0] = SW_DELIM_1; /* kds #if (!defined(_DPT_NETWARE) && !defined(_DPT_BSDI) && !defined(_DPT_FREE_BSD)) class DPTControllerMap * map = new class DPTControllerMap; #else class DPTControllerMap * map = new DPTControllerMap; #endif int ctlr = map->getController( controller.hba, controller.bus ); delete map; if( ctlr >= 0 ) { command_Line[1] = CMD_SPECIFY_CTLR; command_Line[2] = ctlr + '0'; } else kds { command_Line[1] = CMD_SPECIFY_DPT; command_Line[2] = controller.hba + '0'; } kds */ } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_CTLR_DESGINATIONS_NOT_SUPPORTED], this_Commands_Text); } } if (( *command_Line == SW_DELIM_1) || ( *command_Line == SW_DELIM_2)) { const int LEN_STRING_ARG = 60; char string_Arg[ LEN_STRING_ARG ]; unsigned long int_Arg; bool is_Int_Arg = false; bool delete_Hot_Spare; command_Enum command_Char = (command_Enum) *++command_Line; // advance past the command character. command_Line++; // advance past any white space to the parameter( s ) command_Line = Skip_White( command_Line ); // preserve this in case this command doesn't parse out to be a // simple command. This keeps the command from having to do all // the parsing. string_Arg[0] = '\0'; if (command_Line) { // do some of this argument extraction once and for all here. if(( command_Char != CMD_FLASH) &&( isdigit( *command_Line ))) { int_Arg = strtoul( command_Line, &command_Line, 10 ); is_Int_Arg = true; } else { char c; // prevent Extract_Word() from looking past the next command // if there are no arguments to this command. c = *Skip_White( command_Line ); if(( c != SW_DELIM_1 && c != SW_DELIM_2 ) || (command_Char == CMD_FLASH)) { // get the next word ahead of time so that any // commands that need only the next word won't have // to hassle. Advance to the end of this word... command_Line = Extract_Word( command_Line, string_Arg ); if(command_Char != CMD_FLASH) { // make it easier to compare... To_Lower( string_Arg ); } } // indicate that this isn't an integer argument. is_Int_Arg = false; } } int rw = 1; AlarmCommand cmd = None; // kmc switch( command_Char ) { // verbs // Specify drive group( Create raid ) case CMD_DRIVE_GROUP: { SCSI_Addr_List *components; SCSI_Addr_List *compsOmit; compsOmit = new SCSI_Addr_List(); // zero means use default size unsigned long raid_Size_in_Blocks = 0; // back up to the beginning of this argument list by // starting from the beginning of the command, then // skipping the command. command_Line = Skip_White(this_Commands_Text + LEN_OF_SW_AND_CMD); if (command_Line == NULL) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_HBA], this_Commands_Text ); goto END_OF_VERB; } // CR2080 - nobuild option 'N' // this option can only come right after -g // this is HIDDEN bool nobuildOption = false; if (command_Line[0] == 'N') { nobuildOption = true; command_Line++; } components = Get_Address_List( command_Line, &command_Line, this_Commands_Text, &done ); if (!done && (components->get_Num_Items() > 0) && (components->get_Item( 0 ).hba >= 0)) { params.hba_Num = components->get_Item( 0 ).hba; params.hba_Num_Specified = true; } if ( !params.hba_Num_Specified ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_HBA], this_Commands_Text ); done = true; } if( !done ) { if( params.logical_Drive_Capacity_in_Megs_Specified ) { unsigned long raid_Size_in_K; // convert this from megs( 1024 * 1024 ) to K's( 1024 ) raid_Size_in_K = params.logical_Drive_Capacity_in_Megs * 1024; // convert this from K's to blocks raid_Size_in_Blocks = ( raid_Size_in_K / BLOCK_SIZE ) * 1024; } // this should be used with just hba or just hba/bus number // user now telling us how many drives to put in each array int numDrivesPerArray = 0; // only do this if user specified hba or hba/bus ONLY if (components->get_Num_Items() == 1) { command_Line = Skip_White(command_Line); if (command_Line != NULL) { if (isdigit(command_Line[0])) { numDrivesPerArray = command_Line[0] - 0x30; command_Line++; } // look for devices to NOT put in the array/s command_Line = Skip_White(command_Line); if (command_Line != NULL) { if ((command_Line[0] == 'c') || (command_Line[0] == 'd')) compsOmit = Get_Address_List (command_Line, &command_Line, this_Commands_Text, &done); } } } // no need to verify that some of these parameters // have been specified, since the defaults are // allowed for them. { Create_Raid *temp = new Create_Raid (components, params.raid_Type, params.stripe_Size, raid_Size_in_Blocks, nobuildOption, ignoreNonfatalErrors, numDrivesPerArray, compsOmit); cmd_List->add_Item( *temp ); delete temp; } } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text ); } } goto END_OF_VERB; // expand array case CMD_EXPAND_ARRAY: { SCSI_Address raidToExpand; SCSI_Addr_List *components; command_Line = this_Commands_Text + LEN_OF_SW_AND_CMD; // get the raid to expand command_Line = Get_Address (command_Line, &raidToExpand); // get the components to expand with components = Get_Address_List( command_Line, &command_Line, this_Commands_Text, &done ); if (!done) { Expand *temp = new Expand (raidToExpand, components); cmd_List->add_Item (*temp); delete temp; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text ); } } goto END_OF_VERB; case CMD_ZAP: { SCSI_Addr_List *components; int resync = 0; // back up to the beginning of this argument list by // starting from the beginning of the command, then // skipping the command. command_Line = this_Commands_Text + LEN_OF_SW_AND_CMD; components = Get_Address_List( command_Line, &command_Line, this_Commands_Text, &done ); if (!done) { command_Line = Extract_Word(command_Line, string_Arg); // default is NOT to resync // change later when bad cache issue corrected. if (command_Line !='\0') { // see if resync is set on/enable if (isdigit(*string_Arg)) resync = string_Arg[0] - 0x30; else command_Line = TranslateNext(string_Arg, &resync); } Zap * temp = new Zap (components, resync); cmd_List->add_Item( *temp ); delete temp; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text ); } } goto END_OF_VERB; // Delete hot spare drive case CMD_DELETE_HOT_SPARE: delete_Hot_Spare = true; goto DELETE_HOT_SPARE; // Delete logical drive( s ) case CMD_DELETE_LOGICAL_DRIVE: delete_Hot_Spare = false; DELETE_HOT_SPARE: if( is_Int_Arg ) { SCSI_Addr_List *raids_to_Del; // back up to the beginning of this argument list by // starting from the beginning of the command, then skipping the command. command_Line = Skip_White( this_Commands_Text ) + LEN_OF_SW_AND_CMD; raids_to_Del = Get_Address_List( command_Line, &command_Line, this_Commands_Text, &done ); if( done ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ALL_OR_LIST], this_Commands_Text ); } else { Delete_Raid * temp = new Delete_Raid( raids_to_Del, delete_Hot_Spare ); cmd_List->add_Item( *temp ); delete temp; } } else if( !strcmp( string_Arg, EventStrings[STR_CMD_LINE_ALL]) ) { if( params.hba_Num_Specified ) { // create an address for the controller. SCSI_Address Temp( params.hba_Num, params.hba_Bus_Specified ? params.hba_Bus : -1, -1, -1 ); SCSI_Addr_List *components = new SCSI_Addr_List(); components->add_Item( Temp ); Delete_Raid * temp = new Delete_Raid( components, delete_Hot_Spare ); cmd_List->add_Item( *temp ); delete temp; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_HBA], this_Commands_Text ); done = true; } } else { SCSI_Addr_List *raids_to_Del; // back up to the beginning of this argument list by // starting from the beginning of the command, then skipping the command. command_Line = Skip_White( this_Commands_Text ) + LEN_OF_SW_AND_CMD; raids_to_Del = Get_Address_List( command_Line, &command_Line, this_Commands_Text, &done ); if( done ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ALL_OR_LIST], this_Commands_Text ); } else { Delete_Raid * temp = new Delete_Raid( raids_to_Del, delete_Hot_Spare ); cmd_List->add_Item( *temp ); delete temp; } } goto END_OF_VERB; // Create hot spare drive case CMD_CREATE_HOT_SPARE: { SCSI_Addr_List *components; // back up to the beginning of this argument list by // starting from the beginning of the command, then skipping // the command. command_Line= this_Commands_Text + LEN_OF_SW_AND_CMD; components = Get_Address_List( command_Line, &command_Line, this_Commands_Text, &done ); if( !done ) { // TBD: allow for the specification of the // rebuild speed Create_Raid * temp = new Create_Raid (components, Command::RAID_TYPE_HOT_SPARE, 0, 0); cmd_List->add_Item(*temp); delete temp; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text ); } } goto END_OF_VERB; // Action( task ) control case CMD_ACTION_TASK_CONTROL: // options to this command: [build|rebuild|stop|verify|/|-?] // [list] left in just in case somebody complains SCSI_Addr_List *components; command_Line = Skip_White(this_Commands_Text + LEN_OF_SW_AND_CMD); TaskCommandOptions taskCmdOpts; if (command_Line == NULL) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text); goto END_OF_VERB; } if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_TASK_BUILD], strlen(EventStrings[STR_CMD_LINE_TASK_BUILD]))) { taskCmdOpts = Build; command_Line += strlen(EventStrings[STR_CMD_LINE_TASK_BUILD]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_TASK_REBUILD], strlen(EventStrings[STR_CMD_LINE_TASK_REBUILD]))) { taskCmdOpts = Rebuild; command_Line += strlen(EventStrings[STR_CMD_LINE_TASK_REBUILD]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_TASK_STOP], strlen(EventStrings[STR_CMD_LINE_TASK_STOP]))) { taskCmdOpts = Stop; command_Line += strlen(EventStrings[STR_CMD_LINE_TASK_STOP]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_TASK_LIST], strlen(EventStrings[STR_CMD_LINE_TASK_LIST]))) { taskCmdOpts = List; command_Line += strlen(EventStrings[STR_CMD_LINE_TASK_LIST]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_TASK_VERIFY_NO_FIX], strlen(EventStrings[STR_CMD_LINE_TASK_VERIFY_NO_FIX]))) { taskCmdOpts = VerifyNoFix; command_Line += strlen(EventStrings[STR_CMD_LINE_TASK_VERIFY_NO_FIX]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_TASK_VERIFY], strlen(EventStrings[STR_CMD_LINE_TASK_VERIFY]))) { taskCmdOpts = Verify; command_Line += strlen(EventStrings[STR_CMD_LINE_TASK_VERIFY]); } else if (!memcmp(command_Line, "-?", 2)) { taskCmdOpts = List; command_Line += 2; } else if (!memcmp(command_Line, "?", 1)) { taskCmdOpts = List; command_Line++; } else if (!memcmp(command_Line, "d", 1) || !memcmp(command_Line, "c", 1)) { taskCmdOpts = List; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_INVALID_CMD_OR_OPTION_TO_CMD], this_Commands_Text); goto END_OF_VERB; } components = Get_Address_List(command_Line, &command_Line, this_Commands_Text, &done); if (!done) { TaskControl *temp = new TaskControl(components, taskCmdOpts); cmd_List->add_Item(*temp); delete temp; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text); } goto END_OF_VERB; // Force state (optimal/fail) case CMD_FORCE_STATE: // CMD_FORCE_STATE { // options to this command: [optimal|fail] SCSI_Addr_List *components; command_Line = Skip_White(this_Commands_Text + LEN_OF_SW_AND_CMD); ForceStateOptions cmdOpts; if (command_Line == NULL) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text); goto END_OF_VERB; } if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_OPTIMAL], strlen(EventStrings[STR_CMD_LINE_OPTIMAL]))) { cmdOpts = Optimal; command_Line += strlen(EventStrings[STR_CMD_LINE_OPTIMAL]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_FAIL], strlen(EventStrings[STR_CMD_LINE_FAIL]))) { cmdOpts = Fail; command_Line += strlen(EventStrings[STR_CMD_LINE_FAIL]); } else if (!memcmp(command_Line, "?", 1)) { cmdOpts = Current; command_Line ++; } else if (!memcmp(command_Line, "-?", 2)) { cmdOpts = Current; command_Line += 2; } else if ((!memcmp(command_Line, "c", 1)) || (!memcmp(command_Line, "d", 1))) { cmdOpts = Current; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_INVALID_CMD_OR_OPTION_TO_CMD], this_Commands_Text); goto END_OF_VERB; } components = Get_Address_List(command_Line, &command_Line, this_Commands_Text, &done); if (!done) { ForceState *temp = new ForceState(components, cmdOpts); cmd_List->add_Item(*temp); delete temp; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text); } goto END_OF_VERB; } break; // View the event log case CMD_VIEW_LOG: { SCSI_Addr_List *components = new SCSI_Addr_List(); command_Line = Skip_White(this_Commands_Text + LEN_OF_SW_AND_CMD); EventLogOptions eventLogOpts; if (params.hba_Num_Specified == true) { // if bus specified too, just ignore it. SCSI_Address Temp( params.hba_Num, -1, -1, -1 ); components->add_Item (Temp); } if (command_Line == NULL) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text); goto END_OF_VERB; } if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_LOG_SOFT], strlen(EventStrings[STR_CMD_LINE_LOG_SOFT]))) { eventLogOpts = Soft; command_Line += strlen(EventStrings[STR_CMD_LINE_LOG_SOFT]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_LOG_RECOV], strlen(EventStrings[STR_CMD_LINE_LOG_RECOV]))) { eventLogOpts = Recov; command_Line += strlen(EventStrings[STR_CMD_LINE_LOG_RECOV]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_LOG_NONRECOV], strlen(EventStrings[STR_CMD_LINE_LOG_NONRECOV]))) { eventLogOpts = Nonrecov; command_Line += strlen(EventStrings[STR_CMD_LINE_LOG_NONRECOV]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_LOG_STATUS], strlen(EventStrings[STR_CMD_LINE_LOG_STATUS]))) { eventLogOpts = StatusChg; command_Line += strlen(EventStrings[STR_CMD_LINE_LOG_STATUS]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_LOG_DELETE], strlen(EventStrings[STR_CMD_LINE_LOG_DELETE]))) { eventLogOpts = Delete; command_Line += strlen(EventStrings[STR_CMD_LINE_LOG_DELETE]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_LOG_BOARD], strlen(EventStrings[STR_CMD_LINE_LOG_BOARD]))) { eventLogOpts = Board; command_Line += strlen(EventStrings[STR_CMD_LINE_LOG_BOARD]); } else if (!memcmp(command_Line, "?", 1)) { eventLogOpts = Soft; command_Line++; } else if (!memcmp(command_Line, "-?", 2)) { eventLogOpts = Soft; command_Line += 2; } else if ((!memcmp(command_Line, "c", 1)) || (!memcmp(command_Line, "d", 1))) { eventLogOpts = Soft; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_INVALID_CMD_OR_OPTION_TO_CMD], this_Commands_Text); goto END_OF_VERB; } if (params.hba_Num_Specified != true) { components = Get_Address_List(command_Line, &command_Line, this_Commands_Text, &done); } if (!done) { EventLog *temp = new EventLog (components, eventLogOpts); cmd_List->add_Item (*temp); } else Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text); goto END_OF_VERB; } // Predictive caching control case CMD_PREDICTIVE_CACHING_CONTROL: // Specify pre-fetch size case CMD_PREFETCH_SIZE: // Specify read-ahead size case CMD_READ_AHEAD_SIZE: Error_in_Parsing(EventStrings[STR_PARSE_ERR_UNIMPLEMENTED_COMMAND], this_Commands_Text ); done = true; goto END_OF_VERB; // kmc - Alarm commands/status case CMD_ALARM_STATUS: // This command should look something like this coming in: // 'dptutil c1 -A option' where option is [on|off|enable|disable|-?] command_Line = Skip_White( this_Commands_Text + LEN_OF_SW_AND_CMD ); if ( command_Line == 0 ) // nothing { // CR2047 - go ahead and show Status //cmd = None; cmd = Status; } else if ( command_Line[0] == 'o' ) // on { if ( command_Line[1] == 'n' ) { command_Line += 2; cmd = On; } else if (( command_Line[1] == 'f' ) && ( command_Line[2] == 'f' )) // off { command_Line += 3; cmd = Off; } } else if ( command_Line[0] == 'e' ) // enable { if (( command_Line[1] == 'n' ) && ( command_Line[2] == 'a' ) && ( command_Line[3] == 'b' ) && ( command_Line[4] == 'l' ) && ( command_Line[5] == 'e' )) { command_Line += 6; cmd = Enable; } } else if ( command_Line[0] == 'd' ) // disable { if (( command_Line[1] == 'i' ) && ( command_Line[2] == 's' ) && ( command_Line[3] == 'a' ) && ( command_Line[4] == 'b' ) && ( command_Line[5] == 'l' ) && ( command_Line[6] == 'e' )) { command_Line += 7; cmd = Disable; } } else if ( command_Line[0] == '?' ) // ? { command_Line++; cmd = Status; } else if (( command_Line[0] == '-' ) && ( command_Line[1] == '?')) // -? { command_Line+=2; cmd = Status; } else if (command_Line[0] == '-') // next command cmd = Status; if ( !done ) { int theHBA = -1; if ( params.hba_Num_Specified ) { theHBA = params.hba_Num; } AlarmStatus* temp = new AlarmStatus( theHBA, cmd ); cmd_List->add_Item( *temp ); delete temp; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text ); } goto END_OF_VERB; // Write caching case CMD_WRITE_CACHING: rw = 2; goto WE_CAN_WRITE_CACHE; // Host read caching // case CMD_HOST_READ_CACHING: // for CR2038 - this command is not implemented in the FIRMWARE // when it is, we can take these 4 lines out (AND above goto). // Error_in_Parsing( STR_PARSE_ERR_UNIMPLEMENTED_COMMAND, this_Commands_Text ); // done = true; // goto END_OF_VERB; WE_CAN_WRITE_CACHE: { SCSI_Addr_List *components; // back up to the beginning of this argument list by // starting from the beginning of the command, then skipping // the command. command_Line= Skip_White( this_Commands_Text + LEN_OF_SW_AND_CMD ); // Parse on or off int on = -1; command_Line = TranslateNext(command_Line, &on); // if on is still -1, then none of the parms // matched SO check for ? or -? or device if (on == -1) { if ( command_Line[0] == '?' ) { ++command_Line; on = -2; } else if (( command_Line[0] == '-' ) && ( command_Line[1] == '?' )) { command_Line += 2; on = -2; } // Device? else if ((command_Line[0] == 'c') || (command_Line[0] == 'd')) { on = -2; } } // if on never set correctly, error if ( on == -1 ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_INVALID_CMD_OR_OPTION_TO_CMD], this_Commands_Text); goto END_OF_VERB; } components = Get_Address_List( command_Line, &command_Line, this_Commands_Text, &done ); if( !done ) { SetCache * temp = new SetCache( components, on, rw ); cmd_List->add_Item( *temp ); delete temp; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text ); } } goto END_OF_VERB; // Load and Save Configuration from/to file case CMD_LOAD_SAVE_CONFIGURATION: if (*string_Arg == '\0') { Error_in_Parsing(EventStrings[STR_PARSE_ERR_INVALID_CMD_OR_OPTION_TO_CMD], this_Commands_Text); done = true; } else { command_Line = Skip_White(this_Commands_Text + LEN_OF_SW_AND_CMD); ConfigureOption cfgOpt; bool nobuildOption = false; if (command_Line[0] == 'N') { nobuildOption = true; command_Line++; } if (command_Line[0] == ' ') command_Line++; if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_LOAD], strlen(EventStrings[STR_CMD_LINE_LOAD]))) { cfgOpt = LoadCfg; command_Line += strlen(EventStrings[STR_CMD_LINE_LOAD]); } else if (!memcmp(command_Line, EventStrings[STR_CMD_LINE_SAVE], strlen(EventStrings[STR_CMD_LINE_SAVE]))) { cfgOpt = SaveCfg; command_Line += strlen(EventStrings[STR_CMD_LINE_SAVE]); } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_INVALID_CMD_OR_OPTION_TO_CMD], this_Commands_Text); done = true; goto END_OF_VERB; } command_Line = Extract_Word (command_Line, string_Arg); if (command_Line == NULL) { done = true; Error_in_Parsing (EventStrings[STR_PARSE_ERR_MUST_SUPPLY_FILE_NAME], this_Commands_Text); } else { Config *temp = new Config (string_Arg, cfgOpt, nobuildOption); cmd_List->add_Item (*temp); delete temp; } } goto END_OF_VERB; // Reset/Clear RAID store // This is Zap /* case CMD_RESET_CLEAR_RAID_STORE: Error_in_Parsing( STR_PARSE_ERR_UNIMPLEMENTED_COMMAND, this_Commands_Text ); done = true; goto END_OF_VERB;*/ // Reset NVRAM configuration case CMD_RESET_NVRAM_CONFIG: { // default is NOT to resync // change later when bad cache issue corrected. int resync = 0; if (command_Line !='\0') { // see if resync is set on/enable if (is_Int_Arg) resync = int_Arg; else command_Line = TranslateNext(string_Arg, &resync); } if( params.hba_Num_Specified ) { Reset_NVRam * temp = new Reset_NVRam (params.hba_Num, resync); cmd_List->add_Item( *temp ); delete temp; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_HBA], this_Commands_Text ); done = true; } goto END_OF_VERB; } // View Battery Status // This is -L battery /* case CMD_BATTERY_STATUS_INFO: Error_in_Parsing( STR_PARSE_ERR_UNIMPLEMENTED_COMMAND, this_Commands_Text ); done = true; goto END_OF_VERB;*/ case CMD_EOL_COMMENT: // ignore the rest of the command-line, it is a comment (used // for debugging only) command_Line = 0; goto END_OF_VERB; // List devices case CMD_LIST_DEVICES: { int i = 0; static str_to_Const_Struct list_Dev_Types[25]; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_PHYSICAL]; list_Dev_Types[i++].constant = List_Device::LIST_PHYSICALS; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_PHYSICALS]; list_Dev_Types[i++].constant = List_Device::LIST_PHYSICALS; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_LOGICAL]; list_Dev_Types[i++].constant = List_Device::LIST_LOGICALS; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_LOGICALS]; list_Dev_Types[i++].constant = List_Device::LIST_LOGICALS; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_CONTROLLER]; list_Dev_Types[i++].constant = List_Device::LIST_CONTROLLERS; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_CONTROLLERS]; list_Dev_Types[i++].constant = List_Device::LIST_CONTROLLERS; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_SPARE]; list_Dev_Types[i++].constant = List_Device::LIST_HOT_SPARES; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_SPARES]; list_Dev_Types[i++].constant = List_Device::LIST_HOT_SPARES; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_HOTSPARE]; list_Dev_Types[i++].constant = List_Device::LIST_HOT_SPARES; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_HOTSPARES]; list_Dev_Types[i++].constant = List_Device::LIST_HOT_SPARES; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_ARRAY]; list_Dev_Types[i++].constant = List_Device::LIST_ARRAY; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_ARRAYS]; list_Dev_Types[i++].constant = List_Device::LIST_ARRAY; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_ALL]; list_Dev_Types[i++].constant = List_Device::LIST_ALL; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_ALL_VENDOR]; list_Dev_Types[i++].constant = List_Device::LIST_ALL_VENDOR; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_SPEED]; list_Dev_Types[i++].constant = List_Device::LIST_SPEED; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_REDIRECT]; list_Dev_Types[i++].constant = List_Device::LIST_REDIRECT; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_VERSION]; list_Dev_Types[i++].constant = List_Device::LIST_VERSION; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_CACHE]; list_Dev_Types[i++].constant = List_Device::LIST_CACHE; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_INQUIRY]; list_Dev_Types[i++].constant = List_Device::LIST_INQUIRY; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_INQUIRY_VENDOR]; list_Dev_Types[i++].constant = List_Device::LIST_INQUIRY_VENDOR; list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_BATTERY]; list_Dev_Types[i++].constant = List_Device::LIST_BATTERY; // karla's debug for listing tags list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_TAGS]; list_Dev_Types[i++].constant = List_Device::LIST_TAGS; // end of karla's debug (1 line only) list_Dev_Types[i].str = EventStrings[STR_CMD_LINE_ARRAYNAME]; list_Dev_Types[i++].constant = List_Device::LIST_ARRAYNAME; list_Dev_Types[i].str = ""; list_Dev_Types[i++].constant = List_Device::LIST_INVALID_DEVICE_TYPE; List_Device::list_Type list_Devices_Of_Type; list_Devices_Of_Type = (List_Device::list_Type ) Str_to_Constant( string_Arg, list_Dev_Types ); if( list_Devices_Of_Type == List_Device::LIST_INVALID_DEVICE_TYPE ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_NOT_A_VALID_LIST_TYPE], this_Commands_Text ); done= true; } else { Command *list_Device; // even if they specified a controller number, if they // want to list controllers, ignore the number they specified. if( params.hba_Num_Specified) // per CR2072 - make the option of getting the info for a specified hba // if no hba is specified, all are listed // && list_Devices_Of_Type != List_Device::LIST_CONTROLLERS) { // Keep these lines separate for SCO (Unixware) SCSI_Address addr = SCSI_Address(params.hba_Num); list_Device = new List_Device(list_Devices_Of_Type, addr); } else { list_Device = new List_Device(list_Devices_Of_Type); } cmd_List->add_Item(*list_Device); delete list_Device; } } goto END_OF_VERB; // Display inquiry information case CMD_DISPLAY_INQ_INFO: { SCSI_Addr_List *components; // see if an arg was specified. if so, then this is // an inq of a physical device. Otherwise, it is an // inq of an HBA. // // back up to the beginning of this argument list by // starting from the beginning of the command, then // skipping the command. command_Line= this_Commands_Text + LEN_OF_SW_AND_CMD; components = Get_Address_List( command_Line, &command_Line, this_Commands_Text, &done); if( !done && ( components->get_Num_Items() > 0 ) && ( components->get_Item( 0 ).hba >= 0 )) { params.hba_Num = components->get_Item( 0 ).hba; params.hba_Num_Specified = true; } // this was put back in because usage page says // the device is optional if ((components->get_Num_Items() == 0) || (components->get_Item(0).id < 0)) { // create an address for the controller SCSI_Address temp(params.hba_Num, params.hba_Bus, -1, -1); components = new SCSI_Addr_List(); components->add_Item(temp); done = false; } if( !done ) { // if there is an target id argument, then this // must be for a physical device. If it isn't, // then it is a controller. Show_Inquiry * temp = new Show_Inquiry( components->get_Item( 0 )); cmd_List->add_Item( *temp ); delete temp; } } goto END_OF_VERB; case CMD_IGNORE_NONFATAL_ERRORS: { ignoreNonfatalErrors = true; } goto END_OF_VERB; // Quiet mode case CMD_QUIET_MODE: { Quiet_Mode *temp = new Quiet_Mode( quiet_Mode ); cmd_List->add_Item( *temp ); delete temp; } goto END_OF_VERB; // Pagenation mode case CMD_PAGENATION_MODE: { Pagenation_Mode mode; mode.SetPagenationMode(true); } goto END_OF_VERB; // Display usage informaiton case CMD_SHOW_UTIL_USAGE: { Show_Usage *temp = new Show_Usage(); cmd_List->add_Item( *temp ); delete temp; } goto END_OF_VERB; END_OF_VERB: Reset_Params_to_Defaults(); break; // modifiers #if !defined _DPT_WIN_NT && !defined _DPT_LINUX && !defined _DPT_UNIXWARE // Specify Controllers case CMD_SPECIFY_CTLR: if( params.hba_Num_Specified ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_SWITCH_MULTIPLY_DEFINED], this_Commands_Text ); done = true; } else { if( is_Int_Arg ) { DPTControllerMap map; int dpt = map.getHba( int_Arg ); int bus = map.getBus( int_Arg ); if ( dpt < 0 ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_CTLR_DESGINATIONS_NOT_SUPPORTED], this_Commands_Text ); } else { params.hba_Num_Specified = true; params.hba_Num = dpt; params.hba_Bus_Specified = true; params.hba_Bus = bus; } } else { SCSI_Address controller; (void)Get_Address (string_Arg, &controller); if ( controller.hba != -1 ) { params.hba_Num_Specified= true; params.hba_Num = controller.hba; if ( controller.bus != -1 ) { params.hba_Bus_Specified= true; params.hba_Bus = controller.bus; } } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_CTLR_DESGINATIONS_NOT_SUPPORTED], this_Commands_Text); done = true; } } } break; #endif case CMD_SPECIFY_DPT: if( params.hba_Num_Specified ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_SWITCH_MULTIPLY_DEFINED], this_Commands_Text); done = true; } else { if( is_Int_Arg ) { params.hba_Num_Specified = true; params.hba_Num = int_Arg; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_CTLR_DESGINATIONS_NOT_SUPPORTED], this_Commands_Text); done = true; } } break; // Specify new logical drive RAID level case CMD_RAID_LEVEL: if( params.raid_Type_Specified ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_SWITCH_MULTIPLY_DEFINED], this_Commands_Text); done = true; } else { if( is_Int_Arg ) { params.raid_Type_Specified = true; if ( int_Arg == 50 ) { int_Arg = 5; } else if ( int_Arg == 10 ) { int_Arg = 1; } params.raid_Type = ( Create_Raid::Raid_Type ) int_Arg; } else if (string_Arg[0] == 'j') { params.raid_Type = (Create_Raid::Raid_Type) RAID_REDIRECT; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_BE_INTEGER_VALUE], this_Commands_Text ); done = true; } } break; // Specify logical drive number case CMD_LOGICAL_DRIVE_NUM: Error_in_Parsing(EventStrings[STR_PARSE_ERR_UNIMPLEMENTED_COMMAND], this_Commands_Text); done = true; break; #if 0 // Unreachable Code if( is_Int_Arg ) { if( params.logical_Drive_Number ) { // back up to the beginning of this argument list by // starting from the beginning of the command, then skipping // the command. command_Line= this_Commands_Text + LEN_OF_SW_AND_CMD; *params.logical_Drive_Number += *Get_Int_List( command_Line, &command_Line, this_Commands_Text, &done ); } else { // back up to the beginning of this argument list by // starting from the beginning of the command, then skipping // the command. command_Line= this_Commands_Text + LEN_OF_SW_AND_CMD; params.logical_Drive_Number = Get_Int_List( command_Line, &command_Line, this_Commands_Text, &done ); } } break; #endif // display cluster support "enabled/disabled" case CMD_CLUSTER_SUPPORT: command_Line = this_Commands_Text + LEN_OF_SW_AND_CMD; NvramBit *temp; if (params.hba_Num_Specified) temp = new NvramBit (Cluster, params.hba_Num, -1); else temp = new NvramBit (Cluster, -1, -1); cmd_List->add_Item (*temp); delete temp; break; // Specify Logical drive capacity case CMD_LOGICAL_DRIVE_CAPACITY: // CMD_LOGICAL_DRIVE_CAPACITY { if( params.logical_Drive_Capacity_in_Megs_Specified ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_SWITCH_MULTIPLY_DEFINED], this_Commands_Text ); done = true; } else { if( is_Int_Arg ) { params.logical_Drive_Capacity_in_Megs_Specified = true; params.logical_Drive_Capacity_in_Megs = int_Arg; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_DRIVE_CAPACITY_MUST_BE_INTEGER], this_Commands_Text ); done = true; } } } break; // Specify logical drive stripe size case CMD_LOGICAL_DRIVE_STRIPE_SIZE: if( params.stripe_Size_Specified ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_SWITCH_MULTIPLY_DEFINED], this_Commands_Text ); done = true; } else { if( is_Int_Arg ) { params.stripe_Size_Specified= true; // accept non-abbreviated stripe sizes if( int_Arg < 8192 ) { int_Arg *= 1024; } switch( int_Arg ) { // the only valid strip sizes case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: params.stripe_Size_Specified = true; params.stripe_Size = int_Arg; break; default: Error_in_Parsing(EventStrings[STR_PARSE_ERR_INVALID_STRIPE_SIZE], this_Commands_Text ); done = true; break; } } } break; // Specify task rate( priority ) case CMD_TASK_RATE: if( params.task_Rate_Specified ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_SWITCH_MULTIPLY_DEFINED], this_Commands_Text ); done = true; } else { command_Line = Skip_White(this_Commands_Text + LEN_OF_SW_AND_CMD); if (command_Line == NULL) done = true; params.task_Rate_Specified = true; if (is_Int_Arg) { if ((int_Arg < 0) || (int_Arg > 9)) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_INVALID_TASK_RATE], this_Commands_Text ); params.task_Rate_Specified = false; done = true; } else { params.task_Rate = int_Arg; command_Line++; } } else { if (!done) { if (!strncmp(command_Line, EventStrings[STR_CMD_LINE_TASK_RATE_SLOW], strlen(EventStrings[STR_CMD_LINE_TASK_RATE_SLOW]))) { params.task_Rate = 1; command_Line += strlen(EventStrings[STR_CMD_LINE_TASK_RATE_SLOW]); } else if (!strncmp(command_Line, EventStrings[STR_CMD_LINE_TASK_RATE_MEDSLOW], strlen(EventStrings[STR_CMD_LINE_TASK_RATE_MEDSLOW]))) { params.task_Rate = 3; command_Line += strlen(EventStrings[STR_CMD_LINE_TASK_RATE_MEDSLOW]); } else if (!strncmp(command_Line, EventStrings[STR_CMD_LINE_TASK_RATE_MEDFAST], strlen(EventStrings[STR_CMD_LINE_TASK_RATE_MEDFAST]))) { params.task_Rate = 7; command_Line += strlen(EventStrings[STR_CMD_LINE_TASK_RATE_MEDFAST]); } else if (!strncmp(command_Line, EventStrings[STR_CMD_LINE_TASK_RATE_MED], strlen(EventStrings[STR_CMD_LINE_TASK_RATE_MED]))) { params.task_Rate = 5; command_Line += strlen(EventStrings[STR_CMD_LINE_TASK_RATE_MED]); } else if (!strncmp(command_Line, EventStrings[STR_CMD_LINE_TASK_RATE_FAST], strlen(EventStrings[STR_CMD_LINE_TASK_RATE_FAST]))) { params.task_Rate = 9; command_Line += strlen(EventStrings[STR_CMD_LINE_TASK_RATE_FAST]); } else if (!strncmp(command_Line, "?", 1)) { params.task_Rate = -1; command_Line++; } else if (!strncmp(command_Line, "-?", 2)) { params.task_Rate = -1; command_Line += 2; } else if ((!strncmp(command_Line, "c", 1)) || (!strncmp(command_Line, "d", 1))) { params.task_Rate = -1; } else { params.task_Rate_Specified = false; } } } if (params.task_Rate_Specified) { SCSI_Addr_List *components; components = Get_Address_List (command_Line, &command_Line, this_Commands_Text, &done); if (done && ( params.hba_Num_Specified )) { // create an address for the controller. SCSI_Address temp( params.hba_Num, params.hba_Bus, -1, -1 ); components = new SCSI_Addr_List(); components->add_Item( temp ); done = false; } if (!done) { SetRate * temp = new SetRate (params.task_Rate, components); cmd_List->add_Item(*temp); delete temp; } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text); } } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_INVALID_CMD_OR_OPTION_TO_CMD], this_Commands_Text); } } break; // Specify maximum negotiated speed case CMD_SCSI_MHZ: Error_in_Parsing(EventStrings[STR_PARSE_ERR_UNDEFINED_SWITCH], this_Commands_Text ); done = true; break; #if 0 { int speed = -1; if( is_Int_Arg ) { speed = int_Arg; } else if (!strcmp (string_Arg, EventStrings[STR_ASYNC])) { speed = 0; } else if(( *string_Arg == '\0' ) || !strcmp( string_Arg, "-?" ) || !strcmp( string_Arg, "?" ) ) { speed = -1; if ( *string_Arg != '\0' ) { command_Line += 2; } } else { speed = -2; } switch (speed) { case -1: case 0: case 5: case 8: case 10: case 20: case 40: break; default: Error_in_Parsing(EventStrings[STR_PARSE_ERR_INVALID_SPEED], this_Commands_Text ); done = true; } if ( !params.hba_Num_Specified ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_HBA], this_Commands_Text ); done = true; } if ( done != true ) { SetSpeed * temp = new SetSpeed ( speed, params.hba_Num_Specified ? params.hba_Num : -1, params.hba_Bus_Specified ? params.hba_Bus : -1 ); cmd_List->add_Item( *temp ); delete temp; } } goto END_OF_VERB; #endif case CMD_FLASH: #if defined _DPT_NETWARE Error_in_Parsing(EventStrings[STR_PARSE_ERR_NO_FLASH_FOR_NETWARE], this_Commands_Text ); done = true; #endif if ( *string_Arg == '\0' ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SUPPLY_IMAGE], this_Commands_Text ); done = true; } else { Flash * temp; command_Line = Skip_White(command_Line); // default is NOT to resync // change later when bad cache issue corrected. int resync = 0; if (command_Line !='\0') { // see if resync is set on/enable command_Line = TranslateNext(command_Line, &resync); } if ( !params.hba_Num_Specified ) { temp = new Flash ( string_Arg, resync); } else { temp = new Flash( string_Arg, resync, params.hba_Num); } cmd_List->add_Item( *temp ); delete temp; } goto END_OF_VERB; default: Error_in_Parsing(EventStrings[STR_PARSE_ERR_UNDEFINED_SWITCH], this_Commands_Text ); done = true; break; } } // this section to match on strings // all these are HIDDEN!!!!!!!!!!!!! else if (*command_Line == SW_DELIM_3) { command_Line = Skip_White (this_Commands_Text); #if 0 // MGS - This feature was removed from Firmware, no CR assigned to this feature removal. // CMD_FUA_CLUSTER - this is HIDDEN!!!!!!!!!!!! if (!strncmp(command_Line, "+clusterfua", strlen("clusterfua"))) { command_Line = command_Line + 1 + strlen("clusterfua"); int temp_set = -1; command_Line = TranslateNext(command_Line, &temp_set); NvramBit *temp; if (params.hba_Num_Specified) temp = new NvramBit (Cluster_FUA, params.hba_Num, temp_set); else temp = new NvramBit (Cluster_FUA, -1, temp_set); cmd_List->add_Item (*temp); delete temp; } // CMD_CACHE_STALE - this is HIDDEN!!!!!!!!!!!! else #endif if (!strncmp(command_Line, "+cachestale", strlen("+cachestale"))) { command_Line = command_Line + 1 + strlen("cachestale"); int temp_set = -1; command_Line = TranslateNext(command_Line, &temp_set); NvramBit *temp; if (params.hba_Num_Specified) temp = new NvramBit (Cache_Stale, params.hba_Num, temp_set); else temp = new NvramBit (Cache_Stale, -1, temp_set); cmd_List->add_Item (*temp); delete temp; } else if (!strncmp(command_Line, "+cluster", strlen("cluster"))) { command_Line = command_Line + 1 + strlen("cluster"); int temp_set = -1; command_Line = TranslateNext(command_Line, &temp_set); NvramBit *temp; if (params.hba_Num_Specified) temp = new NvramBit (Cluster, params.hba_Num, temp_set); else temp = new NvramBit (Cluster, -1, temp_set); cmd_List->add_Item (*temp); delete temp; } else if (!strncmp(command_Line, "+hot_spare_same_channel", strlen("+hot_spare_same_channel"))) { command_Line = command_Line + 1 + strlen("hot_spare_same_channel"); int temp_set = -1; command_Line = TranslateNext(command_Line, &temp_set); NvramBit *temp; if (params.hba_Num_Specified) temp = new NvramBit (HS_Same_Channel, params.hba_Num, temp_set); else temp = new NvramBit (HS_Same_Channel, -1, temp_set); cmd_List->add_Item (*temp); delete temp; } else if (!strncmp(command_Line, "+setsysconfig", strlen("+setsysconfig"))) { command_Line = command_Line + 1 + strlen("setsysconfig"); command_Line = Skip_White (command_Line); setscfg *temp; temp = new setscfg (); cmd_List->add_Item (*temp); delete temp; } else if (!strncmp(command_Line, "+uartdump", strlen("+uartdump"))) { command_Line = command_Line + 1 + strlen("uartdump"); command_Line = Skip_White (command_Line); // look for name of file to put dump in, // or '-' for screen dump char *fileName; if (*command_Line != '\0') { fileName = command_Line; if (fileName[strlen(fileName) -1] == ' ') fileName[strlen(fileName) -1] = '\0'; } else { Error_in_Parsing (EventStrings[STR_PARSE_ERR_MUST_SUPPLY_FILE_NAME], this_Commands_Text); break; } command_Line += strlen(fileName); UartDmp *temp; if (params.hba_Num_Specified) temp = new UartDmp (params.hba_Num, fileName); else temp = new UartDmp (-1, fileName); cmd_List->add_Item (*temp); delete temp; } else if (!strncmp(command_Line, "+namearray", strlen("+namearray"))) { command_Line = command_Line + 1 + strlen("namearray"); command_Line = Skip_White (command_Line); bool error_Occurred = false; SCSI_Address raidToName; char arrayName[17]; // Get the address of the array to be named if( command_Line) { command_Line = Skip_White (command_Line); command_Line = Get_Address(command_Line, &raidToName); } // return error if no array is found else { error_Occurred = true; Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text ); break; } command_Line = Skip_White( command_Line ); // return error if arrayName is longer than 16 characters if (command_Line) { if (strlen(command_Line) > 16) { error_Occurred = true; Error_in_Parsing(EventStrings[STR_ERR_NAME_TOO_LONG], this_Commands_Text ); break; } command_Line = Extract_Word (command_Line, arrayName); } else { error_Occurred = true; Error_in_Parsing(EventStrings[STR_ERR_NO_ARRAY_NAME], this_Commands_Text ); break; } if (!error_Occurred) { NameArray * temp = new NameArray (raidToName, arrayName); cmd_List->add_Item( *temp ); delete temp; } } else if (!strncmp(command_Line, "+rawdata", strlen("+rawdata"))) { command_Line = command_Line + 1 + strlen("rawdata"); command_Line = Skip_White (command_Line); /* // look for name of file to put dump in, // or '-' for screen dump char *fileName; if (*command_Line != '\0') { fileName = command_Line; if (fileName[strlen(fileName) -1] == ' ') fileName[strlen(fileName) -1] = '\0'; } else { Error_in_Parsing (EventStrings[STR_PARSE_ERR_MUST_SUPPLY_FILE_NAME], this_Commands_Text); break; } command_Line += strlen(fileName); */ RawData *temp = new RawData(); cmd_List->add_Item (*temp); delete temp; } else if (!strncmp(command_Line, "+OEMSpecificName", strlen("+OEMSpecificName"))) { command_Line = command_Line + strlen("+OEMSpecificName"); command_Line = Skip_White (command_Line); // look for string to place within serial flash region. char * OEMSpecificName; if (*command_Line != '\0') { char quote; char * end_of_string; OEMSpecificName = command_Line; if (*OEMSpecificName == '=') { ++OEMSpecificName; ++command_Line; } if (((quote = *OEMSpecificName) == '\'') || (quote == '"') || (quote == '`')) { ++OEMSpecificName; ++command_Line; end_of_string = OEMSpecificName; while (*end_of_string && (*end_of_string != quote)) { ++end_of_string; } if (*end_of_string) { ++command_Line; } } else { end_of_string = OEMSpecificName; while (*end_of_string && (*end_of_string != ' ') && (*end_of_string != '\t') && (*end_of_string != '\n') && (*end_of_string != '\r')) { ++end_of_string; } } *end_of_string = '\0'; } else { Error_in_Parsing (EventStrings[STR_PARSE_ERR_MUST_SUPPLY_ASCII_DATA], this_Commands_Text); break; } command_Line += strlen(OEMSpecificName); RMWFlash *temp; /* Flash Region 3 at offset 0x100 for a maximum length of 32 characters */ if (strlen(OEMSpecificName) > 32) { Error_in_Parsing (EventStrings[STR_PARSE_ERR_ASCII_DATA_TOO_LONG], this_Commands_Text); } { char * Buffer = new char [33]; /* This is a leak :-( */ memset (Buffer, 0, 33); strcpy (Buffer, OEMSpecificName); if (params.hba_Num_Specified) temp = new RMWFlash (params.hba_Num, Buffer, 4, 0x100, 32); else temp = new RMWFlash (-1, Buffer, 4, 0x100, 32); } cmd_List->add_Item (*temp); delete temp; } // Max number of segments possible is 8 // Two long arrays hold parameters to be sent to the engine (segSize, segOffset) to fill the // firmware table. else if (!strncmp(command_Line, "+segment", strlen("+segment"))) { const uSHORT MAX_NUM_SEGMENTS = 8; bool parseSegDone = false; bool error_Occurred = false; SCSI_Address raidToSegment; uLONG segSize[MAX_NUM_SEGMENTS]; memset( segSize, -1, sizeof( segSize)); uLONG segOffset[MAX_NUM_SEGMENTS]; memset( segOffset, 0, sizeof( segOffset)); uLONG currSegSize; uLONG currSegOffset; bool showSegments = false; uSHORT ct=0; const int LEN_STRING_ARG = 60; char string_Arg[ LEN_STRING_ARG ]; command_Line = command_Line + strlen("+segment"); if( command_Line) { command_Line = Skip_White (command_Line); command_Line = Get_Address(command_Line, &raidToSegment); } while( command_Line && *command_Line && !error_Occurred && !parseSegDone && ctadd_Item( *temp ); delete temp; } } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_UNDEFINED_SWITCH], this_Commands_Text ); done = true; } } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_INVALID_CMD_OR_OPTION_TO_CMD], this_Commands_Text ); done = true; } } if (cmd_List->get_Num_Items() == 0) { Show_Usage *temp = new Show_Usage(); cmd_List->add_Item( *temp ); delete temp; } } Parser::~Parser() { ENTER( "Parser::~Parser()" ); delete cmd_List; // Hack for a crash when exiting. // Since we are exiting it really // doesn't matter if we cleaned up all our memory. // Windows will handle it for us. #if !defined _DPT_WIN_NT delete params.logical_Drive_Number; #endif // _DPT_WIN_NT // this function frees certain memory allocated. Reset_Params_to_Defaults(); EXIT(); } void Parser::Reset_Params_to_Defaults() { ENTER( "void Parser::Reset_Params_to_Defaults()" ); params.raid_Type = Create_Raid::RAID_TYPE_5; EXIT(); } Command_List &Parser::get_Command_List() { ENTER( "Command_List &Parser::get_Command_List()" ); EXIT(); return( *cmd_List ); } /**************************************************************************** * * Function Name: Extract_Command(), Created:7/20/98 * * Description: Does a brain-less parse of the string looking for the next switch * character, and returns a null-terminated string consisting of * just this command. It is copied into the buffer passed in. * * Return: Returns a pointer to a string containing just this command. * * * Notes: This isn't meant to be an accurate lifting out of this one command. * The actual parser does a better job, because it is aware of * the context of each command. This only looks for the switch * character. * *****************************************************************************/ char *Parser::Extract_Command( char *this_Commands_Text, char *buffer ) { ENTER( "char *Parser::Extract_Command( char *this_Commands_Text, char *buffer )" ); // we assume the string to be pointing to the switch character. const int LEN_OF_FIRST_HYPHEN = 1; char *end_of_Command; char *switch_1_Loc; char *switch_2_Loc; switch_1_Loc = strchr( this_Commands_Text + LEN_OF_FIRST_HYPHEN, SW_DELIM_1 ); switch_2_Loc = strchr( this_Commands_Text + LEN_OF_FIRST_HYPHEN, SW_DELIM_2 ); if( switch_1_Loc == 0 && switch_2_Loc == 0 ) { strcpy( buffer, this_Commands_Text ); } else { if( switch_1_Loc == 0 || switch_2_Loc == 0 ) { // only one of these switches exists. Or the switch location with the null // from the other non-existent switch location( this OR saves having to figure // which one is valid ). end_of_Command = (char *) ( (unsigned long) switch_1_Loc | (unsigned long) switch_2_Loc ); } else { // there are two visible switches. Find the closest one. #if !defined _DPT_NETWARE && !defined _DPT_MSDOS end_of_Command = min( switch_1_Loc, switch_2_Loc ); #else end_of_Command = (switch_1_Loc < switch_2_Loc) ? switch_1_Loc : switch_2_Loc; #endif } if( end_of_Command ) { strncpy( buffer, this_Commands_Text, end_of_Command - this_Commands_Text ); buffer[ end_of_Command - this_Commands_Text ] = 0; } else { strcpy( buffer, this_Commands_Text ); } } EXIT(); return( buffer ); } /**************************************************************************** * * Function Name: Extract_Word(), Created:7/21/98 * * Description: Returns the first "word" found in the string. * * Return: Returns "str" advanced to just after the word. * * Notes: * *****************************************************************************/ char *Parser::Extract_Word( char *str, // this is the string from which the string is parsed. char *word // this is the buffer into which the word is copied ) { ENTER( "char *Parser::Extract_Word(" ); char *end_of_Word = 0; *word = '\0'; if( str ) { // in case it is on white space on entry... str = Skip_Non_Word( str ); if( str ) { // now skip to the end of the word end_of_Word = Skip_Word( str ); if( end_of_Word ) { strncpy( word, str, end_of_Word - str ); word[ end_of_Word - str ] = 0; } else { strcpy( word, str ); } } } EXIT(); return( end_of_Word ); } /**************************************************************************** * * Function Name: TranslateNext, Created:10/15/99 * * Description: This accepts a pointer to a c-string, and returns the integer equivalent of the number or string in the input string. * * Return: 1 if "on"/"enable"/1 0 if "off"/"disable"/0 * *****************************************************************************/ char *Parser::TranslateNext (char *str, int *retVal) { ENTER ("char *Parser::TranslateNext (char *str, int *retVal)"); char c; // advance to the next non-white space while (((c = *str) != 0) && ((c == ' ') || (c == '\t') || (c == '\n') || (c == '=') || (c == '\r'))) { str++; } if (isdigit (*str)) { *retVal = 0; while ((str[0] != ' ') && (str[0] != '-')) { *retVal *= 10; *retVal += str[0] - '0'; str++; } // *retVal = atoi(str); // str++; } else if (strstr(str, "on")) { *retVal = 1; str += 2; } else if (strstr(str, "enable")) { *retVal = 1; str += 6; } else if (strstr(str, "off")) { *retVal = 0; str += 3; } else if (strstr(str, "disable")) { *retVal = 0; str += 7; } // string is empty else // if (*str == 0) { *retVal = -1; } EXIT(); return(str); } /**************************************************************************** * * Function Name: Skip_White(), Created:7/20/98 * * Description: This accepts a pointer to a c-string, and returns the first non-white character immediately following any white space at the beginning of the string. * * Return: Returns a pointer to the first non-white character after initial white space. Returns null on end of string. * * Notes: * *****************************************************************************/ char *Parser::Skip_White( char *str ) { ENTER( "char *Parser::Skip_White( char *str )" ); char *ret_Str; char c; // advance to the next non-white space while( ( ( c = *str ) != 0 ) && ( ( c == ' ' ) || ( c == '\t' ) || ( c == '\n' ) || ( c == '\r' ) ) ) { str++; } if( *str == 0 ) { ret_Str = 0; } else { ret_Str = str; } EXIT(); return( ret_Str ); } /**************************************************************************** * * Function Name: Skip_Non_White(), Created:7/20/98 * * Description: Returns a pointer to the next white space. * * Return: Returns a pointer to the next white space, or null on end of string. * * Notes: * *****************************************************************************/ char *Parser::Skip_Non_White( char *str ) { ENTER( "char *Parser::Skip_Non_White( char *str )" ); char *ret_Str; char c; // advance to the next white space while( ( ( c = *str ) != 0 ) && ( c != ' ' ) && ( c != '\t' ) && ( c != '\n' ) && ( c != '\r' ) ) { str++; } if( *str == 0 ) { ret_Str = 0; } else { ret_Str = str; } EXIT(); return( ret_Str ); } /**************************************************************************** * * Function Name: Skip_Non_Word(), Created:7/21/98 * * Description: This skips anything that is not a word, i.e. commas, white-space, etc. * * Return: A pointer to the next word character. * * Notes: * *****************************************************************************/ char *Parser::Skip_Non_Word( char *str ) { ENTER( "char *Parser::Skip_Non_Word( char *str )" ); char *ret_Str = 0; char c; if( str ) { // advance to the next non-word while( ( ( c = *str ) != 0 ) && !isalnum( c ) && ( c != '.' ) && ( c != '-' ) && ( c != '/' ) && ( c != '?' ) && ( c != '_' ) ) { str++; } if( *str == 0 ) { ret_Str = 0; } else { ret_Str = str; } } EXIT(); return( ret_Str ); } char *Parser::Skip_Word( char *str ) { ENTER( "char *Parser::Skip_Word( char *str )" ); char *ret_Str = 0; char c; if( str ) { // advance to the next non-word while( ( ( c = *str ) != 0 ) && ( isalnum( c ) || ( c == '.' ) #if !defined _DPT_WIN_NT // taken out for parsing to pick off next command // either all white spaces are ignored or all aren't || ( c == '-' ) #endif #if defined _DPT_WIN_NT || defined _DPT_MSDOS // allow this for path naming (for flashing) // do not allow '\' because that is EOL character || ( c == ':' ) #endif || ( c == '/' ) || ( c == '?' ) || ( c == '_' ) ) ) { str++; } if( *str == 0 ) { ret_Str = 0; } else { ret_Str = str; } } EXIT(); return( ret_Str ); } void Parser::Error_in_Parsing( char *error_Str, char *this_Command_Line ) { ENTER( "void Parser::Error_in_Parsing(" ); char temp[ 100 ]; // remove all previous commands. Since this didn't // parse right, we can't trust that we would be doing // what they intended. delete cmd_List; // now create a new command list object, and place // this parse error in it as the only command. cmd_List = new Command_List(); cmd_List->add_Item( *( new Parse_Error( error_Str, Extract_Command( this_Command_Line, temp ) ) ) ); EXIT(); } int Parser::Str_to_Constant( char *str_to_Match, // this is the string the user supplies str_to_Const_Struct *str_to_Const // this is an array in which we have // to match the string the user supplies ) { ENTER( "int Parser::Str_to_Constant(" ); int ret_Value = -1; int str_Index; bool done = false; for( str_Index = 0; !done && str_to_Const[ str_Index ].str && *str_to_Const[ str_Index ].str; str_Index++ ) { if( !StrICmp( str_to_Match, str_to_Const[ str_Index ].str ) ) { ret_Value = str_to_Const[ str_Index ].constant; done = true; } } EXIT(); return( ret_Value ); } /**************************************************************************** * * Function Name: Get_Int_List(), Created:7/28/98 * * Description: This function expects a string to be passed in consisting of comma-delimited integers. Leading white-space is allowed. The list passed in must be of the form nnn,nnn,nnn with intervening and leading white-space allowed. * * Return: Int_List of all the integers in the comma-delimited list. * * Notes: The list of integers passed in must start with the integers to be parsed( i.e. the command must be stripped off ). Preceding whitespace is allowed. The caller is responsible for deallocating the int list returned. * *****************************************************************************/ Int_List *Parser::Get_Int_List( char *int_Str, // pointer to a list of comma // delimited constants char **end_Ptr, // this will be set to point // to the end of the parsed list char *this_Commands_Text, // this is the whole command, // used to create a context-based // error string when the command fails bool *error_Occurred // set true when an error is // detected ) { ENTER( "Int_List *Parser::Get_Int_List(" ); Int_List *integers; bool done= false; *error_Occurred = false; integers = new Int_List(); // suck up any comma-delimited integers while( int_Str && *int_Str && !*error_Occurred && !done ) { // skip past any delimiters to the next "word" int_Str = Skip_Non_Word( int_Str ); // make sure we have at least one leading digit here. if( !isdigit( *int_Str ) ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_BE_INTEGER_VALUE], this_Commands_Text ); done = true; *error_Occurred = true; } else { integers->add_Item( strtol( int_Str, &int_Str, 10 ) ); } char next_Delimiter = *Skip_White( int_Str ); // determine whether we are done with the comma-delimited list. switch( next_Delimiter ) { // this is what we expect case ',': break; // if we reach here, we've found the next switch, or reached the end // of the command line case 0: case SW_DELIM_1: case SW_DELIM_2: done = true; break; default: // strtol must have been passed a non-numeric value in the string Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_BE_INTEGER_VALUE], this_Commands_Text ); done = true; *error_Occurred = true; break; } } *end_Ptr = int_Str; EXIT(); return( integers ); } /**************************************************************************** * * Function Name: Get_Address(), Created:10/20/98 * * Description: This function expects a Solaris based address of the form 'c#t#d#[s#]' or a DPT convenience `d#b#t#d#' address. * * Return: length of string processed. * * *****************************************************************************/ char * Parser::Get_Address ( char *address_Str, // pointer to a address string SCSI_Address * component ) { int int_Arg; char * cp; component->hba = -1; component->bus = -1; component->id = -1; component->lun = -1; component->level = -1; if ( address_Str == 0 ) { return ( address_Str ); } address_Str = Skip_White( address_Str ); switch (address_Str[0]) { case 'c': cp = address_Str++; int_Arg = strtol( address_Str, &address_Str, 10 ); { #if (!defined(_DPT_NETWARE) && !defined(_DPT_BSDI) && !defined(_DPT_FREE_BSD)) class DPTControllerMap * map = new class DPTControllerMap; #else class DPTControllerMap * map = new DPTControllerMap; #endif if ( map->getHba( int_Arg ) < 0 ) { Error_in_Parsing( EventStrings[STR_PARSE_ERR_CTLR_DESGINATIONS_NOT_SUPPORTED], cp ); } else { component->hba = map->getHba( int_Arg ); component->bus = map->getBus( int_Arg ); } delete map; } break; case 'd': ++address_Str; component->hba = strtol( address_Str, &address_Str, 10 ); if (address_Str[0] != 'b') { /*#if defined _DPT_SOLARIS kds kds component->lun = component->hba; component->hba = -1; #endif*/ return ( address_Str ); } else // get the bus number { ++address_Str; component->bus = strtol( address_Str, &address_Str, 10 ); } case 't': break; default: return ( address_Str ); } if ( address_Str[0] != 't' ) { return ( address_Str ); } ++address_Str; component->id = strtol( address_Str, &address_Str, 10 ); // get second digit of id if( isdigit( *address_Str ) ) { component->id *= 10; component->id += strtol( address_Str, &address_Str, 10 ); // get third digit of id if( isdigit( *address_Str ) ) { component->id *= 10; component->id += strtol( address_Str, &address_Str, 10 ); } } if ( address_Str[0] != 'd' ) { return ( address_Str ); } ++address_Str; component->lun = strtol( address_Str, &address_Str, 10 ); if ( address_Str[0] != 's' ) { return ( address_Str ); } ++address_Str; component->level = strtol( address_Str, &address_Str, 10 ); return ( address_Str ); } /**************************************************************************** * * Function Name: Get_Address_List(), Created:7/28/98 * * Description: This function expects a comma-delimited list of addresses of * the form 'CIII,CIII,CIII', where 'C' is the channel, and * 'III' is the id of the device referenced; or, c#t#d# * which is controller, target, lun respectively * * Return: SCSI_Addr_List of all the addresses listed * * Notes: The list of addresses passed in must start with the addresses to be parsed( i.e. the command must be stripped off ). Preceding whitespace is allowed. The caller is responsible for deallocating the address list returned. * *****************************************************************************/ SCSI_Addr_List *Parser::Get_Address_List( char *address_Str, // pointer to a list of comma // delimited constants char **end_Ptr, // this will be set to point // to the end of the parsed list char *this_Commands_Text, // this is the whole command, // used to create a context-based // error string when the command fails bool *error_Occurred // set true when an error is // detected ) { ENTER( "SCSI_Addr_List *Parser::Get_Address_List(" ); SCSI_Addr_List *components; bool done = false; SCSI_Address last; int last_group = -1; last.hba = ( !params.hba_Num_Specified ) ? -1 : params.hba_Num; last.bus = ( !params.hba_Bus_Specified ) ? -1 : params.hba_Bus; last.id = -1; last.lun = -1; last.level = -1; components = new SCSI_Addr_List(); // suck up any comma-delimited integers while( address_Str && *address_Str && !*error_Occurred && !done ) { address_Str = Skip_Non_Word( address_Str ); if( address_Str == 0 || *address_Str == 0 ) { *error_Occurred = true; } else { SCSI_Address component; if( !isdigit( *address_Str ) ) { address_Str = Get_Address (address_Str, &component); if( component.hba == -1 ) { component.hba = last.hba; } else { last.bus = -1; last.id = -1; last.lun = -1; last.level = last_group; } if( component.bus == -1 ) { component.bus = last.bus; } else { last.id = -1; last.lun = -1; last.level = last_group; } if( component.id == -1 ) { component.id = last.id; } else { last.lun = -1; last.level = last_group; } if( component.lun == -1 ) { component.lun = last.lun; } else { last.level = last_group; } if( component.level == -1 ) { component.level = last.level; } // kds - It is okay to not have a bus specified (INQUIRY) //#if !defined _DPT_SOLARIS // Ex.: Can do inquiry on an HBA. kds kds if (component.hba != -1) //#else // if( ( component.hba != -1 ) // && ( component.bus != -1 ) ) //#endif { last = component; components->add_Item( component ); } else { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_BE_INTEGER_VALUE], this_Commands_Text ); *error_Occurred = true; } } else { /* kds - solaris shouldn't be any different than other OSs #if !defined _DPT_SOLARIS printf(EventStrings[STR_INT_NOT_EXPECTD_USE]); *error_Occurred = true; return( components ); #endif */ char component_Buf[ 40 ]; char *component_Str = component_Buf; SCSI_Address component; address_Str = Extract_Word( address_Str, component_Buf ); if( !isdigit( *component_Str ) ) { Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_BE_INTEGER_VALUE], this_Commands_Text ); *error_Occurred = true; } else { component.hba = params.hba_Num; // the bus is always the first character of the string component.bus = *component_Str++ - '0'; // the remainder of the string is the id number component.id = strtol( component_Str, &component_Str, 10 ); component.lun = 0; component.level = last_group; components->add_Item( component ); } } char *next_Delimiter = Skip_White( address_Str ); if( next_Delimiter ) { // determine whether we are done with the comma-delimited list. switch( *next_Delimiter ) { case '+': ++last_group; // this is what we expect case OPTION_DELIMITER: break; // if we reach here, we've found the next switch, or reached the end // of the command line case 0: case SW_DELIM_1: case SW_DELIM_2: default: done = true; break; //kds Removed this to allow for options to /* default: // strtol must have been passed a non-numeric value in the string Error_in_Parsing( STR_PARSE_ERR_MUST_BE_INTEGER_VALUE, this_Commands_Text ); *error_Occurred = true; break;*/ } } else done = true; } } *end_Ptr = address_Str; EXIT(); return( components ); } /**************************************************************************** * * Function Name: To_Lower(), Created:7/30/98 * * Description: Modifies the string, forcing alpha's to lower case. * * Notes: This is NOT suitable for localization!! * *****************************************************************************/ void Parser::To_Lower( char *str ) { ENTER( "void Parser::To_Lower( char *str )" ); for(; *str; str++ ) { if( isalpha( *str ) ) { *str |= 0x20; } } EXIT(); } int Parser::StrICmp( const char *str1, const char *str2 ) { ENTER( "int Parser::StrICmp(" ); char buf1[ 256 ]; char buf2[ 256 ]; strcpy( buf1, str1 ); strcpy( buf2, str2 ); To_Lower( buf1 ); To_Lower( buf2 ); EXIT(); return( strcmp( buf1, buf2 ) ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/parser.hpp0000664000175000000620000001321010044153336020156 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef PARSER_HPP #define PARSER_HPP /**************************************************************************** * * Created: 7/20/98 * ***************************************************************************** * * File Name: Parser.hpp * Module: * Contributors: Lee Page * Description: This class is an object factory that accepts a command-line string in. Then it creates a an array of objects, one per command. This array can then be fetched and executed. * Version Control: * * $Revision: 9 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "cmdlist.hpp" #include "creatrad.hpp" #include "scsilist.hpp" #include "intlist.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Parser { public: Parser( char *command_Line, bool *quiet_Mode_Ptr // A pointer to the quiet mode boolean ); virtual ~Parser(); Command_List &get_Command_List(); private: /* static const unsigned long RAID_0_DEFAULT_STRIPE_SIZE; static const unsigned long RAID_1_DEFAULT_STRIPE_SIZE; static const unsigned long RAID_5_DEFAULT_STRIPE_SIZE; */ static const unsigned long BLOCK_SIZE; // a structure used in the retrieving of a constant associated with a string. struct str_to_Const_Struct { char *str; // this is the string that is associated with the // constant int constant; }; char *Extract_Command( char *this_Commands_Text, char *buffer ); char *Extract_Word( char *str, char *word ); char *TranslateNext (char *str, int *retVal); char *Skip_White( char *str ); char *Skip_Non_White( char *str ); char *Skip_Non_Word( char *str ); char *Skip_Word( char *str ); static void To_Lower( char *str ); static int StrICmp( const char *str1, const char *str2 ); void Reset_Params_to_Defaults(); void Error_in_Parsing( char *error_Str, char *this_Command_Line ); int Str_to_Constant( char *str_to_Match, // this is the string the user supplies str_to_Const_Struct *str_to_Const // this is an array in which we have // to match the string the user supplies ); Int_List *Get_Int_List( char *int_Str, // pointer to a list of comma // delimited constants char **end_Ptr, // this will be set to point // to the end of the parsed list char *this_Commands_Text, // this is the whole command, // used to create a context-based // error string when the command fails bool *done // set true when an error is // detected ); char * Get_Address( char *address_Str, // pointer to an address SCSI_Address * component ); SCSI_Addr_List *Get_Address_List( char *address_Str, // pointer to a list of comma // delimited constants char **end_Ptr, // this will be set to point // to the end of the parsed list char *this_Commands_Text, // this is the whole command, // used to create a context-based // error string when the command fails bool *done // set true when an error is // detected ); Command_List *cmd_List; bool *quiet_Mode; // the "..._Specified" bool is intended to aid in parameter checking to make // sure that mandatory parameters are used, else the command invocation fails. struct Parameters { bool hba_Num_Specified; int hba_Num; bool hba_Bus_Specified; int hba_Bus; bool unix_Style_Hba_Num_Specified; char *unix_Style_Hba_Num; bool raid_Type_Specified; Create_Raid::Raid_Type raid_Type; bool stripe_Size_Specified; unsigned long stripe_Size; bool task_Rate_Specified; int task_Rate; // this is 1024 x 1024 bool logical_Drive_Capacity_in_Megs_Specified; unsigned long logical_Drive_Capacity_in_Megs; Int_List *logical_Drive_Number; } params; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/parserr.cpp0000664000175000000620000000630110044153335020335 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/20/98 * ***************************************************************************** * * File Name: ParsErr.cpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 5 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "parserr.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Parse_Error::Parse_Error( char *error_Str, char *command_Line ) { ENTER( "Parse_Error::Parse_Error( char *error_Str, char *command_Line )" ); err_Str = new String_List(); err_Str->add_Item( error_Str ); err_Str->add_Item( command_Line ); err_Str->add_Item( "\n" ); EXIT(); } Parse_Error::Parse_Error( const Parse_Error &right ) { ENTER( "Parse_Error::Parse_Error( const Parse_Error &right )" ); err_Str = new String_List( *right.err_Str ); EXIT(); } Parse_Error::~Parse_Error() { ENTER( "Parse_Error::~Parse_Error()" ); // delete this object here in case the execute method was never called. delete err_Str; EXIT(); } Command::Dpt_Error Parse_Error::execute( String_List **output ) { ENTER( "Command::Dpt_Error Parse_Error::execute( String_List **output )" ); Dpt_Error err; *output = err_Str; // the caller is responsible for deleting this, make sure we don't delete it // in the dtor. err_Str = 0; EXIT(); return( err ); } Command &Parse_Error::Clone() const { ENTER( "Command &Parse_Error::Clone() const" ); EXIT(); return( *new Parse_Error( *this ) ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/parserr.hpp0000664000175000000620000000561510044153337020353 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef PARSERR_HPP #define PARSERR_HPP /**************************************************************************** * * Created: 7/20/98 * ***************************************************************************** * * File Name: ParsErr.hpp * Module: * Contributors: Lee Page * Description: This is used for encapsulating errors encountered in parsing. Errors in parsing only halt the execution of subsequent commands, not previous commnads that parsed right (I think). * Version Control: * * $Revision: 5 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Parse_Error:public Command { public: Parse_Error( char *error_Str, char *command_Line ); Parse_Error( const Parse_Error &right ); virtual ~Parse_Error(); // This executes the command that this object represents. This returns an "String_List" // object. The reason it returns this rather than printing to the screen // is to allow the caller complete control over how the strings are given // to the user (if at all). Dpt_Error execute( String_List **output ); Command &Clone() const; private: String_List *err_Str; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/quietmod.hpp0000664000175000000620000000527710044153337020530 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef QUIETMOD_HPP #define QUIETMOD_HPP /**************************************************************************** * * Created: 7/27/98 * ***************************************************************************** * * File Name: QuietMod.hpp * Module: * Contributors: Lee Page * Description: This toggles quiet mode on and off. * Version Control: * * $Revision: 5 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Quiet_Mode: public Command { public: Quiet_Mode( bool *new_Quiet_Mode ):quiet_Mode( new_Quiet_Mode ) {} Quiet_Mode( const Quiet_Mode &new_Quiet_Mode ) { quiet_Mode = new_Quiet_Mode.quiet_Mode; } // virtual ~Quiet_Mode(); Dpt_Error execute( String_List **output ) { Dpt_Error err; // toggle it *quiet_Mode = !*quiet_Mode; return( err ); } Command &Clone() const { return( *new Quiet_Mode( *this ) ); } private: bool *quiet_Mode; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/raidutil.cpp0000664000175000000620000006463710044153336020515 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/21/98 * ***************************************************************************** * * File Name: RaidUtil.cpp * Module: * Contributors: Lee Page * Mark Salyzyn * Description: * Version Control: * * $Revision: 123 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include #include #include #include "debug.hpp" #include "parsargv.hpp" #include "rustring.h" #include "usage.hpp" #include "dptsig.h" #include "pagemod.hpp" #include "rscenum.h" #if !defined _DPT_WIN_NT && !defined _DPT_MSDOS # include #endif #if defined _DPT_NETWARE #include #endif extern char* EventStrings[]; #define MAJOR_VERSION 3 #define MINOR_VERSION '3' #define REVISION '1' #define MONTH 8 #define DAY 12 #define YEAR 2002 - 1980 /* Year - 1980 */ dpt_sig_S mysig = { // signature { 'd', 'P', 't', 'S', 'i', 'G' }, // sig version SIG_VERSION, #if defined (_DPT_AIX) PROC_POWERPC, /* processor family */ PROC_PPC601 | PROC_PPC603 | PROC_PPC604, #elif (defined (_DPT_SOLARIS) && defined (sparc)) PROC_ULTRASPARC, 0, #else PROC_INTEL, PROC_386 | PROC_486 | PROC_PENTIUM, #endif // aix // filetype FT_EXECUTABLE, // filetype flags 0, // oem //#if (defined (_DPT_SOLARIS) && defined (sparc)) #if defined (_DPT_SUN_BRANDING) OEM_SUN, #else OEM_DPT, #endif // operating system #if defined (_DPT_MSDOS) sigLONGLittleEndian(OS_DOS), #elif defined (_DPT_WIN_3X) sigLONGLittleEndian(OS_WINDOWS), #elif defined (_DPT_WIN_NT) sigLONGLittleEndian(OS_WINDOWS_NT), #elif defined (_DPT_OS2) sigLONGLittleEndian(OS_OS22x), #elif defined (_DPT_SCO) sigLONGLittleEndian(OS_SCO_UNIX), #elif defined (_DPT_UNIXWARE) sigLONGLittleEndian(OS_UNIXWARE), #elif defined (SNI_MIPS) sigLONGLittleEndian(OS_SINIX_N), #elif defined (_DPT_MACINTOSH) sigLONGLittleEndian(OS_MAC_OS), #elif defined (_DPT_AIX) sigLONGLittleEndian(OS_AIX_UNIX), #elif defined (_DPT_SOLARIS) sigLONGLittleEndian(OS_SOLARIS), #elif defined (_DPT_LINUX) sigLONGLittleEndian(OS_LINUX), #elif defined (_DPT_BSDI) sigLONGLittleEndian(OS_BSDI_UNIX), #elif defined (_DPT_FREE_BSD) sigLONGLittleEndian(OS_FREE_BSD), #elif defined (_DPT_NETWARE) sigLONGLittleEndian(OS_NW4x), #else #error You must define for this OS #endif // capabilities sigWORDLittleEndian(0), // device support sigWORDLittleEndian(DEV_ALL), // adapter support #if defined (_DPT_AIX) || defined (_DPT_BSDI) || defined (_DPT_FREE_BSD) sigWORDLittleEndian(ADF_ALL), #elif (defined (_DPT_SOLARIS) && defined (sparc)) sigWORDLittleEndian(ADF_ALL_SC5), #elif (defined (_DPT_MSDOS) ) sigWORDLittleEndian(ADF_ALL_SC5), #else sigWORDLittleEndian(ADF_2012A | ADF_PLUS_ISA | ADF_PLUS_EISA), #endif // aix sigWORDLittleEndian(0), /* dsApplication */ REQ_ENGINE, /* requires an engine */ MAJOR_VERSION, MINOR_VERSION, REVISION, MONTH, DAY, YEAR, // description #if defined ( _DPT_BSDI ) "BSDi CLI Configuration Utility" #elif defined ( _DPT_LINUX ) "LINUX CLI Configuration Utility" #elif defined ( _DPT_FREE_BSD ) "FreeBSD CLI Configuration Utility" #elif defined ( _DPT_SCO ) "SCO CLI Configuration Utility" #elif defined ( _DPT_SOLARIS ) # if defined( _DPT_SUN_BRANDING ) // guess they don't want DPT (or Adaptec) [KS] "SUN SOLARIS RAID Configuration Utility" # else "SOLARIS RAID Configuration Utility" # endif #elif defined ( _DPT_UNIXWARE ) "UNIXWARE CLI Configuration Utility" #elif defined ( _DPT_AIX ) "AIX CLI Configuration Utility" #elif defined (_DPT_MSDOS) "MS-DOS CLI Configuration Utility" #elif defined (_DPT_WIN_3X) "Windows CLI Configuration Utility" #elif defined (_DPT_WIN_NT) "WIN32 CLI Configuration Utility" #elif defined (_DPT_OS2) "OS/2 CLI Configuration Utility" #elif defined (_DPT_NETWARE) "NETWARE CLI Configuration Utility" # else #error Define this for your OS #endif }; int DptLegacy=0; /*** CONSTANTS ***/ enum output_Type { OUTPUT_TAB_HEADER, OUTPUT_MULTI_LINED_TAB_HEADER, OUTPUT_END_OF_TAB_SCOPE, OUTPUT_UNADORNED }; enum display_States { STATE_COLUMNAR, STATE_MULTI_LINE_COLUMNAR, STATE_RAW, STATE_ONE_SHOT_RAW }; /*** TYPES ***/ /*** STATIC DATA ***/ //bool Enter_Exit::show_Enters = true; //int Enter_Exit::indent_Counter = 0; static Int_List *tab_Widths = 0; static Int_List *tab_Offsets = 0; static display_States display_State = STATE_RAW; static display_States last_State = STATE_RAW; static int numLinesPrinted = 0; int NUM_LINES_PER_PAGE = 22; bool Pagenation_Mode::pagenation_Mode = false; /*** MACROS ***/ /*** PROTOTYPES ***/ void CheckForLineFeed(char *in_str); void Flush( String_List * ); static Int_List *get_Tab_Widths( const char *tabbed_String ); static Int_List *get_Tab_Offsets( const char *tabbed_String ); static char *get_Width_Adjusted_String( const char *str, int field_Width, char *buf ); static char *get_Multi_Line_Columnar_String( const char *src, char *dest, char padding_Char, int tab_Location, // zero based int line_Len ); static char *Strip_Tab_Place_Holders( const char *str, char *buf ); static output_Type Characterize_String( const char *str ); extern char *STR_USAGE_UTIL_NAME; extern char *STR_USAGE_PROGRAM_DESC; /*** FUNCTIONS ***/ extern "C" { char **Argv; #ifdef _DPT_DOS extern unsigned _stklen=0x2000; #endif } int main( int argc, char *argv[] ) { int i; char *base; Argv = argv; base=argv[0]; for (i=strlen(argv[0])-1; i>=0; i--) { base = argv[0]+i; if (*base == '/' || *base == '\\') { base=argv[0]+i+1; break; } } if (base[0] == 'd' || base[0] == 'D') { DptLegacy=1; STR_USAGE_UTIL_NAME = EventStrings[STR_DPTUTIL]; STR_USAGE_PROGRAM_DESC = EventStrings[STR_DPTUTIL_SHORT_DESCRIP]; } # if (defined(_DPT_SOLARIS) || defined(_DPT_ROOTONLY)) // Only root or sys are allowed to run dptutil. if ( ( getuid () != 0 ) && ( geteuid () != 0 ) && ( getuid () != 3 ) && ( geteuid () != 3 ) && ( getgid () != 0 ) && ( getegid () != 0 ) && ( getgid () != 3 ) && ( getegid () != 3 ) ) { printf (EventStrings[STR_MUST_BE_ROOT]); return (0); } # endif // Enter_Exit::Set_Show_Enters(); // Enter_Exit::Clear_Show_Enters(); ENTER( "int main( int argc, char *argv[] )" ); Command_List *commands; Command *command; Command::Dpt_Error err; bool quiet_Mode = false; const int SKIP_APP_PATH = 1; Parse_Argv parser( argv + SKIP_APP_PATH, &quiet_Mode ); Pagenation_Mode mode; bool pageMode = mode.GetPagenationMode(); commands = &parser.get_Command_List(); #if defined _DPT_NETWARE int screenHandle; if (pageMode) if (DptLegacy) screenHandle = CreateScreen (EventStrings[STR_DPT_UTIL], 0); else screenHandle = CreateScreen (EventStrings[STR_RAID_UTIL], 0); else screenHandle = CreateScreen (EventStrings[STR_SYS_CONSOLE], 0); #endif while( commands && !err.Is_Error() && ( command = &commands->get_Next_Item() ) ) { String_List *output; if ( tab_Widths ) { delete tab_Widths; tab_Widths = 0; } if ( tab_Offsets ) { delete tab_Offsets; tab_Offsets = 0; } display_State = STATE_RAW; last_State = STATE_RAW; err = command->execute( &output ); if( !quiet_Mode ) { #if defined _DPT_NETWARE // put in to make headers come out right, console spaces over before print occurs, // which messes up the pretty output printf( "\n" ); #endif Flush ( output ); printf( "\n" ); delete output; } } EXIT(); return( err.Is_Error() ); } /**************************************************************************** * * Function Name: Flush( String_List *), Created: 10/14/98 * * Description: Flush the String List * *****************************************************************************/ void Flush ( String_List * output ) { char *out_Str; Pagenation_Mode mode; bool pageMode = mode.GetPagenationMode(); // loop through the items in this command and display them while( out_Str = output->get_Next_Item() ) { char temp_Buf[ 512 ]; char stripped_Str[ 160 ]; output_Type out_Type; out_Type = Characterize_String( out_Str ); switch( out_Type ) { case OUTPUT_MULTI_LINED_TAB_HEADER: display_State = STATE_MULTI_LINE_COLUMNAR; break; case OUTPUT_END_OF_TAB_SCOPE: if( tab_Widths ) { // this is a \n, reset the next counter for the next line tab_Widths->reset_Next_Index(); display_State = STATE_ONE_SHOT_RAW; } break; case OUTPUT_TAB_HEADER: delete tab_Widths; delete tab_Offsets; tab_Widths = get_Tab_Widths( out_Str ); tab_Offsets = get_Tab_Offsets( out_Str ); display_State = STATE_RAW; break; case OUTPUT_UNADORNED: if( tab_Widths ) { display_State = STATE_COLUMNAR; } // status quo break; } switch( display_State ) { case STATE_COLUMNAR: if( tab_Widths->num_Left() ) { get_Width_Adjusted_String(out_Str, tab_Widths->get_Next_Item(), temp_Buf ); printf( "%s", Strip_Tab_Place_Holders( temp_Buf, stripped_Str ) ); CheckForLineFeed(stripped_Str); } else { // must be last column on the line. printf( "%s", out_Str ); CheckForLineFeed(out_Str); } break; case STATE_MULTI_LINE_COLUMNAR: if( tab_Offsets ) { printf( "%s", get_Multi_Line_Columnar_String( out_Str, temp_Buf, TABULATION_MULTI_LINED_TABBED_FILL_CHAR, tab_Offsets->get_Item( 0 ), 80 ) ); CheckForLineFeed(temp_Buf); } else { printf( "%s", out_Str ); CheckForLineFeed(out_Str); } break; case STATE_ONE_SHOT_RAW: display_State = last_State; case STATE_RAW: printf( "%s", Strip_Tab_Place_Holders(out_Str, temp_Buf)); CheckForLineFeed(temp_Buf); break; } last_State = display_State; if (numLinesPrinted >= NUM_LINES_PER_PAGE) { numLinesPrinted = 0; if (pageMode) { #if defined _DPT_NETWARE PressAnyKeyToContinue(); // netware only #else // hey, wait a minute for next page!!! printf(EventStrings[STR_PRESS_ENTER2_CONT]); int key = getchar(); #endif } #if defined _DPT_NETWARE else ThreadSwitch(); #endif } } } /**************************************************************************** * * Function Name: get_Tab_Widths(), Created:8/5/98 * * Description: This is used to retrieve the width of each tab-stop in a string as designated by the presence of the tab-stop character embedded in the string (TABULATION_PLACE_HOLDER). * * Return: An Int_List container. The caller is responsible for the destruction of this object. * * Notes: The intent of this function is that a title string would be passed in, and the tab-widths would passed back. The caller can then use this info to tabulate info such that it lines up with the title string. * *****************************************************************************/ Int_List *get_Tab_Widths( const char *tabbed_String ) { ENTER( "Int_List *get_Tab_Widths( const char *tabbed_String )" ); int last_Tab_Location_Found = -1; // change this to zero to record // the beginning space before the // first tab. Leave as "-1" to record // the space AFTER the delimiter. int str_Index; Int_List *tab_Stop; tab_Stop = new Int_List; for( str_Index = 0; tabbed_String[ str_Index ]; str_Index++ ) { if( tabbed_String[ str_Index ] == TABULATION_PLACE_HOLDER ) { // "-1" means "un-inited". This "if()" statement can be removed to record // the space BEFORE the delimiter, as opposed to AFTER. if( last_Tab_Location_Found != -1 ) { tab_Stop->add_Item( str_Index - last_Tab_Location_Found - 1 ); } last_Tab_Location_Found = str_Index; } } EXIT(); return( tab_Stop ); } /**************************************************************************** * * Function Name: get_Tab_Offsets(), Created:8/7/98 * * Description: This function gets absolute tab offsets. A "tab" is specified by the TABULATION_PLACE_HOLDER character. * * Return: An Int_List containing all the tabs offsets. * * Notes: * *****************************************************************************/ Int_List *get_Tab_Offsets( const char *tabbed_String ) { ENTER( "Int_List *get_Tab_Offsets( const char *tabbed_String )" ); int str_Index; Int_List *tab_Stop; tab_Stop = new Int_List; for( str_Index = 0; tabbed_String[ str_Index ]; str_Index++ ) { if( tabbed_String[ str_Index ] == TABULATION_PLACE_HOLDER ) { tab_Stop->add_Item( str_Index ); } } EXIT(); return( tab_Stop ); } /**************************************************************************** * * Function Name: get_Width_Adjusted_String(), Created:8/7/98 * * Description: Pads or truncs a string to a specified width * * Return: char * * Notes: * *****************************************************************************/ char *get_Width_Adjusted_String( const char *str, int field_Width, char *buf ) { ENTER( "char *get_Width_Adjusted_String(" ); int len_of_Str; len_of_Str = strlen( str ); // see if we're truncating, or padding with spaces. if( len_of_Str > field_Width ) { strncpy( buf, str, field_Width ); buf[ field_Width ] = 0; } else { int copy_Index; // copy over the string strcpy( buf, str ); // and pad the rest of the field with spaces. for( copy_Index = len_of_Str; copy_Index < field_Width; copy_Index++ ) { buf[ copy_Index ] = ' '; } buf[ copy_Index ] = 0; } EXIT(); return( buf ); } /**************************************************************************** * * Function Name: get_Multi_Line_Columnar_String(), Created:8/6/98 * * Description: This function looks for the TABULATION_MULTI_LINED_TABBED character embedded in the string, and inserts spaces up until tab_Location is reached. It then starts copying src over to the buffer until line_Len is reached, then wraps to the next line, again, with tabs inserted up to tab_Location. * * Return: The formatted string. * * Notes: This function will do nothing if line_Len is less than or equal to tab_Location. dest needs to be able to handle several lines of src, since this can expand very fast. * *****************************************************************************/ char *get_Multi_Line_Columnar_String( const char *src, char *dest, char padding_Char, int tab_Location, // zero based int line_Len ) { ENTER( "char *get_Multi_Line_Columnar_String(" ); *dest = 0; if( tab_Location < line_Len - 1 ) { char c; int src_Index; int dest_Index; int column = 0; // zero based int loc_of_Last_Word_Break_Src = 0; // used to know where to int loc_of_Last_Word_Break_Dest = 0; // break long lines. for( src_Index = dest_Index = 0; ( c = src[ src_Index ] ); ) { // see if we've overflowed the line. If so, then back up to the last // word break, and insert a carriage return. if( column >= line_Len ) { dest[ loc_of_Last_Word_Break_Dest ] = '\n'; // add one so we don't start the new line on the white space we found. src_Index = loc_of_Last_Word_Break_Src + 1; // add one so we don't over-write the CR we embedded. dest_Index = loc_of_Last_Word_Break_Dest + 1; column = 0; while( column < tab_Location ) { // fill with spaces till column is reached dest[ dest_Index++ ] = ' '; column++; } } switch( c ) { case TABULATION_MULTI_LINED_TABBED: { char fill_Char = ' '; while( column < tab_Location ) { // fill with spaces till column is reached dest[ dest_Index++ ] = fill_Char; column++; // toggle the fill char with spaces so it isn't solid. fill_Char = ( column & 1 )? padding_Char:' '; } } // peel off the tabbed character src_Index++; break; case '\n': column = 0; default: if( isspace( c ) ) { // remember where this word break is. loc_of_Last_Word_Break_Src = src_Index; loc_of_Last_Word_Break_Dest = dest_Index; } // copy the next bytes from source to dest. dest[ dest_Index++ ] = src[ src_Index++ ]; column++; break; } } dest[ dest_Index ] = 0; } EXIT(); return( dest ); } char *Strip_Tab_Place_Holders( const char *src, char *dest ) { ENTER( "char *Strip_Tab_Place_Holders(" ); int src_Index; int dest_Index; for( src_Index = dest_Index = 0; src[ src_Index ]; src_Index++ ) { if( src[ src_Index ] != TABULATION_PLACE_HOLDER ) { dest[ dest_Index++ ] = src[ src_Index ]; } } dest[ dest_Index++ ] = 0; EXIT(); return( dest ); } output_Type Characterize_String( const char *str ) { ENTER( "output_Type Characterize_String( const char *str )" ); output_Type out_Type = OUTPUT_UNADORNED; // place this first, since it is low priority and can be over-ridden if( strchr( str, '\n' ) ) { out_Type = OUTPUT_END_OF_TAB_SCOPE; } if( strchr( str, TABULATION_PLACE_HOLDER ) ) { out_Type = OUTPUT_TAB_HEADER; } if( strchr( str, TABULATION_MULTI_LINED_TABBED ) ) { out_Type = OUTPUT_MULTI_LINED_TAB_HEADER; } EXIT(); return( out_Type ); } void CheckForLineFeed(char *in_str) { for (int i = 0; i < (int)strlen(in_str); i++) { if (in_str[i] == 0x0a) numLinesPrinted++; } } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/rawdata.cpp0000664000175000000620000000764110044153335020312 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 8/6/98 * ***************************************************************************** * * File Name: Usage.cpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "rawdata.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #define DPT_ENGINE_COMPATIBILITY 4 #define BufferLength 256 RawData::RawData() { ENTER( "RawData::RawData()" ); EXIT(); } RawData::~RawData() { ENTER( "RawData::~RawData()" ); EXIT(); } Command::Dpt_Error RawData::execute( String_List **output ) { ENTER( "Command::Dpt_Error RawData::execute( String_List **output )" ); String_List *out; Init_Engine(1); *output = out = new String_List(); uCHAR SCSIcmd[12] = ""; uCHAR returned[BufferLength]; char rtnBuff[BufferLength]; memset(rtnBuff,NULL,sizeof(rtnBuff)); DPT_RTN_T rtnVal; int i = 0; // Scan the SCSI sub-system if (engine->Send(MSG_IO_SCAN_SYSTEM) == MSG_RTN_COMPLETED) { // Check DASDs for SMART status if (engine->GetIDs(MSG_ID_ALL_PHYSICALS) == MSG_RTN_COMPLETED) { engine->ids.Next(); //skip the RAID controller if (engine->ids.GetID()) { engine->Reset(); engine->Insert((uSHORT) 0x80); // control flag engine->Insert((uLONG) 255); // data length SCSIcmd[0] = SC_INQUIRY; SCSIcmd[1] = 0; SCSIcmd[2] = 0; //page 00 SCSIcmd[3] = 0; SCSIcmd[4] = 255; SCSIcmd[5] = 0; engine->Insert(&SCSIcmd, 12); do { if ((rtnVal = engine->Send(MSG_SCSI_CMD, engine->ids.tag)) == MSG_RTN_COMPLETED) { engine->Extract(&returned, 256); for (i=0; i <= returned[4]; i++) { if (i < 8) sprintf(rtnBuff+i,"%x",returned[i]); else sprintf(rtnBuff+i,"%c",returned[i]); } } out->add_Item(rtnBuff); out->add_Item("\n"); memset(rtnBuff,NULL,sizeof(rtnBuff)); } while (engine->ids.Next()); } } } EXIT(); return( Command::Dpt_Error::DPT_CMD_ERR_NO_ERROR ); } Command &RawData::Clone() const { ENTER( "Command &RawData::Clone() const" ); EXIT(); return( *new RawData( *this ) ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/rawdata.hpp0000664000175000000620000000447610044153337020324 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef RAWDATA_HPP #define RAWDATA_HPP /**************************************************************************** * * Created: 8/6/98 * ***************************************************************************** * * File Name: Usage.hpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 1 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class RawData: public Command { public: RawData(); virtual ~RawData(); Dpt_Error execute( String_List **output ); Command &Clone() const; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/rdutlosd.cpp0000664000175000000620000001125510044153336020524 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 8/13/98 * ***************************************************************************** * * File Name: RdUtlOsd.cpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 1 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "engiface.hpp" #include "rdutlosd.h" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ /* char *Command::Make_Path_to_Eng_From_DLL( const char *dpt_Sal_Dll_Name, char *buffer // this is for housing the return string ) { char *dll_Filename_and_Path = buffer; if( GetModuleFileName( GetModuleHandle( dpt_Sal_Dll_Name ), dll_Filename_and_Path, 256 ) ) { int slash_Finder_Index; // Strip off this app's name const int ROOT_DIRS_BACKSLASH_INDEX = 3; for( slash_Finder_Index = strlen( dll_Filename_and_Path ); slash_Finder_Index > ROOT_DIRS_BACKSLASH_INDEX; slash_Finder_Index-- ) { if( dll_Filename_and_Path[ slash_Finder_Index ] == '\\' || dll_Filename_and_Path[ slash_Finder_Index ] == '/' ) { // strip off the file name dll_Filename_and_Path[ slash_Finder_Index ] = 0; } } // append the engine's name to this. strcat( dll_Filename_and_Path, "\\" ); strcat( dll_Filename_and_Path, STR_DPT_ENGINE32_DLL_NAME ); } return( dll_Filename_and_Path ); } */ /**************************************************************************** * * Function Name: Load_Engine(), Created:8/13/98 * * Description: Finds where the engine is and loads it. * * Return: DLL_HANDLE_T * * Notes: * *****************************************************************************/ DLL_HANDLE_T Load_Engine( DPT_ENGINE_FN_T *engine_Proc ) { char fname_and_Path_Buf[ 256 ]; DLL_HANDLE_T eng_Hdl = 0; /* int dir_Index; char *dir_Name[] = // a list of several likely directories to look // for the engine in { STR_ENGINE_DIR_1, STR_ENGINE_DIR_2, STR_ENGINE_DIR_3, STR_ENGINE_DIR_4, STR_ENGINE_DIR_5, STR_ENGINE_DIR_6, STR_ENGINE_DIR_7, STR_ENGINE_DIR_8, 0 }; for( dir_Index = 0; dir_Name[ dir_Index ] && *dir_Name[ dir_Index ] && eng_Hdl; dir_Index++ ) { // construct a new path to the engine strcpy( fname_and_Path_Buf, dir_Name[ dir_Index ] ); strcpy( fname_and_Path_Buf, ); // try this path eng_Hdl = Load_Engine_by_Path( fname_and_Path_Buf, engine_Proc ); } */ return( eng_Hdl ); } DLL_HANDLE_T Load_Engine_by_Path( const char *dll_Filename_and_Path, DPT_ENGINE_FN_T *engine_Proc ) { DLL_HANDLE_T eng_Module_Handle = 0; /* if( ( eng_Module_Handle = osdLoadModule( (uCHAR *) dll_Filename_and_Path ) ) != 0 ) { *engine_Proc = (DPT_ENGINE_FN_T) osdGetFnAddr( eng_Module_Handle, (uCHAR *) STR_ENGINE_ENTRY_POINT ); } */ return( eng_Module_Handle ); } void Unload_Module( DLL_HANDLE_T eng_Module_Handle ) { // osdUnloadModule( eng_Module_Handle ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/rdutlosd.h0000664000175000000620000000601710044153333020166 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef RDUTLOSD_H #define RDUTLOSD_H /**************************************************************************** * * Created: 8/13/98 * ***************************************************************************** * * File Name: RdUtlOsd.h * Module: Raid Util for Sun * Contributors: Lee Page * Description: This is the OS dependent constants, etc. for DptUtil. * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ /*** CONSTANTS ***/ // Platform-specific strings // the directories must include the final blackslash so that platform-specific path-delimiters // can be accounted for without the code having to worry about it. #define STR_ENGINE_DIR_1 ".\\" #define STR_ENGINE_DIR_2 "C:\\DptMgr\\" #define STR_ENGINE_DIR_3 "C:\\Dpt\\" #define STR_ENGINE_DIR_4 "D:\\DptMgr\\" #define STR_ENGINE_DIR_5 "D:\\Dpt\\" #define STR_ENGINE_DIR_6 "\\DptMgr\\" #define STR_ENGINE_DIR_7 "\\Dpt\\" #define STR_ENGINE_DIR_8 "" #define STR_DPT_ENGINE32_DLL_NAME "dpteng32.dll" #define STR_ENGINE_ENTRY_POINT "DPT_Engine" /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ DLL_HANDLE_T Load_Engine( DPT_ENGINE_FN_T *engine_Proc ); DLL_HANDLE_T Load_Engine_by_Path( const char *dll_Filename_and_Path, DPT_ENGINE_FN_T *engine_Proc ); void Unload_Module( DLL_HANDLE_T eng_Module_Handle ); /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/rmwflash.cpp0000664000175000000620000002173410044153336020512 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 3/8/01 * ***************************************************************************** * * File Name: RMWFlash.cpp * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * * $Revision: 4 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "rmwflash.hpp" #include "rscenum.h" /* #define DEBUG_RMWFlash */ #if (defined(DEBUG_RMWFlash)) # include #endif /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ extern char* EventStrings[]; /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ RMWFlash::RMWFlash (int hbaNo, char *Data, int Region, unsigned long Offset, unsigned Size) :hbaNum (hbaNo), data (Data), region (Region), offset (Offset), size (Size) { ENTER("RMWFlash::RMWFlash("); EXIT(); } RMWFlash::RMWFlash (const RMWFlash &new_RMWFlash) { ENTER("RMWFlash::RMWFlash (const RMWFlash &new_RMWFlash):"); hbaNum = new_RMWFlash.hbaNum; data = new_RMWFlash.data; region = new_RMWFlash.region; offset = new_RMWFlash.offset; size = new_RMWFlash.size; EXIT(); } RMWFlash::~RMWFlash() { ENTER( "RMWFlash::~RMWFlash()" ); EXIT(); } static unsigned long CheckSum(char * buffer, unsigned size) { unsigned long checksum; for (checksum = 0; size > 0; ++buffer, --size) { checksum += *buffer & 0xFF; } return (checksum); } /******************************************************* Main exe loop *******************************************************/ Command::Dpt_Error RMWFlash::execute(String_List **output) { ENTER("Command::Dpt_Error RMWFlash::execute(String_List **output)"); Dpt_Error err; bool more_Devs_Left = true; DPT_TAG_T hbaTag; Init_Engine(1); *output = new String_List(); for (int dev_Index = 0; more_Devs_Left; dev_Index++) { hbaTag = Get_HBA_by_Index(dev_Index, &more_Devs_Left); if (more_Devs_Left == 0) { break; } if (( hbaNum == -1 ) || ( hbaNum == dev_Index )) { unsigned long region_size = 8192; switch (region) { case 0: region_size = 2 * 1024L * 1024L; break; case 1: region_size = 65536L; break; case 2: region_size = 512L * 1024L; break; case 3: region_size = 8192; break; case 4: region_size = 8192; break; } char * original = new char[ region_size ]; if (original != NULL) { // Send the command to the engine to set the region of flash memory to use. engine->Reset(); engine->Insert((uLONG) region); err = engine->Send(MSG_FLASH_SET_REGION, hbaTag); if (err.Success()) { // Send the command to the engine to read the flash memory. engine->Reset(); engine->Insert((uLONG) 0); engine->Insert((uLONG) region_size); err = engine->Send(MSG_FLASH_READ, hbaTag); // If the read succeeded then copy the data that was read from the flash // memory into the caller's buffer. if (err.Success()) { engine->Extract(original, region_size); # if (defined(DEBUG_RMWFlash)) { int fd = creat ("before", 0777); write (fd, original, (unsigned)region_size); close (fd); } # endif if (strcmp (data, "-") == 0) { char temp_Buf[ 256 ]; sprintf(temp_Buf, "%.*s\r\n", size, original + offset); (**output).add_Item (temp_Buf); continue; } engine->Reset(); engine->Insert((uLONG) region); err = engine->Send(MSG_FLASH_SET_REGION, hbaTag); if (err.Success()) { /* Ideally we want the caller to specify the checksum handling, but for now ... */ switch (region) { case 4: if ((0x14 < offset) && (offset < 0x7F)) { break; } *((unsigned long *)(&original[0x10])) += CheckSum (data, size) - CheckSum (original + offset, size); case 0: case 1: case 2: case 3: break; } memcpy (original + offset, data, size); # if (defined(DEBUG_RMWFlash)) { int fd = creat ("after", 0777); write (fd, original, (unsigned)region_size); close (fd); } # endif // Send the command to the engine to write the flash memory. engine->Reset(); engine->Insert((void *)original, region_size); err = engine->Send(MSG_FLASH_WR_NO_VERIFY, hbaTag); if (err.Success()) { // Send the command to the engine to stop writing flash memory. engine->Reset(); err = engine->Send(MSG_FLASH_WRITE_DONE, hbaTag); if (err.Success()) { (**output).add_Item(EventStrings[STR_FLASH_COMPLETE]); } } } } } delete [] original; if (err.Failure()) { extern void Flush( String_List * ); char temp_Buf[ 256 ]; sprintf(temp_Buf, EventStrings[STR_FLASH_ERR_MSG], 0L, (int)err, (char *)err); (**output).add_Item (temp_Buf); Flush (*output); // Send the command to the engine to stop writing flash memory. engine->Reset(); engine->Insert((uCHAR) 1); err = engine->Send(MSG_FLASH_WRITE_DONE, hbaTag); break; } } else { err = Dpt_Error::DPT_ERR_NOT_ENOUGH_MEMORY; break; } } } (**output).add_Item("\n"); return (err); } Command &RMWFlash::Clone() const { ENTER("Command &RMWFlash::Clone() const"); EXIT(); return(*new RMWFlash(*this)); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/rmwflash.hpp0000664000175000000620000000532110044153334020507 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef RMWFLASH_HPP #define RMWFLASH_HPP /**************************************************************************** * * Created: 3/8/01 * ***************************************************************************** * * File Name: RMWFlash.hpp * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * * $Revision: 1 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class RMWFlash:public Command { public: RMWFlash::RMWFlash(int hbaNo, char *Data, int Region, unsigned long Offset, unsigned Size); RMWFlash(const RMWFlash &new_RMWFlash); virtual ~RMWFlash(); virtual Dpt_Error execute(String_List **output); virtual Command &Clone() const; private: int hbaNum; char *data; int region; unsigned long offset; unsigned size; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/rscenum.h0000664000175000000620000020742010044153337020007 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __RSCENUM_H #define __RSCENUM_H /****************************************** ** FILE: RSCENUM.H ** ** DATE: 6/23/1999 ******************************************/ /****************************************** ** STRINGS ** ******************************************/ enum StringNames { // STR_DPT = 0, // STR_COPYRIGHT = 1, // STR_PROG_TITLE = 2, // STR_VERSION = 3, STR_DPTUTIL, STR_RAIDUTIL, STR_DPT_UTIL, STR_RAID_UTIL, STR_DPTUTIL_ALL_CAPS, STR_RAIDUTIL_ALL_CAPS, STR_DPT_ENGINE, STR_ADPT_ENGINE, STR_VERSION_DATE, STR_FILLIN_DATE, STR_FILLIN_VERSION, STR_DPTUTIL_SHORT_DESCRIP, STR_RAIDUTIL_SHORT_DESCRIP, STR_USAGE_PROGRAM_DESC_TITLE, STR_USAGE_SW_TITLE, STR_USAGE_SW_CREATE_LOGICAL, STR_USAGE_SW_CREATE_LOGICAL2, STR_USAGE_SW_IGNORE_NONFATAL_ERRORS, STR_USAGE_SW_DELETE_LOGICAL, STR_USAGE_SW_CREATE_HOT_SPARE, STR_USAGE_SW_DELETE_HOT_SPARE, STR_USAGE_SW_ALARM, STR_USAGE_SW_ACTION_TASK_CONTROL, STR_USAGE_EXPAND_ARRAY, STR_USAGE_LOAD_SAVE_CONFIGURATION, STR_USAGE_SW_WRITE_CACHING, STR_USAGE_SW_RESET_CLEAR_RAID_STORE, STR_USAGE_SW_RESET_NVRAM_CONFIG, STR_USAGE_SW_LIST_DEVICES_PHYSICAL, STR_USAGE_SW_LIST_DEVICES_LOGICAL, STR_USAGE_SW_LIST_DEVICES_CONTROLLER, STR_USAGE_SW_LIST_DEVICES_SPARE, STR_USAGE_SW_LIST_DEVICES_RAID, STR_USAGE_SW_LIST_DEVICES_SPEED, STR_USAGE_SW_LIST_DEVICES_CACHE, STR_USAGE_SW_LIST_DEVICES_VERSION, STR_USAGE_SW_LIST_DEVICES_REDIRECT, STR_USAGE_SW_LIST_BATTERY, STR_USAGE_SW_LIST_DEVICES_ALL, STR_USAGE_SW_DISPLAY_INQ_INFO, STR_USAGE_SW_QUIET_MODE, STR_USAGE_SW_PAGENATION, STR_USAGE_SW_SHOW_UTIL_USAGE, STR_USAGE_SW_SPECIFY_DPT, STR_USAGE_SW_SPECIFY_CTLR, STR_USAGE_SW_RAID_LEVEL, STR_USAGE_SW_LOGICAL_DRIVE_CAPACITY, STR_USAGE_SW_LOGICAL_DRIVE_STRIPE_SIZE, STR_USAGE_SW_TASK_RATE, STR_USAGE_VIEW_LOG, STR_USAGE_FORCE_STATE, STR_USAGE_CLUSTER_SUPPORT, STR_USAGE_SAMPLE_TITLE, STR_USAGE_SAMPLE_QUIET_MODE, STR_USAGE_SAMPLE_SHOW_USAGE, // begin of defines in rscstrs.h STR_USAGE_SAMPLE_CREATE_LOGICAL, STR_USAGE_SAMPLE_DELETE_LOGICAL, STR_USAGE_SAMPLE_CREATE_HOT_SPARE, STR_USAGE_SAMPLE_DELETE_HOT_SPARE, STR_USAGE_SAMPLE_LIST_DEVICES, STR_USAGE_SAMPLE_DISPLAY_INQUIRY_INFO, STR_USAGE_SAMPLE_RESET_NVRAM, STR_USAGE_LEGEND_2, STR_REBOOT, STR_USAGE_SW_FLASH, // end of defines in rscstrs.h STR_USAGE_SYNTAX, STR_USAGE_LEGEND_1, STR_ALARM_STATUS_HEADER, STR_LIST_DEV_PHYS_HEADER, STR_LIST_DEV_ARRAY_HEADER, STR_LIST_DEV_STATUS_HEADER, STR_LIST_DEV_HOT_SPARE_HEADER, // STR_LIST_DEV_LOG_HEADER, STR_LIST_DEV_CTLR_HEADER, STR_LIST_BATTERY_HEADER, STR_LIST_DEV_VERSION_HEADER, STR_LIST_DEV_SET_RATE_HEADER, STR_LIST_TAGS_HEADER, STR_BUS_SPEED_HEADER, STR_LIST_DEV_SPEED_HEADER, STR_LIST_TASKS, STR_LIST_CACHE_STALE_HEADER, STR_LIST_CACHE_HEADER, STR_LIST_CLUSTER_HEADER, STR_LIST_CLUSTER_FUA_HEADER, STR_LIST_HS_SAME_CHANNEL_HEADER, STR_LIST_INQUIRY_HEADER, STR_LIST_SEGMENT_HEADER, STR_LIST_INQUIRY_HEADER_MAP1, STR_LIST_INQUIRY_HEADER_MAP2, STR_LIST_INQUIRY_HEADER_MAP3, STR_LIST_INQUIRY_HEADER_MAP4, STR_LIST_INQUIRY_HEADER_MAP5, STR_LIST_INQUIRY_HEADER_MAP6, STR_LIST_INQUIRY_HEADER_MAP7, STR_LIST_INQUIRY_HEADER_MAP8, STR_LIST_INQUIRY_HEADER_MAP9, STR_LIST_INQUIRY_HEADER_MAP10, STR_LIST_INQUIRY_HEADER_MAP11, STR_LIST_INQUIRY_HEADER_MAP12, STR_LIST_INQUIRY_HEADER_KEY, STR_INQ_TITLE, STR_NVRAM_RESET, STR_OK, STR_YES, STR_NO, STR_ABORT, // STR_RETRY = 8, // STR_CONTINUE = 9, // STR_CANCEL = 10, // STR_ACCEPT = 11, // STR_RESET = 12, // STR_SKIP = 13, // STRT_PREVIOUS = 14, // STRT_FILE = 15, // STRT_OPTIONS = 16, // STRT_INSTALLATION = 17, // STRT_COMMUNICATIONS = 18, // STRT_HELP = 19, // STRT_READ_SYS_CONFIG = 20, // STRT_SET_SYS_CONFIG = 21, // STRT_LOAD_CONFIG = 22, // STRT_SAVE_CONFIG = 23, // STRT_EXIT = 24, // STRT_SET_HBA_THROTTLE = 25, // STRT_DISABLE_ALARM = 26, // STRT_QUIET_BUS = 27, // STRT_INITIAL_SETUP = 28, // STRT_DOS_SETUP = 29, // STRT_MAKE_CONNECTION = 30, // STRT_LEGEND_ICONS = 31, // STRT_INDEX = 32, // STRT_CONTACT = 33, // STRT_SYS_INFO = 34, // STRT_ABOUT = 35, // STRT_CREATE_RAID = 36, // STRT_MODIFY_RAID = 37, // STRT_SWITCH_VIEW = 38, // STRT_INCLUDE_DRIVE = 39, // STRT_DONE = 40, // STRT_REMOVE_DRIVE = 41, // STRT_EXIT_INSTALL = 42, // STR_DECIMAL = 43, // STR_PROG_EXIT = 44, STR_FAILED, //= 45, // STR_RAID_5_GROUP = 46, STR_WARNING, //= 47, // STR_RAID_0_GROUP = 48, // STR_RAID_1_GROUP = 49, STR_MISSING, //= 50, STR_REMOVED, STR_ADDED, // STR_LOG_SU = 51, // STR_HOTSPARE = 52, // STR_LSU = 53, STR_SCSI_PRINTER, STR_SCSI_PROCESSOR, // STR_PROCESSOR = 56, STR_SCSI_WORM, STR_SCSI_CD_ROM, STR_SCSI_SCANNER, STR_SCSI_OPTICAL, STR_SCSI_JUKEBOX, STR_SCSI_PRO_ROOT, STR_SCSI_PRO_CONNECTION, // STR_COMMUN = 62, STR_UNKNOWN, STR_UNCHANGED, STR_UNSUPPORTED, // STR_DISK = 64, // STR_FLOPTICAL = 65, // STR_KB = 66, STR_MB, // STR_DESCRIPTION = 68, // STR_LEGEND_ICONS = 69, // STR_LEGEND_FLAGS = 70, // STR_HOST_ADAPTER = 71, // STR_CHIPSET = 72, // STR_RAID_MOD = 73, // STR_CACHE_MOD = 74, // STR_MEMORY_MOD = 75, // STR_CACHE_MEM_MOD = 76, // STR_HARD_DRIVE = 77, // STR_SETUP_FOR = 78, // STR_RAID_GROUP = 79, // STR_FAULT_TOL = 80, // STR_DRIVE_FT = 81, // STR_NO_FT = 82, // STR_OPTIMIZATION = 83, // STR_OPT_CAPACITY = 84, // STR_OPT_PERFORM = 85, // STR_CHOSEN_RAID = 86, STR_STRIPE_SIZE, // STR_OVERRIDE = 88, // STR_OVERRIDE_RAID = 89, // STR_RAID_LEVEL = 90, // STR_NONE = 91, // STR_8_KB = 92, // STR_16_KB = 93, // STR_32_KB = 94, // STR_64_KB = 95, // STR_128_KB = 96, // STR_256_KB = 97, // STR_512_KB = 98, // STR_1_MB = 99, // STR_RAID_DASH = 100, STR_RAID_HOT_SPARE, STR_RAID, STR_RAID_0, STR_RAID_1, STR_RAID_5, STR_RAID_10, STR_RAID_50, // STR_8_KB_RA = 104, // STR_16_KB_RA = 105, // STR_32_KB_RA = 106, // STR_64_KB_RA = 107, // STR_128_KB_RA = 108, // STR_256_KB_RA = 109, // STR_512_KB_RA = 110, // STR_1_MB_RA = 111, // STR_NOT_INSTALLED = 112, // STR_SYSTEM_INFO = 113, // STR_CMOS_SETTINGS = 114, // STR_LOGICAL_PARMS = 115, // STR_DRIVE = 116, // STR_DRIVE_0 = 117, // STR_DRIVE_1 = 118, // STR_SROM_VERSION = 119, // STR_ENGINE_VERSION = 120, // STR_DRIVER_NAME = 121, // STR_DRIVER_VERSION = 122, // STR_ADDRESS = 123, STR_DEVICE, STR_NOT_PRESENT, // STR_BASE_MEMORY = 125, // STR_EXTEND_MEMORY = 126, // STR_HELP = 127, // STR_SCANNING_1 = 128, // STR_SCANNING_2 = 129, // STR_DOS_SETUP = 130, // STR_NO_DOS = 131, // STR_NO_CDROM_DRIVERS = 132, // STR_CHG_CONFIG = 133, // STR_TOO_MANY = 134, // STR_CHG_AUTOEXEC = 135, // STR_NO_CAPACITY = 136, STR_MANUFACTURER, STR_MODEL, // STR_CACHE = 138, // STR_FIRMWARE_COLON = 139, // STR_IRQ = 140, // STR_HEX = 141, // STR_HBA_INFO = 142, // STR_DMA = 143, // STR_PRIMARY = 144, // STR_SECONDARY = 145, // STR_EDGE = 146, // STR_LEVEL = 147, // STR_BUS_MASTER = 148, // STR_8_BIT = 149, // STR_16_BIT = 150, // STR_SINGLE_END = 151, // STR_DIFFERENTIAL = 152, // STR_LVD_SINGLE = 153, STR_FIBRE, // STR_ADDR_HBA = 155, STR_BUS, STR_ID, // STR_LUN = 158, // STR_CAPACITY = 159, // STR_STATUS = 160, // STR_RAID_INFO = 161, // STR_SCSI_INFO = 162, STR_REMOVABLE, // STR_CAPABILITIES = 164, // STR_REL_ADDR = 165, STR_WIDE, STR_NARROW, // STR_WIDE_16 = 166, // STR_WIDE_32 = 167, // STR_SYNC = 168, // STR_LINKED = 169, // STR_CMD_Q = 170, // STR_SOFT_RESET = 171, // STR_ESTIMATED = 172, // STR_RAID_LEVEL_COLON = 173, // STR_TRANSFER = 174, // STR_MB_SECOND = 175, STR_FORMAT, // STRT_MAKE_HOTSPARE = 177, // STRT_PRINT = 178, // STRT_DIAGS = 179, // STRT_VIEW_LOG = 180, // STRT_REPORTS = 181, // STRT_STATISTICS = 182, // STRT_MOD_CONFIG = 183, // STRT_MOD_AUTOEXEC = 184, // STRT_CREATE_BAT = 185, // STR_INCOMPLETE = 186, STR_INCOMPLETE_ENTRY, // STR_NONE_CHOSEN = 187, // STR_SCSI_BUS = 188, // STR_BRIDGE = 189, // STR_REREAD = 190, // STR_COPY_FILES = 191, // STR_PHYSICAL = 192, STR_BLOCKS, // STR_SIZE = 194, // STR_BYTES = 195, // STR_NA = 196, STR_REV, // STR_MEMBER_OF = 198, // STR_CONTROLLER = 199, // STR_HOST_BUS = 200, STR_TYPE, // STR_MB_SEC_MAX = 202, // STR_WIDTH = 203, // STR_SCSI_ID = 204, // STR_FIBRE_ID = 205, // STR_ATTACHED_MOD = 206, // STR_PHYSICAL_CONFIG = 207, // STR_LOGICAL_CONFIG = 208, // STR_CREATING_ARRAY = 209, STR_ARRAY_MODIFY, STR_RAID_TYPE, // STR_SELECT_ARRAY_TYPE = 211, // STR_SCSI_DIAGS = 212, // STR_TEST_DURATION = 213, // STR_ITERATIONS = 214, // STR_CONTINUOUS = 215, // STR_TESTS_PERFORMED = 216, // STR_DEVICE_BUFFER = 217, // STR_MEDIA_READ = 218, // STR_MEDIA_RW = 219, // STR_TARGET_SECTORS = 220, // STR_ALL_SECTORS = 221, // STR_RANDOM_SECTORS = 222, // STR_STOP_ON_ERROR = 223, // STR_PASS = 224, // STR_ERRORS = 225, // STR_TOTAL_TIME = 226, // STRT_RUN_TEST = 227, // STRT_STOP_TEST = 228, // STR_DIAGPCT = 229, // STR_1KB_STAT = 230, // STR_2KB_STAT = 231, // STR_4KB_STAT = 232, // STR_8KB_STAT = 233, // STR_16KB_STAT = 234, // STR_32KB_STAT = 235, // STR_64KB_STAT = 236, // STR_128KB_STAT = 237, // STR_256KB_STAT = 238, // STR_512KB_STAT = 239, // STR_1MB_STAT = 240, // STR_TOTAL_STAT = 241, // STR_FORMAT_WARN = 242, // STR_FORMAT_OPTIONS = 243, // STR_CREATE_DISK = 244, // STR_FORMAT_DISKETTE = 245, // STR_PROTECTED_RAID0 = 246, // STR_PROTECTED_RAID1 = 247, // STR_PROTECTED_RAID5 = 248, // STRT_HOTSPARES = 249, // STRT_REMOVE_HOTSPARE = 250, // STR_CURRENT_MEDIA = 251, // STR_NO_MEDIA = 252, // STR_NOW_QUIET = 253, // STR_EVENT_LOGS = 254, // STRT_EVENT_LOG = 255, // STR_NAME_COLON = 256, // STR_NAME = 257, // STRT_BUILD = 258, // STR_NAME_ARRAY = 259, // STR_CHOOSE_NAME = 260, // STR_NAME_USED = 261, // STR_DPT_INSTALL = 262, // STR_INSTALL_6 = 263, // STR_INSTALL_11 = 264, // STR_SCSI_BUSES = 265, // STR_NO_CMOS_FLOPPY = 266, // STR_NO_DRIVERS = 267, // STR_CHOOSE_TARGET = 268, // STR_INSERT_BLANK = 269, // STR_FORMAT_FAILURE = 270, // STR_WRITING = 271, // STR_HDW_ERROR_DESC = 272, // STR_HDW_ERROR = 273, // STR_SET_CONFIG_WARN = 274, // STR_NO_OS2_DOS_BOX = 275, // STR_REQ_SMARTROM = 276, // STR_OFFER_REBOOT = 277, // STR_WHICH_VERSION = 278, // STR_SELECT_OS = 279, // STR_CHOOSE_OS_FAMILY = 280, // STR_AVAIL_CONN = 281, // STR_UNSAVED = 282, // STR_INTERNAL_ERROR = 283, // STR_IE_CONTACT = 284, // STR_SEARCH_ENGINES = 285, // STR_NUM_STRIPES = 286, // STR_COMPONENTS = 287, // STRT_VERIFY_ARRAY = 288, // STR_DESTINATION = 289, // STR_LPT1 = 290, // STR_LPT2 = 291, // STR_PRINT_SETTINGS = 292, // STR_FILE_COLON = 293, // STR_APPEND_FILE = 294, // STRP_DEVICE_TYPE = 295, // STR_PRINTER_NOT_READY = 296, // STR_HLP_MISSING = 297, // STR_NO_SPECIFIC_HELP = 298, // STRT_CONTINUE_C = 299, // STR_NO_RAID_CAP = 300, // STR_LOAD_CLASS_DRV = 301, // STR_CHOOSE_DONE = 302, STR_PARSE_ERR_INVALID_STRIPE_SIZE, STR_PARSE_ERR_INVALID_TASK_RATE, STR_PARSE_ERR_INVALID_SPEED, STR_PARSE_ERR_UNDEFINED_SWITCH, STR_PARSE_ERR_DRIVE_CAPACITY_MUST_BE_INTEGER, STR_PARSE_ERR_CTLR_DESGINATIONS_NOT_SUPPORTED, STR_PARSE_ERR_SWITCH_MULTIPLY_DEFINED, STR_PARSE_ERR_MUST_BE_INTEGER_VALUE, STR_PARSE_ERR_NOT_A_VALID_LIST_TYPE, STR_PARSE_ERR_MUST_SPECIFY_HBA, STR_PARSE_ERR_MUST_SPECIFY_ADDRESS, STR_PARSE_ERR_MUST_SPECIFY_ALL_OR_LIST, STR_PARSE_ERR_UNIMPLEMENTED_COMMAND, STR_PARSE_ERR_INVALID_CMD_OR_OPTION_TO_CMD, STR_PARSE_ERR_MUST_SUPPLY_IMAGE, STR_PARSE_ERR_MUST_SUPPLY_FILE_NAME, STR_PARSE_ERR_MUST_SUPPLY_ASCII_DATA, STR_PARSE_ERR_ASCII_DATA_TOO_LONG, STR_CMD_PARSER_ERROR, STR_CMD_ERR_INVALID_LIST_TYPE, STR_CMD_ERR_CANT_FIND_COMPONENT, STR_CMD_ERR_CANT_FIND_HBA_INDEX, STR_CMD_ERR_CANT_FIND_HBA_INDEX_NVRAM, STR_CMD_ERR_COMPONENT_BUSY, STR_CMD_ERR_INVALID_FLASH_IMAGE, STR_ERR_VALUE_OUT_OF_RANGE, STR_ERR_INVALID_FILE, STR_ERR_INVALID_RAID_TYPE, STR_ERR_NOT_ENOUGH_MEMORY, STR_CMD_ERR_CMD_NOT_POSS_ON_RAID, STR_CMD_ERR_CMD_NOT_POSS_ON_HBA, STR_CMD_ERR_CMD_NOT_POSS_ON_THIS_DEVICE, STR_ERR_POSS_BUFFER_CORRUPTION, STR_MSG_RTN_COMPLETED, STR_MSG_RTN_STARTED, STR_MSG_RTN_FAILED, STR_MSG_RTN_DATA_OVERFLOW, STR_MSG_RTN_DATA_UNDERFLOW, STR_MSG_RTN_IGNORED, STR_MSG_RTN_DISCONNECT, STR_ERR_CONN_LIST_ALLOC, STR_ERR_SEMAPHORE_ALLOC, STR_ERR_OSD_OPEN_ENGINE, STR_ERR_INVALID_IO_METHOD, STR_ERR_NO_SMARTROM, STR_ERR_ENGINE_INIT, STR_ERR_INVALID_CONN_TAG, STR_ERR_SEMAPHORE_TIMEOUT, STR_ERR_NULL_IO_BUFFER, STR_ERR_INVALID_TGT_TAG, STR_ERR_DESTROY_SEMAPHORE, STR_ERR_MEM_ALLOC, STR_ERR_INVALID_DEV_ADDR, STR_ERR_DUPLICATE_NAME, STR_ERR_GET_CCB, STR_ERR_NO_RAID_DEVICES, STR_ERR_RESERVE_BLK_SIG, STR_ERR_FORMAT_BLK_SIZE, STR_ERR_RAID_REFNUM, STR_ERR_RAID_COMP_DUPLICATE, STR_ERR_RAID_COMP_RESTRICT, STR_ERR_RAID_COMP_USED, STR_ERR_RAID_COMP_GHOST, STR_ERR_RAID_COMP_FAILED, STR_ERR_RAID_TOO_FEW, STR_ERR_RAID_TOO_MANY, STR_ERR_RAID_EVEN, STR_ERR_RAID_ODD, STR_ERR_RAID_POWER_2_PLUS, STR_ERR_RAID_CHAN_COUNT, STR_ERR_RAID_MIN_STRIPE, STR_ERR_RAID_MAX_STRIPE, STR_ERR_RAID_ZERO_STRIPES, STR_ERR_RAID_TOO_LARGE, STR_ERR_RAID_START_CHAN, STR_ERR_RAID_SEQ_CHAN, STR_ERR_RAID_DIFF_STRIPES, STR_ERR_RAID_DIFF_NUM_STR, STR_ERR_RAID_OVER_STRIPE, STR_ERR_RAID_COMP_REMOVE, STR_ERR_RAID_COMP_EMULATED, STR_ERR_RAID_COMP_DEVTYPE, STR_ERR_RAID_COMP_NON_512, STR_ERR_RAID_DIFF_BLOCKS, STR_ERR_RAID_DIFF_CAPACITY, STR_ERR_RAID_DIFF_VENDOR, STR_ERR_RAID_DIFF_PRODUCT, STR_ERR_RAID_DIFF_REVISION, STR_ERR_RAID_NOT_SUPPORTED, STR_ERR_RAID_INVALID_HBA, STR_ERR_RAID_TABLE_REQUIRED, STR_ERR_RAID_COMP_TAG, STR_ERR_RAID_MAX_ARRAYS, STR_ERR_RAID_COMP_SIZE, STR_ERR_RAID_FW_LEVEL, STR_ERR_INVALID_HBA_ADDR, STR_ERR_ISA_ADDR_ONLY, STR_ERR_PRIMARY_HBA_EXISTS, STR_ERR_NO_MORE_SLOTS, STR_ERR_DUP_ISA_ADDR, STR_ERR_DUP_EISA_SLOT, STR_ERR_PRIMARY_ISA_ADDR, STR_ERR_SECONDARY_ISA_ADDR, STR_ERR_ABS_NO_MORE_IDS, STR_ERR_ABS_NON_ZERO_LUN, STR_ERR_ABS_ADDR_LIMITS, STR_ERR_ABS_ADDR_OCCUPIED, STR_ERR_ABS_NO_MORE_LUNS, STR_ERR_NEW_ARTIFICIAL, STR_ERR_IO_NOT_SUPPORTED, STR_ERR_RW_EXCEEDS_CAPACITY, STR_ERR_DATA_IN_OUT, STR_ERR_SCSI_CMD_FAILED, STR_ERR_ARTIFICIAL_IO, STR_ERR_SCSI_IO, STR_ERR_BLINK_LED_IO, STR_ERR_OSD_MEM_ALLOC, STR_ERR_FORMATTING, STR_ERR_HBA_BUSY, STR_ERR_HBA_INITIALIZING, STR_ERR_DEL_OLD_RAID, STR_ERR_ENABLE_NEW_RAID, STR_ERR_UPDATE_OS_CONFIG, STR_ERR_SCSI_ADDR_BOUNDS, STR_ERR_SCSI_ADDR_CONFLICT, STR_ERR_CANNOT_DELETE, STR_ERR_FWD_NO_SPACE, STR_ERR_FWD_NOT_RESERVED, STR_ERR_FWD_NOT_INITIALIZED, STR_ERR_FWD_BLK_MISMATCH, STR_ERR_FWD_BLK_OVERFLOW, STR_ERR_RSV_REMOVEABLE, STR_ERR_RSV_NOT_DASD, STR_ERR_RSV_NON_ZERO, STR_ERR_RSV_HBA_UNABLE, STR_ERR_RSV_OTHER, STR_ERR_SCAN_PHYSICALS, STR_ERR_INIT_PHYSICALS, STR_ERR_SCAN_LOGICALS, STR_ERR_INIT_LOGICALS, STR_ERR_COMM_XMIT_BUFFER, STR_ERR_COMM_RCVE_BUFFER, STR_ERR_COMM_DISCONNECTED, STR_ERR_COMM_DATA_OVERFLOW, STR_ERRC_T_OPEN, STR_ERRC_T_BIND, STR_ERRC_T_ALLOC, STR_ERRC_T_CONNECT, STR_ERRC_T_LISTEN, STR_ERRC_T_ACCEPT, STR_ERRC_COMM_NW_INIT, STR_ERRC_COMM_WS_INIT, STR_ERRC_SEMAPHORE_TIMEOUT, STR_ERRC_CONNECTION_TAG, STR_ERRC_NOT_NULL_TERMED, STR_ERRC_MEM_ALLOC, STR_ERRC_NULL_IO_BUFFER, STR_ERRC_INVALID_PASSWORD, STR_ERRC_NOT_LOGGED_IN, STR_ERRC_ENGINE_LOAD, STR_ERRC_NOT_SUPPORTED, STR_ERRC_ICRS_ACTIVE, STR_ERRC_ICRS_INACTIVE, STR_ERRC_ICRS_REQ_POSTED, STR_ERRC_ICRS_THREAD_START, STR_ERRC_ICRS_START_REQUEST, STR_ERRC_ICRS_INIT, STR_ERRC_ACCEPTING_ICR, STR_ERRC_TX_MSG_SYNC, STR_ERRC_RX_MSG_ACK, STR_ERRC_RX_MSG_HEADER, STR_ERRC_TX_MSG_HEADER, STR_ERRC_TX_TO_ENG_DATA, STR_ERRC_RX_TO_ENG_DATA, STR_ERRC_RX_STATUS_HEADER, STR_ERRC_TX_STATUS_HEADER, STR_ERRC_RX_FROM_ENG_DATA, STR_ERRC_TX_FROM_ENG_DATA, STR_ERRC_FROM_ENG_SIZE, STR_ERRC_TO_ENG_SIZE, STR_ERRC_SERIAL_INIT, STR_ERRC_BAUD_RATE, STR_ERRC_COMM_BUSY, STR_ERRC_INVALID_PROTOCOL, STR_ERRC_PORT_CONFLICT, STR_ERRC_MODEM_INIT, STR_ERRC_DIAL_ABORT, STR_ERRC_DIAL_TIMEOUT, STR_ERRC_DIAL_BUSY, STR_ERRC_DIAL_BEEPER_OK, STR_ERRC_DIAL_UNEXPECTED_CD, STR_ERRC_DIAL_NO_TONE, STR_ERRC_DIAL_NO_ANSWER, STR_ERRC_DIAL_ERROR, STR_ERRC_NEGOTIATION, STR_ERRC_MSG_TIMEOUT, STR_ERRC_USER_ABORT, STR_ERRSPX_RD_PROPERTY, STR_ERRSPX_SAP, STR_ERRC_SOCKET_ALLOC, STR_ERRC_SOCKET_BIND, STR_ERRC_SOCKET_ACCEPT, STR_ERRC_SOCKET_CONNECT, STR_ERRC_USER_VALIDATION, STR_ERR_FLASH_ERASE, STR_ERR_FLASH_SWITCH_MODES, STR_ERR_FLASH_WRITE_512, STR_ERR_FLASH_ENG_VERIFY, STR_ERR_FLASH_INIT_REQ, STR_ERR_EXCLUSION_TIME, STR_ERR_DIAG_SCHEDULED, STR_ERR_DIAG_NOT_ACTIVE, STR_ERR_ELOG_NOT_LOADED, STR_ERR_ELOG_LOADED, STR_ERR_ELOG_EVENTS, STR_ERR_ELOG_PAUSED, STR_ERR_ELOG_NOT_PAUSED, STR_ERR_SLOG_INVALID_TIME, STR_ERR_SLOG_STAT_GROUP, STR_ERR_ALMS_ALREADY_LINKED, STR_ERR_ALMS_NOT_LINKED, STR_ERR_ALMS_INVALID_RESOURCE_TYPE, STR_ERR_UNKNOWN_ERROR, STR_NO_ERROR, STR_ER, STR_SEL_TIMEOUT, STR_CMD_TIMEOUT, STR_BUS_RESET, STR_POWER_UP, STR_UNX_PHASE, STR_UNX_FREE, STR_BUS_PARITY, STR_SCSI_HUNG, STR_UNX_MESSAGE, STR_BUS_STUCK, STR_AUTO_FAILED, STR_RAM_PARITY, STR_POWER_SUPPLY, STR_COOLING_ELEM, STR_FAN, STR_FAILURE, // STR_ABT_NON_ACT = 316, // STR_ABT_ACT = 317, // STR_RST_NON_ACT = 318, // STR_RST_ACT = 319, // STR_RAM_ECC = 320, // STR_PCI_PRTY = 321, // STR_PCI_MST_ABORT = 322, // STR_PCI_TGT_ABORT = 323, // STR_PCI_SIG_ABORT = 324, // STR_HBAERR_RESERVED_0 = 325, // STR_HBAERR_RESERVED_1 = 326, // STR_HBAERR_RESERVED_2 = 327, // STR_HBAERR_RESERVED_3 = 328, // STR_HBAERR_RESERVED_4 = 329, // STR_HBAERR_RESERVED_5 = 330, // STR_HBAERR_RESERVED_6 = 331, // STR_HBAERR_RESERVED_7 = 332, // STR_HBAERR_RESERVED_8 = 333, // STR_HBAERR_RESERVED_9 = 334, STR_GOOD, //= 335, STR_CHECK_COND, //= 336, STR_COND_MET, //= 337, STR_BUSY, //= 338, STR_INTERMEDIATE, //= 339, STR_INT_COND_MET, //= 340, STR_RESERV_CONFLICT, //= 341, STR_CMD_TERMINATED, //= 342, STR_QUEUE_FULL, STR_QUEUE_FROZEN, // STRT_REBUILD = 344, //// STR_BUILD = 345, // STRT_VERIFY = 346, STR_LOG_OVERFLOW, //= 347, STR_BAD_SCSI, //= 348, STR_REQ_SENSE, //= 349, STR_HBA_ERROR, //= 350, STR_BLOCK_REASSIGN, //= 351, STR_RAM_ERR_ADDR, //= 352, STR_HBA_TIME_CHG, //= 353, STR_OLD, //= 354, STR_NEW, //= 355, STR_CONFIG_UPDATE, //= 356, STR_FIRMWARE, //= 357, STR_SOFTWARE, //= 358, // STR_DRIVE_CRASH = 359, STR_STARTED, //= 360, STR_STOPPED, //= 361, STR_COMPLETED, STR_DATA_INC, //= 362, STR_BLOCK, //= 363, STR_COUNT, //= 364, STR_LOCK, //= 365, STR_NO_LOG_ENTRIES, STR_DRIVE_FAILURE, //= 367, // STR_RESTART_MAC = 368, // STR_CFG_HBA = 369, // STR_SCSI_TERMPWR = 370, // STR_SCAM = 371, // STR_TERMINATION = 372, STR_ON, STR_OFF, STR_ON_WRITE_BACK, STR_OFF_WRITE_THRU, STR_WRITE_BACK, STR_WRITE_THRU, // STR_HIGH_ONLY = 375, // STR_SCSI_XFER = 376, // STR_XFER_RATE = 377, STR_ASYNC, STR_5MHZ, STR_8MHZ, STR_10MHZ, STR_20MHZ, STR_40MHZ, STR_80MHZ, STR_FILLIN_MHZ, STR_FILLIN_GHZ, STR_FILLIN_MB_PER_SEC, STR_FILLIN_MV, STR_FILLIN_MA, STR_FILLIN_MAH, STR_FILLIN_HRS, // STR_PCI_BURST = 385, // STR_AUTO = 386, // STR_32LW = 387, // STR_64LW = 388, // STR_128LW = 389, // STR_EXT_CABLE = 390, // STR_ENABLED_5 = 391, // STR_DISABLED_10 = 392, // STR_DISABLED_20 = 393, // STR_BUS_ON_TIME = 394, STR_CMD_LINE_TASK_RATE_SLOW, STR_CMD_LINE_TASK_RATE_MEDSLOW, STR_CMD_LINE_TASK_RATE_MED, STR_CMD_LINE_TASK_RATE_MEDFAST, STR_CMD_LINE_TASK_RATE_FAST, STR_CMD_LINE_LOG_SOFT, STR_CMD_LINE_LOG_RECOV, STR_CMD_LINE_LOG_NONRECOV, STR_CMD_LINE_LOG_STATUS, STR_CMD_LINE_LOG_DELETE, STR_CMD_LINE_LOG_BOARD, STR_CMD_LINE_TASK_BUILD, STR_CMD_LINE_TASK_REBUILD, STR_CMD_LINE_TASK_STOP, STR_CMD_LINE_TASK_LIST, STR_CMD_LINE_TASK_VERIFY, STR_CMD_LINE_TASK_VERIFY_NO_FIX, // HIDDEN!!!!!! STR_CMD_LINE_OPTIMAL, STR_CMD_LINE_FAIL, STR_CMD_LINE_LOAD, STR_CMD_LINE_SAVE, // note that this contains the singular and plural of each list type. This is due // to the inconsistency in the command-line spec, it specifies some items as singular, // some as plural. // If your language only needs singular or plural, then set both singular and plural // strings to the same value. STR_CMD_LINE_PHYSICAL, STR_CMD_LINE_PHYSICALS, STR_CMD_LINE_LOGICAL, STR_CMD_LINE_LOGICALS, STR_CMD_LINE_CONTROLLER, STR_CMD_LINE_CONTROLLERS, STR_CMD_LINE_SPARE, STR_CMD_LINE_SPARES, STR_CMD_LINE_HOTSPARE, STR_CMD_LINE_HOTSPARES, STR_CMD_LINE_ARRAY, STR_CMD_LINE_ARRAYS, STR_CMD_LINE_ALL, STR_CMD_LINE_ALL_VENDOR, STR_CMD_LINE_SPEED, STR_CMD_LINE_REDIRECT, STR_CMD_LINE_CACHE, STR_CMD_LINE_VERSION, STR_CMD_LINE_INQUIRY, STR_CMD_LINE_INQUIRY_VENDOR, STR_CMD_LINE_BATTERY, STR_CMD_LINE_DRIVE, STR_CMD_LINE_TAGS, STR_CMD_LINE_ARRAYNAME, // STR_IO_ADDR = 397, // STR_HBA_ADDR = 398, // STR_DMA_CHANNEL = 399, // STR_DMA_SPEED = 400, // STR_PCI_PARITY = 401, // STR_SCSI_CMD_Q = 402, // STR_EXT_PCI_REQ = 403, // STR_GREEN_MODE = 404, // STR_FLOPPY_ENABLED = 405, // STR_LA17_CRAP = 406, // STR_CACHING = 407, // STRT_FLASH = 408, // STRT_APPLY = 409, // STRT_DEFAULTS = 410, // STR_10MBS = 411, // STR_8MBS = 412, // STR_6_6MBS = 413, // STR_5_7MBS = 414, // STR_5_0MBS = 415, // STR_4_4MBS = 416, // STR_4_0MBS = 417, // STR_3_0MBS = 418, // STR_8K = 419, // STR_16K = 420, // STR_32K = 421, // STR_64K = 422, // STR_ALL = 423, // STR_HBA_CACHING = 424, // STR_NO_HBAS = 425, // STR_IRQ_12 = 426, // STR_IRQ_14 = 427, // STR_IRQ_15 = 428, STR_DISABLED, //= 429, // STR_DRQ_5 = 430, // STR_DRQ_6 = 431, // STR_DRQ_7 = 432, // STR_START_NT_SERVICE = 433, // STR_VIEW_NT_EVENTS = 434, // STR_ZAP_INSTRUCT = 435, // STR_OUT_OF_RANGE = 436, // STR_COLD_BOOT = 437, // STR_DRIVES_ASSIGNED = 438, // STR_AND = 439, // STR_ACCESS_DENIED = 440, // STR_PASSWORD = 441, // STR_ENTER_PASSWORD = 442, // STR_LOCAL = 443, // STR_RAIDBCD_INFO = 444, // STR_VERSION_COLON = 445, // STR_HARDWARE = 446, // STR_IDENTIFIER = 447, // STR_REDUNDANT_CONT = 448, // STR_DATE = 449, // STR_STRIPE = 450, STR_FORMATTING, // STR_RAID1_BUILD = 452, // STR_COPY_DIRECTION = 453, // STR_CHG_DIRECTION = 454, // STR_START_COPY = 455, // STR_COPY = 456, // STR_CLEAR_BOTH = 457, // STR_PHYSICAL_MAP = 458, // STR_LOGICAL_MAP = 459, // STR_ONBOARD = 460, // STR_BANK = 461, // STRT_ALARM_OFF = 462, STR_ALARM, // STR_SCSIBCD_INFO = 464, // STR_NOT_CONNECTED = 465, // STR_NEED_CONNECTION = 466, // STR_CONNECTION_LOST = 467, // STR_NO_LONGER_CONNECTED = 468, // STR_RETURN_TO_AVAILABLE = 469, // STR_RETURN_TO_PHONEBOOK = 470, // STR_SET_HBA_THROTTLE = 471, // STR_FOREGROUND = 472, // STR_BACKGROUND = 473, // STR_DOS_VERSION = 474, // STR_LOADED_HIGH = 475, // STR_DPMI_VERSION = 476, // STR_MEMORY_EXP = 477, // STR_SIMM_MODULE = 478, STR_SCSI_BRIDGE_CTLR, STR_RAID_BRIDGE_CTLR, // STR_NO_DISPLAY = 480, // STR_READING_IMAGE = 481, // STR_IS_OS = 482, // STR_CDD_CANT_HANDLE = 483, // STR_CDD_READ_ERROR = 484, // STR_CDD_CORRUPT = 485, // STR_FMT_WRITE_PROTECT = 486, // STR_FMT_NOT_READY = 487, // STR_FMT_FAILURE = 488, // STR_TRY_AGAIN = 489, // STR_WRITING_DISKETTE = 490, // STR_ERROR_WRITING_DD = 491, // STR_REPLACE_SMDISK = 492, // STRT_MAKE_OPTIMAL = 493, // STRT_STOP_VERIFY = 494, // STRT_STOP_BUILD = 495, // STR_DD_INSTRUCTIONS = 496, // STRT_USING_NO_MOUSE = 497, // STRT_PULL_DOWNS = 498, // STRT_FUNCTION_BTNS = 499, // STRT_DELETE_ARRAY = 500, // STR_PLEASE_WAIT = 501, // STR_ALL_DATA_LOST = 502, // STR_LOAD_CONFIG_WARN = 503, // STR_INSTALL_REMOTE = 504, // STR_CANNOT_DETERMINE = 505, // STR_PROCESSOR_COLON = 506, // STR_OPERATING_SYSTEM = 507, STR_IMPACTED, //= 508, // STR_CANNOT_OPEN_FILE = 509, // STR_FILE_OVERWRITE = 510, // STR_FILENAME = 511, // STR_FILENAME_COLON = 512, // STR_WARNING_COLON = 513, // STR_DEFAULT_SETTINGS = 514, // STR_DRIVER_ROLLED_IN = 515, // STR_UPON_RETURN = 516, // STR_FOUND_OS_ERRORS = 517, // STR_OS_CONF_ERRORS = 518, // STR_BAD_ENGINE_VERSION = 519, // STR_DIAG_STOP_USER = 520, // STR_DIAG_RUNNING = 521, // STR_DIAG_PAUSED = 522, // STR_DIAG_COMPLETED = 523, // STR_DIAG_STOP_ERROR = 524, // STR_DIAG_INVALID = 525, STR_BLANK, //= 526, // STRT_NEW_TEST = 527, // STR_BUFFER_READ = 528, // STR_BUFFER_RW = 529, // STR_VERIFY_INFO = 530, // STR_ITERATION_COLON = 531, // STR_ARRAY_STATS = 532, // STR_HD_STATS = 533, // STR_READ_STATS = 534, // STR_TOTAL_SECTORS = 535, // STR_CACHE_HITS = 536, // STR_CACHE_MISSES = 537, // STR_READ_AHEAD_HITS = 538, // STR_WRITE_STATS = 539, // STR_WRITE_BACKS = 540, // STR_WRITE_THRUS = 541, // STR_PROP_HEAD_STUFF = 542, // STR_STRIPES_CROSSED = 543, // STR_IO_COMMANDS = 544, // STR_READS = 545, // STR_WRITES = 546, // STR_TOTAL = 547, // STRT_CLEAR = 548, // STR_HBA_STATS = 549, // STR_CACHE_STATS = 550, // STR_TOTAL_PAGES = 551, // STR_USED_PAGES = 552, // STR_DIRTY_PAGES = 553, // STR_READ_AHEAD_PAGES = 554, // STR_ECC_FAULT_PAGES = 555, // STR_COMMANDS = 556, // STR_TOTAL_COMMANDS = 557, // STR_MISALIGNED = 558, // STR_SCSI_BUS_RESETS = 559, // STR_ADD_ADDL_DEVICES = 560, // STR_ADD_ADDL_DONE = 561, // STR_NO_INITIAL = 562, // STRT_VIEW_README = 563, // STR_OS_SETTINGS = 564, // STR_VIEWING_FILE = 565, STR_STATUS_CHANGE, //= 566, // STR_OLD_COLON = 567, // STR_NEW_COLON = 568, // STR_LOGGER_NOT_LOADED = 569, // STR_EVENT_LOGGING_NOTIFICATION = 570, // STRT_EVENT_LOGGING = 571, // STR_FIRST_DONE = 572, // STR_LOG_LOAD_BAD = 573, // STR_COPY_SM_FILES = 574, // STR_OVERWRITE_SM_FILES = 575, // STR_MSCDEX_MSG = 576, // STR_CANT_CONNECT = 577, STR_BUILDING, //= 578, STR_BUILD_PENDING, // STR_FUTURE_DW_CONFIG = 579, // STR_DW_CONFIG_NOT_DONE = 580, // STR_FLOPT_TOO_SMALL = 581, // STR_FLOPT_TOO_BIG = 582, // STR_FLOPT_OPTIONS = 583, // STR_FORMAT_MEDIA = 584, // STR_DOS_FORMAT = 585, // STR_FLOPT_BOOTABLE = 586, // STR_FLOPT_NON_BOOTABLE = 587, // STR_USE_SYS = 588, // STR_EVENT_LOGGING = 589, // STR_TIME_INTERVAL = 590, // STR_MINUTES_120 = 591, // STR_RECORD_EVENTS_TO_FILE = 592, // STR_NOTIFICATION = 593, // STR_BROADCAST_TO_USERS = 594, // STR_LOG_TO_SYSTEM_FILE = 595, // STR_EMAIL_TO_USERS = 596, // STR_SEND_TO_DEVICES = 597, // STR_REDIRECT_SCSI_ID = 598, // STR_NEW_SCSI_ID = 599, // STR_MOD_CREATED_CONFLICT = 600, // STR_DW_COMPLETE = 601, // STR_ORG_CONFIG = 602, // STR_ORG_AUTOEXEC = 603, // STR_ORG_SYSTEMINI = 604, // STRT_REDIRECT = 605, // STR_DW_ANYTIME = 606, // STRT_VIEW_README2 = 607, // STR_PROMPT_REF = 608, // STR_FLOPT_NO_FORMAT = 609, STR_OPTIMAL, //= 610, STR_CREATED, // STR_MISSING_NO_CONFIG = 611, STR_CURRENT_CREATE, //= 612, // STR_MISSING_NO_ATTACH = 613, // STR_NO_INFORMATION = 614, // STR_LOG_NOT_REMOTE = 615, // STRT_STOP_LOGGER = 616, // STRT_START_LOGGER = 617, // STRT_UNLOAD_LOGGER = 618, // STR_PP_EMU_ONLY = 619, // STR_PP_NO_SMARTROM = 620, // STR_PP_REQ_ALL_SECONDARY = 621, // STR_PP_NO_LEVEL = 622, // STR_PP_NO_LUNS = 623, // STR_PP_EISA_ONLY = 624, // STR_PP_NO_ISA_EISA = 625, // STR_TAPE_DRIVE = 626, // STR_PP_NO_SUPPORT = 627, // STR_PP_DEV_TOO_MANY = 628, // STR_PP_DEV_WRONG_ID = 629, // STR_PP_NO_STRIPING = 630, // STR_SEND_LOGGER = 631, STR_DEVICES, // STR_NOTE_THRESHOLD = 633, // STR_USERS = 634, STR_RAID_REDIRECT, // STR_REDIRECTED = 635, // STR_PP_EISA_SLOTS = 636, // STR_PP_TOO_MANY_HBAS = 637, // STR_PP_UNLESS_RAID = 638, // STR_PP_HBA_REQ_ADDR = 639, // STR_PP_BAD_HBA_ADDR = 640, // STR_PP_1F0_PRIMARY = 641, // STR_THRESHOLD_1 = 642, // STR_THRESHOLD_2 = 643, // STR_THRESHOLD_3 = 644, // STR_THRESHOLD_4 = 645, // STR_LOG_INSTRUCTIONS = 646, // STR_DISPLAY_THRESHOLD = 647, // STRT_CLEAR_LOG = 648, // STR_PROCESSOR_EXEP = 649, // STR_FIRMWARE_EXEP = 650, // STR_POWER_UP_FAIL = 651, // STR_FIRMWARE_ERROR = 652, // STR_BLINKLED = 653, // STR_BLINK_80 = 654, // STR_BLINK_81 = 655, // STR_BLINK_82 = 656, // STR_BLINK_83 = 657, // STR_BLINK_84 = 658, // STR_BLINK_86 = 659, // STR_BLINK_87 = 660, // STR_BLINK_RESET_STUCK = 661, // STR_BLINK_71 = 662, // STR_BLINK_72 = 663, // STR_BLINK_73 = 664, // STR_BLINK_74 = 665, //// STR_BLINK_UNDEF = 666, //// STR_BLINK_HWERR = 667, //// STR_BLINK_0X12 = 668, //// STR_BLINK_0X15 = 669, //// STR_BLINK_0X16 = 670, //// STR_BLINK_0X17 = 671, //// STR_BLINK_PCIXFERERR = 672, //// STR_BLINK_PCIPARERR = 673, //// STR_BLINK_PCICFGERR = 674, //// STR_BLINK_ECCMISMATCH = 675, //// STR_BLINK_MEMPM3XXX = 676, //// STR_BLINK_MEMPM2XXX = 677, //// STR_BLINK_DOMMISMATCH = 678, //// STR_BLINK_DOMINVALID = 679, //// STR_BLINK_UNSUPP_SG = 680, //// STR_BLINK_NVRAM_CLR = 681, //// STR_BLINK_CACHE_INV = 682, //// STR_BLINK_CACHE_MIS = 683, //// STR_BLINK_CACHE_OUT = 684, //// STR_BLINK_HW_FAIL1 = 685, //// STR_BLINK_HW_FAIL2 = 686, //// STR_BLINK_HW_FAIL3 = 687, //// STR_BLINK_HW_UNKNOWN = 688, //// STR_BLINK_OS_TASK_FAIL = 689, //// STR_BLINK_OS_HISR_FAIL = 690, //// STR_BLINK_OS_QUECR_FAIL = 691, //// STR_BLINK_OS_SEM_FAIL = 692, //// STR_BLINK_OS_LISR_FAIL = 693, //// STR_BLINK_OS_QUEUE_FAIL = 694, //// STR_BLINK_OS_ERR_LOOP = 695, //// STR_BLINK_OS_GEN_ERR = 696, // STR_COULD_NOT_CREATE = 697, // STR_STAT_INVALID = 698, STR_STAT_1, //= 699, STR_STAT_2, //= 700, STR_STAT_3, //= 701, STR_STAT_4, //= 702, STR_STAT_5, //= 703, STR_STAT_6, //= 704, STR_STAT_7, //= 705, STR_STAT_8, //= 706, STR_STAT_9, //= 707, STR_STAT_10, //= 708, STR_STAT_11, //= 709, STR_STAT_12, //= 710, STR_STAT_13, //= 711, STR_STAT_14, //= 712, STR_STAT_15, //= 713, STR_STAT_16, //= 714, STR_STAT_17, //= 715, STR_STAT_18, //= 716, STR_STAT_19, //= 717, STR_STAT_20, //= 718, STR_STAT_21, //= 719, STR_STAT_22, //= 720, STR_STAT_23, //= 721, STR_STAT_24, //= 722, STR_STAT_25, //= 723, STR_STAT_26, //= 724, STR_STAT_27, //= 725, STR_PARAMETER_MISMATCH, STR_REPLACED_FORMAT, STR_DRIVE_FAILED, STR_STAT_31, //= 729, STR_STAT_32, //= 730, STR_STAT_33, //= 731, STR_STAT_34, //= 732, STR_STAT_35, //= 733, // STR_OSS_OS2 = 734, // STR_OSS_UNIX = 735, // STR_OSS_NETWARE_286 = 736, // STR_OSS_NETWARE_386 = 737, // STR_OSS_SCO_UNIX = 738, // STR_PROC_8086 = 739, // STR_PROC_80286 = 740, // STR_PROC_80386 = 741, // STR_PROC_80486 = 742, // STR_PROC_PENTIUM = 743, // STR_PROC_PENTIUM_PRO = 744, // STR_NEW_ARRAY_NO_COVERAGE = 745, // STR_HS_NO_PROTECT = 746, // STR_HS_SOME_PROTECT = 747, // STR_WINDOWS_PATH = 748, // STR_INT24_WRITE_PROTECT = 749, // STR_INT24_UNKNOWN_UNIT = 750, // STR_INT24_NOT_READY = 751, // STR_INT24_GENERIC = 752, // STR_INT24_DATA_ERROR = 753, // STR_INT24_SEEK_ERROR = 754, // STR_INT24_UNKNOWN_MEDIA_TYPE = 755, // STR_INT24_SECTOR_NOT_FOUND = 756, // STR_PRINT_NO_FILENAME = 757, // STR_PRINT_TO_CONSOLE = 758, STR_SYS_CONSOLE, // STR_NO_SPACE_FOR_RAID_TABLE = 759, // STR_HBA_NO_RAID_MODULE = 760, // STR_NO_WINDOWS_IN_PATH = 761, // STR_FORMAT_UNSUCCESSFUL = 762, // STR_PRINTED_BY = 763, // STR_TEXT_MISSING = 764, // STR_TEXT_IMPACTED = 765, // STR_TEXT_WARNING = 766, // STR_TEXT_FAILED = 767, // STR_TEXT_BUILDING = 768, STR_SENSE_0, //= 769, STR_SENSE_1, //= 770, STR_SENSE_2, //= 771, STR_SENSE_3, //= 772, STR_SENSE_4, //= 773, STR_SENSE_5, //= 774, STR_SENSE_6, //= 775, STR_SENSE_7, //= 776, STR_SENSE_8, //= 777, STR_SENSE_9, //= 778, STR_SENSE_A, //= 779, STR_SENSE_B, //= 780, STR_SENSE_C, //= 781, STR_SENSE_D, //= 782, STR_SENSE_E, //= 783, STR_SENSE_F, //= 784, STR_ISA, STR_EISA, STR_PCI, STR_VERIFY2, //= 788, STR_STAT_DEGRADED, //= 789, STR_STAT_RECONSTRUCT, //= 790, STR_STAT_EXPAND, //= 791, STR_STAT_DEAD, //= 792, STR_ARRAY_WARNING, //= 793, STR_NON_ARRAYED, //= 794, STR_NON_EXISTANT, //= 795, STR_FAILED_DRIVE, //= 796, STR_REPLACED_DRIVE, //= 797, STR_DRIVE_WARNING, //= 798, STR_PARAM_MISMATCH, //= 799, STR_FORMAT_UNIT, //= 800, STR_UNINITIALIZED_HYPH, //= 801, STR_DRIVE_VERIFY, //= 802, // STR_DUMMY_CDD = 803, // STR_DPTDDL_PATH = 804, // STR_DPT_DEVICE_ENTRY = 805, STR_SCSI_BUS_ECC_ERR, //= 806, STR_CORRECTABLE, //= 807, STR_NONCORRECTABLE, //= 808, // STR_CORRECTED = 809, STR_PARITY, //= 810, STR_ECC, //= 811, STR_SS_COMP_FAILED, //= 812, STR_SS_FULLY_FUNC, //= 813, // STR_ALL_IDS_IN_USE = 814, // STR_CURRENT_ADDR = 815, // STR_NEW_SCSI_ADDR = 816, // STRT_SEARCH_AGAIN = 817, // STR_DPT_ENGINE = 818, // STR_DSM_INCOMPATIBLE = 819, // STR_NOT_COMPATIBLE = 820, // STRT_GLOSSARY = 821, // STRT_BACK = 822, // STR_OS_MISMATCH = 823, // STRT_PRINTER_SETUP = 824, // STR_LOAD_CONFIG = 825, // STR_SAVE_CONFIG = 826, STR_HOST_CMD_REC, //= 827, STR_HOST_CMD_SENT, //= 828, // STR_ARRAY_DIAGS = 829, // STR_ECC_ENABLED = 830, // STR_ENABLE_DPT_ECC = 831, // STR_SLOT = 832, // STR_DRIVER_NO_STRIPE = 833, // STR_STRIPE_CHANGE = 834, // STR_CANNOT_FIND_SERVER = 835, // STR_COMM_ENGINE = 836, // STR_INCOMPATIBLE_COMM = 837, // STR_IMAGE_WRONG_SIZE = 838, // STR_ONE_FLOPPY_RIGHT_SIZE = 839, // STR_IMAGE_SIZE_MISMATCH = 840, STR_FILE_NOT_MATCH_HBA, // STR_INVALID_IMAGE_FILE = 841, // STR_WRITE_ERROR = 842, // STR_ZAPPED = 843, // STR_OST_DOS = 844, // STR_OST_WINDOWS = 845, // STR_OST_WINDOWS95 = 846, // STR_OST_WINDOWS_NT = 847, // STR_OST_MSOS2 = 848, // STR_OST_IBMOS2 = 849, // STR_OST_NOVELL = 850, // STR_OST_SCO = 851, // STR_OST_USL = 852, // STR_OST_SVR42 = 853, // STR_OST_UNIXWARE = 854, // STR_OST_SOLARIS = 855, // STR_OST_INTERACTIVE = 856, // STR_OST_ATT_UNIX = 857, // STR_OST_NEXT = 858, // STR_OST_UNIX = 859, // STR_OST_VINES = 860, // STR_OST_PICK = 861, // STR_OST_THEOS = 862, // STR_OST_LINUX = 863, // STR_OST_BSDI = 864, // STR_OST_FREEBSD = 865, // STR_OST_AIX = 866, // STR_OST_NETBSD = 867, // STR_OST_OTHER = 868, // STR_OS_DOS = 869, // STR_OS_DOS5 = 870, // STR_OS_DRDOS = 871, // STR_OS_CONDOS = 872, // STR_OS_ZENITH = 873, // STR_OS_PCMOS = 874, // STR_OS_OS2MMS = 875, // STR_OS_OS2MIBM = 876, // STR_OS_OS2L = 877, // STR_OS_OS220 = 878, // STR_OS_OS221 = 879, // STR_OS_OS221_AND_UP = 880, // STR_OS_OS2OTHER = 881, // STR_OS_NW311 = 882, // STR_OS_NW40 = 883, // STR_OS_NW21X = 884, // STR_OS_NW22 = 885, // STR_OS_NW20 = 886, // STR_OS_CONSENSYS = 887, // STR_OS_IF_SVR4 = 888, // STR_OS_MICROPORT = 889, // STR_OS_UHC = 890, // STR_OS_SCO_UNIX_320 = 891, // STR_OS_SCO_UNIX_322 = 892, // STR_OS_SCO_UNIX_324 = 893, // STR_OS_SCO_UNIX_3242 = 894, // STR_OS_SCO_XENIX = 895, // STR_OS_INT_UNIX_1X = 896, // STR_OS_INT_UNIX_2X = 897, // STR_OS_INT_UNIX_3X = 898, // STR_OS_ESIX = 899, // STR_OS_INTEL_UNIX = 900, // STR_OS_MICROPORT_286 = 901, // STR_OS_MICROPORT_386 = 902, // STR_OS_VINES_411 = 903, // STR_OS_VINES_55 = 904, // STR_OS_VINES_6X = 905, // STR_OS_VINES_7X = 906, // STR_OS_MAGIX = 907, // STR_OS_PICK22 = 908, // STR_OS_PICK21 = 909, // STR_OS_QNX = 910, // STR_OS_WYSE = 911, // STR_OS_INT13 = 912, // STR_OS_WD1003 = 913, // STR_OS_NOTLISTED = 914, // STR_YOUR_CHOSEN_OS = 915, // STR_OST_OLIVETTI = 916, // STR_OS_NEXT = 917, // STR_OS_NEXT33 = 918, // STR_OS_UNIXWARE1X = 919, // STR_OS_UNIXWARE2X = 920, // STR_OS_LINUX = 921, // STR_OS_BSDI = 922, // STR_OS_FREEBSD = 923, // STR_OS_AIX = 924, // STR_OS_NETBSD = 925, // STR_OS_DGUNIX = 926, // STR_OS_MACOS = 927, // STR_QUIET_TITLE = 928, // STR_QUIET_DESCRIP = 929, // STR_SCSI_II = 930, // STRT_CREATE_DISK = 931, // STR_BAD_EXCLUSION = 932, // STR_PRIORITY = 933, // STR_EX_PERIOD = 934, // STR_START_COLON = 935, // STR_END_COLON = 936, STR_ENABLED, STR_CURRENT_SENSOR, STR_VOLT_SENSOR, STR_TEMP_SENSOR, STR_ENCL_TEMPERATURE_SENSOR, STR_NORMAL_TEMP_RESTORED, STR_TEMP_NORMAL, STR_HIGH_TEMP, STR_LOW_TEMP, STR_DETECTED, STR_VERY_HIGH_TEMP, STR_TEMP_OUT_OF_RANGE, STR_LOW_VOLTAGE, STR_NORMAL_VOLTAGE, STR_HIGH_VOLTAGE, STR_DIAGNOSTIC, STR_STOPPED_DDS, STR_STOPPED_FAIL, STR_STOPPED_LIMIT, STR_STOPPED_USER, STR_STOPPED_COMPLETE, STR_SMART_THRESHOLD, STR_DRIVE_PREDICTION, STR_SPINUP_CRITERION, STR_SEEK_CRITERION, STR_SCHEDULED, STR_QUERIED, STR_CANCELED, STR_EX_PERIOD_SET, STR_DEBUG_EVENT, STR_LOG_TIME, STR_LOG_LEVEL, // STR_WRAP_OFF = 961, // STR_LOG_SEPARATOR = 962, // STR_SAVE_CHANGES = 963, // STR_MUST_REBOOT = 964, // STR_DEV_CONFIG = 965, // STR_READ_CACHING = 966, // STRT_DISCONNECT = 967, // STRT_FAIL = 968, // STR_START_DURING_EX = 969, // STR_STOP_BUILD_BAD = 970, // STR_STOP_GEN5_BUILD_BAD = 971, // STR_BOTH_FAILED = 972, // STRT_CONFIGURE = 973, // STR_SECTORS_COLON = 974, // STR_BYTES_SECTOR_LOGICAL = 975, // STR_BYTES_SECTOR = 976, // STR_SCSI_3 = 977, // STR_SMART = 978, //// STR_REBUILD = 979, STR_SAFTE, STR_SES, // STR_SAFTE_ENCL = 981, // STR_CE_ENOENT = 982, // STR_CE_EMFILE = 983, // STR_CE_EACCES = 984, // STR_CE_EINVACC = 985, // STR_CF_NOSPACE = 986, // STR_CF_OTHER = 987, // STR_CF_NOOPEN_SRC = 988, // STR_WIN_INSTALL = 989, // STR_UNCONF_EISA = 990, // STR_WIN32_NODASD = 991, // STR_FLASH_NEEDED = 992, // STR_VALID_FLASH_FILE = 993, // STR_SUCCESSFUL_FLASH = 994, // STR_FLASH_DL_ERROR = 995, // STR_VERIFY_FLASH = 996, // STR_FLASH_FIRMWARE = 997, // STR_FLASH_BIOS = 998, // STR_FLASH_SMOR = 999, // STR_BATTERY_MISSING = 1000, // STR_BATTERY_PRESENT = 1001, STR_BATT_STAT_CHANGE, // STR_NORMAL = 1002, // STR_LOW = 1003, // STR_HIGH = 1004, // STR_VOLTAGE = 1005, // STR_SERIALNUM = 1006, // STR_STANDARD_CONNECTIONS = 1007, // STR_CUSTOM_CONNECTIONS = 1008, // STR_PROTOCOL_TCPIP = 1009, // STR_PROTOCOL_SPX = 1010, // STR_PROTOCOL_SERIAL = 1011, // STR_PROTOCOL_MODEM = 1012, // STR_MODEM = 1013, // STR_CONNECTION_INFORMATION = 1014, // STRT_ADDRESS = 1015, // STRT_USERNAME = 1016, // STRT_PASSWORD = 1017, // STR_PHONEBOOK = 1018, // STRT_PHONEBOOK = 1019, // STRT_DISPLAY_ICON = 1020, // STRT_PROTOCOL = 1021, // STRT_SERVERNAME = 1022, // STRT_ADD = 1023, // STRT_EDIT = 1024, // STRT_SAVE = 1025, // STRT_DELETE = 1026, // STRT_CONNECT = 1027, // STRT_CLOSE = 1028, // STR_CHOOSE_ICON = 1029, // STRT_CHOOSE_ICON = 1030, // STRT_ICONS = 1031, // STR_SX4000 = 1032, // STR_TERMINATOR = 1033, // STR_RAID_CTLR = 1034, // STR_SES_ENCL = 1035, // STR_SAFTE_SES = 1036, // STR_XFER = 1037, // STR_FCAL = 1038, // STR_FIBRE_CHANNEL = 1039, // STR_132 = 1040, // STR_264 = 1041, // STR_64BIT_SLOT = 1042, // STR_32BIT_SLOT = 1043, // STR_EVENT_VIEWER = 1044, // STR_TAPI = 1045, // STR_LOG_DESKTOP = 1046, // STR_BROADCAST_TO_MACHINE = 1047, // STR_LOG_COMPUTERS = 1048, STR_FAILED_HOTSPARE, // STRT_EXPAND_RAID = 1050, STR_ULTRA, STR_ULTRA2, STR_ULTRA3, STR_ULTRA160, STR_ULTRA320, // STR_NRAM_CACHE_NOTE = 1052, // STR_CACHE_INHIBIT_COMMANDS = 1053, // STR_CACHE_ADVISORY = 1054, // STR_CACHE_MANDATORY = 1055, // STR_CACHE_SYNC_COMMANDS = 1056, // STR_CACHE_SIZE = 1057, // STR_CACHE_VIRTUAL = 1058, // STR_CACHE_PHYSICAL = 1059, // STR_CACHE_CONTROL = 1060, // STR_CACHE_WRITE = 1061, // STR_CACHE_WRITE_BACK = 1062, // STR_CACHE_WRITE_THROUGH = 1063, STR_CACHE_DISABLED, // STR_TRACE_HOST_COMMANDS = 1064, // STR_TRACE_SCSI_COMMANDS = 1065, STR_NO_BATTERY, STR_BAD_BATTERY, // STR_BBU_WND_TITLE = 1066, // STR_BBU_NOT_DETECTED = 1067, // STR_BBU_CHECK_CONNECTIONS = 1068, // STR_BBU_STATUS = 1069, STR_BBU_STARTING, STR_BBU_OPERATIONAL, // STR_BBU_BACKUP = 1070, // STR_BBU_CAP_WARNINGS = 1071, // STR_BBU_AUTO_WT = 1072, STR_BBU_PRED_FAILURE, // STR_BBU_INIT_CAL_BUTTON = 1074, // STR_BBU_MAINT_CAL_BUTTON = 1075, // STR_BBU_DEFAULT_BUTTON = 1076, // STR_BBU_INIT_DLG_TITLE = 1077, // STR_BBU_INIT_DLG_MSG = 1078, // STR_BBU_MAINT_DLG_TITLE = 1079, // STR_BBU_MAINT_DLG_MSG = 1080, // STR_BBU_GEN_ERROR_MSG = 1081, // STR_BBU_GEN_ERROR_TITLE = 1082, STR_BBU_FULL, STR_BBU_CHARGING, STR_BBU_DISCHARGING, STR_RECHARGING, STR_BBU_BAD, STR_BBU_INIT_CHARGE, STR_BBU_INIT_DISCHARGE, STR_BBU_INIT_RECHARGE, STR_BBU_MAINT_DISCHARGE, STR_BBU_MAINT_CHARGE, STR_TRICKLE_CHRGING, STR_MAINT_CALIB, STR_INIT_CALIB, // STR_BBU_MAINT_CAL_CHARGE = 1091, // STR_BBU_AUTO_WT_MESSAGE = 1092, // STR_MB_SEC_XFER = 1093, // STR_IN_MAINT_WT_MODE = 1094, // STR_IN_FORCED_WT_MODE = 1095, // STR_NO_MAINT_PERFORMED = 1096, // STR_BBU_AUTO_PRED_MSG = 1097, // STR_AUTO_WT_WARNING = 1098, // STR_ADVANCED = 1099, // STR_DIRECTORY_FILE = 1100, // STR_SUCCESSFUL_FLASH_REMOTE = 1101, // NUM_STRINGS = 1102 STR_DEGRADED, //= 1103 STR_RECONSTRUCT, //= 1104 STR_EXPAND, //= 1105 STR_DEAD, //= 1106 STR_ARRAY_WARNING2, //= 1107 STR_VERIFY, //= 1108 STR_NON_EXIST, //= 1109 STR_UNINITIALIZED, //= 1110 STR_REPLACED_DRIVE2, //= 1111 STR_DRIVE_WARNING2, //= 1112 STR_PARAM_MISMATCH2, //= 1113 STR_FORMAT_UNIT2, //= 1114 STR_SES_ENCL, STR_SAFTE_ENCL, STR_DEC_ENCL, STR_NILE_ENCL, STR_COMMUNICATION_LOST, STR_SES_ENCL_FOUND, STR_DOOR_LOCK, STR_AUD_ALARM, STR_SES_ENCL_SELECTION_TIMEOUT, STR_SES_ENCL_HARDWARE_ERROR, STR_SES_ENCL_ERROR_LIMIT, STR_CPU_REGISTER_DUMP, STR_BLINKLED_EVENT, STR_RU_SURE_TO_ZAP, STR_CHAR_Y, STR_DRIVE_IS_BUSY, STR_SUCCESS_RESYNC_SUCCESS, STR_SUCCESS_RESYNC_NOT_SUPPORTED, STR_SUCCESS_RESYNC_FAILED, STR_UART_HBA_NUM, STR_HBA_NUM_NOT_FOUND, STR_ERR_UART_HBA_NUM, STR_UART_WRITTEN_TO_FILE, STR_NO_UART_DATA, STR_MUST_REBUILD_RAID1, STR_STR_OVER_PENDING, STR_READ_CACHE, STR_WRITE_CACHE, STR_OFF_DUE2_MAINT_OPER, STR_OFF_DUE2_BATTERY_COND, STR_ERR_NO_CHANGE, STR_RESYNC_SUCCESS_NO_REBOOT, STR_RESYNC_NOT_SUPPORTED_REBOOT, STR_RESYNC_FAILED_REBOOT, STR_MUST_BE_ROOT, STR_PRESS_ENTER2_CONT, STR_INT_NOT_EXPECTD_USE, STR_LOGICAL_VIEW, STR_PHYSICAL_VIEW, STR_DRIVE_NOT_OPT_CANT_CHG, STR_UNCHANGED_OPTIMAL, STR_RAID_NOT_FAIL_CANT_CHG, STR_UNCHANGED_FAILED, STR_NVRAM, STR_SCAN_TYPE_SIZE, STR_SCAN_TYPE_SIZE_DATE_VERSION, STR_CTLR_NOT_FOUND, STR_FLASH_COMPLETE, STR_FLASH_ERR_MSG, STR_VERIFYING_ERR_MSG, STR_WARN_ONLY_NT_2000, STR_EVENT_LOG_CLEARED, STR_FOR_CHANNEL, STR_DOUBLE_COMP_FAIL, STR_THE_SERVER, STR_COULD_NOT, STR_A_HEARTBEAT, STR_SLASH_CLEAR, STR_FINISHED, STR_ERROR, STR_SWAP_SIG_DETECTED, STR_COMP_MALFUNC, STR_COMP_OPERATIONAL, STR_DIRTY_DATA, STR_CRC_FAILURE, STR_LOCAL_PARAM_FAILURE, STR_LOCAL_SIG_FAILURE, STR_CACHE_SIG_FAILURE, STR_LSU_DEV_ID_ZERO, STR_NO_CACHE, STR_INVALID_PCB, STR_PCB_NO_LSU, STR_PCB_COUNT, STR_DIRTY_BLOCK_COUNT, STR_LSU_INVALID_DEV_ID, STR_LSU_INVALID_TYPE, STR_LSU_PARENT_DEV_ID, STR_LSU_CAPACITY, STR_LSU_MAGIC_NBR, STR_VOLTS_HIGH, STR_VOLT_RESTORED, STR_VOLTS_LOW, STR_TERM_POWER, STR_BAD_DATA_BLOCK, STR_BAD_PARITY_BLOCK, STR_BAD_DATA_LIST_FULL_BLOCK, STR_BAD_PARITY_LIST_FULL_BLOCK, STR_WRITE_BACK_FAIL_BLOCK, STR_FOR, STR_GLOBAL_CACHE_STATE_CHG, STR_CAUSE_OF_BUS_RESET, STR_HOST_CMD_BUS_RESET, STR_WATCHDOG_BUS_RESET, STR_BUS_RESET_ON_CHAN, STR_FIBRE_LOOP_CHAN_FROM, STR_DOWN_TO_UP, STR_UP_TO_DOWN, STR_ACCESS_FIBRE_FAILED_FILLIN, STR_UNKNOWN_FLAGS_FIBRE_LOOP, STR_BATTERY_CALIB_COUNT, STR_CHAN_FILLIN_WAS, STR_TAKEN_OFFLINE, STR_LEFT_OFFLINE, STR_ISP_PROC_DIAG_CHK_FAILED, STR_EXCESS_REINIT_ISP_SUB, STR_EXCESS_INBOUND_RESETS, STR_ISP_UNABLE_RESET_SFBUS, STR_ISP_RECV_UNRECOV_PCIBUS_FAULT, STR_ISP_FAILED_INIT, STR_UNKNOWN_REASON_CODE, STR_DOWN_SPEED_DOMAIN_VALID, STR_NOT_SCSI_DEV_DOMAIN_VALID, STR_ERR_IN_LOG_MSG, STR_UNKNOWN_EVENT, STR_SUCCESS, STR_REQ_ABORTED, STR_UNABLE_TO_ABORT, STR_COMPLETE_WITH_ERROR, STR_ADAPTER_BUSY, STR_REQUEST_INVALID, STR_PATH_INVALID, STR_UNABLE_TO_TERMINATE, STR_MR_MSG_RECVD, STR_PARITY_ERR_FAILURE, STR_AUTOSENSE_FAILED, STR_NO_ADAPTER, STR_DATA_OVERRUN, STR_SEQ_FAILURE, STR_REQ_LEN_ERROR, STR_PROVIDE_FAILURE, STR_BDR_MSG_SENT, STR_REQ_TERM, STR_IDE_MSG_SENT, STR_RESOURCE_UNAVAIL, STR_UNACKED_EVENT, STR_MSG_RECVD, STR_INVALID_CDB, STR_LUN_INVALID, STR_SCSI_TID_INVALID, STR_FUNC_UNAVAIL, STR_NO_NEXUS, STR_SCSI_IID_INVALID, STR_CDB_RECVD, STR_LUN_ALREADY_AVAIL, STR_UNKNOWN_ERR_CODE, STR_INVALID_HBA_TIME, STR_UNSPECIFIED, STR_ENCL_SERV_CTLR_ELEC, STR_SCC_CTLR_ELEC, STR_NONVOLATILE_CACHE, STR_UNINTERRUPTABLE, STR_DISPLAY, STR_KEY_PAD_ENTRY_DEV, STR_SCSI_PORT_XCEIVER, STR_LANGUAGE, STR_COMM_PORT, STR_SCSI_TGT_PORT, STR_SCSI_INIT_PORT, STR_SIMPLE_SUBENCL, STR_CRITICAL, STR_NONCRITICAL, STR_UNRECOVERABLE, STR_NOT_INSTALLED, STR_UNAVAILABLE, STR_MAIN, STR_SUB, STR_PARENT_ARRAY_BUILDING, STR_PARENT_BUILDING, STR_PARENT_EXPANDING, STR_NO_INFO_AVAIL, STR_MIRROR_MSG1, STR_MIRROR_MSG2, STR_MIRROR_MSG3, STR_MIRROR_MSG4, STR_MIRROR_MSG5, STR_CFG_FILE_LOADED, STR_CFG_FILE_SAVED, STR_ENG_CONN_FAILED, STR_COLON_OPEN, STR_COLON_COMPAT_NBR, STR_COLON_SCAN_FAILED, STR_HBA, STR_SCSI_DASD, STR_SCSI_SASD, STR_NO_ITEMS_FOUND, STR_NO_HOTSPARE_AVAIL, STR_RBLD_DRV_TOO_SMALL, STR_ATA33, STR_ATA45, STR_ATA66, STR_ATA100, STR_ATA133, STR_ATA, STR_SATA1500, STR_SATA3000, STR_SATA6000, STR_SATA, STR_REMMODEZERO, STR_RESCONFLICT, STR_CLSTR_FEAT_DISABLE, STR_ERR_TWO_TB_RAID, STR_ERR_INVALID_SEGMENT_OFFSET, STR_ERR_INVALID_SEGMENT_SIZE, STR_RAID_JBOD, STR_NO_SEGMENT_CONFIG, STR_LIST_DEV_CTLR_HEADER_NO_CACHE, STR_LIST_DEV_VERSION_HEADER_NO_CACHE, STR_ERR_NAME_TOO_LONG, STR_ERR_NO_ARRAY_NAME, STR_ERR_NAME_ALREADY_USED, STR_ARRAY_NAME_CHANGED, STR_LIST_ARRAYNAME_HEADER }; #endif // __RSCENUM_H raidutils-0.0.6.orig/raidutil/rscstrs.h0000664000175000000620000027406710044153335020047 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __RSCSTRS_H #define __RSCSTRS_H /****************************************** ** FILE: RSCENUM.H ** ** DATE: 6/23/1999 ******************************************/ /****************************************** ** STRINGS ** ******************************************/ char * EventStrings[] = { // "Distributed Processing Technology", // STR_DPT = 0, // "Copyright 1993-2000 All Rights Reserved",// STR_COPYRIGHT = 1, // "DPT Utility", // STR_PROG_TITLE = 2, // "Version " // STR_VERSION = 3, "dptutil", // STR_DPTUTIL "raidutil", // STR_RAIDUTIL "DPT Util", // STR_DPT_UTIL "Raid Util", // STR_RAID_UTIL "DPTUTIL ", // STR_DPTUTIL_ALL_CAPS "RAIDUTIL ", // STR_RAIDUTIL_ALL_CAPS "DPT ENGINE ", // STR_DPT_ENGINE "Adaptec ENGINE ", // STR_ADPT_ENGINE "Version: %d.%c%c Date: %d/%d/%d %s", // STR_VERSION_DATE "%2d/%02d/%04d", // STR_FILLIN_DATE "V%s%s%s", // STR_FILLIN_VERSION "The dptutil allows command-line access to administer the RAID configuration.", // STR_DPTUTIL_SHORT_DESCRIP "The raidutil allows command-line access to administer the RAID configuration.", // STR_RAIDUTIL_SHORT_DESCRIP "Program Description:", // STR_USAGE_PROGRAM_DESC_TITLE "Switch definitions: ~", // STR_USAGE_SW_TITLE "-g d,d[,d][+d,d][d]... @Create logical drive, where \"d\" is a device id. When creating RAID 10 or 50, separate parity groups with +", // STR_USAGE_SW_CREATE_LOGICAL "-g b [n] [d[,d,..]]@Create logical drive, where \"b\" is an hba or an hba\\bus; \"n\" is the number of drives in each array; \"d\" is a list of device ids to exclude from the array(s).", // STR_USAGE_SW_CREATE_LOGICAL2 "-i@Causes non-fatal errors to be ignored when creating logical drives", // STR_USAGE_SW_IGNORE_NONFATAL_ERRORS "-D [d|all]@Delete logical drive, where \"d\" is a device id or all", // STR_USAGE_SW_DELETE_LOGICAL "-h d@Create hot-spare, where \"d\" is a device id", // STR_USAGE_SW_CREATE_HOT_SPARE "-H d@Delete hot-spare, where \"d\" is a device id", // STR_USAGE_SW_DELETE_HOT_SPARE "-A [on|off|enable|disable|?|-?]@Alarm Status and Control", //STR_USAGE_SW_ALARM "-a [build|rebuild|verify|stop|list|?|-?] d[,d]@Task status and control", //STR_USAGE_SW_ACTION_TASK_CONTROL "-E d d[,d]...@Expand array d with drives d[,d]... Valid only under Windows NT and Windows 2000", //STR_USAGE_EXPAND_ARRAY "-C load|save filename@Load/Save Configuration from/to file", //STR_USAGE_LOAD_SAVE_CONFIGURATION "-w [on|off|?|-?] d,d[,d]@Write Caching control (on = Write-back, off = write-through)", //STR_USAGE_SW_WRITE_CACHING "-Z d[,d]... @Clear the RAID table information on selected components, where \"d\" is a device id", //STR_USAGE_SW_RESET_CLEAR_RAID_STORE "-X @Reset the firmware's configuration in NVRAM to defaults", //STR_USAGE_SW_RESET_NVRAM_CONFIG "-L physical@List physical devices", //STR_USAGE_SW_LIST_DEVICES_PHYSICAL "-L logical@List logical devices", //STR_USAGE_SW_LIST_DEVICES_LOGICAL "-L controller@List controllers", //STR_USAGE_SW_LIST_DEVICES_CONTROLLER "-L spare@List hot spare devices", //STR_USAGE_SW_LIST_DEVICES_SPARE "-L raid|array@List array organization", //STR_USAGE_SW_LIST_DEVICES_RAID "-L speed@List speed of devices", //STR_USAGE_SW_LIST_DEVICES_SPEED "-L cache@List write cache mode of LSUs", //STR_USAGE_SW_LIST_DEVICES_CACHE "-L version@List controller FW/NVRAM/BIOS/SMOR versions", //STR_USAGE_SW_LIST_DEVICES_VERSION "-L redirect@List redirected devices", //STR_USAGE_SW_LIST_DEVICES_REDIRECT "-L battery@List battery information", //STR_USAGE_SW_LIST_BATTERY "-L all@List all types", //STR_USAGE_SW_LIST_DEVICES_ALL "-I [d]@Display inquiry info on the controller specified. If \"d\" is specified, it is the device id of the device whose inquiry info is to be displayed", //STR_USAGE_SW_DISPLAY_INQ_INFO "-q@Inhibits output (must precede output-generating command)", //STR_USAGE_SW_QUIET_MODE "-P@Forces display to pagenate output (must precede output-generating command)", //STR_USAGE_SW_PAGENATION "-?@displays this screen", //STR_USAGE_SW_SHOW_UTIL_USAGE "-d n@The utility-relative controller number on which the following commands apply", //STR_USAGE_SW_SPECIFY_DPT "-c n@The solaris controller number on which the following commands apply", //STR_USAGE_SW_SPECIFY_CTLR "-l [0|1|5|10|50]@The logical to create is of this raid level", //STR_USAGE_SW_RAID_LEVEL "-s n@Specify the capacity in megabytes of the generated array", //STR_USAGE_SW_LOGICAL_DRIVE_CAPACITY "-z n@The stripe size to use in the creation of the next logical drive", //STR_USAGE_SW_LOGICAL_DRIVE_STRIPE_SIZE "-r [slow|medslow|med|medfast|fast|?|-?] d[,d...]@Set the rebuild rate", //STR_USAGE_SW_TASK_RATE "-e [soft|recov|nonrecov|status|delete|board|?|-?] d@View the controller's event log", //STR_USAGE_VIEW_LOG "-f [optimal|fail|?|-?] d@Force an array member drive to Failed state, or force an array to Optimal state", //STR_USAGE_FORCE_STATE "-K@Report on cluster support enabled/disabled", //STR_USAGE_CLUSTER_SUPPORT "Commmand Usage Examples: ~", //STR_USAGE_SAMPLE_TITLE "-q@Quiet mode", //STR_USAGE_SAMPLE_QUIET_MODE "-?@Display usage screen", //STR_USAGE_SAMPLE_SHOW_USAGE #if !defined _DPT_SOLARIS "-d n [-s n][-z n][-l n]-g d[,d[,d...]]@Create logical", //STR_USAGE_SAMPLE_CREATE_LOGICAL "-d n -D d@Delete logical", //STR_USAGE_SAMPLE_DELETE_LOGICAL "-d n [-r n] -h d@Create hot spare", //STR_USAGE_SAMPLE_CREATE_HOT_SPARE "-d n -H d@Delete hot spare", //STR_USAGE_SAMPLE_DELETE_HOT_SPARE "-d n -L physical@List all physical devices", //STR_USAGE_SAMPLE_LIST_DEVICES "-d n -I [d]@Display inquiry information", //STR_USAGE_SAMPLE_DISPLAY_INQUIRY_INFO "-d n -X@Reset NVRAM to firmware defaults on the selected HBA", //STR_USAGE_SAMPLE_RESET_NVRAM "\td#b#t#d#, which corresponds to controller, bus, target id and lun respectively. Note: The target id may also be specified as digits (d#b#t##d#).", //STR_USAGE_LEGEND_2 "\nOperation successful, a reboot is required before the actions will take affect.\n", // STR_REBOOT "-F filename@Flash the referenced controller's firmware, fcode, bios, smor or nvram flash regions with the supplied image - for a path use / instead of \\", //STR_USAGE_SW_FLASH #else "-c n [-s n][-z n][-l n]-g d[,d[,d...]]@Create logical", //STR_USAGE_SAMPLE_CREATE_LOGICAL "-c n -D n@Delete logical", //STR_USAGE_SAMPLE_DELETE_LOGICAL "-c n [-r n] -h n@Create hot spare", //STR_USAGE_SAMPLE_CREATE_HOT_SPARE "-c n -H n@Delete hot spare", //STR_USAGE_SAMPLE_DELETE_HOT_SPARE "-c n -L physical@List all physical devices", //STR_USAGE_SAMPLE_LIST_DEVICES "-c n -I [d]@Display inquiry information", //STR_USAGE_SAMPLE_DISPLAY_INQUIRY_INFO "-c n -X@Reset NVRAM to firmware defaults on the selected HBA", //STR_USAGE_SAMPLE_RESET_NVRAM "\tc#t#d#, which corresponds to controller, target id and lun respectively", //STR_USAGE_LEGEND_2 "\nOperation successful, a reboot is required before the actions will take affect.\nPlease use `boot -r' at Ok boot prompt.\n", // STR_REBOOT "-F image@Flash the referenced controller's firmware, fcode, bios, smor or nvram flash regions with the supplied image", // STR_USAGE_SW_FLASH #endif "Notes:", //STR_USAGE_SYNTAX "Device id is of the form:", //STR_USAGE_LEGEND_1 "~# ~b0 ~b1 ~b2 ~Controller ~Alarm Status ~Alarm Enable\n", // STR_ALARM_STATUS_HEADER "~Address ~Type ~Manufactu~rer/Model ~Capacity ~Status\n", // STR_LIST_DEV_PHYS_HEADER "~Address ~Type ~Manufactu~rer/Model ~Capacity ~Status\n", // STR_LIST_DEV_ARRAY_HEADER "~Address ~Type ~Status\n", // STR_LIST_DEV_STATUS_HEADER "~Address ~Capacity ~\n", // STR_LIST_DEV_HOT_SPARE_HEADER // "~# ~Logical Drive Name ~Address ~Capacity ~Status ~Type\n", // STR_LIST_DEV_LOG_HEADER "~# ~b0 ~b1 ~b2 ~Cont~roller ~Cache ~FW ~NVRAM ~Serial ~Status\n", // STR_LIST_DEV_CTLR_HEADER "~# ~Cont~roller ~Status ~Voltage ~Current ~Full Cap ~Rem Cap R~em Time\n", // STR_LIST_BATTERY_HEADER "~# ~Cont~roller ~Cache ~FW ~NVRAM ~BIOS ~SMOR ~Serial\n", // STR_LIST_DEV_VERSION_HEADER "~Address ~Type ~Rate\n", // STR_LIST_DEV_SET_RATE_HEADER "~Tag ~Address ~Type\n", // STR_LIST_TAGS_HEADER "~# ~Channel ~Cont~roller ~Speed\n", // STR_BUS_SPEED_HEADER "~Address ~Max Speed ~Actual Rate / ~Width\n", // STR_LIST_DEV_SPEED_HEADER "~Address ~Task Type / Status\n", // STR_LIST_TASKS "~# ~Cont~roller ~FW ~Cache Stale Period (secs)\n", // STR_LIST_CACHE_STALE_HEADER "~Address ~Manufactu~rer/Model ~Write Cache Mode\n", // STR_LIST_CACHE_HEADER "~Address ~Manufactu~rer/Model ~FW ~Cluster Support\n", // STR_LIST_CLUSTER_HEADER "~Address ~Manufactu~rer/Model ~FW ~Cluster Support ~FUA\n", // STR_LIST_CLUSTER_FUA_HEADER "~Address ~Manufactu~rer/Model ~FW ~Hot Spare Same Channel\n", // STR_LIST_HS_SAME_CHANNEL_HEADER "~Address ~Manufactu~rer/Model ~FW ~ Serial ~123456789012\n", // STR_LIST_INQUIRY_HEADER "~LUN Address ~SIZE(MB) ~AVAILABLE (MB) ~Start Block ~End Block\n", // STR_LIST_SEGMENT_HEADER "Capabilities Map: Column 1 = Soft Reset\n", // STR_LIST_INQUIRY_HEADER_MAP1 " Column 2 = Cmd Queuing\n", // STR_LIST_INQUIRY_HEADER_MAP2 " Column 3 = Linked Cmds\n", // STR_LIST_INQUIRY_HEADER_MAP3 " Column 4 = Synchronous\n", // STR_LIST_INQUIRY_HEADER_MAP4 " Column 5 = Wide 16\n", // STR_LIST_INQUIRY_HEADER_MAP5 " Column 6 = Wide 32\n", // STR_LIST_INQUIRY_HEADER_MAP6 " Column 7 = Relative Addr\n", // STR_LIST_INQUIRY_HEADER_MAP7 " Column 8 = SCSI II\n", // STR_LIST_INQUIRY_HEADER_MAP8 " Column 9 = S.M.A.R.T.\n", // STR_LIST_INQUIRY_HEADER_MAP9 " Column 0 = SCAM\n", // STR_LIST_INQUIRY_HEADER_MAP10 " Column 1 = SCSI-3\n", // STR_LIST_INQUIRY_HEADER_MAP11 " Column 2 = SAF-TE\n", // STR_LIST_INQUIRY_HEADER_MAP12 " X = Capability Exists, - = Capability does not exist, O = Not Supported\n", // STR_LIST_INQUIRY_HEADER_KEY "~Inquiry Data ~", // STR_INQ_TITLE "NVRAM Reset", // STR_NVRAM_RESET "OK", // STR_OK "Yes", // STR_YES "No", // STR_NO "abort", // STR_ABORT // STR_RETRY = 8, // STR_CONTINUE = 9, // STR_CANCEL = 10, // STR_ACCEPT = 11, // STR_RESET = 12, // STR_SKIP = 13, // STRT_PREVIOUS = 14, // STRT_FILE = 15, // STRT_OPTIONS = 16, // STRT_INSTALLATION = 17, // STRT_COMMUNICATIONS = 18, // STRT_HELP = 19, // STRT_READ_SYS_CONFIG = 20, // STRT_SET_SYS_CONFIG = 21, // STRT_LOAD_CONFIG = 22, // STRT_SAVE_CONFIG = 23, // STRT_EXIT = 24, // STRT_SET_HBA_THROTTLE = 25, // STRT_DISABLE_ALARM = 26, // STRT_QUIET_BUS = 27, // STRT_INITIAL_SETUP = 28, // STRT_DOS_SETUP = 29, // STRT_MAKE_CONNECTION = 30, // STRT_LEGEND_ICONS = 31, // STRT_INDEX = 32, // STRT_CONTACT = 33, // STRT_SYS_INFO = 34, // STRT_ABOUT = 35, // STRT_CREATE_RAID = 36, // STRT_MODIFY_RAID = 37, // STRT_SWITCH_VIEW = 38, // STRT_INCLUDE_DRIVE = 39, // STRT_DONE = 40, // STRT_REMOVE_DRIVE = 41, // STRT_EXIT_INSTALL = 42, // STR_DECIMAL = 43, // STR_PROG_EXIT = 44, "Failed", // STR_FAILED = 45, // STR_RAID_5_GROUP = 46, "Warning", // STR_WARNING = 47, // STR_RAID_0_GROUP = 48, // STR_RAID_1_GROUP = 49, "Missing", // STR_MISSING "Removed", // STR_REMOVED "Added", // STR_ADDED // STR_LOG_SU = 51, // STR_HOTSPARE = 52, // STR_LSU = 53, // STR_TAPE = 54, "Printer", // STR_SCSI_PRINTER "Processor", // STR_SCSI_PROCESSOR "WORM", // STR_SCSI_WORM "CD-ROM", // STR_SCSI_CD_ROM "Scanner", // STR_SCSI_SCANNER "Optical", // STR_SCSI_OPTICAL "Jukebox", // STR_SCSI_JUKEBOX "Pro Root", // STR_SCSI_PRO_ROOT "Pro Connection", // STR_SCSI_PRO_CONNECTION // STR_COMMUN = 62, "Unknown", // STR_UNKNOWN "Unchanged", // STR_UNCHANGED "Unsupported", // STR_UNSUPPORTED // STR_DISK = 64, // STR_FLOPTICAL = 65, // STR_KB = 66, "MB", // STR_MB // STR_DESCRIPTION = 68, // STR_LEGEND_ICONS = 69, // STR_LEGEND_FLAGS = 70, // STR_HOST_ADAPTER = 71, // STR_CHIPSET = 72, // STR_RAID_MOD = 73, // STR_CACHE_MOD = 74, // STR_MEMORY_MOD = 75, // STR_CACHE_MEM_MOD = 76, // STR_HARD_DRIVE = 77, // STR_SETUP_FOR = 78, // STR_RAID_GROUP = 79, // STR_FAULT_TOL = 80, // STR_DRIVE_FT = 81, // STR_NO_FT = 82, // STR_OPTIMIZATION = 83, // STR_OPT_CAPACITY = 84, // STR_OPT_PERFORM = 85, // STR_CHOSEN_RAID = 86, "Stripe Size", // STR_STRIPE_SIZE, // STR_OVERRIDE = 88, // STR_OVERRIDE_RAID = 89, // STR_RAID_LEVEL = 90, // STR_NONE = 91, // STR_8_KB = 92, // STR_16_KB = 93, // STR_32_KB = 94, // STR_64_KB = 95, // STR_128_KB = 96, // STR_256_KB = 97, // STR_512_KB = 98, // STR_1_MB = 99, // STR_RAID_DASH = 100, "Hot Spare", // STR_RAID_HOT_SPARE "RAID", // STR_RAID "RAID 0 (Striped)", // STR_RAID_0 "RAID 1 (Mirrored)", // STR_RAID_1 "RAID 5 (Redundant Parity)", // STR_RAID_5 "RAID 10 (Mirrored&Striped)", // STR_RAID_10 "RAID 50 (Parity&Striped)", // STR_RAID_50 // STR_8_KB_RA = 104, // STR_16_KB_RA = 105, // STR_32_KB_RA = 106, // STR_64_KB_RA = 107, // STR_128_KB_RA = 108, // STR_256_KB_RA = 109, // STR_512_KB_RA = 110, // STR_1_MB_RA = 111, // STR_NOT_INSTALLED = 112, // STR_SYSTEM_INFO = 113, // STR_CMOS_SETTINGS = 114, // STR_LOGICAL_PARMS = 115, // STR_DRIVE = 116, // STR_DRIVE_0 = 117, // STR_DRIVE_1 = 118, // STR_SROM_VERSION = 119, // STR_ENGINE_VERSION = 120, // STR_DRIVER_NAME = 121, // STR_DRIVER_VERSION = 122, // STR_ADDRESS = 123, "Device", // STR_DEVICE "Not Present", // STR_NOT_PRESENT // STR_BASE_MEMORY = 125, // STR_EXTEND_MEMORY = 126, // STR_HELP = 127, // STR_SCANNING_1 = 128, // STR_SCANNING_2 = 129, // STR_DOS_SETUP = 130, // STR_NO_DOS = 131, // STR_NO_CDROM_DRIVERS = 132, // STR_CHG_CONFIG = 133, // STR_TOO_MANY = 134, // STR_CHG_AUTOEXEC = 135, // STR_NO_CAPACITY = 136, "Manufacturer", // STR_MANUFACTURER "Model", // STR_MODEL // STR_CACHE = 138, // STR_FIRMWARE_COLON = 139, // STR_IRQ = 140, // STR_HEX = 141, // STR_HBA_INFO = 142, // STR_DMA = 143, // STR_PRIMARY = 144, // STR_SECONDARY = 145, // STR_EDGE = 146, // STR_LEVEL = 147, // STR_BUS_MASTER = 148, // STR_8_BIT = 149, // STR_16_BIT = 150, // STR_SINGLE_END = 151, // STR_DIFFERENTIAL = 152, // STR_LVD_SINGLE = 153, "fibre", // STR_FIBRE // STR_ADDR_HBA = 155, "BUS ", // STR_BUS "ID", // STR_ID // STR_LUN = 158, // STR_CAPACITY = 159, // STR_STATUS = 160, // STR_RAID_INFO = 161, // STR_SCSI_INFO = 162, "Removeable", // STR_REMOVABLE // STR_CAPABILITIES = 164, // STR_REL_ADDR = 165, "wide", // STR_WIDE "narrow", // STR_NARROW // STR_WIDE_16 = 166, // STR_WIDE_32 = 167, // STR_SYNC = 168, // STR_LINKED = 169, // STR_CMD_Q = 170, // STR_SOFT_RESET = 171, // STR_ESTIMATED = 172, // STR_RAID_LEVEL_COLON = 173, // STR_TRANSFER = 174, // STR_MB_SECOND = 175, "Format", // STR_FORMAT // STRT_MAKE_HOTSPARE = 177, // STRT_PRINT = 178, // STRT_DIAGS = 179, // STRT_VIEW_LOG = 180, // STRT_REPORTS = 181, // STRT_STATISTICS = 182, // STRT_MOD_CONFIG = 183, // STRT_MOD_AUTOEXEC = 184, // STRT_CREATE_BAT = 185, // STR_INCOMPLETE = 186, "Incomplete entry\n\n", // STR_INCOMPLETE_ENTRY // STR_NONE_CHOSEN = 187, // STR_SCSI_BUS = 188, // STR_BRIDGE = 189, // STR_REREAD = 190, // STR_COPY_FILES = 191, // STR_PHYSICAL = 192, "Blocks", // STR_BLOCKS // STR_SIZE = 194, // STR_BYTES = 195, // STR_NA = 196, "Rev", // STR_REV // STR_MEMBER_OF = 198, // STR_CONTROLLER = 199, // STR_HOST_BUS = 200, "Type", // STR_TYPE // STR_MB_SEC_MAX = 202, // STR_WIDTH = 203, // STR_SCSI_ID = 204, // STR_FIBRE_ID = 205, // STR_ATTACHED_MOD = 206, // STR_PHYSICAL_CONFIG = 207, // STR_LOGICAL_CONFIG = 208, // STR_CREATING_ARRAY = 209, "Array Modify ", // STR_ARRAY_MODIFY "Raid Type: ", // STR_RAID_TYPE // STR_SELECT_ARRAY_TYPE = 211, // STR_SCSI_DIAGS = 212, // STR_TEST_DURATION = 213, // STR_ITERATIONS = 214, // STR_CONTINUOUS = 215, // STR_TESTS_PERFORMED = 216, // STR_DEVICE_BUFFER = 217, // STR_MEDIA_READ = 218, // STR_MEDIA_RW = 219, // STR_TARGET_SECTORS = 220, // STR_ALL_SECTORS = 221, // STR_RANDOM_SECTORS = 222, // STR_STOP_ON_ERROR = 223, // STR_PASS = 224, // STR_ERRORS = 225, // STR_TOTAL_TIME = 226, // STRT_RUN_TEST = 227, // STRT_STOP_TEST = 228, // STR_DIAGPCT = 229, // STR_1KB_STAT = 230, // STR_2KB_STAT = 231, // STR_4KB_STAT = 232, // STR_8KB_STAT = 233, // STR_16KB_STAT = 234, // STR_32KB_STAT = 235, // STR_64KB_STAT = 236, // STR_128KB_STAT = 237, // STR_256KB_STAT = 238, // STR_512KB_STAT = 239, // STR_1MB_STAT = 240, // STR_TOTAL_STAT = 241, // STR_FORMAT_WARN = 242, // STR_FORMAT_OPTIONS = 243, // STR_CREATE_DISK = 244, // STR_FORMAT_DISKETTE = 245, // STR_PROTECTED_RAID0 = 246, // STR_PROTECTED_RAID1 = 247, // STR_PROTECTED_RAID5 = 248, // STRT_HOTSPARES = 249, // STRT_REMOVE_HOTSPARE = 250, // STR_CURRENT_MEDIA = 251, // STR_NO_MEDIA = 252, // STR_NOW_QUIET = 253, // STR_EVENT_LOGS = 254, // STRT_EVENT_LOG = 255, // STR_NAME_COLON = 256, // STR_NAME = 257, // STRT_BUILD = 258, // STR_NAME_ARRAY = 259, // STR_CHOOSE_NAME = 260, // STR_NAME_USED = 261, // STR_DPT_INSTALL = 262, // STR_INSTALL_6 = 263, // STR_INSTALL_11 = 264, // STR_SCSI_BUSES = 265, // STR_NO_CMOS_FLOPPY = 266, // STR_NO_DRIVERS = 267, // STR_CHOOSE_TARGET = 268, // STR_INSERT_BLANK = 269, // STR_FORMAT_FAILURE = 270, // STR_WRITING = 271, // STR_HDW_ERROR_DESC = 272, // STR_HDW_ERROR = 273, // STR_SET_CONFIG_WARN = 274, // STR_NO_OS2_DOS_BOX = 275, // STR_REQ_SMARTROM = 276, // STR_OFFER_REBOOT = 277, // STR_WHICH_VERSION = 278, // STR_SELECT_OS = 279, // STR_CHOOSE_OS_FAMILY = 280, // STR_AVAIL_CONN = 281, // STR_UNSAVED = 282, // STR_INTERNAL_ERROR = 283, // STR_IE_CONTACT = 284, // STR_SEARCH_ENGINES = 285, // STR_NUM_STRIPES = 286, // STR_COMPONENTS = 287, // STRT_VERIFY_ARRAY = 288, // STR_DESTINATION = 289, // STR_LPT1 = 290, // STR_LPT2 = 291, // STR_PRINT_SETTINGS = 292, // STR_FILE_COLON = 293, // STR_APPEND_FILE = 294, // STRP_DEVICE_TYPE = 295, // STR_PRINTER_NOT_READY = 296, // STR_HLP_MISSING = 297, // STR_NO_SPECIFIC_HELP = 298, // STRT_CONTINUE_C = 299, // STR_NO_RAID_CAP = 300, // STR_LOAD_CLASS_DRV = 301, // STR_CHOOSE_DONE = 302, "Invalid stripe size: ", // STR_PARSE_ERR_INVALID_STRIPE_SIZE "Invalid task rate: ", // STR_PARSE_ERR_INVALID_TASK_RATE "Invalid SCSI MHz rate: ", // STR_PARSE_ERR_INVALID_SPEED "A switch was specified that is not supported: ", // STR_PARSE_ERR_UNDEFINED_SWITCH "Logical drive's capacity must be an integer value: ", // STR_PARSE_ERR_DRIVE_CAPACITY_MUST_BE_INTEGER "HBA designation incorrect: ", // STR_PARSE_ERR_CTLR_DESGINATIONS_NOT_SUPPORTED "Switch specified multiple times in same command: ", // STR_PARSE_ERR_SWITCH_MULTIPLY_DEFINED "Arguments must be integer value: ", // STR_PARSE_ERR_MUST_BE_INTEGER_VALUE "Unrecognized device type to list: ", // STR_PARSE_ERR_NOT_A_VALID_LIST_TYPE "Must specify HBA for this command: ", // STR_PARSE_ERR_MUST_SPECIFY_HBA "Must specify an address for this command: ", // STR_PARSE_ERR_MUST_SPECIFY_ADDRESS "Must specify a list of logicals or \"all\":", // STR_PARSE_ERR_MUST_SPECIFY_ALL_OR_LIST "This command is unimplemented: ", // STR_PARSE_ERR_UNIMPLEMENTED_COMMAND "This is an invalid command or option to a command: ", // STR_PARSE_ERR_INVALID_CMD_OR_OPTION_TO_CMD "Must specify an image file", // STR_PARSE_ERR_MUST_SUPPLY_IMAGE "Must specify a file name", // STR_PARSE_ERR_MUST_SUPPLY_FILE_NAME "Must specify a replacment string", // STR_PARSE_ERR_MUST_SUPPLY_ASCII_DATA "Replacement string too long", // STR_PARSE_ERR_ASCII_DATA_TOO_LONG "Parser error", // STR_CMD_PARSER_ERROR "Invalid list type", // STR_CMD_ERR_INVALID_LIST_TYPE "Can't find component by address", // STR_CMD_ERR_CANT_FIND_COMPONENT "Can't find HBA index", // STR_CMD_ERR_CANT_FIND_HBA_INDEX "Can't find HBA index (in NVRAM)", // STR_CMD_ERR_CANT_FIND_HBA_INDEX_NVRAM "Component is currently busy", // STR_CMD_ERR_COMPONENT_BUSY "Invalid flash image", // STR_CMD_ERR_INVALID_FLASH_IMAGE "Value out of range", // STR_ERR_VALUE_OUT_OF_RANGE "Invalid file", // STR_ERR_INVALID_FILE "Invalid raid type for this command", // STR_ERR_INVALID_RAID_TYPE "Controller does not have enough memory available", // STR_ERR_NOT_ENOUGH_MEMORY "Invalid command on RAID", // STR_CMD_ERR_CMD_NOT_POSS_ON_RAID "Invalid command on HBA", // STR_CMD_ERR_CMD_NOT_POSS_ON_HBA "Invalid command on this device", // STR_CMD_ERR_CMD_NOT_POSS_ON_THIS_DEVICE "Possible buffer corruption", // STR_ERR_POSS_BUFFER_CORRUPTION "Message: rtn completed", // STR_MSG_RTN_COMPLETED "Message: rtn started", // STR_MSG_RTN_STARTED "Message: rtn failed", // STR_MSG_RTN_FAILED "Message: rtn data overflow", // STR_MSG_RTN_DATA_OVERFLOW "Message: rtn data underflow", // STR_MSG_RTN_DATA_UNDERFLOW "Message: rtn ignored", // STR_MSG_RTN_IGNORED "Message: rtn disconnect", // STR_MSG_RTN_DISCONNECT "Error: conn list alloc", // STR_ERR_CONN_LIST_ALLOC "Error: semaphore alloc", // STR_ERR_SEMAPHORE_ALLOC "Error: osd open engine", // STR_ERR_OSD_OPEN_ENGINE "Error: invalid io method", // STR_ERR_INVALID_IO_METHOD "Error: no smartrom", // STR_ERR_NO_SMARTROM "Error: engine init", // STR_ERR_ENGINE_INIT "Error: invalid conn tag", // STR_ERR_INVALID_CONN_TAG "Error: semaphore timeout", // STR_ERR_SEMAPHORE_TIMEOUT "Error: null io buffer", // STR_ERR_NULL_IO_BUFFER "Error: invalid tgt tag", // STR_ERR_INVALID_TGT_TAG "Error: destroy semaphore", // STR_ERR_DESTROY_SEMAPHORE "Error: mem alloc", // STR_ERR_MEM_ALLOC "Error: invalid dev addr", // STR_ERR_INVALID_DEV_ADDR "Error: duplicate name", // STR_ERR_DUPLICATE_NAME "Error: get ccb", // STR_ERR_GET_CCB "Error: no raid devices", // STR_ERR_NO_RAID_DEVICES "Error: reserve blk sig", // STR_ERR_RESERVE_BLK_SIG "Error: format blk size", // STR_ERR_FORMAT_BLK_SIZE "Error: raid refnum", // STR_ERR_RAID_REFNUM "Error: RAID component duplicate", // STR_ERR_RAID_COMP_DUPLICATE "Error: RAID component restrict", // STR_ERR_RAID_COMP_RESTRICT "Error: RAID component used", // STR_ERR_RAID_COMP_USED "Error: RAID component ghost", // STR_ERR_RAID_COMP_GHOST "Error: RAID component failed", // STR_ERR_RAID_COMP_FAILED "Error: raid too few", // STR_ERR_RAID_TOO_FEW "Error: raid too many", // STR_ERR_RAID_TOO_MANY "Error: raid even", // STR_ERR_RAID_EVEN "Error: raid odd", // STR_ERR_RAID_ODD "Error: raid power 2 plus", // STR_ERR_RAID_POWER_2_PLUS "Error: raid chan count", // STR_ERR_RAID_CHAN_COUNT "Error: raid min stripe", // STR_ERR_RAID_MIN_STRIPE "Error: raid max stripe", // STR_ERR_RAID_MAX_STRIPE "Error: raid zero stripes", // STR_ERR_RAID_ZERO_STRIPES "Error: raid too large", // STR_ERR_RAID_TOO_LARGE "Error: raid start chan", // STR_ERR_RAID_START_CHAN "Error: raid seq chan", // STR_ERR_RAID_SEQ_CHAN "Error: raid diff stripes", // STR_ERR_RAID_DIFF_STRIPES "Error: raid diff num str", // STR_ERR_RAID_DIFF_NUM_STR "Error: raid over stripe", // STR_ERR_RAID_OVER_STRIPE "Error: RAID component remove", // STR_ERR_RAID_COMP_REMOVE "Error: RAID component emulated", // STR_ERR_RAID_COMP_EMULATED "Error: RAID component devtype", // STR_ERR_RAID_COMP_DEVTYPE "Error: RAID component non 512", // STR_ERR_RAID_COMP_NON_512 "Error: raid diff blocks", // STR_ERR_RAID_DIFF_BLOCKS "Error: raid diff capacity", // STR_ERR_RAID_DIFF_CAPACITY "Error: raid diff vendor", // STR_ERR_RAID_DIFF_VENDOR "Error: raid diff product", // STR_ERR_RAID_DIFF_PRODUCT "Error: raid diff revision", // STR_ERR_RAID_DIFF_REVISION "Error: raid not supported", // STR_ERR_RAID_NOT_SUPPORTED "Error: raid invalid hba", // STR_ERR_RAID_INVALID_HBA "Error: raid table required", // STR_ERR_RAID_TABLE_REQUIRED "Error: RAID component tag", // STR_ERR_RAID_COMP_TAG "Error: raid max arrays", // STR_ERR_RAID_MAX_ARRAYS "Error: RAID component size", // STR_ERR_RAID_COMP_SIZE "Error: raid fw level", // STR_ERR_RAID_FW_LEVEL "Error: invalid hba addr", // STR_ERR_INVALID_HBA_ADDR "Error: isa addr only", // STR_ERR_ISA_ADDR_ONLY "Error: primary hba exists", // STR_ERR_PRIMARY_HBA_EXISTS "Error: no more slots", // STR_ERR_NO_MORE_SLOTS "Error: dup isa addr", // STR_ERR_DUP_ISA_ADDR "Error: dup eisa slot", // STR_ERR_DUP_EISA_SLOT "Error: primary isa addr", // STR_ERR_PRIMARY_ISA_ADDR "Error: secondary isa addr", // STR_ERR_SECONDARY_ISA_ADDR "Error: abs no more ids", // STR_ERR_ABS_NO_MORE_IDS "Error: abs non zero lun", // STR_ERR_ABS_NON_ZERO_LUN "Error: abs addr limits", // STR_ERR_ABS_ADDR_LIMITS "Error: abs addr occupied", // STR_ERR_ABS_ADDR_OCCUPIED "Error: abs no more luns", //STR_ERR_ABS_NO_MORE_LUNS "Error: new artificial", //STR_ERR_NEW_ARTIFICIAL "Error: io not supported", //STR_ERR_IO_NOT_SUPPORTED "Error: rw exceeds capacity", //STR_ERR_RW_EXCEEDS_CAPACITY "Error: data in out", //STR_ERR_DATA_IN_OUT "Error: scsi cmd failed", //STR_ERR_SCSI_CMD_FAILED "Error: artificial io", //STR_ERR_ARTIFICIAL_IO "Error: scsi io", //STR_ERR_SCSI_IO "Error: blink led io", //STR_ERR_BLINK_LED_IO "Error: osd mem alloc", //STR_ERR_OSD_MEM_ALLOC "Error: formatting", //STR_ERR_FORMATTING "Error: hba busy", //STR_ERR_HBA_BUSY "Error: hba initializing",//STR_ERR_HBA_INITIALIZING "Error: del old raid", //STR_ERR_DEL_OLD_RAID "Error: enable new raid", //STR_ERR_ENABLE_NEW_RAID "Error: update os config", //STR_ERR_UPDATE_OS_CONFIG "Error: scsi addr bounds", //STR_ERR_SCSI_ADDR_BOUNDS "Error: scsi addr conflict",//STR_ERR_SCSI_ADDR_CONFLICT "Error: cannot delete", //STR_ERR_CANNOT_DELETE "Error: fwd no space", //STR_ERR_FWD_NO_SPACE "Error: fwd not reserved", //STR_ERR_FWD_NOT_RESERVED "Error: fwd not initialized",//STR_ERR_FWD_NOT_INITIALIZED "Error: fwd blk mismatch", //STR_ERR_FWD_BLK_MISMATCH "Error: fwd blk overflow", //STR_ERR_FWD_BLK_OVERFLOW "Error: rsv removeable", //STR_ERR_RSV_REMOVEABLE "Error: rsv not dasd", //STR_ERR_RSV_NOT_DASD "Error: rsv non zero", //STR_ERR_RSV_NON_ZERO "Error: rsv hba unable",//STR_ERR_RSV_HBA_UNABLE "Error: rsv other", //STR_ERR_RSV_OTHER "Error: scan physicals",//STR_ERR_SCAN_PHYSICALS "Error: init physicals", // STR_ERR_INIT_PHYSICALS "Error: scan logicals", // STR_ERR_SCAN_LOGICALS "Error: init logicals", // STR_ERR_INIT_LOGICALS "Error: comm xmit buffer", // STR_ERR_COMM_XMIT_BUFFER "Error: comm rcve buffer", // STR_ERR_COMM_RCVE_BUFFER "Error: comm disconnected", //STR_ERR_COMM_DISCONNECTED "Error: comm data overflow",//STR_ERR_COMM_DATA_OVERFLOW "Error: c t open", //STR_ERRC_T_OPEN "Error: c t bind", //STR_ERRC_T_BIND "Error: c t alloc", //STR_ERRC_T_ALLOC "Error: c t connect", //STR_ERRC_T_CONNECT "Error: c t listen", //STR_ERRC_T_LISTEN "Error: c t accept", //STR_ERRC_T_ACCEPT "Error: c comm nw init",//STR_ERRC_COMM_NW_INIT "Error: c comm ws init",//STR_ERRC_COMM_WS_INIT "Error: c semaphore timeout",//STR_ERRC_SEMAPHORE_TIMEOUT "Error: c connection tag", //STR_ERRC_CONNECTION_TAG "Error: c not null termed", //STR_ERRC_NOT_NULL_TERMED "Error: c mem alloc", //STR_ERRC_MEM_ALLOC "Error: c null io buffer", //STR_ERRC_NULL_IO_BUFFER "Error: c invalid password",//STR_ERRC_INVALID_PASSWORD "Error: c not logged in", //STR_ERRC_NOT_LOGGED_IN "Error: c engine load", //STR_ERRC_ENGINE_LOAD "Error: c not supported", //STR_ERRC_NOT_SUPPORTED "Error: c icrs active", //STR_ERRC_ICRS_ACTIVE "Error: c icrs inactive", //STR_ERRC_ICRS_INACTIVE "Error: c icrs req posted", //STR_ERRC_ICRS_REQ_POSTED "Error: c icrs thread start", //STR_ERRC_ICRS_THREAD_START "Error: c icrs start request",//STR_ERRC_ICRS_START_REQUEST "Error: c icrs init", //STR_ERRC_ICRS_INIT "Error: c accepting icr", //STR_ERRC_ACCEPTING_ICR "Error: c tx Message: sync", //STR_ERRC_TX_MSG_SYNC "Error: c rx Message: ack", //STR_ERRC_RX_MSG_ACK "Error: c rx Message: header",//STR_ERRC_RX_MSG_HEADER "Error: c tx Message: header",//STR_ERRC_TX_MSG_HEADER "Error: c tx to eng data", //STR_ERRC_TX_TO_ENG_DATA "Error: c rx to eng data", //STR_ERRC_RX_TO_ENG_DATA "Error: c rx status header",//STR_ERRC_RX_STATUS_HEADER "Error: c tx status header",//STR_ERRC_TX_STATUS_HEADER "Error: c rx from eng data",//STR_ERRC_RX_FROM_ENG_DATA "Error: c tx from eng data",//STR_ERRC_TX_FROM_ENG_DATA "Error: c from eng size", //STR_ERRC_FROM_ENG_SIZE "Error: c to eng size", //STR_ERRC_TO_ENG_SIZE "Error: c serial init", //STR_ERRC_SERIAL_INIT "Error: c baud rate", //STR_ERRC_BAUD_RATE "Error: c comm busy", //STR_ERRC_COMM_BUSY "Error: c invalid protocol",//STR_ERRC_INVALID_PROTOCOL "Error: c port conflict", //STR_ERRC_PORT_CONFLICT "Error: c modem init", //STR_ERRC_MODEM_INIT "Error: c dial abort", //STR_ERRC_DIAL_ABORT "Error: c dial timeout", //STR_ERRC_DIAL_TIMEOUT "Error: c dial busy", //STR_ERRC_DIAL_BUSY "Error: c dial beeper ok", //STR_ERRC_DIAL_BEEPER_OK "Error: c dial unexpected cd",//STR_ERRC_DIAL_UNEXPECTED_CD "Error: c dial no tone", //STR_ERRC_DIAL_NO_TONE "Error: c dial no answer", //STR_ERRC_DIAL_NO_ANSWER "Error: c dial Error: or", //STR_ERRC_DIAL_ERROR "Error: c negotiation", //STR_ERRC_NEGOTIATION "Error: c Message: timeout",//STR_ERRC_MSG_TIMEOUT "Error: c user abort", //STR_ERRC_USER_ABORT "Error: spx rd property", //STR_ERRSPX_RD_PROPERTY "Error: spx sap", //STR_ERRSPX_SAP "Error: c socket alloc", //STR_ERRC_SOCKET_ALLOC "Error: c socket bind", //STR_ERRC_SOCKET_BIND "Error: c socket accept", //STR_ERRC_SOCKET_ACCEPT "Error: c socket connect", //STR_ERRC_SOCKET_CONNECT "Error: c user validation", //STR_ERRC_USER_VALIDATION "Error: flash erase", //STR_ERR_FLASH_ERASE "Error: flash switch modes",//STR_ERR_FLASH_SWITCH_MODES "Error: flash write 512", //STR_ERR_FLASH_WRITE_512 "Error: flash eng verify",//STR_ERR_FLASH_ENG_VERIFY "Error: flash init req", //STR_ERR_FLASH_INIT_REQ "Error: exclusion time", //STR_ERR_EXCLUSION_TIME "Error: diag scheduled", //STR_ERR_DIAG_SCHEDULED "Error: diag not active", //STR_ERR_DIAG_NOT_ACTIVE "Error: elog not loaded",//STR_ERR_ELOG_NOT_LOADED "Error: elog loaded", //STR_ERR_ELOG_LOADED "Error: elog events", //STR_ERR_ELOG_EVENTS "Error: elog paused", //STR_ERR_ELOG_PAUSED "Error: elog not paused",//STR_ERR_ELOG_NOT_PAUSED "Error: slog invalid time", //STR_ERR_SLOG_INVALID_TIME "Error: slog stat group", //STR_ERR_SLOG_STAT_GROUP "Error: alms already linked", //STR_ERR_ALMS_ALREADY_LINKED "Error: alms not linked", //STR_ERR_ALMS_NOT_LINKED "Error: alms invalid resource type",//STR_ERR_ALMS_INVALID_RESOURCE_TYPE "Error: unknown error", // STR_ERR_UNKNOWN_ERROR "No Error", // STR_NO_ERROR "Er", // STR_ER "Selection Timeout", // STR_SEL_TIMEOUT "Command Timeout", // STR_CMD_TIMEOUT "SCSI Bus Reset", // STR_BUS_RESET "Initial Controller Power-Up", // STR_POWER_UP "Unexpected Bus Phase", // STR_UNX_PHASE "Unexpected Bus Free", // STR_UNX_FREE "Bus Parity Error", // STR_BUS_PARITY "SCSI Hung", // STR_SCSI_HUNG "Unexpected Message Rejected", // STR_UNX_MESSAGE "SCSI Bus Reset Stuck", // STR_BUS_STUCK "Auto Request-Sense Failed", // STR_AUTO_FAILED "Controller RAM Parity Error", // STR_RAM_PARITY "Power Supply", // STR_POWER_SUPPLY "Cooling Element", // STR_COOLING_ELEM "Fan", // STR_FAN "Failure", // STR_FAILURE // STR_ABT_NON_ACT = 316, // STR_ABT_ACT = 317, // STR_RST_NON_ACT = 318, // STR_RST_ACT = 319, // STR_RAM_ECC = 320, // STR_PCI_PRTY = 321, // STR_PCI_MST_ABORT = 322, // STR_PCI_TGT_ABORT = 323, // STR_PCI_SIG_ABORT = 324, // STR_HBAERR_RESERVED_0 = 325, // STR_HBAERR_RESERVED_1 = 326, // STR_HBAERR_RESERVED_2 = 327, // STR_HBAERR_RESERVED_3 = 328, // STR_HBAERR_RESERVED_4 = 329, // STR_HBAERR_RESERVED_5 = 330, // STR_HBAERR_RESERVED_6 = 331, // STR_HBAERR_RESERVED_7 = 332, // STR_HBAERR_RESERVED_8 = 333, // STR_HBAERR_RESERVED_9 = 334, "Good", // STR_GOOD = 335, "Check Condition", // STR_CHECK_COND = 336, "Condition Met", // STR_COND_MET = 337, "Busy", // STR_BUSY = 338, "Intermediate", // STR_INTERMEDIATE = 339, "Intermediate - Condition Met", // STR_INT_COND_MET = 340, "Reservation Conflict", // STR_RESERV_CONFLICT = 341, "Command Terminated", // STR_CMD_TERMINATED = 342, "Queue Full", // STR_QUEUE_FULL "Queue Frozen", // STR_QUEUE_FROZEN // STRT_REBUILD = 344, // STR_BUILD = 345, // STRT_VERIFY = 346, "\nLog Overflow\n\n", // STR_LOG_OVERFLOW = 347, "Bad SCSI Status", // STR_BAD_SCSI = 348, "Request Sense\n", // STR_REQ_SENSE = 349, "HBA Error", // STR_HBA_ERROR = 350, "Block reassigned", // STR_BLOCK_REASSIGN = 351, "RAM Error - Address=", // STR_RAM_ERR_ADDR = 352, "HBA Time Changed", // STR_HBA_TIME_CHG = 353, "Old", // STR_OLD = 354, "New", // STR_NEW = 355, "Array Configuration Update", // STR_CONFIG_UPDATE = 356, "Firmware", // STR_FIRMWARE = 357, "Software", // STR_SOFTWARE = 358, // STR_DRIVE_CRASH = 359, "Started", // STR_STARTED = 360, "Stopped", // STR_STOPPED = 361, "Completed", // STR_COMPLETED "Data Inconsistency", // STR_DATA_INC = 362, "Block", // STR_BLOCK = 363, "Count", // STR_COUNT = 364, "Lock", // STR_LOCK = 365, "No entries in the log\n", // STR_NO_LOG_ENTRIES "Drive Failure", // STR_DRIVE_FAILURE = 367, // STR_RESTART_MAC = 368, // STR_CFG_HBA = 369, // STR_SCSI_TERMPWR = 370, // STR_SCAM = 371, // STR_TERMINATION = 372, "On", // STR_ON "Off", // STR_OFF "On (Write Back)", // STR_ON_WRITE_BACK "Off (Write Through)", // STR_OFF_WRITE_THRU "Write Back", // STR_WRITE_BACK "Write Through", // STR_WRITE_THRU // STR_HIGH_ONLY = 375, // STR_SCSI_XFER = 376, // STR_XFER_RATE = 377, "Async", // STR_ASYNCH " 5 MHz", // STR_5MHZ " 8 MHz", // STR_8MHZ "10 MHz", // STR_10MHZ "20 MHz", // STR_20MHZ "40 MHz", // STR_40MHZ "80 MHz", // STR_80MHZ "%d MHz", // STR_FILLIN_MHZ "%d GHz", // STR_FILLIN_GHZ "%d MB/sec", // STR_FILLIN_MB_PER_SEC "%d mV", // STR_FILLIN_MV "%d mA", // STR_FILLIN_MA "%d mAH", // STR_FILLIN_MAH "%d hrs", // STR_FILLIN_HRS // STR_PCI_BURST = 385, // STR_AUTO = 386, // STR_32LW = 387, // STR_64LW = 388, // STR_128LW = 389, // STR_EXT_CABLE = 390, // STR_ENABLED_5 = 391, // STR_DISABLED_10 = 392, // STR_DISABLED_20 = 393, // STR_BUS_ON_TIME = 394, "slow", // STR_CMD_LINE_TASK_RATE_SLOW "medslow", // STR_CMD_LINE_TASK_RATE_MEDSLOW "med", // STR_CMD_LINE_TASK_RATE_MED "medfast", // STR_CMD_LINE_TASK_RATE_MEDFAST "fast", // STR_CMD_LINE_TASK_RATE_FAST "soft", // STR_CMD_LINE_LOG_SOFT "recov", // STR_CMD_LINE_LOG_RECOV "nonrecov", // STR_CMD_LINE_LOG_NONRECOV "status", // STR_CMD_LINE_LOG_STATUS "delete", // STR_CMD_LINE_LOG_DELETE "board", // STR_CMD_LINE_LOG_BOARD "build", // STR_CMD_LINE_TASK_BUILD "rebuild", // STR_CMD_LINE_TASK_REBUILD "stop", // STR_CMD_LINE_TASK_STOP "list", // STR_CMD_LINE_TASK_LIST "verify", // STR_CMD_LINE_TASK_VERIFY "verifynofix", // HIDDEN!!!!!! STR_CMD_LINE_TASK_VERIFY_NO_FIX "optimal", // STR_CMD_LINE_OPTIMAL "fail", // STR_CMD_LINE_FAIL "load", // STR_CMD_LINE_LOAD "save", // STR_CMD_LINE_SAVE // note that this contains the singular and plural of each list type. This is due // to the inconsistency in the command-line spec, it specifies some items as singular, // some as plural. // If your language only needs singular or plural, then set both singular and plural // strings to the same value. "physical", // STR_CMD_LINE_PHYSICAL "physicals", // STR_CMD_LINE_PHYSICALS "logical", // STR_CMD_LINE_LOGICAL "logicals", // STR_CMD_LINE_LOGICALS "controller", // STR_CMD_LINE_CONTROLLER "controllers", // STR_CMD_LINE_CONTROLLERS "spare", // STR_CMD_LINE_SPARE "spares", // STR_CMD_LINE_SPARES "hotspare", // STR_CMD_LINE_HOTSPARE "hotspares", // STR_CMD_LINE_HOTSPARES "raid", // STR_CMD_LINE_ARRAY "array", // STR_CMD_LINE_ARRAYS "all", // STR_CMD_LINE_ALL "allvendor", // STR_CMD_LINE_ALL_VENDOR "speed", // STR_CMD_LINE_SPEED "redirect", // STR_CMD_LINE_REDIRECT "cache", // STR_CMD_LINE_CACHE "version", // STR_CMD_LINE_VERSION "inquiry", // STR_CMD_LINE_INQUIRY "inquiryvendor", // STR_CMD_LINE_INQUIRY_VENDOR "battery", // STR_CMD_LINE_BATTERY "drive", // STR_CMD_LINE_DRIVE "listtagsfordebug", // STR_CMD_LINE_TAGS <- Karla's debug "arrayname", //STR_CMD_LINE_ARRAYNAME // STR_IO_ADDR = 397, // STR_HBA_ADDR = 398, // STR_DMA_CHANNEL = 399, // STR_DMA_SPEED = 400, // STR_PCI_PARITY = 401, // STR_SCSI_CMD_Q = 402, // STR_EXT_PCI_REQ = 403, // STR_GREEN_MODE = 404, // STR_FLOPPY_ENABLED = 405, // STR_LA17_CRAP = 406, // STR_CACHING = 407, // STRT_FLASH = 408, // STRT_APPLY = 409, // STRT_DEFAULTS = 410, // STR_10MBS = 411, // STR_8MBS = 412, // STR_6_6MBS = 413, // STR_5_7MBS = 414, // STR_5_0MBS = 415, // STR_4_4MBS = 416, // STR_4_0MBS = 417, // STR_3_0MBS = 418, // STR_8K = 419, // STR_16K = 420, // STR_32K = 421, // STR_64K = 422, // STR_ALL = 423, // STR_HBA_CACHING = 424, // STR_NO_HBAS = 425, // STR_IRQ_12 = 426, // STR_IRQ_14 = 427, // STR_IRQ_15 = 428, "Disabled", // STR_DISABLED // STR_DRQ_5 = 430, // STR_DRQ_6 = 431, // STR_DRQ_7 = 432, // STR_START_NT_SERVICE = 433, // STR_VIEW_NT_EVENTS = 434, // STR_ZAP_INSTRUCT = 435, // STR_OUT_OF_RANGE = 436, // STR_COLD_BOOT = 437, // STR_DRIVES_ASSIGNED = 438, // STR_AND = 439, // STR_ACCESS_DENIED = 440, // STR_PASSWORD = 441, // STR_ENTER_PASSWORD = 442, // STR_LOCAL = 443, // STR_RAIDBCD_INFO = 444, // STR_VERSION_COLON = 445, // STR_HARDWARE = 446, // STR_IDENTIFIER = 447, // STR_REDUNDANT_CONT = 448, // STR_DATE = 449, // STR_STRIPE = 450, "Formatting", // STR_FORMATTING // STR_RAID1_BUILD = 452, // STR_COPY_DIRECTION = 453, // STR_CHG_DIRECTION = 454, // STR_START_COPY = 455, // STR_COPY = 456, // STR_CLEAR_BOTH = 457, // STR_PHYSICAL_MAP = 458, // STR_LOGICAL_MAP = 459, // STR_ONBOARD = 460, // STR_BANK = 461, // STRT_ALARM_OFF = 462, "Alarm", // STR_ALARM // STR_SCSIBCD_INFO = 464, // STR_NOT_CONNECTED = 465, // STR_NEED_CONNECTION = 466, // STR_CONNECTION_LOST = 467, // STR_NO_LONGER_CONNECTED = 468, // STR_RETURN_TO_AVAILABLE = 469, // STR_RETURN_TO_PHONEBOOK = 470, // STR_SET_HBA_THROTTLE = 471, // STR_FOREGROUND = 472, // STR_BACKGROUND = 473, // STR_DOS_VERSION = 474, // STR_LOADED_HIGH = 475, // STR_DPMI_VERSION = 476, // STR_MEMORY_EXP = 477, // STR_SIMM_MODULE = 478, "SCSI Bridge Controller", // STR_SCSI_BRIDGE_CTLR "RAID Bridge Controller", // STR_RAID_BRIDGE_CTLR // STR_NO_DISPLAY = 480, // STR_READING_IMAGE = 481, // STR_IS_OS = 482, // STR_CDD_CANT_HANDLE = 483, // STR_CDD_READ_ERROR = 484, // STR_CDD_CORRUPT = 485, // STR_FMT_WRITE_PROTECT = 486, // STR_FMT_NOT_READY = 487, // STR_FMT_FAILURE = 488, // STR_TRY_AGAIN = 489, // STR_WRITING_DISKETTE = 490, // STR_ERROR_WRITING_DD = 491, // STR_REPLACE_SMDISK = 492, // STRT_MAKE_OPTIMAL = 493, // STRT_STOP_VERIFY = 494, // STRT_STOP_BUILD = 495, // STR_DD_INSTRUCTIONS = 496, // STRT_USING_NO_MOUSE = 497, // STRT_PULL_DOWNS = 498, // STRT_FUNCTION_BTNS = 499, // STRT_DELETE_ARRAY = 500, // STR_PLEASE_WAIT = 501, // STR_ALL_DATA_LOST = 502, // STR_LOAD_CONFIG_WARN = 503, // STR_INSTALL_REMOTE = 504, // STR_CANNOT_DETERMINE = 505, // STR_PROCESSOR_COLON = 506, // STR_OPERATING_SYSTEM = 507, "Impacted", // STR_IMPACTED = 508, // STR_CANNOT_OPEN_FILE = 509, // STR_FILE_OVERWRITE = 510, // STR_FILENAME = 511, // STR_FILENAME_COLON = 512, // STR_WARNING_COLON = 513, // STR_DEFAULT_SETTINGS = 514, // STR_DRIVER_ROLLED_IN = 515, // STR_UPON_RETURN = 516, // STR_FOUND_OS_ERRORS = 517, // STR_OS_CONF_ERRORS = 518, // STR_BAD_ENGINE_VERSION = 519, // STR_DIAG_STOP_USER = 520, // STR_DIAG_RUNNING = 521, // STR_DIAG_PAUSED = 522, // STR_DIAG_COMPLETED = 523, // STR_DIAG_STOP_ERROR = 524, // STR_DIAG_INVALID = 525, " ", // STR_BLANK = 526, // STRT_NEW_TEST = 527, // STR_BUFFER_READ = 528, // STR_BUFFER_RW = 529, // STR_VERIFY_INFO = 530, // STR_ITERATION_COLON = 531, // STR_ARRAY_STATS = 532, // STR_HD_STATS = 533, // STR_READ_STATS = 534, // STR_TOTAL_SECTORS = 535, // STR_CACHE_HITS = 536, // STR_CACHE_MISSES = 537, // STR_READ_AHEAD_HITS = 538, // STR_WRITE_STATS = 539, // STR_WRITE_BACKS = 540, // STR_WRITE_THRUS = 541, // STR_PROP_HEAD_STUFF = 542, // STR_STRIPES_CROSSED = 543, // STR_IO_COMMANDS = 544, // STR_READS = 545, // STR_WRITES = 546, // STR_TOTAL = 547, // STRT_CLEAR = 548, // STR_HBA_STATS = 549, // STR_CACHE_STATS = 550, // STR_TOTAL_PAGES = 551, // STR_USED_PAGES = 552, // STR_DIRTY_PAGES = 553, // STR_READ_AHEAD_PAGES = 554, // STR_ECC_FAULT_PAGES = 555, // STR_COMMANDS = 556, // STR_TOTAL_COMMANDS = 557, // STR_MISALIGNED = 558, // STR_SCSI_BUS_RESETS = 559, // STR_ADD_ADDL_DEVICES = 560, // STR_ADD_ADDL_DONE = 561, // STR_NO_INITIAL = 562, // STRT_VIEW_README = 563, // STR_OS_SETTINGS = 564, // STR_VIEWING_FILE = 565, "Status Change\n", // STR_STATUS_CHANGE = 566, // STR_OLD_COLON = 567, // STR_NEW_COLON = 568, // STR_LOGGER_NOT_LOADED = 569, // STR_EVENT_LOGGING_NOTIFICATION = 570, // STRT_EVENT_LOGGING = 571, // STR_FIRST_DONE = 572, // STR_LOG_LOAD_BAD = 573, // STR_COPY_SM_FILES = 574, // STR_OVERWRITE_SM_FILES = 575, // STR_MSCDEX_MSG = 576, // STR_CANT_CONNECT = 577, "Building", // STR_BUILDING = 578, "Build Pending", // STR_BUILD_PENDING // STR_FUTURE_DW_CONFIG = 579, // STR_DW_CONFIG_NOT_DONE = 580, // STR_FLOPT_TOO_SMALL = 581, // STR_FLOPT_TOO_BIG = 582, // STR_FLOPT_OPTIONS = 583, // STR_FORMAT_MEDIA = 584, // STR_DOS_FORMAT = 585, // STR_FLOPT_BOOTABLE = 586, // STR_FLOPT_NON_BOOTABLE = 587, // STR_USE_SYS = 588, // STR_EVENT_LOGGING = 589, // STR_TIME_INTERVAL = 590, // STR_MINUTES_120 = 591, // STR_RECORD_EVENTS_TO_FILE = 592, // STR_NOTIFICATION = 593, // STR_BROADCAST_TO_USERS = 594, // STR_LOG_TO_SYSTEM_FILE = 595, // STR_EMAIL_TO_USERS = 596, // STR_SEND_TO_DEVICES = 597, // STR_REDIRECT_SCSI_ID = 598, // STR_NEW_SCSI_ID = 599, // STR_MOD_CREATED_CONFLICT = 600, // STR_DW_COMPLETE = 601, // STR_ORG_CONFIG = 602, // STR_ORG_AUTOEXEC = 603, // STR_ORG_SYSTEMINI = 604, // STRT_REDIRECT = 605, // STR_DW_ANYTIME = 606, // STRT_VIEW_README2 = 607, // STR_PROMPT_REF = 608, // STR_FLOPT_NO_FORMAT = 609, "Optimal", // STR_OPTIMAL "Created", // STR_CREATED // STR_MISSING_NO_CONFIG = 611, "Creating/Mod", // STR_CURRENT_CREATE = 612, // STR_MISSING_NO_ATTACH = 613, // STR_NO_INFORMATION = 614, // STR_LOG_NOT_REMOTE = 615, // STRT_STOP_LOGGER = 616, // STRT_START_LOGGER = 617, // STRT_UNLOAD_LOGGER = 618, // STR_PP_EMU_ONLY = 619, // STR_PP_NO_SMARTROM = 620, // STR_PP_REQ_ALL_SECONDARY = 621, // STR_PP_NO_LEVEL = 622, // STR_PP_NO_LUNS = 623, // STR_PP_EISA_ONLY = 624, // STR_PP_NO_ISA_EISA = 625, // STR_TAPE_DRIVE = 626, // STR_PP_NO_SUPPORT = 627, // STR_PP_DEV_TOO_MANY = 628, // STR_PP_DEV_WRONG_ID = 629, // STR_PP_NO_STRIPING = 630, // STR_SEND_LOGGER = 631, "Devices", // STR_DEVICES // STR_NOTE_THRESHOLD = 633, // STR_USERS = 634, "Redirect", // STR_RAID_REDIRECT // STR_PP_EISA_SLOTS = 636, // STR_PP_TOO_MANY_HBAS = 637, // STR_PP_UNLESS_RAID = 638, // STR_PP_HBA_REQ_ADDR = 639, // STR_PP_BAD_HBA_ADDR = 640, // STR_PP_1F0_PRIMARY = 641, // STR_THRESHOLD_1 = 642, // STR_THRESHOLD_2 = 643, // STR_THRESHOLD_3 = 644, // STR_THRESHOLD_4 = 645, // STR_LOG_INSTRUCTIONS = 646, // STR_DISPLAY_THRESHOLD = 647, // STRT_CLEAR_LOG = 648, // STR_PROCESSOR_EXEP = 649, // STR_FIRMWARE_EXEP = 650, // STR_POWER_UP_FAIL = 651, // STR_FIRMWARE_ERROR = 652, // STR_BLINKLED = 653, // STR_BLINK_80 = 654, // STR_BLINK_81 = 655, // STR_BLINK_82 = 656, // STR_BLINK_83 = 657, // STR_BLINK_84 = 658, // STR_BLINK_86 = 659, // STR_BLINK_87 = 660, // STR_BLINK_RESET_STUCK = 661, // STR_BLINK_71 = 662, // STR_BLINK_72 = 663, // STR_BLINK_73 = 664, // STR_BLINK_74 = 665, // STR_BLINK_UNDEF = 666, // STR_BLINK_HWERR = 667, // STR_BLINK_0X12 = 668, // STR_BLINK_0X15 = 669, // STR_BLINK_0X16 = 670, // STR_BLINK_0X17 = 671, // STR_BLINK_PCIXFERERR = 672, // STR_BLINK_PCIPARERR = 673, // STR_BLINK_PCICFGERR = 674, // STR_BLINK_ECCMISMATCH = 675, // STR_BLINK_MEMPM3XXX = 676, // STR_BLINK_MEMPM2XXX = 677, // STR_BLINK_DOMMISMATCH = 678, // STR_BLINK_DOMINVALID = 679, // STR_BLINK_UNSUPP_SG = 680, // STR_BLINK_NVRAM_CLR = 681, // STR_BLINK_CACHE_INV = 682, // STR_BLINK_CACHE_MIS = 683, // STR_BLINK_CACHE_OUT = 684, // STR_BLINK_HW_FAIL1 = 685, // STR_BLINK_HW_FAIL2 = 686, // STR_BLINK_HW_FAIL3 = 687, // STR_BLINK_HW_UNKNOWN = 688, // STR_BLINK_OS_TASK_FAIL = 689, // STR_BLINK_OS_HISR_FAIL = 690, // STR_BLINK_OS_QUECR_FAIL = 691, // STR_BLINK_OS_SEM_FAIL = 692, // STR_BLINK_OS_LISR_FAIL = 693, // STR_BLINK_OS_QUEUE_FAIL = 694, // STR_BLINK_OS_ERR_LOOP = 695, // STR_BLINK_OS_GEN_ERR = 696, // STR_COULD_NOT_CREATE = 697, // STR_STAT_INVALID = 698, "- security stamp missing", // STR_STAT_1 = 699, "- Non-supported channel", // STR_STAT_2 = 700, "- Non-supported ID", // STR_STAT_3 = 701, "- Non-supported channel and ID",// STR_STAT_4 = 702, "- Component failure", // STR_STAT_5 = 703, "- Test Unit Ready failure", // STR_STAT_6 = 704, "- Format failure", // STR_STAT_7 = 705, "- Write failure", // STR_STAT_8 = 706, "- User failed via Mode Select", // STR_STAT_9 = 707, "- Start-of-Day failure", // STR_STAT_10 = 708, "No action in progress", // STR_STAT_11 = 709, "Format initiated", // STR_STAT_12 = 710, "Rebuild initiated", // STR_STAT_13 = 711, "No information available", // STR_STAT_14 = 712, "Wrong sector size", // STR_STAT_15 = 713, "Wrong capacity", // STR_STAT_16 = 714, "Incorrect mode parameters", // STR_STAT_17 = 715, "Wrong controller serial number",// STR_STAT_18 = 716, "Channel mismatch", // STR_STAT_19 = 717, "ID mismatch", // STR_STAT_20 = 718, "is at the channel ID", // STR_STAT_21 = 719, "drive format initiated", // STR_STAT_22 = 720, "Wrong drive replaced", // STR_STAT_23 = 721, "awaiting build", // STR_STAT_24 = 722, "integration in progress", // STR_STAT_25 = 723, " in progress", // STR_STAT_26 = 724, "/Fix in progress", // STR_STAT_27 = 725, "Parameter mismatch", // STR_PARAMETER_MISMATCH = 726, "Replaced RAID 0 drive formatting", // STR_REPLACED_FORMAT "Drive Failed", // STR_DRIVE_FAILED "Replaced Drive being formatted", // STR_STAT_31 = 729, "Multiple drive failures", // STR_STAT_32 = 730, "Format in progress", // STR_STAT_33 = 731, "Awaiting build", // STR_STAT_34 = 732, "Verify found data inconsistent", // STR_STAT_35 = 733, // STR_OSS_OS2 = 734, // STR_OSS_UNIX = 735, // STR_OSS_NETWARE_286 = 736, // STR_OSS_NETWARE_386 = 737, // STR_OSS_SCO_UNIX = 738, // STR_PROC_8086 = 739, // STR_PROC_80286 = 740, // STR_PROC_80386 = 741, // STR_PROC_80486 = 742, // STR_PROC_PENTIUM = 743, // STR_PROC_PENTIUM_PRO = 744, // STR_NEW_ARRAY_NO_COVERAGE = 745, // STR_HS_NO_PROTECT = 746, // STR_HS_SOME_PROTECT = 747, // STR_WINDOWS_PATH = 748, // STR_INT24_WRITE_PROTECT = 749, // STR_INT24_UNKNOWN_UNIT = 750, // STR_INT24_NOT_READY = 751, // STR_INT24_GENERIC = 752, // STR_INT24_DATA_ERROR = 753, // STR_INT24_SEEK_ERROR = 754, // STR_INT24_UNKNOWN_MEDIA_TYPE = 755, // STR_INT24_SECTOR_NOT_FOUND = 756, // STR_PRINT_NO_FILENAME = 757, // STR_PRINT_TO_CONSOLE = 758, "System Console", // STR_SYS_CONSOLE // STR_NO_SPACE_FOR_RAID_TABLE = 759, // STR_HBA_NO_RAID_MODULE = 760, // STR_NO_WINDOWS_IN_PATH = 761, // STR_FORMAT_UNSUCCESSFUL = 762, // STR_PRINTED_BY = 763, // STR_TEXT_MISSING = 764, // STR_TEXT_IMPACTED = 765, // STR_TEXT_WARNING = 766, // STR_TEXT_FAILED = 767, // STR_TEXT_BUILDING = 768, "No Sense\n", // STR_SENSE_0 = 769, "Recovered Error\n", // STR_SENSE_1 = 770, "Not Ready\n", // STR_SENSE_2 = 771, "Medium Error\n", // STR_SENSE_3 = 772, "Hardware Error\n", // STR_SENSE_4 = 773, "Illegal Request\n", // STR_SENSE_5 = 774, "Unit Attention\n", // STR_SENSE_6 = 775, "Data Protect\n", // STR_SENSE_7 = 776, "Blank Check\n", // STR_SENSE_8 = 777, "Vendor Specific\n", // STR_SENSE_9 = 778, "Copy Aborted\n", // STR_SENSE_A = 779, "Aborted Command\n", // STR_SENSE_B = 780, "Equal\n", // STR_SENSE_C = 781, "Volume Overflow\n", // STR_SENSE_D = 782, "Miscompare\n", // STR_SENSE_E = 783, "Reserved\n", // STR_SENSE_F = 784, "isa", // STR_ISA "eisa", // STR_EISA "pci", // STR_PCI "Verify", // STR_VERIFY = 788, "Degraded -", // STR_STAT_DEGRADED = 789, "Reconstructing -", // STR_STAT_RECONSTRUCT = 790, "Expanding", // STR_STAT_EXPAND = 791, "Dead -", // STR_STAT_DEAD = 792, "Array In Warning -", // STR_ARRAY_WARNING = 793, "Non-Arrayed", // STR_NON_ARRAYED = 794, "Non-existent drive", // STR_NON_EXISTANT = 795, "Failed drive", // STR_FAILED_DRIVE = 796, "Replaced drive -", // STR_REPLACED_DRIVE = 797, "Drive in warning condition", // STR_DRIVE_WARNING = 798, "Parameter mismatch (drive) -", // STR_PARAM_MISMATCH = 799, "Format Unit -", // STR_FORMAT_UNIT = 800, "Uninitialized -", // STR_UNINITIALIZED_HYPH = 801, "Drive Verify", // STR_DRIVE_VERIFY = 802, // STR_DUMMY_CDD = 803, // STR_DPTDDL_PATH = 804, // STR_DPT_DEVICE_ENTRY = 805, "\n%sSCSI Bus ECC Error\n", // STR_SCSI_BUS_ECC_ERR = 806, "Correctable ", // STR_CORRECTABLE = 807, "Non-Correctable ", // STR_NONCORRECTABLE = 808, // STR_CORRECTED = 809, "Parity", // STR_PARITY = 810, "ECC", // STR_ECC, = 811, "Storage Subsystem - Component Failed\n", // STR_SS_COMP_FAILED = 812, "Storage Subsystem - Fully Functional\n", // STR_SS_FULLY_FUNC = 813, // STR_ALL_IDS_IN_USE = 814, // STR_CURRENT_ADDR = 815, // STR_NEW_SCSI_ADDR = 816, // STRT_SEARCH_AGAIN = 817, // STR_DPT_ENGINE = 818, // STR_DSM_INCOMPATIBLE = 819, // STR_NOT_COMPATIBLE = 820, // STRT_GLOSSARY = 821, // STRT_BACK = 822, // STR_OS_MISMATCH = 823, // STRT_PRINTER_SETUP = 824, // STR_LOAD_CONFIG = 825, // STR_SAVE_CONFIG = 826, "Host Command Received", // STR_HOST_CMD_REC = 827, "Host Command Sent", // STR_HOST_CMD_SENT = 828, // STR_ARRAY_DIAGS = 829, // STR_ECC_ENABLED = 830, // STR_ENABLE_DPT_ECC = 831, // STR_SLOT = 832, // STR_DRIVER_NO_STRIPE = 833, // STR_STRIPE_CHANGE = 834, // STR_CANNOT_FIND_SERVER = 835, // STR_COMM_ENGINE = 836, // STR_INCOMPATIBLE_COMM = 837, // STR_IMAGE_WRONG_SIZE = 838, // STR_ONE_FLOPPY_RIGHT_SIZE = 839, // STR_IMAGE_SIZE_MISMATCH = 840, "The specified file does not match the controller.\n", // STR_FILE_NOT_MATCH_HBA // STR_INVALID_IMAGE_FILE = 841, // STR_WRITE_ERROR = 842, // STR_ZAPPED = 843, // STR_OST_DOS = 844, // STR_OST_WINDOWS = 845, // STR_OST_WINDOWS95 = 846, // STR_OST_WINDOWS_NT = 847, // STR_OST_MSOS2 = 848, // STR_OST_IBMOS2 = 849, // STR_OST_NOVELL = 850, // STR_OST_SCO = 851, // STR_OST_USL = 852, // STR_OST_SVR42 = 853, // STR_OST_UNIXWARE = 854, // STR_OST_SOLARIS = 855, // STR_OST_INTERACTIVE = 856, // STR_OST_ATT_UNIX = 857, // STR_OST_NEXT = 858, // STR_OST_UNIX = 859, // STR_OST_VINES = 860, // STR_OST_PICK = 861, // STR_OST_THEOS = 862, // STR_OST_LINUX = 863, // STR_OST_BSDI = 864, // STR_OST_FREEBSD = 865, // STR_OST_AIX = 866, // STR_OST_NETBSD = 867, // STR_OST_OTHER = 868, // STR_OS_DOS = 869, // STR_OS_DOS5 = 870, // STR_OS_DRDOS = 871, // STR_OS_CONDOS = 872, // STR_OS_ZENITH = 873, // STR_OS_PCMOS = 874, // STR_OS_OS2MMS = 875, // STR_OS_OS2MIBM = 876, // STR_OS_OS2L = 877, // STR_OS_OS220 = 878, // STR_OS_OS221 = 879, // STR_OS_OS221_AND_UP = 880, // STR_OS_OS2OTHER = 881, // STR_OS_NW311 = 882, // STR_OS_NW40 = 883, // STR_OS_NW21X = 884, // STR_OS_NW22 = 885, // STR_OS_NW20 = 886, // STR_OS_CONSENSYS = 887, // STR_OS_IF_SVR4 = 888, // STR_OS_MICROPORT = 889, // STR_OS_UHC = 890, // STR_OS_SCO_UNIX_320 = 891, // STR_OS_SCO_UNIX_322 = 892, // STR_OS_SCO_UNIX_324 = 893, // STR_OS_SCO_UNIX_3242 = 894, // STR_OS_SCO_XENIX = 895, // STR_OS_INT_UNIX_1X = 896, // STR_OS_INT_UNIX_2X = 897, // STR_OS_INT_UNIX_3X = 898, // STR_OS_ESIX = 899, // STR_OS_INTEL_UNIX = 900, // STR_OS_MICROPORT_286 = 901, // STR_OS_MICROPORT_386 = 902, // STR_OS_VINES_411 = 903, // STR_OS_VINES_55 = 904, // STR_OS_VINES_6X = 905, // STR_OS_VINES_7X = 906, // STR_OS_MAGIX = 907, // STR_OS_PICK22 = 908, // STR_OS_PICK21 = 909, // STR_OS_QNX = 910, // STR_OS_WYSE = 911, // STR_OS_INT13 = 912, // STR_OS_WD1003 = 913, // STR_OS_NOTLISTED = 914, // STR_YOUR_CHOSEN_OS = 915, // STR_OST_OLIVETTI = 916, // STR_OS_NEXT = 917, // STR_OS_NEXT33 = 918, // STR_OS_UNIXWARE1X = 919, // STR_OS_UNIXWARE2X = 920, // STR_OS_LINUX = 921, // STR_OS_BSDI = 922, // STR_OS_FREEBSD = 923, // STR_OS_AIX = 924, // STR_OS_NETBSD = 925, // STR_OS_DGUNIX = 926, // STR_OS_MACOS = 927, // STR_QUIET_TITLE = 928, // STR_QUIET_DESCRIP = 929, // STR_SCSI_II = 930, // STRT_CREATE_DISK = 931, // STR_BAD_EXCLUSION = 932, // STR_PRIORITY = 933, // STR_EX_PERIOD = 934, // STR_START_COLON = 935, // STR_END_COLON = 936, "Enabled", // STR_ENABLED "Current Sensor", // STR_CURRENT_SENSOR "Voltage Sensor", // STR_VOLT_SENSOR "Temperature Sensor", // STR_TEMP_SENSOR "enclosure temperature sensor #", // STR_ENCL_TEMPERATURE_SENSOR "Normal temperature restored", // STR_NORMAL_TEMP_RESTORED "Temperature Normal", // STR_TEMP_NORMAL "High temperature", // STR_HIGH_TEMP "Low temperature", // STR_LOW_TEMP " detected\n", // STR_DETECTED "Very high temperature detected\n", // STR_VERY_HIGH_TEMP "Temperature Out Of Range", // STR_TEMP_OUT_OF_RANGE "Low voltage detected\n", // STR_LOW_VOLTAGE "Normal voltage restored\n", // STR_NORMAL_VOLTAGE "Low voltage detected\n", // STR_HIGH_VOLTAGE "Diagnostic ", // STR_DIAGNOSTIC "Stopped: Drive doesn't support command\n", // STR_STOPPED_DDS "Stopped: Drive failure\n", // STR_STOPPED_FAIL "Stopped: Error limit exceeded\n", // STR_STOPPED_LIMIT "Stopped: User intervention\n", // STR_STOPPED_USER "Stopped: Test completed\n", // STR_STOPPED_COMPLETE "S.M.A.R.T. threshold reached\n", // STR_SMART_THRESHOLD "Internal Drive Prediction\n", // STR_DRIVE_PREDICTION "Spin up criterion met\n", // STR_SPINUP_CRITERION "Seek criterion met\n", // STR_SEEK_CRITERION "Scheduled\n", // STR_SCHEDULED "Queried\n", // STR_QUERIED "Canceled\n", // STR_CANCELED "Exclusion period set\n", // STR_EX_PERIOD_SET "Debug Event\n", // STR_DEBUG_EVENT "%02d/%02d/%02d %02d:%02d:%02d ", // STR_LOG_TIME "Level %d", // STR_LOG_LEVEL // STR_WRAP_OFF // STR_LOG_SEPARATOR // STR_SAVE_CHANGES // STR_MUST_REBOOT // STR_DEV_CONFIG // STR_READ_CACHING // STRT_DISCONNECT // STRT_FAIL // STR_START_DURING_EX // STR_STOP_BUILD_BAD // STR_STOP_GEN5_BUILD_BAD // STR_BOTH_FAILED // STRT_CONFIGURE // STR_SECTORS_COLON // STR_BYTES_SECTOR_LOGICAL // STR_BYTES_SECTOR // STR_SCSI_3 = 977, // STR_SMART = 978, // STR_REBUILD = 979, "SAF-TE", // STR_SAFTE "SES", // STR_SES // STR_SAFTE_ENCL = 981, // STR_CE_ENOENT = 982, // STR_CE_EMFILE = 983, // STR_CE_EACCES = 984, // STR_CE_EINVACC = 985, // STR_CF_NOSPACE = 986, // STR_CF_OTHER = 987, // STR_CF_NOOPEN_SRC = 988, // STR_WIN_INSTALL = 989, // STR_UNCONF_EISA = 990, // STR_WIN32_NODASD = 991, // STR_FLASH_NEEDED = 992, // STR_VALID_FLASH_FILE = 993, // STR_SUCCESSFUL_FLASH = 994, // STR_FLASH_DL_ERROR = 995, // STR_VERIFY_FLASH = 996, // STR_FLASH_FIRMWARE = 997, // STR_FLASH_BIOS = 998, // STR_FLASH_SMOR = 999, // STR_BATTERY_MISSING = 1000, // STR_BATTERY_PRESENT = 1001, "Battery Status Change", // STR_BATT_STAT_CHANGE // STR_NORMAL = 1002, // STR_LOW = 1003, // STR_HIGH = 1004, // STR_VOLTAGE = 1005, // STR_SERIALNUM = 1006, // STR_STANDARD_CONNECTIONS = 1007, // STR_CUSTOM_CONNECTIONS = 1008, // STR_PROTOCOL_TCPIP = 1009, // STR_PROTOCOL_SPX = 1010, // STR_PROTOCOL_SERIAL = 1011, // STR_PROTOCOL_MODEM = 1012, // STR_MODEM = 1013, // STR_CONNECTION_INFORMATION = 1014, // STRT_ADDRESS = 1015, // STRT_USERNAME = 1016, // STRT_PASSWORD = 1017, // STR_PHONEBOOK = 1018, // STRT_PHONEBOOK = 1019, // STRT_DISPLAY_ICON = 1020, // STRT_PROTOCOL = 1021, // STRT_SERVERNAME = 1022, // STRT_ADD = 1023, // STRT_EDIT = 1024, // STRT_SAVE = 1025, // STRT_DELETE = 1026, // STRT_CONNECT = 1027, // STRT_CLOSE = 1028, // STR_CHOOSE_ICON = 1029, // STRT_CHOOSE_ICON = 1030, // STRT_ICONS = 1031, // STR_SX4000 = 1032, // STR_TERMINATOR = 1033, // STR_RAID_CTLR = 1034, // STR_SES_ENCL = 1035, // STR_SAFTE_SES = 1036, // STR_XFER = 1037, // STR_FCAL = 1038, // STR_FIBRE_CHANNEL = 1039, // STR_132 = 1040, // STR_264 = 1041, // STR_64BIT_SLOT = 1042, // STR_32BIT_SLOT = 1043, // STR_EVENT_VIEWER = 1044, // STR_TAPI = 1045, // STR_LOG_DESKTOP = 1046, // STR_BROADCAST_TO_MACHINE = 1047, // STR_LOG_COMPUTERS = 1048, "Fail Hot Spar", // STR_FAILED_HOTSPARE // STRT_EXPAND_RAID = 1050, "Ultra", // STR_ULTRA "Ultra2", // STR_ULTRA2 "Ultra3", // STR_ULTRA3 "Ultra160", // STR_ULTRA160 "Ultra320", // STR_ULTRA320 // STR_NRAM_CACHE_NOTE = 1052, // STR_CACHE_INHIBIT_COMMANDS = 1053, // STR_CACHE_ADVISORY = 1054, // STR_CACHE_MANDATORY = 1055, // STR_CACHE_SYNC_COMMANDS = 1056, // STR_CACHE_SIZE = 1057, // STR_CACHE_VIRTUAL = 1058, // STR_CACHE_PHYSICAL = 1059, // STR_CACHE_CONTROL = 1060, // STR_CACHE_WRITE = 1061, // STR_CACHE_WRITE_BACK = 1062, // STR_CACHE_WRITE_THROUGH = 1063, "Cache disabled", // STR_CACHE_DISABLED // STR_TRACE_HOST_COMMANDS = 1064, // STR_TRACE_SCSI_COMMANDS = 1065, "No battery", // STR_NO_BATTERY "Bad Battery", // STR_BAD_BATTERY // STR_BBU_WND_TITLE = 1066, // STR_BBU_NOT_DETECTED = 1067, // STR_BBU_CHECK_CONNECTIONS = 1068, // STR_BBU_STATUS = 1069, "Starting up", // STR_BBU_STARTING "Operational", // STR_BBU_OPERATIONAL // STR_BBU_BACKUP = 1070, // STR_BBU_CAP_WARNINGS = 1071, // STR_BBU_AUTO_WT = 1072, "Predictive Failure", // STR_BBU_PRED_FAILURE // STR_BBU_INIT_CAL_BUTTON = 1074, // STR_BBU_MAINT_CAL_BUTTON = 1075, // STR_BBU_DEFAULT_BUTTON = 1076, // STR_BBU_INIT_DLG_TITLE = 1077, // STR_BBU_INIT_DLG_MSG = 1078, // STR_BBU_MAINT_DLG_TITLE = 1079, // STR_BBU_MAINT_DLG_MSG = 1080, // STR_BBU_GEN_ERROR_MSG = 1081, // STR_BBU_GEN_ERROR_TITLE = 1082, "Full", // STR_BBU_FULL "Charging", // STR_BBU_CHARGING "Discharging", // STR_BBU_DISCHARGING "Recharging", // STR_RECHARGING "Bad", // STR_BBU_BAD "Init chrg", // STR_BBU_INIT_CHARGE "Init dschrg", // STR_BBU_INIT_DISCHARGE "Init rechrg", // STR_BBU_INIT_RECHARGE "Maint dschg", // STR_BBU_MAINT_DISCHARGE "Maint chrg", // STR_BBU_MAINT_CHARGE "Trickle Charging", // STR_TRICKLE_CHRGING "Maintenance Calibration", // STR_MAINT_CALIB "Initial Calibration", // STR_INIT_CALIB // STR_BBU_AUTO_WT_MESSAGE = 1092, // STR_MB_SEC_XFER = 1093, // STR_IN_MAINT_WT_MODE = 1094, // STR_IN_FORCED_WT_MODE = 1095, // STR_NO_MAINT_PERFORMED = 1096, // STR_BBU_AUTO_PRED_MSG = 1097, // STR_AUTO_WT_WARNING = 1098, // STR_ADVANCED = 1099, // STR_DIRECTORY_FILE = 1100, // STR_SUCCESSFUL_FLASH_REMOTE = 1101, // NUM_STRINGS = 1102 "Degraded", // STR_DEGRADED = 1103 "Reconstruct", // STR_RECONSTRUCT = 1104 "Expanding", // STR_EXPAND = 1105 "Dead", // STR_DEAD = 1106 "Array in Warn", // STR_ARRAY_WARNING2= 1107 "Verifying", // STR_VERIFY = 1108 "Non-existent", // STR_NON_EXIST = 1109 "Uninitialized", // STR_UNINITIALIZED = 1110 "Replaced Drive", // STR_REPLACED_DRIVE2=1111 "Drive in Warn", // STR_DRIVE_WARNING2 =1112 "Parm Mismatch", // STR_PARAM_MISMATCH2=1113 "Format Unit", // STR_FORMAT_UNIT2 = 1114 "SES Enclosure", // STR_SES_ENCL, "SAF-TE Enclosure", // STR_SAFTE_ENCL, "DEC Enclosure", // STR_DEC_ENCL, "Nile Enclosure", // STR_NILE_ENCL "Communication Lost", // STR_COMMUNICATION_LOST "Enclosure Found", // STR_SES_ENCL_FOUND, "Door Lock", // STR_DOOR_LOCK "Audible Alarm", // STR_AUD_ALARM "Selection Timeout", // STR_SES_ENCL_SELECTION_TIMEOUT, "Hardware Error", // STR_SES_ENCL_HARDWARE_ERROR, "Error Limit Exceeded", // STR_SES_ENCL_ERROR_LIMIT, "CPU Register Dump : ", // STR_CPU_REGISTER_DUMP, "BlinkLED: Type = %.2x, Code = %.2x", // STR_BLINKLED_EVENT "Are you sure you want to Zap the drive(s) [yN]? ", // STR_RU_SURE_TO_ZAP "Yy", // STR_CHAR_Y for answering yes (Y or y) "This drive is busy. ", // STR_DRIVE_IS_BUSY "Operation and Resync successful, reboot unnecessary.\n", // STR_SUCCESS_RESYNC_SUCCESS "Operation successful, however Resync not supported on this OS, please reboot.\n", // STR_SUCCESS_RESYNC_NOT_SUPPORTED "Operation successful, however Resync failed, please reboot.\n", // STR_SUCCESS_RESYNC_FAILED "\nUart data for hba number %d:\n", //STR_UART_HBA_NUM "\nHba number %d not found\n", //STR_HBA_NUM_NOT_FOUND "Error occurred getting uart data from hba %d\n", //STR_ERR_UART_HBA_NUM "Uart data written to file for hba %d\n", //STR_UART_WRITTEN_TO_FILE "No uart data for hba %d\n", //STR_NO_UART_DATA "RAID 1 must be rebuilt\n", // STR_MUST_REBUILD_RAID1 "%s/Pending", // STR_STR_OVER_PENDING " Read Cache ", // STR_READ_CACHE " Write Cache ", // STR_WRITE_CACHE " (Off due to maintenance operation)", // STR_OFF_DUE2_MAINT_OPER " (Off due to battery condition)", // STR_OFF_DUE2_BATTERY_COND " Error occurred, no change made!\n", // STR_ERR_NO_CHANGE "Resync Successful, reboot unnecessary.\n", // STR_RESYNC_SUCCESS_NO_REBOOT "Resync not supported on this OS, please reboot.\n", // STR_RESYNC_NOT_SUPPORTED_REBOOT "Resync Failed, please reboot.\n", // STR_RESYNC_FAILED_REBOOT "You must be root to run this utility\n", // STR_MUST_BE_ROOT "Press ENTER to continue\n", // STR_PRESS_ENTER2_CONT "Integer not expected, use format d#b#t#d# or d#b#t##d#\n", // STR_INT_NOT_EXPECTD_USE "Logical View\n", // STR_LOGICAL_VIEW "Physical View\n", // STR_PHYSICAL_VIEW " Drive not Optimal, cannot change\n", // STR_DRIVE_NOT_OPT_CANT_CHG " unchanged - Optimal\n", // STR_UNCHANGED_OPTIMAL " Raid not Failed, cannot change\n", // STR_RAID_NOT_FAIL_CANT_CHG " unchanged - Failed\n", // STR_UNCHANGED_FAILED "NVRAM", // STR_NVRAM "%8s:%6ld Bytes\n", // STR_SCAN_TYPE_SIZE "%8s:%6ld Bytes %s %s\n", // STR_SCAN_TYPE_SIZE_DATE_VERSION "Controller not found.\n", // STR_CTLR_NOT_FOUND "Flashing complete.\n", // STR_FLASH_COMPLETE "An error occurred while flashing data to the controller.\n(at %lu bytes, Error=0x%X: %s)\n", // STR_FLASH_ERR_MSG "An error occurred while verifying the data that was flashed to the controller.\n(at %lu bytes, Error=0x%X: %s)\n", // STR_VERIFYING_ERR_MSG "Warning: This feature is valid only for Windows NT and Windows 2000.\n", // STR_WARN_ONLY_NT_2000 "The hba's event log has been cleared.\n", // STR_EVENT_LOG_CLEARED "for Channel", // STR_FOR_CHANNEL "Double Component Failed", // STR_DOUBLE_COMP_FAIL "The server ", // STR_THE_SERVER " could not ", // STR_COULD_NOT "a heartbeat", // STR_A_HEARTBEAT "/clear", // STR_SLASH_CLEAR " finished ", // STR_FINISHED "error", // STR_ERROR "Swap Signal Detected", // STR_SWAP_SIG_DETECTED "component malfunction", // STR_COMP_MALFUNC "component operational", // STR_COMP_OPERATIONAL "Dirty data", // STR_DIRTY_DATA "No Battery Detected or Battery CRC Failure", // STR_CRC_FAILURE "Local Parameter Failure", // STR_LOCAL_PARAM_FAILURE "Local Signature Failure", // STR_LOCAL_SIG_FAILURE "Cache Signature Failure", // STR_CACHE_SIG_FAILURE "LSU Device ID is Zero", // STR_LSU_DEV_ID_ZERO "No Cache", // STR_NO_CACHE "Invalid PCB", // STR_INVALID_PCB "PCB No LSU", // STR_PCB_NO_LSU "PCB Count", // STR_PCB_COUNT "Dirty Block Count", // STR_DIRTY_BLOCK_COUNT "LSU has Invalid Device ID", // STR_LSU_INVALID_DEV_ID "LSU has an Invalid Type", // STR_LSU_INVALID_TYPE "LSU Parent Device TID", // STR_LSU_PARENT_DEV_ID "LSU Capacity", // STR_LSU_CAPACITY "LSU Magic Number", // STR_LSU_MAGIC_NBR "Volts high", // STR_VOLTS_HIGH "voltage restored", // STR_VOLT_RESTORED "Volts low", // STR_VOLTS_LOW "Term Power ", // STR_TERM_POWER "Bad Data Block", // STR_BAD_DATA_BLOCK "Bad Parity Block", // STR_BAD_PARITY_BLOCK "Bad Data List Full, Block", // STR_BAD_DATA_LIST_FULL_BLOCK "Bad Parity List Full, Block", // STR_BAD_PARITY_LIST_FULL_BLOCK "Write Back Failure, Block", // STR_WRITE_BACK_FAIL_BLOCK "for", // STR_FOR "Global Cache State Change", // STR_GLOBAL_CACHE_STATE_CHG "External device or initator caused incoming bus reset", // STR_CAUSE_OF_BUS_RESET "Command from host requested that the bus to be reset", // STR_HOST_CMD_BUS_RESET "Command watchdog time-out caused the bus to be reset", // STR_WATCHDOG_BUS_RESET "Bus reset occurred on channel", // STR_BUS_RESET_ON_CHAN "The Fibre Loop on channel %d went from ", // STR_FIBRE_LOOP_CHAN_FROM "down to up\n", // STR_DOWN_TO_UP "up to down\n", // STR_UP_TO_DOWN "Access to Fibre device ID %d failed on Channel %d\n", // STR_ACCESS_FIBRE_FAILED_FILLIN "Unknown flags for Fibre Loop event\n", // STR_UNKNOWN_FLAGS_FIBRE_LOOP "Battery Calibration %s, Count = %d\n", // STR_BATTERY_CALIB_COUNT "Channel %d was ", // STR_CHAN_FILLIN_WAS "taken offline", // STR_TAKEN_OFFLINE "left offline", // STR_LEFT_OFFLINE "after ISP processor diagnostic check failed\n", // STR_ISP_PROC_DIAG_CHK_FAILED "after excessive reinitializes of the ISP sub-system\n", // STR_EXCESS_REINIT_ISP_SUB "after excessive inbound resets occurred\n", // STR_EXCESS_INBOUND_RESETS "because ISP was unable to reset the SCSI-FIBRE bus\n", // STR_ISP_UNABLE_RESET_SFBUS "because the ISP received an unrecoverable PCI bus fault\n", // STR_ISP_RECV_UNRECOV_PCIBUS_FAULT "because the ISP failed to initialize\n", // STR_ISP_FAILED_INIT "(unknown reason code)\n", // STR_UNKNOWN_REASON_CODE "down speed occurred on \nbus %d, id %d, lun %d\ndue to Domain Validation\n", // STR_DOWN_SPEED_DOMAIN_VALID "device located at bus %d, id %d, lun %d\nmay not be seen as valid SCSI device due to\nDomain Validation failure to complete\n", // STR_NOT_SCSI_DEV_DOMAIN_VALID "Error in log message\n", // STR_ERR_IN_LOG_MSG "Unknown Event", // STR_UNKNOWN_EVENT "Success", // STR_SUCCESS "Request Aborted", // STR_REQ_ABORTED "Unable To Abort", // STR_UNABLE_TO_ABORT "Complete With Error", // STR_COMPLETE_WITH_ERROR "Adapter Busy", // STR_ADAPTER_BUSY "Request Invalid", // STR_REQUEST_INVALID "Path Invalid", // STR_PATH_INVALID "Unable To Terminate", // STR_UNABLE_TO_TERMINATE "MR Message Received", // STR_MR_MSG_RECVD "Parity Error Failure", // STR_PARITY_ERR_FAILURE "Autosense Failed", // STR_AUTOSENSE_FAILED "No Adapter", // STR_NO_ADAPTER "Data Overrun", // STR_DATA_OVERRUN "Sequence Failure", // STR_SEQ_FAILURE "Request Length Error", // STR_REQ_LEN_ERROR "Provide Failure", // STR_PROVIDE_FAILURE "BDR Message Sent", // STR_BDR_MSG_SENT "Request Terminated", // STR_REQ_TERM "IDE Message Sent", // STR_IDE_MSG_SENT "Resource Unavailable", // STR_RESOURCE_UNAVAIL "Unacknowledged Event", // STR_UNACKED_EVENT "Message Received", // STR_MSG_RECVD "Invalid CDB", // STR_INVALID_CDB "LUN Invalid", // STR_LUN_INVALID "SCSI TID Invalid", // STR_SCSI_TID_INVALID "Function Unavailable", // STR_FUNC_UNAVAIL "No Nexus", // STR_NO_NEXUS "SCSI IID Invalid", // STR_SCSI_IID_INVALID "CDB Received", // STR_CDB_RECVD "LUN Already Enabled", // STR_LUN_ALREADY_AVAIL "Unknown Error Code", // STR_UNKNOWN_ERR_CODE "(Invalid HBA time) ", // STR_INVALID_HBA_TIME "Unspecified", // STR_UNSPECIFIED "Enclosure Services Controller Electronics", // STR_ENCL_SERV_CTLR_ELEC "SCC Controller Electronics", // STR_SCC_CTLR_ELEC "Nonvolatile Cache", // STR_NONVOLATILE_CACHE "Uninterruptible", // STR_UNINTERRUPTABLE "Display", // STR_DISPLAY "Key Pad Entry Device", // STR_KEY_PAD_ENTRY_DEV "SCSI Port/Transceiver", // STR_SCSI_PORT_XCEIVER "Language", // STR_LANGUAGE "Communication Port", // STR_COMM_PORT "SCSI Target Port", // STR_SCSI_TGT_PORT "SCSI Initiator Port", // STR_SCSI_INIT_PORT "Simple Sub-enclosure", // STR_SIMPLE_SUBENCL "Critical", // STR_CRITICAL "Noncritical", // STR_NONCRITICAL "Unrecoverable", // STR_UNRECOVERABLE "Not Installed", // STR_NOT_INSTALLED "Unavailable", // STR_UNAVAILABLE "main", // STR_MAIN "sub", // STR_SUB "Parent Array Building ", // STR_PARENT_ARRAY_BUILDING "Parent Build", // STR_PARENT_BUILDING "Parent Expand", // STR_PARENT_EXPANDING "No Info Avail", // STR_NO_INFO_AVAIL "\n\nYou are attempting to mirror a larger drive onto a smaller drive - \n", // STR_MIRROR_MSG1 "this will result in a loss of mirrored data. If you want to do this rerun\n", // STR_MIRROR_MSG2 "the command and precede it with the '-i' option. Otherwise rerun the\n", // STR_MIRROR_MSG3 "command, but reverse the order of the drives so that the smaller drive is\n", // STR_MIRROR_MSG4 "copied to the larger drive.", // STR_MIRROR_MSG5 "Configuration file loaded.\n", // STR_CFG_FILE_LOADED "Configuration file saved.\n", // STR_CFG_FILE_SAVED "Engine connect failed", // STR_ENG_CONN_FAILED ": Open\n", // STR_COLON_OPEN ": COMPATIBILITY number\n", // STR_COLON_COMPAT_NBR ": SCAN failed\n", // STR_COLON_SCAN_FAILED "HBA", // STR_HBA "Disk Drive (DASD)", // STR_SCSI_DASD "Tape Drive", // STR_SCSI_SASD "No items of that type found", // STR_NO_ITEMS_FOUND "No hotspare is available", // STR_NO_HOTSPARE_AVAIL "Rebuild drive too small", // STR_RBLD_DRV_TOO_SMALL "ATA33", // STR_ATA33 "ATA45", // STR_ATA45 "ATA66", // STR_ATA66 "ATA100", // STR_ATA100 "ATA133", // STR_ATA133 "ATA", // STR_ATA "SATA1500", // STR_SATA1500 "SATA3000", // STR_SATA3000 "SATA6000", // STR_SATA6000 "SATA", // STR_SATA "Remove Mode 0 jumper before reboot.\n", // STR_REMMODEZERO "Device reserve conflict detected. Command failed.\n", //STR_RESCONFLICT "Cluster bit is set, feature disabled.\n", // STR_CLSTR_FEAT_DISABLE "Total Raid size exceeds 2TB raid creation failed.", // STR_ERR_TWO_TB_RAID "Invalid segment offset.\n", //STR_ERR_INVALID_SEGMENT_OFFSET "Invalid segment size.\n", //STR_ERR_INVALID_SEGMENT_SIZE "JBOD", //STR_RAID_JBOD "No segments configured",//STR_NO_SEGMENT_CONFIG "~# ~b0 ~b1 ~b2 ~Cont~roller ~ ~FW ~NVRAM ~Serial ~Status\n", // STR_LIST_DEV_CTLR_HEADER_NO_CACHE "~# ~Cont~roller ~ ~FW ~NVRAM ~BIOS ~SMOR ~Serial\n", // STR_LIST_DEV_VERSION_HEADER_NO_CACHE "Array name too long (must be 16 characters or less) ", // STR_ERR_NAME_TOO_LONG "No array name specified ", //STR_ERR_NO_ARRAY_NAME "Input name is already used by another device", //STR_ERR_NAME_ALREADY_USED "Array name successfully changed", //STR_ARRAY_NAME_CHANGED "~Address ~Array Name ~Manufactu~rer/Model ~Capacity ~Status\n", // STR_LIST_ARRAYNAME_HEADER }; #endif // __RSCSTRS_H raidutils-0.0.6.orig/raidutil/rstnvram.cpp0000664000175000000620000001272110044153336020537 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 8/5/98 * ***************************************************************************** * * File Name: RstNVRam.cpp * Module: * Contributors: Lee Page * Mark Salyzyn * Description: * Version Control: * * $Revision: 12 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "rstnvram.hpp" #include "rustring.h" #include "rscenum.h" extern char* EventStrings[]; /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Reset_NVRam::Reset_NVRam ( int which_Hba_Num, int resync ): Modify_NVRam( which_Hba_Num ) { ENTER( "Reset_NVRam::Reset_NVRam( int which_Hba_Num ): Modify_NVRam( which_Hba_Num )" ); Resync = resync; hbaNum = which_Hba_Num; EXIT(); } Reset_NVRam::Reset_NVRam( const Reset_NVRam &new_Reset_NVRam ): Modify_NVRam( new_Reset_NVRam ) { ENTER( "Reset_NVRam::Reset_NVRam( const Reset_NVRam &new_Reset_NVRam ): Modify_NVRam( new_Reset_NVRam )" ); Resync = new_Reset_NVRam.Resync; hbaNum = new_Reset_NVRam.hbaNum; EXIT(); } Reset_NVRam::~Reset_NVRam() { ENTER( "Reset_NVRam::~Reset_NVRam()" ); EXIT(); } /**************************************************************************** * * Function Name: execute(), Created:8/10/98 * * Description: Fetches the defaults page, then writes out * ONLY the firmware settings to the nvram * page. * * Return: Dpt_Error * * Notes: I am told that another way of doing this * is to write back the page with an invalid * check sum. * *****************************************************************************/ Command::Dpt_Error Reset_NVRam::execute( String_List **output ) { ENTER( "Command::Dpt_Error Reset_NVRam::execute( String_List **output )" ); DPT_TAG_T this_HBAs_Tag; Dpt_Error err; struct nvRam_Struct { unsigned char firmware[ 128 ]; } nvram; String_List *out= new String_List; *output = out; Init_Engine(1); // only scan hbas err = get_HBA_Tag( &this_HBAs_Tag ); if( !err.Is_Error() ) { engine->Reset(); engine->Insert( (uCHAR)0x2E ); // NVRAM page engine->Insert( (uCHAR)0x42 ); // Interpret and Default // get the defaults page err = engine->Send( MSG_GET_MODE_PAGE, this_HBAs_Tag ); } if( !err.Is_Error() ) { if (( engine->Extract( &nvram, 4 ) == 0 ) // Take filler and header || ( engine->Extract( &nvram, sizeof( nvram ) ) == 0 )) { err = MSG_RTN_DATA_UNDERFLOW; } else { nvram.firmware[0] = 0; // Reset Parameters on Version } } if( !err.Is_Error() ) { // fill the nvram buf with the present software // settings (we'll overwrite the firmware settings) err = Read_NVRam_to_Buf(); } if( !err.Is_Error() ) { // copy from the temp buffer to the buffer that the // base class uses to write from memcpy( get_NVRam_Buf(), nvram.firmware, sizeof( nvram.firmware ) ); err = Write_NVRam_from_Buf(); } if( !err.Is_Error() ) { out->add_Item(EventStrings[STR_NVRAM_RESET]); out->add_Item( "\n" ); // only resync if specified in command line if (Resync) { Dpt_Error err2; engine->Insert ((uCHAR) 0x01); // perform a complete init err2 = engine->Send (MSG_I2O_RESYNC, this_HBAs_Tag); if (!err2.Is_Error()) (**output).add_Item(EventStrings[STR_RESYNC_SUCCESS_NO_REBOOT]); else if (err2 == Dpt_Error::DPT_MSG_RTN_IGNORED) (**output).add_Item(EventStrings[STR_RESYNC_NOT_SUPPORTED_REBOOT]); else (**output).add_Item(EventStrings[STR_RESYNC_FAILED_REBOOT]); } } else { out->add_Item( (char *) err ); out->add_Item( "\n" ); } EXIT(); return( err ); } Command &Reset_NVRam::Clone() const { ENTER( "Command &Reset_NVRam::Clone() const" ); EXIT(); return (*new Reset_NVRam (this->hbaNum, this->Resync)); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/rstnvram.hpp0000664000175000000620000000472610044153333020547 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef RSTNVRAM_HPP #define RSTNVRAM_HPP /**************************************************************************** * * Created: 8/5/98 * ***************************************************************************** * * File Name: RstNVRam.hpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 4 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "modnvram.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Reset_NVRam: public Modify_NVRam { public: Reset_NVRam (int which_Hba_Num, int resync); Reset_NVRam( const Reset_NVRam &new_Reset_NVRam ); virtual ~Reset_NVRam(); Dpt_Error execute( String_List **output ); Command &Clone() const; private: int Resync; int hbaNum; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/rustring.h0000664000175000000620000002226510044153337020212 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef STRINGS_H #define STRINGS_H /**************************************************************************** * * Created: 7/20/98 * ***************************************************************************** * * File Name: strings.h * Module: * Contributors: Lee Page * Description: English Language Strings for DptUtil * Version Control: * * $Revision: 79 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "rscenum.h" extern char* EventStrings[]; /*** CONSTANTS ***/ #define LZSS_NUM_BUFS 16 #define LZSS_HEADER_SIZE 16 #define LZSS_BUF_SIZE 64512L /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #define STR_CMD_ERR_NO_ERROR EventStrings[STR_NO_ERROR] #define OPTION_DELIMITER ',' // Note to translators: // The ensure that number of characters between tildes remains equal to or greater // than what appears in the English. // The tilde is used as a place holder for tabulating the output #define TABULATION_PLACE_HOLDER '~' #define TABULATION_MULTI_LINED_TABBED '@' #define TABULATION_MULTI_LINED_TABBED_FILL_CHAR '.' #define STR_LIST_DEV_REDIRECT_HEADER STR_LIST_DEV_HOT_SPARE_HEADER // leave it as a hot-spare for now, yet to be defined. #define STR_DEV_DIVIDING_LINE "---------------------------------------------------------------------------\n" // Parse errors... //#define STR_PARSE_ERR_RAID_LEVEL_MUST_BE_INTEGER "Logical drive's capacity must be an integer value: " //#define STR_PARSE_ERR_MUST_SPECIFY_ON_OR_OFF "Must specify either the keyword on or off: " // Command-line switch delimiter enum command_Switch_Delim { SW_DELIM_1 = '-', SW_DELIM_2 = '/', SW_DELIM_3 = '+' }; // Command-line parameters enum command_Enum { CMD_DRIVE_GROUP = 'g', CMD_DELETE_LOGICAL_DRIVE = 'D', CMD_CREATE_HOT_SPARE = 'h', CMD_DELETE_HOT_SPARE = 'H', CMD_ALARM_STATUS = 'A', CMD_ACTION_TASK_CONTROL = 'a', CMD_PREDICTIVE_CACHING_CONTROL = 't', CMD_PREFETCH_SIZE = 'b', CMD_READ_AHEAD_SIZE = 'p', // CMD_HOST_READ_CACHING = 'C', CMD_LOAD_SAVE_CONFIGURATION = 'C', CMD_WRITE_CACHING = 'w', CMD_RESET_CLEAR_RAID_STORE = 'W', CMD_RESET_NVRAM_CONFIG = 'X', CMD_BATTERY_STATUS_INFO = 'B', CMD_LIST_DEVICES = 'L', CMD_IGNORE_NONFATAL_ERRORS = 'i', CMD_DISPLAY_INQ_INFO = 'I', CMD_QUIET_MODE = 'q', CMD_SHOW_UTIL_USAGE = '?', CMD_SPECIFY_CTLR = 'c', CMD_SPECIFY_DPT = 'd', CMD_RAID_LEVEL = 'l', CMD_LOGICAL_DRIVE_NUM = 'n', CMD_LOGICAL_DRIVE_CAPACITY = 's', CMD_LOGICAL_DRIVE_STRIPE_SIZE = 'z', CMD_TASK_RATE = 'r', CMD_EOL_COMMENT = '/', CMD_FLASH = 'F', CMD_ZAP = 'Z', CMD_SCSI_MHZ = 'M', CMD_VIEW_LOG = 'e', CMD_FORCE_STATE = 'f', CMD_CLUSTER_SUPPORT = 'K', CMD_PAGENATION_MODE = 'P', CMD_EXPAND_ARRAY = 'E' }; // this is used to denote the tabulation level for the switch definitions // use the LIST_TABULATION_INSERT_TAB_HERE char literal constant to denote where // the tab should go to. // !!!!!! These are unused - leaving them here anyway (kds) !!!!!!!! //#define STR_USAGE_SW_PREDICTIVE_CACHING_CONTROL "-t@(unimplemented)" //#define STR_USAGE_SW_PREFETCH_SIZE "-b@(unimplemented)" //#define STR_USAGE_SW_READ_AHEAD_SIZE "-p@(unimplemented)" //#define STR_USAGE_SW_HOST_READ_CACHING "-C [on|off|?|-?] d,d[,d]@Read Caching control (unsupported)" //#define STR_USAGE_SW_BATTERY_STATUS_INFO "-B@(unimplemented)" //#define STR_USAGE_SW_LOGICAL_DRIVE_NUM "-n n@The logical drive number to assign to the logical being created (unsupported)" //#define STR_USAGE_SW_SPEED "-M [5|8|10|20|40|async|?|-?]@Set Maximum negotiation speed" //#define STR_USAGE_NOTES "White space is ignored completely" /* Status strings */ //#define STR_LSU_FAILED "LSU Failed" //#define STR_COMPONENT_FAIL "Component failed" //#define STR_REBUILD "Rebuilding" //#define STR_BUILD_REQUIRED "Build Required" //#define STR_WRONG_REPLACE "Replaced wrong drive" //#define STR_VERIFY_FAIL "Verify failed" //#define STR_VERIFY_FIX "Verify/Fix in progress" //#define STR_NO_RAID_TABLE "RAID table does not exist" //#define STR_SSMISSING "Security stamp missing" //#define STR_REDUNDANT_CTLR "Redundant store invalid" //#define STR_NS_CHAN "Unsupported channel" //#define STR_NS_ID "Unsupported id" //#define STR_NS_CHAN_ID "Unsupported channel and id" //#define STR_UNCONFIGURED "Unconfigured" //#define STR_NOT_BUILT "Not Built" //#define STR_TUR_FAIL "Test Unit Ready failed" //#define STR_BUILD_FAIL "Build failure" //#define STR_WRITE_FAIL "Write failure" //#define STR_FORCE_FAIL "User forced failure" //#define STR_START_FAIL "Start of day failure" //#define STR_REPLACED "Drive replaced" //#define STR_SECTOR_SIZE "Wrong sector size" //#define STR_CAPACITY "Wrong capacity" //#define STR_MODE_PARAMS "Wrong mode parameters" //#define STR_SERIAL_NUM "Wrong controller serial number" //#define STR_CHAN_MISMATCH "Channel mismatch" //#define STR_ID_MISMATCH "Id mismatch" //#define STR_HBA_MISMATCH "HBA at specified ID" //#define STR_WRONG_DRIVE "Wrong Drive" //#define STR_CLEAR "Clearing" //#define STR_FORMAT_FAILED "Format failed" //#define STR_CLEAR_FAILED "Clear failed" //#define STR_FLASH_INIT "Flash initializing" //#define STR_FLASH "Flashing" //#define STR_DIAG_READ "Read Diagnostics" //#define STR_DIAG_RW "Read/Write Diagnostics" //#define STR_DIAG_MEDIA_READ "Media read Diagnostics" //#define STR_DIAG_MEDIA_RW "Media Read/Write Diagnostics" //#define STR_DIAG_VERIFY "Verify Diagnostics" //#define STR_DIAG_REBUILD "Rebuild Diagnostics" //#define STR_DIAG_BUILD "Build Diagnostics" //#define STR_DIAG_EXPAND "Expand Diagnostics" //#define STR_CANT_DO_ALARM "\nCan not perform this action on the alarm because it is disabled. Enable the alarm.\n\n" /* Blink Codes (5th Generation) */ //#define STR_BLINK_HWERR "Hardware error" //#define STR_BLINK_UNDEF EventStrings[STR_UNKNOWN] //kds #define STR_BLINK_UNDEF STR_UNKNOWN //#define STR_BLINK_0X12 "Flash image corrupted" //#define STR_BLINK_0X15 "Firmware/PM mismatch" //#define STR_BLINK_0X16 "Firmware/SX mismatch" //#define STR_BLINK_0X17 "RAM test failure" //#define STR_BLINK_PCIXFERERR "PCI transfer error" //#define STR_BLINK_PCIPARERR "PCI parity error" //#define STR_BLINK_PCICFGERR "PCI configuration error" //#define STR_BLINK_ECCMISMATCH "SIMMs are not same type and size" //#define STR_BLINK_MEMPM3XXX "No SIMMs/DIMMs installed" //#define STR_BLINK_MEMPM2XXX "No SIMMs installed in RA405X" //#define STR_BLINK_DOMMISMATCH "SIMMs/DIMMs not same type or size" //#define STR_BLINK_DOMINVALID "SIMMs/DIMMs not supported type" //#define STR_BLINK_UNSUPP_SG "Unsupported SG mode used" //#define STR_BLINK_NVRAM_CLR "NVRAM clear jumper installed" //#define STR_BLINK_CACHE_INV STR_BLINK_DOMINVALID //#define STR_BLINK_CACHE_MIS STR_BLINK_DOMMISMATCH //#define STR_BLINK_CACHE_OUT "Run out of Cache Pages" //#define STR_BLINK_HW_FAIL1 "I2C failure on controller" //#define STR_BLINK_HW_FAIL2 "I2C failure on SCSI expansion" //#define STR_BLINK_HW_FAIL3 "I2C failure on NVRAM" //#define STR_BLINK_HW_UNKNOWN "Uncategorized Hardware failure" //#define STR_BLINK_OS_TASK_FAIL "Task create failure" //#define STR_BLINK_OS_HISR_FAIL "ISR create failure" //#define STR_BLINK_OS_QUECR_FAIL "Queue create failure" //#define STR_BLINK_OS_SEM_FAIL "Semaphore create failure" //#define STR_BLINK_OS_LISR_FAIL "List register failure" //#define STR_BLINK_OS_QUEUE_FAIL "Queue failure" //#define STR_BLINK_OS_ERR_LOOP "ISR loop failure" //#define STR_BLINK_OS_GEN_ERR "Kernel failure" #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/scsiaddr.hpp0000664000175000000620000000540510044153334020463 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef SCSIADDR_HPP #define SCSIADDR_HPP /**************************************************************************** * * Created: 7/22/98 * ***************************************************************************** * * File Name: ScsiAddr.hpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 5 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ /*** CONSTANTS ***/ /*** TYPES ***/ class SCSI_Address { public: SCSI_Address(): hba( 0 ), bus( 0 ), id( 0 ), lun( 0 ), level( 0 ) {} SCSI_Address( int new_HBA, int new_Bus = 0, int new_ID = 0, int new_Lun = 0, int new_Level = 0 // this is NOT the engine levels, this is 0 == physicals... ): hba( new_HBA ), bus( new_Bus ), id( new_ID ), lun( new_Lun ), level( new_Level ) {} SCSI_Address( const SCSI_Address &right ) { hba = right.hba; bus = right.bus; id = right.id; lun = right.lun; level = right.level; } int hba; int bus; int id; int lun; int level; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/scsilist.cpp0000664000175000000620000002057410044153336020525 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/17/98 * ***************************************************************************** * * File Name: ScsiList.cpp * Module: * Contributors: Lee Page * Description: Encapsulates an array of SCSI items. Used as a least-common denominator solution in coding C++ without STL. * Version Control: * * $Revision: 8 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "debug.hpp" #include "scsilist.hpp" #include "log_core.hpp" #include /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ SCSI_Addr_List::SCSI_Addr_List(): num_Items( 0 ), items( 0 ), next_Item_Index( 0 ) { ENTER( "SCSI_Addr_List::SCSI_Addr_List():" ); EXIT(); } SCSI_Addr_List::SCSI_Addr_List( const SCSI_Addr_List &right ) { ENTER( "SCSI_Addr_List::SCSI_Addr_List( const SCSI_Addr_List &right )" ); Copy_Items( right ); num_Items = right.num_Items; next_Item_Index = right.next_Item_Index; EXIT(); } SCSI_Addr_List::~SCSI_Addr_List() { ENTER( "SCSI_Addr_List::~SCSI_Addr_List()" ); Destroy_Items(); EXIT(); } SCSI_Addr_List &SCSI_Addr_List::operator += ( const SCSI_Addr_List &right ) { ENTER( "SCSI_Addr_List &SCSI_Addr_List::operator += ( const SCSI_Addr_List &right )" ); int int_Index; SCSI_Address **temp_Items; // allocate a larger buffer and copy over the existing entries temp_Items = new SCSI_Address *[ num_Items + right.num_Items ]; memcpy( temp_Items, items, num_Items * sizeof( SCSI_Address * ) ); delete items; items = temp_Items; // now copy over the ones being added for( int_Index = 0; int_Index < right.num_Items; int_Index++ ) { items[ int_Index + num_Items ] = &right.get_Item( int_Index ); } num_Items += right.num_Items; EXIT(); return( *this ); } const SCSI_Addr_List & SCSI_Addr_List::operator = ( const SCSI_Addr_List &right ) { ENTER( "const SCSI_Addr_List & SCSI_Addr_List::operator = ( const SCSI_Addr_List &right )" ); Destroy_Items(); Copy_Items( right ); num_Items = right.num_Items; next_Item_Index = right.next_Item_Index; EXIT(); return( *this ); } /**************************************************************************** * * Function Name: add_Address(), Created:7/17/98 * * Description: Appends a address to the end of the list of items. * * Notes: * *****************************************************************************/ void SCSI_Addr_List::add_Item( const SCSI_Address &address ) { ENTER( "void SCSI_Addr_List::add_Item( const SCSI_Address &address )" ); SCSI_Address **temp_Addresses; // create a new table large enough to contain the previously entered items // plus this new one. temp_Addresses = new SCSI_Address *[ num_Items + 1 ]; if( temp_Addresses ) { num_Items++; if( items ) { //Copy all the previous items over to the new array memcpy( temp_Addresses, items, num_Items * sizeof( SCSI_Address *) ); // we don't need this old one any more. delete[] items; } items = temp_Addresses; items[ num_Items - 1 ] = new SCSI_Address( address ); } EXIT(); } /**************************************************************************** * * Function Name: get_Address(), Created:7/17/98 * * Description: Fetches the nth address (0 based). The user should not deallocate the returned address. It is owned by the object. * * Notes: * *****************************************************************************/ SCSI_Address &SCSI_Addr_List::get_Item( int index ) const { ENTER( "SCSI_Address &SCSI_Addr_List::get_Item( int index ) const" ); SCSI_Address *ret_Address = 0; if( index < num_Items ) { ret_Address = items[ index ]; } EXIT(); return( *ret_Address ); } /**************************************************************************** * * Function Name: get_Next_Address(), Created:7/17/98 * * Description: Fetches the next address. The user should not deallocate the returned address. It is owned by the object. * * Return: C-address * * Notes: * *****************************************************************************/ SCSI_Address &SCSI_Addr_List::get_Next_Item() { ENTER( "SCSI_Address &SCSI_Addr_List::get_Next_Item()" ); SCSI_Address *ret_Address = 0; if( next_Item_Index < num_Items ) { ret_Address = items[ next_Item_Index ]; next_Item_Index++; } EXIT(); return( *ret_Address ); } /**************************************************************************** * * Function Name: shift_Item(), Created:7/28/98 * * Description: FIFO. Removes the first item from the list, and returns it. * * Return: The first item in the list. * * Notes: This is a destructive read. * *****************************************************************************/ SCSI_Address SCSI_Addr_List::shift_Item() { ENTER( "SCSI_Address SCSI_Addr_List::shift_Item()" ); SCSI_Address ret_Item( *items[ 0 ] ); int copy_Index; delete items[ 0 ]; for( copy_Index = 0; copy_Index < num_Items - 1; copy_Index++ ) { items[ copy_Index ] = items[ copy_Index + 1 ]; } num_Items--; next_Item_Index = ( next_Item_Index > 0 )?next_Item_Index - 1:0; EXIT(); return( ret_Item ); } /**************************************************************************** * * Function Name: reset_Next_Index(), Created:7/17/98 * * Description: Resets the get_Next_Address index to point to the first item. * * Notes: * *****************************************************************************/ void SCSI_Addr_List::reset_Next_Index() { ENTER( "void SCSI_Addr_List::reset_Next_Index()" ); next_Item_Index = 0; EXIT(); } int SCSI_Addr_List::num_Left() const { ENTER( "int SCSI_Addr_List::num_Left() const" ); EXIT(); return( num_Items - next_Item_Index ); } void SCSI_Addr_List::Destroy_Items() { ENTER( "void SCSI_Addr_List::Destroy_Items()" ); int address_Index; for( address_Index = 0; address_Index < num_Items; address_Index++ ) { delete items[ address_Index ]; } delete[] items; EXIT(); } void SCSI_Addr_List::Copy_Items( const SCSI_Addr_List &right ) { ENTER( "void SCSI_Addr_List::Copy_Items( const SCSI_Addr_List &right )" ); int address_Index; items = new SCSI_Address *[ right.num_Items ]; num_Items = right.num_Items; for( address_Index = 0; address_Index < num_Items; address_Index++ ) { items[ address_Index ] = new SCSI_Address( right.get_Item( address_Index ) ); } EXIT(); } // returns true if addr is already in the list, false otherwise bool SCSI_Addr_List::In_List (const SCSI_Address &addr) { for (int i = 0; i < num_Items; i++) { if ((items [i]->hba == addr.hba) && (items [i]->bus == addr.bus) && (items [i]->id == addr.id) && (items [i]->lun == addr.lun)) return true; } return false; } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/scsilist.hpp0000664000175000000620000000671410044153333020527 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef SCSILIST_HPP #define SCSILIST_HPP /**************************************************************************** * * Created: 7/20/98 * ***************************************************************************** * * File Name: ScsiList.hpp * Module: * Contributors: Lee Page * Description: This file serves as a container class, holding a list of scsi addresses. * Version Control: * * $Revision: 7 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "scsiaddr.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class SCSI_Addr_List { public: SCSI_Addr_List(); SCSI_Addr_List( const SCSI_Addr_List &right ); ~SCSI_Addr_List(); SCSI_Addr_List &operator += ( const SCSI_Addr_List &right ); const SCSI_Addr_List & operator = ( const SCSI_Addr_List &right ); void add_Item( const SCSI_Address &address ); // Fetches the nth str (0 based). The user should not // deallocate the returned address. It is owned by the // object. SCSI_Address &get_Item( int index ) const; // Fetches the next address. The user should not deallocate // the returned address. It is owned by the object. SCSI_Address &get_Next_Item(); // FIFO. Removes the first item from the list, and returns it. SCSI_Address shift_Item(); // Resets the get_Next_Address index to point to the first item. void reset_Next_Index(); // returns the number of entries minus the index int num_Left() const; int get_Num_Items() const { return( num_Items ); } // returns true if addr is already in the list, false otherwise bool In_List (const SCSI_Address &addr); private: void Destroy_Items(); void Copy_Items( const SCSI_Addr_List &right ); int num_Items; SCSI_Address **items; int next_Item_Index; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/segment.cpp0000664000175000000620000003772610046161517020343 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * File Name: segment.hpp * Contributors: Edrick Estrada * Description: Class that enables functionality for segmentation in HBAs * that are segmentation compatible * *****************************************************************************/ /*** INCLUDES ***/ #include "segment.hpp" #include "rscenum.h" #include "ctlr_map.hpp" #include "rustring.h" /*** CONSTANTS ***/ #define ARRAY_SEGMENTS_MAX 8 /*** TYPES ***/ /*** STATIC DATA ***/ uSHORT arraySegment::segArrayCt=0; /*** EXTERNAL DATA ***/ extern char* EventStrings[]; extern uSHORT PHYS_LIST_SIZE; /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ arraySegment::arraySegment (SCSI_Address raidToSeg, uLONG segSize[ARRAY_SEGMENTS_MAX], uLONG segOffset[ARRAY_SEGMENTS_MAX], bool showSeg):raidToSegment(raidToSeg),showArraySegData(showSeg) { ENTER("arraySegment::arraySegment("); segSizeArray = new uLONG[ARRAY_SEGMENTS_MAX]; memcpy(segSizeArray,segSize, (sizeof(segSize)*ARRAY_SEGMENTS_MAX)); segOffsetArray = new uLONG[ARRAY_SEGMENTS_MAX]; memcpy(segOffsetArray,segOffset, (sizeof(segOffset)*ARRAY_SEGMENTS_MAX)); segArrayCt++; EXIT(); } arraySegment::arraySegment (const arraySegment &new_arraySegment) :raidToSegment(new_arraySegment.raidToSegment),showArraySegData(new_arraySegment.showArraySegData) { ENTER("arraySegment::arraySegment (const arraySegment &new_arraySegment):"); segSizeArray = new uLONG [ARRAY_SEGMENTS_MAX]; memcpy(segSizeArray,new_arraySegment.segSizeArray, (sizeof(new_arraySegment.segSizeArray)*ARRAY_SEGMENTS_MAX)); segOffsetArray = new uLONG [ARRAY_SEGMENTS_MAX]; memcpy(segOffsetArray,new_arraySegment.segOffsetArray, (sizeof(new_arraySegment.segOffsetArray)*ARRAY_SEGMENTS_MAX)); segArrayCt++; EXIT(); } arraySegment::~arraySegment() { ENTER( "arraySegment::~arraySegment()" ); delete []segSizeArray; delete []segOffsetArray; segArrayCt--; EXIT(); } /******************************************************* Main exe loop *******************************************************/ Command::Dpt_Error arraySegment::execute(String_List **output) { ENTER("Command::Dpt_Error arraySegment::execute(String_List **output)"); String_List *out; *output = out = new String_List(); Dpt_Error err; bool objFound = false; bool getHidden = false; bool segmentingSupported = false; bool more_Devs_Left = true; uLONG majorStripeSize; uLONG numArrayComps; uLONG lastValidSegment; uSHORT raidToSegmentType; dptID_S *idList = new dptID_S[PHYS_LIST_SIZE]; arraySegment_S currArraySegData[ARRAY_SEGMENTS_MAX]; arraySegment_S newArraySegData[ARRAY_SEGMENTS_MAX]; uCHAR newSegFlags[ARRAY_SEGMENTS_MAX]; DPT_RTN_T returnMsg; memset( currArraySegData, 0, sizeof(currArraySegData)); memset( newArraySegData, 0, sizeof(newArraySegData)); memset( newSegFlags, 0, sizeof(newSegFlags)); uLONG newStartBlock; uLONG newEndBlock; uLONG newUsedBlocks = 0; uLONG newSegSizeInBlks; uLONG extraBlocks =0; //DON'T FORGET TO RESET THE ENGINE BEFORE YOU USE IT... .JUST IN CASE Init_Engine(); engine->Reset(); //Change SCSI_Address to Dpt_Tag so it can be used by the engine raidToSegmentTag = Get_Log_Dev_by_Address (raidToSegment, getHidden, &objFound); // Checks to see if segmenting is supported by HBA firmware for(uSHORT dev_Index = 0; more_Devs_Left && !err.Is_Error(); dev_Index ++){ DPT_TAG_T hba_Tag; hba_Tag = Get_HBA_by_Index(dev_Index, &more_Devs_Left); engine->Reset(); engine->Send(MSG_GET_INFO, hba_Tag); //if the segmenting bit is enabled, ENABLE this feature if (engine->hbaInfo_P->flags2 & FLG_SEG_SUPPORTED) segmentingSupported = true; } engine->Reset(); returnMsg = engine->Send(MSG_GET_INFO, raidToSegmentTag ); raidToSegmentType = engine->devInfo_P->raidType; // If it's not a valid raid type, or the HBA doesn't support segmenting, command fails if ((raidToSegmentType<0) || (raidToSegmentType>5) || !segmentingSupported) { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_THIS_DEVICE; } else { //save off array size arraySizeInBlks = engine->devInfo_P->capacity.maxLBA + 1; //get number of components in Array numArrayComps = EngineFindIDs(1, MSG_ID_COMPONENTS, raidToSegmentTag, idList, PHYS_LIST_SIZE); lastValidSegment = 0; majorStripeSize = engine->devInfo_P->masterStripe; segmentAlignment = numArrayComps * majorStripeSize; } // bypass it all if they just want to see the segment info if (showArraySegData == true && !err.Is_Error()) { returnMsg = showSegmentData(raidToSegmentTag, **output); if (returnMsg == MSG_RTN_IGNORED) out->add_Item( EventStrings[STR_NO_SEGMENT_CONFIG] ); } // For clustering else if (engine->devInfo_P->flags3 & FLG_DEV_RES_CONFLICT) out->add_Item( EventStrings[STR_RESCONFLICT] ); else if (!err.Is_Error()) { // Get Previous segment info returnMsg = getSegmentData( raidToSegmentTag, currArraySegData); memcpy(newArraySegData, currArraySegData, sizeof(currArraySegData)); // if err comes back MSG_RTN_IGNORED, no valid segment data was found, but go through anyway if (returnMsg == MSG_RTN_IGNORED) err = MSG_RTN_COMPLETED; for(uSHORT count=0;count arraySizeInBlks) { // CREATE ERROR STRING FOR SEGMENT OUT OF BOUNDS err |=Dpt_Error::DPT_ERR_INVALID_SEGMENT_SIZE; break; } // Check for conflicts between new segment data and current segment data else { if (segSizeArray[count]) { for(uSHORT count2=0; count2 < ARRAY_SEGMENTS_MAX; count2++) { uLONG currStartBlock = currArraySegData[count2].offsetLo; uLONG currEndBlock = currArraySegData[count2].offsetLo + currArraySegData[count2].sizeLo-1; //don't check the data in the segment that will be replaced. if (count2 != count) { // does the new segment data conflict with any current segment data if( (((currStartBlock < newStartBlock) && (newStartBlock < currEndBlock)) || ((currStartBlock < newEndBlock) && (newEndBlock < currEndBlock))) && currArraySegData[count2].sizeLo !=0) { // CREATE ERROR STRING FOR SEGMENT COLLISION err |=Dpt_Error::DPT_ERR_INVALID_SEGMENT_SIZE; break; } } } if (err.Is_Error()) break; else { // If all the conditions are right, and no errors have occurred, copy over new segment Data newArraySegData[count].offsetLo = newStartBlock; newArraySegData[count].sizeLo = newSegSizeInBlks; // No name is given to new segment from Raidutil strcpy(newArraySegData[count].name_A, ""); } } else { newArraySegData[count].offsetLo = 0; newArraySegData[count].sizeLo = 0; // No name is given to new segment from Raidutil strcpy(newArraySegData[count].name_A, ""); } }//if !(newEndBlock > arraySizeInBlks) }//for(uSHORT count=0;countReset(); engine->Insert((uLONG)ARRAY_SEGMENTS_MAX); engine->Insert((uLONG)sizeof(arraySegment_S)); engine->Insert(&newArraySegData, sizeof(arraySegment_S)*ARRAY_SEGMENTS_MAX); err = engine->Send(MSG_RAID_SET_LUN_SEGMENTS, raidToSegmentTag); } }//if (!err.Is_Error()) delete idList; if (err.Is_Error()) { out->add_Item((char *) err); out->add_Item("\n"); } return (err); } //Gets Any Current Segment Data available for particular array DPT_RTN_T arraySegment::getSegmentData(DPT_TAG_T raidTag, arraySegment_S *segData_P ) { uLONG numSegments; uLONG entrySize; DPT_RTN_T retVal = MSG_RTN_IGNORED; arraySegment_S returnSegData[ARRAY_SEGMENTS_MAX]; memset( returnSegData, 0, sizeof(returnSegData)); memset( segData_P, 0, sizeof(returnSegData)); engine->Reset(); retVal = engine->Send(MSG_RAID_GET_LUN_SEGMENTS, raidTag); // if there are no segments defined, then MSG_RTN_IGNORED is returned, and so there is no previous valid // segment info if (retVal == MSG_RTN_COMPLETED) { engine->Extract (&numSegments, sizeof(numSegments)); engine->Extract (&entrySize, sizeof(entrySize)); // Double check entry size for correct structure if ( entrySize == sizeof( arraySegment_S)) { // get arraySegment Data engine->Extract(&returnSegData, sizeof(arraySegment_S)* numSegments); for (uSHORT count=0; count < ARRAY_SEGMENTS_MAX; count++) { //Only copy segments that have valid data inside if (count >= numSegments) { break; } // Copy over all data segData_P[count].flags1 = returnSegData[count].flags1; segData_P[count].offsetHi = returnSegData[count].offsetHi; segData_P[count].offsetLo = returnSegData[count].offsetLo; segData_P[count].sizeHi = returnSegData[count].sizeHi; segData_P[count].sizeLo = returnSegData[count].sizeLo; segData_P[count].reserved1 = returnSegData[count].reserved1; segData_P[count].reserved2 = returnSegData[count].reserved2; segData_P[count].reserved3 = returnSegData[count].reserved3; // if size is zero, then there should be no name in the name field if(!segData_P[count].sizeLo) { strcpy(segData_P[count].name_A, ""); } // copy over the name of the array... name array is 16 char big else { strncpy(segData_P[count].name_A, returnSegData[count].name_A, 16); } } engine->Reset(); engine->Insert((uLONG)8); engine->Insert((uLONG)sizeof(arraySegment_S)); engine->Insert(&returnSegData, sizeof(arraySegment_S)*ARRAY_SEGMENTS_MAX); retVal = engine->Send(MSG_RAID_SET_LUN_SEGMENTS, raidTag); }// entrySize == sizeof(arraySegment_S) // if entrySize is different than the arraySegment_S size, return error else { retVal = MSG_RTN_FAILED; } }// retVal == MSG_RTN_COMPLETED return retVal; } DPT_RTN_T arraySegment::showSegmentData(DPT_TAG_T raidTag, String_List &output) { DPT_RTN_T retVal = MSG_RTN_IGNORED; arraySegment_S segData[ARRAY_SEGMENTS_MAX]; DPTControllerMap map; const int BUF_LEN = 256; char temp_Buf[ BUF_LEN ]; char * String = NULL; getSegmentData ( raidTag, segData); uLONG segSizeInMb = 0; uLONG availableBlocks =0; uLONG extraBlocks; uLONG availableSizeInMb = 0; uLONG endBlock = 0; uLONG closestStartBlock = 0; engine->Reset(); retVal = engine->Send(MSG_GET_INFO, raidToSegmentTag ); dptCaddr_S *addr_P = &engine->devInfo_P->addr; output.add_Item(EventStrings[STR_LIST_SEGMENT_HEADER]); output.add_Item( STR_DEV_DIVIDING_LINE ); for(int count=0; count < ARRAY_SEGMENTS_MAX; count++) { //calculate end block for given segment endBlock =segData[count].sizeLo + segData[count].offsetLo-1; closestStartBlock = 0; String = map.getTargetString( addr_P->hba, addr_P->chan, addr_P->id, count); ///Printing Segment Info sprintf(temp_Buf, "%s",String); delete [] String; output.add_Item(temp_Buf); //calculate and display segment size in MB segSizeInMb = segData[count].sizeLo/2048; sprintf( temp_Buf, "%ld%s", segSizeInMb, EventStrings[STR_MB]); output.add_Item(temp_Buf); if (segData[count].sizeLo ==0&&count!=0) // Changed by Qi Zhu { sprintf( temp_Buf, "------"); output.add_Item(temp_Buf); } //calculate and display available size in MB else { for(int i=0; i < ARRAY_SEGMENTS_MAX; i++) { if (i == count) continue; // get the next closest start block else if (segData[i].offsetLo > endBlock) { closestStartBlock = segData[i].offsetLo; for (int j=0; j < ARRAY_SEGMENTS_MAX; j++) { if (j == count) continue; if ((segData[j].offsetLo > endBlock) && (segData[j].offsetLo < closestStartBlock)) closestStartBlock = segData[j].offsetLo; } } else if (closestStartBlock == 0) { closestStartBlock = arraySizeInBlks; } } availableBlocks = closestStartBlock - endBlock; if (count != 0 && segData[count].sizeLo) --availableBlocks ; extraBlocks = availableBlocks % segmentAlignment; availableBlocks -=extraBlocks; availableSizeInMb = availableBlocks/2048; sprintf( temp_Buf, "%ld %s",availableSizeInMb, EventStrings[STR_MB]); output.add_Item(temp_Buf); } //display start block of segment sprintf( temp_Buf, "%ld", segData[count].offsetLo); output.add_Item(temp_Buf); //calculate and display endBlock if(segData[count].sizeLo ==0) sprintf( temp_Buf, "%d", 0); else sprintf( temp_Buf, "%ld", endBlock); output.add_Item(temp_Buf); output.add_Item("\n"); } return (retVal); } Command &arraySegment::Clone() const { ENTER("Command &arraySegment::Clone() const"); EXIT(); return(*new arraySegment(*this)); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/segment.hpp0000664000175000000620000000540510044153336020333 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef SEGMENT_HPP #define SEGMENT_HPP /**************************************************************************** * * File Name: segment.hpp * Contributors: Edrick Estrada * Description: Class that enables functionality for segmentation in HBAs * that are segmentation compatible * *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class arraySegment:public Command { public: arraySegment::arraySegment(SCSI_Address raidToSeg, uLONG segSize[8], uLONG segOffset[8], bool showSeg); arraySegment(const arraySegment &new_arraySegment); virtual ~arraySegment(); Dpt_Error execute(String_List **output); DPT_RTN_T getSegmentData(DPT_TAG_T raidTag, arraySegment_S *segData); DPT_RTN_T showSegmentData(DPT_TAG_T raidTag, String_List &output); Command &Clone() const; private: SCSI_Address raidToSegment; DPT_TAG_T raidToSegmentTag; uLONG *segSizeArray; uLONG *segOffsetArray; static uSHORT segArrayCt; bool showArraySegData; uLONG arraySizeInBlks; uLONG segmentAlignment; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/setcache.cpp0000664000175000000620000002626510044153335020451 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 12/18/98 * ***************************************************************************** * * File Name: SetCache.cpp * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * * $Revision: 17 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include #include "setcache.hpp" #include "rustring.h" #include "ctlr_map.hpp" #include "status.hpp" #include "rscenum.h" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ extern char* EventStrings[]; /*** MACROS ***/ /*** PROTOTYPES ***/ extern void Flush( String_List * ); extern void add_Unique_Item( Int_List *component_List, DPT_TAG_T component_Tag ); /*** FUNCTIONS ***/ SetCache::SetCache( SCSI_Addr_List *addresses, int on, int rw ): address_List( addresses ) { ENTER( "SetCache::SetCache(" ); On = on; RW = rw; EXIT(); } SetCache::SetCache( const SetCache &new_SetCache ): address_List( new_SetCache.address_List ) { ENTER( "SetCache::SetCache( const SetCache &new_SetCache ):" ); On = new_SetCache.On; RW = new_SetCache.RW; EXIT(); } SetCache::~SetCache() { ENTER( "SetCache::~SetCache()" ); EXIT(); } Command::Dpt_Error SetCache::execute( String_List **output ) { ENTER( "Command::Dpt_Error SetCache::execute( String_List **output )" ); Dpt_Error err; Dpt_Error totalErr; DPT_TAG_T component_Tag; Int_List component_List; Init_Engine(); *output = new String_List(); address_List->reset_Next_Index(); while(address_List->num_Left()) { SCSI_Address component; bool more_Devs_Left = true; component = address_List->get_Next_Item(); for (int dev_Index = 0; more_Devs_Left; dev_Index++) { get_Devs_Type devs_Type; component_Tag = Get_Address_by_Index( component, dev_Index, &more_Devs_Left, &devs_Type ); if ( !more_Devs_Left ) { break; } if ((devs_Type != GET_SCSI_DASD) && (devs_Type != GET_RAID)) continue; engine->Reset(); err = engine->Send( MSG_GET_INFO, component_Tag ); DPT_TAG_T tempTag = engine->devInfo_P->raidParent; if ((tempTag == -1) && (!err.Is_Error())) { add_Unique_Item( &component_List, component_Tag ); } } } component_List.reset_Next_Index(); if ( component_List.num_Left() == 0 ) { totalErr |= Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; (*output)->add_Item((char *)totalErr); } else { // Actually affect the drives/arrays do { component_Tag = component_List.get_Next_Item(); char Buffer[ 256 ]; char check_byte; // SetCache the drive engine->Reset(); engine->Insert( (uCHAR) 0x08 ); engine->Insert( (uCHAR) 0x40 ); // get the page err = engine->Send( MSG_GET_MODE_PAGE, component_Tag ); if( err.Is_Error() ) { continue; } engine->Extract( Buffer, sizeof(Buffer) ); if ( On == 1 ) { if ( RW & 1 ) { Buffer[ 4 ] &= ~1; } if ( RW & 2 ) { Buffer[ 4 ] |= 4; } } else if ( On == 0 ) { if ( RW & 1 ) { Buffer[ 4 ] |= 1; } if ( RW & 2 ) { Buffer[ 4 ] &= ~4; } } check_byte = Buffer[4]; Buffer[ 0 ] = 0x40; Buffer[ 1 ] = 0; engine->Reset(); err = engine->Send( MSG_GET_INFO, component_Tag ); totalErr |= err; if( !err.Is_Error() ) { dptCaddr_S *addr_P = &engine->devInfo_P->addr; DPTControllerMap map; char * String = map.getTargetString( addr_P->hba, addr_P->chan, addr_P->id, addr_P->lun ); (**output).add_Item( String ); delete [] String; (**output).add_Item( " " ); get_Devs_Type devs_Type; #ifndef _DPT_STRICT_ALIGN devs_Type = (get_Devs_Type) (engine->devInfo_P->objType); #else // here's the story. "myTag" is of type DPT_TAG_T, // current_P->type is of type uSHORT. On a big endian // machine, we would be copying these two bytes into the // high end position if we memcpy'ed straight into type // from current_P->type, since it assumes the type's sizes // to be the same. Ok, so now instead we memcpy to the // same type (this gets away from the initial problem // on Solaris, the bus error that occurs when copying // from a boundary that isn't divisible by four). Then // we move the temp_Type to the "type" variable, and // the endianess is correct. uSHORT temp_Type; memcpy(&temp_Type, &engine->devInfo_P->objType, sizeof(uSHORT)); devs_Type = (get_Devs_Type)temp_Type; #endif if ( engine->devInfo_P->level <= 1 ) { devs_Type = GET_RAID; } switch ( devs_Type ) { case GET_RAID: case GET_ARRAY: switch( engine->devInfo_P->raidType ) { case RAID_TYPE_0: (**output).add_Item(EventStrings[STR_RAID_0]); break; case RAID_TYPE_1: (**output).add_Item(EventStrings[STR_RAID_1]); break; case RAID_TYPE_5: (**output).add_Item(EventStrings[STR_RAID_5]); break; case RAID_TYPE_HOT_SPARE: (**output).add_Item(EventStrings[STR_RAID_HOT_SPARE]); break; case RAID_TYPE_REDIRECT: (**output).add_Item(EventStrings[STR_RAID_REDIRECT]); break; default: (**output).add_Item(EventStrings[STR_UNKNOWN]); break; } break; case GET_SCSI_DASD: (**output).add_Item(EventStrings[STR_SCSI_DASD]); break; case GET_SCSI_SASD: (**output).add_Item(EventStrings[STR_SCSI_SASD]); break; case GET_SCSI_WORM: (**output).add_Item(EventStrings[STR_SCSI_WORM]); break; case GET_SCSI_JUKEBOX: (**output).add_Item(EventStrings[STR_SCSI_JUKEBOX]); break; case GET_SCSI_CD_ROM: (**output).add_Item(EventStrings[STR_SCSI_CD_ROM]); break; case GET_SCSI_OPTICAL: (**output).add_Item(EventStrings[STR_SCSI_OPTICAL]); break; case GET_SCSI_PRINTER: (**output).add_Item(EventStrings[STR_SCSI_PRINTER]); break; case GET_SCSI_PROCESSOR: (**output).add_Item(EventStrings[STR_SCSI_PROCESSOR]); break; case GET_SCSI_SCANNER: (**output).add_Item(EventStrings[STR_SCSI_SCANNER]); break; case GET_SCSI_HBA: (**output).add_Item(EventStrings[STR_HBA]); break; case GET_SCSI_BCD: (**output).add_Item(EventStrings[STR_SCSI_BRIDGE_CTLR]); break; case GET_RAID_BCD: (**output).add_Item(EventStrings[STR_RAID_BRIDGE_CTLR]); break; default: (**output).add_Item(EventStrings[STR_UNKNOWN]); break; } } if ( RW & 1 ) { (**output).add_Item(EventStrings[STR_READ_CACHE]); (**output).add_Item( (Buffer[ 4 ] & 1 ) ? EventStrings[STR_OFF] : EventStrings[STR_ON]); } if ( RW & 2 ) { (**output).add_Item(EventStrings[STR_WRITE_CACHE]); (**output).add_Item( (Buffer[ 4 ] & 4 ) ? EventStrings[STR_ON_WRITE_BACK] : EventStrings[STR_OFF_WRITE_THRU]); /* If it is on, then check if the battery is affecting this */ if ( Buffer[ 4 ] & 4 ) { // Only display a message if we have a forced write // through bit set. // Find the parent adapter, and ask it if it's battery // is OK. dptBatteryInfo_S batteryInfo; DPT_TAG_T hbaTag; if ((hbaTag = engine->devInfo_P->hbaTag) == 0) { hbaTag = engine->devInfo_P->attachedTo; } err = engine->Send( MSG_GET_BATTERY_INFO, hbaTag ); // don't save in totalErr - if board doesn't have battery, will return err //totalErr |= err; if( err.Is_Error() || ( engine->Extract( &batteryInfo, sizeof(batteryInfo) ) == 0 )) { memset (&batteryInfo, 0, sizeof(batteryInfo)); } if( !err.Is_Error() && ( batteryInfo.flags & BATTERY_FLAG_FORCED_WRITE_THROUGH )) { // Based on whether or not we are in one of the // following states display a message. switch (batteryInfo.status) { case BATTERY_STAT_MAINTENANCE_DISCHARGE: case BATTERY_STAT_MAINTENANCE_CHARGE: case BATTERY_STAT_INIT_CHARGE: case BATTERY_STAT_INIT_DISCHARGE: case BATTERY_STAT_INIT_RECHARGE: // Let the user know that the controller's // cache is in write through mode because we // are in a maint. or initial calibration // operation. (**output).add_Item (EventStrings[STR_OFF_DUE2_MAINT_OPER]); break; default: // Let the user know that their battery is // crapping out on them, because it has dropped // below the Auto write through threshold and // we are not in any type of calibration // operation. (**output).add_Item (EventStrings[STR_OFF_DUE2_BATTERY_COND]); } } } } (**output).add_Item( "\n" ); if ( On < 0 ) { continue; } engine->Reset(); engine->Insert( Buffer, sizeof(Buffer) ); err = engine->Send( MSG_SET_MODE_PAGE, component_Tag ); totalErr |= err; if( err.Is_Error() ) { // an error occurred, let's not count this as an error if the // change was made engine->Reset(); engine->Insert( (uCHAR) 0x08 ); engine->Insert( (uCHAR) 0x40 ); err = engine->Send( MSG_GET_MODE_PAGE, component_Tag ); engine->Extract( Buffer, sizeof(Buffer) ); if (Buffer[4] != check_byte) (**output).add_Item(EventStrings[STR_ERR_NO_CHANGE]); } } while( component_List.num_Left() ); } EXIT(); return( totalErr ); } Command &SetCache::Clone() const { ENTER( "Command &SetCache::Clone() const" ); EXIT(); return( *new SetCache( *this ) ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/setcache.hpp0000664000175000000620000000535110044153337020451 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef SETCACHE_HPP #define SETCACHE_HPP /**************************************************************************** * * Created: 12/18/98 * ***************************************************************************** * * File Name: SetCache.hpp * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * * $Revision: 1 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "scsilist.hpp" #include "intlist.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ class SetCache:public Command { public: SetCache::SetCache( SCSI_Addr_List *addresses, // a list of addresses int on, // Whether to enable or disable int rw // Read or write cacheing. ); // to delete raid tables on SetCache( const SetCache &new_SetCache ); virtual ~SetCache(); SetCache &operator = ( SetCache &right ); Dpt_Error execute( String_List **output ); Command &Clone() const; private: SCSI_Addr_List *address_List; int On, RW; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/setrate.cpp0000664000175000000620000002050310044153336020327 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 02/23/99 * ***************************************************************************** * * File Name: SetRate.cpp * Module: * Contributors: Mark Salyzyn * Description: This command sets the rebuild rate. * Version Control: * * $Revision: 16 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "setrate.hpp" #include "rustring.h" #include "ctlr_map.hpp" #include "ctype.h" #include "taskctrl.hpp" #include "rscenum.h" /*** CONSTANTS ***/ extern char* EventStrings[]; /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ extern void Flush( String_List * ); /*** FUNCTIONS ***/ SetRate::SetRate(int rate, SCSI_Addr_List *objs) :rebuildRate (rate), objsList(objs) { ENTER( "SetRate::SetRate(" ); EXIT(); } SetRate::SetRate( const SetRate &right ) { ENTER( "SetRate::SetRate(const SetRate &right):" ); rebuildRate = right.rebuildRate; objsList = right.objsList; EXIT(); } SetRate::~SetRate() { ENTER( "SetRate::~SetRate()" ); EXIT(); } Command::Dpt_Error SetRate::execute( String_List **output ) { ENTER( "Command::Dpt_Error SetRate::execute( String_List **output )" ); String_List *out; Dpt_Error err, thisErr; int firstTime = 1; bool obj_found = false; bool obj_valid = false; // allocate this object once for all functions. *output = out = new String_List(); Init_Engine(); while (objsList->num_Left()) { bool more_Devs_Left = true; SCSI_Address device_Address = objsList->get_Next_Item(); for (int dev_Index = 0; more_Devs_Left && !thisErr.Is_Error(); dev_Index++) { get_Devs_Type devs_Type; DPT_TAG_T this_Objs_Tag = Get_Address_by_Index (device_Address, dev_Index, &more_Devs_Left, &devs_Type); thisErr = engine->Send( MSG_GET_INFO, this_Objs_Tag ); DPT_TAG_T hbaTag; if (!more_Devs_Left) { break; // object not found } obj_found = true; // object found // only allow hba type if doing an inquiry on the whole hba if (devs_Type == GET_SCSI_HBA) { hbaTag = this_Objs_Tag; } else if ((hbaTag = engine->devInfo_P->hbaTag) == 0) { hbaTag = engine->devInfo_P->attachedTo; } // otherwise set speed in an LSU if ((devs_Type != GET_SCSI_HBA) && (devs_Type != GET_RAID) && (devs_Type != GET_RAID_HOT_SPARE)) { continue; } // this is a valid object for the change obj_valid = true; uSHORT thisRate = 0; if ((0 <= rebuildRate) && (rebuildRate <= 9)) { static uSHORT buildAmount[] = { 128, 512, 128, 256, 512, 1024, 2048, 4096, 8192, 16384 }; engine->Reset(); thisRate = (uSHORT)rebuildRate * 10; engine->Insert( thisRate ); engine->Insert( (uSHORT)buildAmount[rebuildRate] ); thisErr = engine->Send( MSG_RAID_SET_RATE, this_Objs_Tag ); if (thisErr.Is_Error()) { thisErr = engine->Send( MSG_RAID_SET_RATE, hbaTag ); } err |= thisErr; } if (!thisErr.Is_Error()) { thisErr = engine->Send( MSG_GET_INFO, this_Objs_Tag ); if (!thisErr.Is_Error()) { const int BUF_LEN = 256; char temp_Buf[ BUF_LEN ]; if (firstTime) { (**output).add_Item(EventStrings[STR_LIST_DEV_SET_RATE_HEADER]); (**output).add_Item(STR_DEV_DIVIDING_LINE); firstTime = 0; } PrintRaidAddress (this_Objs_Tag, out); char * Type_Ptr = EventStrings[STR_HBA]; if (devs_Type == GET_RAID_HOT_SPARE) Type_Ptr = EventStrings[STR_RAID_HOT_SPARE]; if ((devs_Type != GET_SCSI_HBA) && (devs_Type != GET_RAID_HOT_SPARE)) { Type_Ptr = EventStrings[STR_RAID]; switch( engine->devInfo_P->raidType ) { case RAID_TYPE_0: Type_Ptr = EventStrings[STR_RAID_0]; { bool obj_Found = false; get_Devs_Type dev_Type; DPT_TAG_T component; component = Get_Component(this_Objs_Tag, 0, &obj_Found, &dev_Type); if (( obj_Found ) && ( dev_Type == GET_RAID )) { err |= engine->Send( MSG_GET_INFO, component ); switch( engine->devInfo_P->raidType ) { case RAID_TYPE_1: Type_Ptr = EventStrings[STR_RAID_10]; break; case RAID_TYPE_5: Type_Ptr = EventStrings[STR_RAID_50]; break; } } } break; case RAID_TYPE_1: Type_Ptr = EventStrings[STR_RAID_1]; break; case RAID_TYPE_5: Type_Ptr = EventStrings[STR_RAID_5]; break; } } (**output).add_Item(Type_Ptr); # if 0 thisErr = engine->Send( MSG_GET_INFO, this_Objs_Tag ); if (!thisErr.Is_Error()) { thisRate = engine->devInfo_P->rbldFrequency; } # else thisErr = engine->Send( MSG_GET_INFO, hbaTag ); if (!thisErr.Is_Error()) { thisRate = engine->hbaInfo_P->rbldFrequency; } # endif if( thisRate > 99 ) { thisRate = 0; } int i = 0; static char * rateString[15]; rateString[i++] = ""; rateString[i++] = EventStrings[STR_CMD_LINE_TASK_RATE_SLOW]; rateString[i++] = ""; rateString[i++] = EventStrings[STR_CMD_LINE_TASK_RATE_MEDSLOW]; rateString[i++] = ""; rateString[i++] = EventStrings[STR_CMD_LINE_TASK_RATE_MED]; rateString[i++] = ""; rateString[i++] = EventStrings[STR_CMD_LINE_TASK_RATE_MEDFAST]; rateString[i++] = ""; rateString[i++] = EventStrings[STR_CMD_LINE_TASK_RATE_FAST]; sprintf( temp_Buf, "%d.%ds (%s)", thisRate / 10, thisRate % 10, rateString[thisRate / 10]); (**output).add_Item( temp_Buf ); (**output).add_Item( "\n" ); Flush ( *output); } } } } if (err.Is_Error()) { if (err == Dpt_Error::DPT_ERR_SCSI_IO) { err = Dpt_Error::DPT_ERR_NO_RAID_DEVICES; } (**output).add_Item((char *) err); } else { // only put out this error if no other errors occurred // and it was an invalid device if (obj_found == false) { err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; (**output).add_Item((char *) err); } else if (obj_valid == false) { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_THIS_DEVICE; (**output).add_Item((char *) err); } } EXIT(); return(err); } Command &SetRate::Clone() const { ENTER( "Command &SetRate::Clone() const" ); EXIT(); return( *new SetRate( *this ) ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/setrate.hpp0000664000175000000620000000501210044153333020327 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef SETRATE_HPP #define SETRATE_HPP /**************************************************************************** * * Created: 02/23/99 * ***************************************************************************** * * File Name: SetRate.hpp * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "scsilist.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class SetRate: public Command { public: // Set the (global) rebuild rate SetRate::SetRate(int rate, SCSI_Addr_List *objs); SetRate::SetRate(const SetRate &right); virtual ~SetRate(); Dpt_Error execute(String_List **output); Command &Clone() const; private: int rebuildRate; SCSI_Addr_List *objsList; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/setscfg.cpp0000664000175000000620000000567110044153336020327 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 12/20/00 * ***************************************************************************** * * File Name: setscfg.cpp * Module: * Contributors: Edrick Estrada * Description: * Version Control: * * $Revision: 1 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "setscfg.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ setscfg::setscfg () { ENTER("setscfg::setscfg ("); EXIT(); } setscfg::~setscfg() { ENTER( "setscfg::~setscfg()" ); EXIT(); } /******************************************************* Main exe loop *******************************************************/ Command::Dpt_Error setscfg::execute(String_List **output) { ENTER("Command::Dpt_Error setscfg::execute(String_List **output)"); Dpt_Error err; Init_Engine(); String_List *out; *output = out = new String_List(); engine->Reset(); if (engine->Send( MSG_RAID_HW_ENABLE ) == MSG_RTN_COMPLETED){ out->add_Item("System Configuration set."); out->add_Item("\n"); } return (err); } Command &setscfg::Clone() const { ENTER("Command &setscfg::Clone() const"); EXIT(); return(*new setscfg(*this)); }raidutils-0.0.6.orig/raidutil/setscfg.hpp0000664000175000000620000000453210044153334020325 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef SETSCFG_HPP #define SETSCFG_HPP /**************************************************************************** * * Created: 12/20/00 * ***************************************************************************** * * File Name: setscfg.hpp * Module: * Contributors: Edrick Estrada * Description: * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class setscfg:public Command { public: setscfg::setscfg(); virtual ~setscfg(); Dpt_Error execute(String_List **output); Command &Clone() const; private: }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/setspeed.cpp0000664000175000000620000002071510044153333020476 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 04/15/99 * ***************************************************************************** * * File Name: SetSpeed.cpp * Module: * Contributors: Mark Salyzyn * Description: This command sets the bus speed. * Version Control: * * $Revision: 13 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "modnvram.hpp" #include "setspeed.hpp" #include "rustring.h" #include "ctlr_map.hpp" #include "ctype.h" #include "rscenum.h" /*** CONSTANTS ***/ extern char* EventStrings[]; /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ extern void Flush( String_List * ); /*** FUNCTIONS ***/ SetSpeed::SetSpeed( int rate, int hba, int channel ) : Modify_NVRam( hba ) { ENTER( "SetSpeed::SetSpeed(" ); scsiSpeed = rate; hba_Num = hba; channelNum = channel; EXIT(); } SetSpeed::SetSpeed( const SetSpeed &right ) : Modify_NVRam( right.hba_Num ) { ENTER( "SetSpeed::SetSpeed(" ); //SetSpeed::SetSpeed( right.scsiSpeed, right.hba_Num, right.channelNum ); scsiSpeed = right.scsiSpeed; hba_Num = right.hba_Num; channelNum = right.channelNum; EXIT(); } SetSpeed::~SetSpeed() { ENTER( "SetSpeed::~SetSpeed()" ); EXIT(); } Command::Dpt_Error SetSpeed::execute( String_List **output ) { ENTER( "Command::Dpt_Error SetSpeed::execute( String_List **output )" ); Dpt_Error err; // allocate this object once for all functions. *output = new String_List(); Init_Engine(); bool more_Devs_Left = true; for( int dev_Index = 0; more_Devs_Left; dev_Index++ ) { DPT_TAG_T this_Objs_Tag = Get_HBA_by_Index( dev_Index, &more_Devs_Left ); if (( more_Devs_Left ) && (( hba_Num == -1 ) || ( hba_Num == dev_Index ))) { int first_time_through = 1; int hbaNum = hba_Num; Dpt_Error thisErr; hba_Num = dev_Index; thisErr = Read_NVRam_to_Buf(); if ( !thisErr.Is_Error() ) { int channel_Num, last_channel_Num, changed = 0; channel_Num = last_channel_Num = channelNum; if ( channelNum == -1 ) { channel_Num = 0; last_channel_Num = 2; } while (channel_Num <= last_channel_Num) { err |= Read_NVRam_to_Buf(); if ( !err.Is_Error() ) { switch (scsiSpeed) { case 0: if (get_NVRam_Buf()->getXfrRate(channel_Num) != 3) { changed = 1; } get_NVRam_Buf()->setXfrRate(channel_Num,3); break; case 5: if (get_NVRam_Buf()->getXfrRate(channel_Num) != 2) { changed = 1; } get_NVRam_Buf()->setXfrRate(channel_Num,2); break; case 8: if (get_NVRam_Buf()->getXfrRate(channel_Num) != 1) { changed = 1; } get_NVRam_Buf()->setXfrRate(channel_Num,1); break; case 10: if (get_NVRam_Buf()->getXfrRate(channel_Num) != 0) { changed = 1; } get_NVRam_Buf()->setXfrRate(channel_Num,0); break; case 20: if (get_NVRam_Buf()->getXfrRate(channel_Num) != 4) { changed = 1; } get_NVRam_Buf()->setXfrRate(channel_Num,4); break; case 40: if (get_NVRam_Buf()->getXfrRate(channel_Num) != 5) { changed = 1; } get_NVRam_Buf()->setXfrRate(channel_Num,5); break; #if 0 case 80: if (get_NVRam_Buf()->getXfrRate(channel_Num) != 6) { changed = 1; } get_NVRam_Buf()->setXfrRate(channel_Num,6); break; #endif default: break; } if ( changed ) { err |= Write_NVRam_from_Buf(); } ++channel_Num; } } //while if ( changed ) { err |= Write_NVRam_from_Buf(); } //err |= Read_NVRam_to_Buf(); if( !err.Is_Error() ) { err = engine->Send( MSG_GET_INFO, this_Objs_Tag ); if( !err.Is_Error() ) { int channel_Num, last_channel_Num; channel_Num = last_channel_Num = channelNum; if ( channelNum == -1 ) { channel_Num = 0; last_channel_Num = 2; } while (channel_Num <= last_channel_Num) { const int BUF_LEN = 256; dptCaddr_S *addr_P = &engine->devInfo_P->addr; char temp_Buf[ BUF_LEN ]; if ( first_time_through ) { (**output).add_Item(EventStrings[STR_BUS_SPEED_HEADER]); (**output).add_Item( STR_DEV_DIVIDING_LINE ); first_time_through = 0; } sprintf ( temp_Buf, "d%d", addr_P->hba ); (**output).add_Item( temp_Buf ); DPTControllerMap map; char* String = map.getChannelString( addr_P->hba, channel_Num ); if ( *String == 'c' ) { (**output).add_Item( String ); } else { char tmpBuf[12]; sprintf( tmpBuf, "d%db%d", addr_P->hba, channel_Num); (**output).add_Item( tmpBuf ); } /* for ( int bus = 0; bus < 3; ++bus ) { char * String = map->getChannelString( addr_P->hba, bus ); if (( *String == 'c' ) && ( bus == channel_Num )) { (**output).add_Item( String ); } else { char tmpBuf[12]; sprintf( tmpBuf, "d%db%d", addr_P->hba, channel_Num); } (**output).add_Item( ( *String == 'c' ) ? String : ( engine->hbaInfo_P->chanInfo[bus].flags ? "--" : " " )); delete String; } delete map; */ (**output).add_Item( Strip_Trailing_Whitespace( engine->devInfo_P->vendorID ) ); (**output).add_Item( Strip_Trailing_Whitespace( engine->devInfo_P->productID ) ); switch ( get_NVRam_Buf()->getXfrRate(channel_Num) ) { case 0: strcpy (temp_Buf, EventStrings[STR_10MHZ]); break; case 1: strcpy (temp_Buf, EventStrings[STR_8MHZ]); break; case 2: strcpy (temp_Buf, EventStrings[STR_5MHZ]); break; case 3: strcpy (temp_Buf, EventStrings[STR_ASYNC]); break; case 4: strcpy (temp_Buf, EventStrings[STR_20MHZ]); break; case 5: strcpy (temp_Buf, EventStrings[STR_40MHZ]); break; case 6: strcpy (temp_Buf, EventStrings[STR_80MHZ]); break; default: strcpy (temp_Buf, EventStrings[STR_UNKNOWN]); break; } (**output).add_Item (temp_Buf); ++channel_Num; (**output).add_Item("\n"); } } } } hba_Num = hbaNum; } } if( err.Is_Error() ) { (**output).add_Item( (char *) err ); } EXIT(); return( err ); } Command &SetSpeed::Clone() const { ENTER( "Command &SetSpeed::Clone() const" ); EXIT(); return( *new SetSpeed( *this ) ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/setspeed.hpp0000664000175000000620000000475010044153336020507 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef SETSPEED_HPP #define SETSPEED_HPP /**************************************************************************** * * Created: 04/15/99 * ***************************************************************************** * * File Name: SetSpeed.hpp * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class SetSpeed: public Modify_NVRam { public: // Set the maximum negotiate scsi speed SetSpeed( int speed, int hba = -1, int channel = -1 ); SetSpeed( const SetSpeed &right ); virtual ~SetSpeed(); Dpt_Error execute( String_List **output ); Command &Clone() const; private: int scsiSpeed; int channelNum; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/showinq.cpp0000664000175000000620000002425410044153336020357 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/17/98 * ***************************************************************************** * * File Name: ShowInq.cpp * Module: * Contributors: Lee Page * Description: This command displays the inquiry information for the device passed in. * Version Control: * * $Revision: 13 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "showinq.hpp" #include "rustring.h" #include "rscenum.h" #include #include extern char* EventStrings[]; /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Show_Inquiry::Show_Inquiry( SCSI_Address &address_to_List ): address( address_to_List ), show_Ctlr( address_to_List.id < 0 ) { ENTER( "Show_Inquiry::Show_Inquiry(" ); EXIT(); } Show_Inquiry::Show_Inquiry( const Show_Inquiry &right ): address( right.address ), show_Ctlr( right.show_Ctlr ) { ENTER( "Show_Inquiry::Show_Inquiry( const Show_Inquiry &right ):" ); EXIT(); } Show_Inquiry::~Show_Inquiry() { ENTER( "Show_Inquiry::~Show_Inquiry()" ); EXIT(); } Command::Dpt_Error Show_Inquiry::execute( String_List **output ) { ENTER( "Command::Dpt_Error Show_Inquiry::execute( String_List **output )" ); Dpt_Error err; Init_Engine(); // allocate this object once for all functions. *output = new String_List(); err = Show_Inq_on_Dev( **output, show_Ctlr ); if( err.Is_Error() ) { (**output).add_Item (EventStrings[STR_FAILURE]); (**output).add_Item ((char *) err); } else { if( (**output).get_Num_Items() == 0 ) { (**output).add_Item(EventStrings[STR_NO_ITEMS_FOUND]); err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; } } EXIT(); return( err ); } Command::Dpt_Error Show_Inquiry::Show_Inq_on_Dev( String_List &output, bool show_Controller ) { ENTER( "Command::Dpt_Error Show_Inquiry::Show_Inq_on_Dev(" ); DPT_TAG_T this_Objs_Tag; bool dev_Found = true; Dpt_Error err; get_Devs_Type devs_Type; if( show_Controller ) { devs_Type = GET_SCSI_HBA; this_Objs_Tag = Get_HBA_by_Index( address.hba, &dev_Found ); } else { // get inquiry info on device this_Objs_Tag = Get_Dev_by_Address( address, &devs_Type, &dev_Found ); } if( dev_Found ) { err = Show_Inq_on_This_Dev( output, this_Objs_Tag, devs_Type ); } else { output.add_Item(EventStrings[STR_NO_ITEMS_FOUND]); output.add_Item( "\n" ); } EXIT(); return( err ); } Command::Dpt_Error Show_Inquiry::Show_Inq_on_This_Dev( String_List &output, DPT_TAG_T this_Objs_Tag, get_Devs_Type devs_Type ) { ENTER( "Command::Dpt_Error Show_Inquiry::Show_Inq_on_This_Dev(" ); Dpt_Error err; const long ONE_K = 1024; err = engine->Send( MSG_GET_INFO, this_Objs_Tag ); if( !err.Is_Error() ) { const int BUF_LEN = 256; char address_Buf[ BUF_LEN ]; char vendor_Product_Info_Buf[ BUF_LEN ]; char bus_Type_and_Address_Buf[ BUF_LEN ]; char fw_Revision_Buf[ BUF_LEN ]; char *obj_Type_Str = EventStrings[STR_UNKNOWN]; char *raid_Type_Ptr = 0; bool show_Capacity = false; long capacity_in_Mb; address_Buf[ 0 ] = 0; vendor_Product_Info_Buf[ 0 ] = 0; bus_Type_and_Address_Buf[ 0 ] = 0; fw_Revision_Buf[ 0 ] = 0; { long capacity_in_Kb; capacity_in_Kb = engine->devInfo_P->capacity.maxLBA / 2; capacity_in_Mb = capacity_in_Kb / ONE_K; } output.add_Item(EventStrings[STR_INQ_TITLE]); output.add_Item( "\n" ); output.add_Item( STR_DEV_DIVIDING_LINE ); switch( devs_Type ) { case GET_SCSI_DASD: obj_Type_Str = EventStrings[STR_SCSI_DASD]; show_Capacity = true; goto SHOW_PHYSICAL; SHOW_PHYSICAL: output.add_Item(EventStrings[STR_MANUFACTURER]); output.add_Item( ":" ); output.add_Item( Strip_Trailing_Whitespace( engine->devInfo_P->vendorID ) ); output.add_Item( "\n" ); output.add_Item(EventStrings[STR_MODEL]); output.add_Item( ":" ); output.add_Item( Strip_Trailing_Whitespace( engine->devInfo_P->productID ) ); output.add_Item( "\n" ); output.add_Item(EventStrings[STR_REV]); output.add_Item( ":" ); output.add_Item( engine->devInfo_P->revision ); output.add_Item( "\n" ); output.add_Item(EventStrings[STR_TYPE]); output.add_Item( ":" ); output.add_Item( obj_Type_Str ); output.add_Item( "\n" ); output.add_Item(EventStrings[STR_REMOVABLE]); output.add_Item( ":" ); output.add_Item( ( engine->devInfo_P->flags & FLG_DEV_REMOVEABLE)? EventStrings[STR_YES]:EventStrings[STR_NO]); output.add_Item( "\n" ); break; case GET_SCSI_SASD: obj_Type_Str = EventStrings[STR_SCSI_SASD]; show_Capacity = false; goto SHOW_PHYSICAL; case GET_SCSI_WORM: obj_Type_Str = EventStrings[STR_SCSI_WORM]; show_Capacity = true; goto SHOW_PHYSICAL; case GET_SCSI_JUKEBOX: obj_Type_Str = EventStrings[STR_SCSI_JUKEBOX]; show_Capacity = false; goto SHOW_PHYSICAL; case GET_SCSI_CD_ROM: obj_Type_Str = EventStrings[STR_SCSI_CD_ROM]; show_Capacity = false; goto SHOW_PHYSICAL; case GET_SCSI_OPTICAL: obj_Type_Str = EventStrings[STR_SCSI_OPTICAL]; show_Capacity = true; goto SHOW_PHYSICAL; case GET_SCSI_PRINTER: obj_Type_Str = EventStrings[STR_SCSI_PRINTER]; output.add_Item( obj_Type_Str ); break; case GET_SCSI_PROCESSOR: obj_Type_Str = EventStrings[STR_SCSI_PROCESSOR]; output.add_Item( obj_Type_Str ); break; case GET_SCSI_SCANNER: obj_Type_Str = EventStrings[STR_SCSI_SCANNER]; output.add_Item( obj_Type_Str ); break; case GET_SCSI_PRO_ROOT: obj_Type_Str = EventStrings[STR_SCSI_PRO_ROOT]; output.add_Item( obj_Type_Str ); break; case GET_SCSI_PRO_CONNECTION: obj_Type_Str = EventStrings[STR_SCSI_PRO_CONNECTION]; output.add_Item( obj_Type_Str ); break; case GET_SCSI_HBA: { // char *bus_Type_Str; obj_Type_Str = EventStrings[STR_HBA]; /* { long chache_Size_in_Kb; chache_Size_in_Kb = engine->hbaInfo_P->memSize; chache_Size_in_Mb = chache_Size_in_Kb / ONE_K / ONE_K; } switch( hba_Info->busType ) { case HBA_BUS_EISA: bus_Type_Str = STR_EISA; bus_Base_Address= hba_Info->ioAddr.std.eisa; break; case HBA_BUS_ISA: bus_Type_Str = STR_ISA; bus_Base_Address= hba_Info->ioAddr.std.isa; break; case HBA_BUS_PCI: bus_Type_Str = STR_PCI; bus_Base_Address= hba_Info->ioAddr.pci; break; } */ output.add_Item(EventStrings[STR_MANUFACTURER]); output.add_Item( ":" ); output.add_Item( Strip_Trailing_Whitespace( engine->devInfo_P->vendorID ) ); output.add_Item( "\n" ); output.add_Item(EventStrings[STR_MODEL]); output.add_Item( ":" ); output.add_Item( Strip_Trailing_Whitespace( engine->devInfo_P->productID ) ); output.add_Item( "\n" ); output.add_Item(EventStrings[STR_REV]); output.add_Item( ":" ); output.add_Item( engine->devInfo_P->revision ); output.add_Item( "\n" ); output.add_Item(EventStrings[STR_TYPE]); output.add_Item( ":" ); output.add_Item( obj_Type_Str ); output.add_Item( "\n" ); // output.add_Item( ( engine->devInfo_P->flags & FLG_DEV_REMOVEABLE )? STR_YES:STR_NO ); output.add_Item( "\n" ); } break; case GET_SCSI_BCD: obj_Type_Str = EventStrings[STR_SCSI_BRIDGE_CTLR]; break; case GET_RAID_BCD: obj_Type_Str = EventStrings[STR_RAID_BRIDGE_CTLR]; break; case GET_RAID: case GET_RAID_HOT_SPARE: case GET_RAID_REDIRECT: obj_Type_Str = EventStrings[STR_RAID]; switch( engine->devInfo_P->raidType ) { case RAID_TYPE_0: raid_Type_Ptr = EventStrings[STR_RAID_0]; goto PRINT_RAID; case RAID_TYPE_1: raid_Type_Ptr = EventStrings[STR_RAID_1]; goto PRINT_RAID; case RAID_TYPE_5: raid_Type_Ptr = EventStrings[STR_RAID_5]; goto PRINT_RAID; PRINT_RAID: // raid_Type_Ptr = raid_Type_Ptr; break; case RAID_TYPE_HOT_SPARE: raid_Type_Ptr = EventStrings[STR_RAID_HOT_SPARE]; goto PRINT_STANDALONE; case RAID_TYPE_REDIRECT: raid_Type_Ptr = EventStrings[STR_RAID_REDIRECT]; goto PRINT_STANDALONE; PRINT_STANDALONE: break; default: raid_Type_Ptr = EventStrings[STR_UNKNOWN]; break; } break; } } EXIT(); return( err ); } Command &Show_Inquiry::Clone() const { ENTER( "Command &Show_Inquiry::Clone() const" ); EXIT(); return( *new Show_Inquiry( *this ) ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/showinq.hpp0000664000175000000620000000536510044153334020364 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef SHOWINQ_HPP #define SHOWINQ_HPP /**************************************************************************** * * Created: 8/7/98 * ***************************************************************************** * * File Name: ShowInq.hpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 5 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ class Show_Inquiry: public Command { public: Show_Inquiry( SCSI_Address &address_to_List ); Show_Inquiry( const Show_Inquiry &right ); virtual ~Show_Inquiry(); Dpt_Error execute( String_List **output ); Command &Clone() const; private: Dpt_Error Show_Inq_on_Dev( String_List &output, bool show_Controller ); Dpt_Error Show_Inq_on_This_Dev( String_List &output, DPT_TAG_T this_Objs_Tag, get_Devs_Type devs_Type ); SCSI_Address address; bool show_Ctlr; // if this is false, then it shows a physical device. }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/status.cpp0000664000175000000620000005317610044153337020220 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 12/15/98 * ***************************************************************************** * * File Name: Status.cpp * Module: * Contributors: Mark Salyzyn * Description: Status handling * Version Control: * *****************************************************************************/ /*** INCLUDES ***/ #include #include #include "status.hpp" #include "rustring.h" #include "engiface.hpp" #include "rscenum.h" #include "rscstrs.h" /*** CONSTANTS ***/ extern int FID_RESET_OUTBUFF; extern uSHORT PHYS_LIST_SIZE; /*** TYPES ***/ /*** STATIC DATA ***/ extern char* EventStrings[]; static int displaystats[] = { STR_OPTIMAL, STR_WARNING, STR_DRIVE_FAILED, STR_IMPACTED, STR_MISSING, //_NO_CONFIG, STR_CURRENT_CREATE, STR_BUILDING, STR_MISSING}; //_NO_ATTACH}; static int LAPmainstatus[] = { STR_OPTIMAL, STR_DEGRADED, STR_RECONSTRUCT, STR_EXPAND, STR_DEAD, STR_ARRAY_WARNING2, STR_BLANK, STR_BLANK, STR_BLANK, STR_BLANK, STR_VERIFY, STR_BUILDING, STR_NON_ARRAYED }; static int PAPmainstatus[] = { STR_OPTIMAL, STR_NON_EXIST, STR_UNINITIALIZED, STR_FAILED_DRIVE, STR_REPLACED_DRIVE2, STR_DRIVE_WARNING2, STR_PARAM_MISMATCH2, STR_BLANK, STR_FORMAT_UNIT2, STR_BLANK, STR_UNINITIALIZED, STR_DRIVE_VERIFY, STR_NON_ARRAYED }; static int maxmain[2] = {12, 12}; static int maxsub[2] = {12, 12}; /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Dpt_Status::Dpt_Status ( DPT_TAG_T thisTag ) { memset ( &curLBA, 0, sizeof(curLBA) + sizeof(maxLBA) + sizeof(status) + sizeof(temp) ); Command::engine->Reset(); if ( Command::engine->Send ( MSG_RAID_GET_PROGRESS, thisTag ) != MSG_RTN_IGNORED ) { Command::engine->Extract ( &curLBA, sizeof(curLBA) ); Command::engine->Extract ( &maxLBA, sizeof(maxLBA) ); Command::engine->Extract ( &status, sizeof(status) ); } else { // Our initial MSG was ignored so do a get info for the status. if ( Command::engine->Send( MSG_UPDATE_STATUS, thisTag ) != MSG_RTN_FAILED ) { Command::engine->Extract( &status, sizeof(dptCstatus_S) ); if (status.flags == 0) { memcpy(&status, &Command::engine->devInfo_P->status, sizeof(status)); } } } } Dpt_Status::~Dpt_Status ( void ) { if ( temp ) { delete [] temp; temp = (char *)NULL; } } Dpt_Status::operator char *() { char *class_Str = EventStrings[STR_UNKNOWN]; char *Str = NULL; int page = 0; if ( temp ) { delete [] temp; temp = (char *)NULL; } if (status.flags & FLG_STAT_LAP) page = 1; // if the status didn't come from log or phys pages, just // set to the display status (from SM) -kds CR 2366 if (!(status.flags & FLG_STAT_LAP) && !(status.flags & FLG_STAT_PAP)) { Str = EventStrings[displaystats[status.display]]; } else if ((status.flags & FLG_STAT_PAP) && (status.main == 2) && (status.sub == 1)) { // in SM is Uninitialized, Not Built Str = EventStrings[STR_UNINITIALIZED]; } // if optimal, set, except if verifying else if ((status.display == DPT_STAT_OPTIMAL) && (status.main != 10)) { Str = EventStrings[STR_OPTIMAL]; } else if ((status.flags & FLG_STAT_PAP) && (status.main == 4) && (status.sub == 1)) { // in SM is Parent Array Building Str = EventStrings[STR_PARENT_BUILDING]; } // do some special case status values else if ((status.flags & FLG_STAT_LAP) && (status.main == 4) && (status.sub == 0)) { // if hot spare, set up failed hot spare string if (Command::engine->devInfo_P->raidParent != 0xffffffff) { // get info for parent to see if hot spare if (MSG_RTN_COMPLETED == Command::engine->Send(MSG_GET_INFO, Command::engine->devInfo_P->raidParent)) { if (Command::engine->devInfo_P->raidType == RAID_HOT_SPARE) Str = EventStrings[STR_FAILED_HOTSPARE]; } } // no parent, but we know it is failed // just put up generic "Failed" message. else { Str = EventStrings[STR_FAILED]; } } // if invalid code, return generic string else if ((status.main > maxmain[page]) || (status.sub > maxsub[page])) { if (!(status.flags & FLG_STAT_PAP) && (status.main != 0x7f)) Str = EventStrings[STR_NO_INFO_AVAIL]; } else if ((status.flags & FLG_STAT_PAP) && (status.main == 0x7f)) { Str = EventStrings[STR_FORMATTING]; } else if ((status.flags & FLG_STAT_PAP) && (status.main == 8) && (status.sub == 1)) { Str = EventStrings[STR_PARENT_EXPANDING]; } else if (status.flags & FLG_STAT_PAP) { Str = EventStrings[PAPmainstatus[status.main]]; } else { Str = EventStrings[LAPmainstatus[status.main]]; } /* class_Str = STR_LOGICAL; switch( status.main ) { case LAPM_OPTIMAL: switch( status.sub ) { case LAPS_OPTIMAL: Str = STR_OPTIMAL; break; case LAPS_PARAM_MISMATCH: Str = STR_PARAMETER_MISMATCH; break; case LAPS_REPLACED_FORMAT: Str = STR_REPLACED_FORMAT; break; } break; case LAPM_DEGRADED: switch( status.sub ) { case LAPS_FAILED: Str = STR_DRIVE_FAILED; break; case LAPS_COMPONENT_FAIL: Str = STR_COMPONENT_FAIL; break; } break; case LAPM_REBUILD: switch( status.sub ) { case LAPS_REBUILD: Str = STR_REBUILD; break; } break; case LAPM_EXPAND: switch( status.sub ) { case LAPS_EXPAND: Str = STR_EXPAND; break; } break; case LAPM_FAILED: switch( status.sub ) { case LAPS_MULTIPLE_DRIVES: case LAPS_BUILD_REQUIRED: // Str = STR_LSU_FAILED; Str = STR_DEAD; break; case LAPS_BUILD: Str = STR_BUILDING; break; // case LAPS_BUILD_REQUIRED: // Str = STR_BUILD_REQUIRED; break; case LAPS_WRONG_REPLACE: Str = STR_WRONG_REPLACE; break; } break; case LAPM_WARN: switch( status.sub ) { case LAPS_VERIFY_FAIL: Str = STR_VERIFY_FAIL; break; } break; case LAPM_VERIFY: switch( status.sub ) { case LAPS_VERIFY: Str = STR_VERIFY; break; case LAPS_VERIFY_FIX: Str = STR_VERIFY_FIX; break; } break; case LAPM_BUILD: switch( status.sub ) { case LAPS_BUILD_INIT: Str = STR_BUILDING; break; } break; case LAPM_NO_RAID_TABLE: switch( status.sub ) { case LAPS_NO_RAID_TABLE: Str = STR_NO_RAID_TABLE; break; } break; } } else if ( status.flags & FLG_STAT_PAP ) { class_Str = "Physical"; switch( status.main ) { case PAPM_OPTIMAL: switch( status.sub ) { case PAPS_OPTIMAL: Str = STR_OPTIMAL; break; case PAPS_SSMISSING: Str = STR_SSMISSING; break; case PAPS_REDUNDANT_CTLR: Str = STR_REDUNDANT_CTLR; break; } break; case PAPM_NON_EXISTENT: switch( status.sub ) { case PAPS_NON_EXISTENT: Str = STR_NON_EXISTENT; break; case PAPS_NS_CHAN: Str = STR_NS_CHAN; break; case PAPS_NS_ID: Str = STR_NS_ID; break; case PAPS_NS_CHAN_ID: Str = STR_NS_CHAN_ID; break; } break; case PAPM_UNCONFIGURED: switch( status.sub ) { case PAPS_UNCONFIGURED: Str = STR_UNCONFIGURED; break; case PAPS_NOT_BUILT: Str = STR_UNINITIALIZED; //kds CR 2366 - to match SM Str = STR_NOT_BUILT; // really, to match, would include ", Not Built" break; } break; case PAPM_FAILED: switch( status.sub ) { case PAPS_FAILED: Str = STR_DRIVE_FAILED; break; case PAPS_COMPONENT_FAIL: Str = STR_COMPONENT_FAIL; break; case PAPS_TUR_FAIL: Str = STR_TUR_FAIL; break; case PAPS_BUILD_FAIL: Str = STR_BUILD_FAIL; break; case PAPS_WRITE_FAIL: Str = STR_WRITE_FAIL; break; case PAPS_FORCE_FAIL: Str = STR_FORCE_FAIL; break; case PAPS_START_FAIL: Str = STR_START_FAIL; break; } break; case PAPM_REPLACED: switch( status.sub ) { case PAPS_NO_ACTION: Str = STR_REPLACED; break; case PAPS_BUILD: Str = STR_BUILDING; break; case PAPS_REBUILD: Str = STR_REBUILD; #if !defined _DPT_SOLARIS if (status.display == DSPLY_STAT_IMPACTED) Str = STR_IMPACTED; #endif break; } break; case PAPM_WARNING: switch( status.sub ) { case PAPS_WARNING: Str = STR_WARNING; break; case PAPS_VERIFY_FAIL: Str = STR_VERIFY_FAIL; break; } break; case PAPM_PARAMETER_MISMATCH: switch( status.sub ) { case PAPS_PARAMETER_MISMATCH: Str = STR_PARAMETER_MISMATCH; break; case PAPS_SECTOR_SIZE: Str = STR_SECTOR_SIZE; break; case PAPS_CAPACITY: Str = STR_CAPACITY; break; case PAPS_MODE_PARAMS: Str = STR_MODE_PARAMS; break; case PAPS_SERIAL_NUM: Str = STR_SERIAL_NUM; break; case PAPS_CHAN_MISMATCH: Str = STR_CHAN_MISMATCH; break; case PAPS_ID_MISMATCH: Str = STR_ID_MISMATCH; break; } break; case PAPM_HBA: switch( status.sub ) { case PAPS_HBA: Str = STR_HBA_MISMATCH; break; } break; case PAPM_BUILD: switch( status.sub ) { case PAPS_BUILD_INIT: Str = STR_BUILDING; break; case PAPS_BUILD_EXPAND: Str = STR_EXPAND; break; } break; case PAPM_BAD_REPLACEMENT: switch( status.sub ) { case PAPS_WRONG_DRIVE: Str = STR_WRONG_DRIVE; break; } break; case PAPM_UNINITIALIZED: Str = STR_UNINITIALIZED; break; case PAPM_VERIFY: switch( status.sub ) { case PAPS_VERIFY: Str = STR_VERIFY; break; case PAPS_VERIFY_FIX: Str = STR_VERIFY_FIX; break; } break; case PAPM_NO_RAID_TABLE: switch( status.sub ) { case PAPS_NO_RAID_TABLE: Str = STR_NO_RAID_TABLE; break; } break; case PMAIN_STAT_FORMAT: switch( status.sub ) { case PSUB_STAT_IN_PROGRESS: Str = EventStrings[STR_FORMATTING]; break; case PSUB_STAT_CLEARING: Str = STR_CLEAR; break; case PSUB_STAT_FMT_FAILED: Str = STR_FORMAT_FAILED; break; case PSUB_STAT_CLR_FAILED: Str = STR_CLEAR_FAILED; break; } break; case SMAIN_FLASH_MODE: switch( status.sub ) { case SSUB_FLASH_INIT: Str = STR_FLASH_INIT; break; case SSUB_FLASH_WRITE: Str = STR_FLASH; break; } break; case SMAIN_FW_DIAGNOSTIC: switch( status.sub ) { case SSUB_BUFFER_READ: Str = STR_DIAG_READ; break; case SSUB_BUFFER_RW: Str = STR_DIAG_RW; break; case SSUB_MEDIA_READ: Str = STR_DIAG_MEDIA_READ; break; case SSUB_MEDIA_RW: Str = STR_DIAG_MEDIA_RW; break; case SSUB_VERIFY: Str = STR_DIAG_VERIFY; break; case SSUB_REBUILD: Str = STR_DIAG_REBUILD; break; case SSUB_BUILD: Str = STR_DIAG_BUILD; break; case SSUB_EXPAND: Str = STR_DIAG_EXPAND; break; } break; case SMAIN_BLINK_LED: Str = STR_UNKNOWN; switch ( status.sub ) { // Hardware Errors case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: // Type & User are same fault case 0x08: case 0x09: case 0x0A: case 0x0B: case 0x0C: case 0x0E: case 0x0F: Str = STR_BLINK_HWERR; break; case 0x11: Str = STR_BLINK_UNDEF; break; case 0x12: Str = STR_BLINK_0X12; break; case 0x13: Str = STR_BLINK_UNDEF; break; case 0x14: Str = STR_BLINK_UNDEF; break; case 0x15: Str = STR_BLINK_0X15; break; case 0x16: Str = STR_BLINK_0X16; break; case 0x17: Str = STR_BLINK_0X17; break; case 0x1D: case 0x1E: case 0x1F: case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: Str = STR_BLINK_UNDEF; break; case 0x26: case 0x27: Str = STR_BLINK_PCIXFERERR; break; case 0x28: Str = STR_BLINK_PCIPARERR; break; case 0x29: case 0x2A: Str = STR_BLINK_UNDEF; break; case 0x2B: Str = STR_BLINK_PCICFGERR; break; case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: case 0x3A: case 0x3B: case 0x3C: case 0x3E: case 0x3F: case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x50: case 0x51: case 0x52: case 0x53: case 0x58: case 0x59: case 0x5A: Str = STR_BLINK_UNDEF; break; case 0x5B: Str = STR_BLINK_ECCMISMATCH; break; case 0x5C: case 0x5D: case 0x5E: case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67: case 0x70: case 0x71: case 0x72: Str = STR_BLINK_UNDEF; break; case 0x73: // if (strncmp(gHba_P->productID, "PM3", 3) == 0) // { Str = STR_BLINK_MEMPM3XXX; // } // else if (strncmp(gHba_P->productID, "PM2", 3) == 0) // { // Str = STR_BLINK_MEMPM2XXX; // } // else // { // Str = STR_BLINK_UNDEF; // } break; case 0x74: case 0x75: Str = STR_BLINK_UNDEF; break; case 0x76: Str = STR_BLINK_DOMMISMATCH; break; case 0x77: Str = STR_BLINK_DOMINVALID; break; case 0x81: case 0x98: case 0x99: case 0xA0: case 0xA1: case 0xA2: case 0xA3: case 0xA4: case 0xA5: case 0xA6: case 0xA7: case 0xA8: case 0xA9: case 0xAA: case 0xAB: case 0xAC: Str = STR_BLINK_UNDEF; break; case 0xB0: Str = STR_BLINK_UNSUPP_SG; break; case 0xB1: case 0xB2: case 0xB3: case 0xB4: case 0xB5: case 0xB6: case 0xB7: case 0xB8: case 0xB9: case 0xBA: case 0xBB: case 0xBD: // To Be Done case 0xBF: // We Be F...ed case 0xC0: case 0xC1: case 0xC2: case 0xC3: case 0xC4: case 0xC5: case 0xC6: case 0xC7: case 0xC8: case 0xC9: case 0xCA: case 0xCB: case 0xCC: case 0xCD: case 0xCE: case 0xD1: case 0xD2: case 0xD3: Str = STR_BLINK_UNDEF; break; case 0xD4: Str = STR_BLINK_NVRAM_CLR; break; case 0xD8: Str = STR_BLINK_UNDEF; break; case 0xE0: Str = STR_BLINK_CACHE_INV; break; case 0xE1: Str = STR_BLINK_CACHE_MIS; break; case 0xE2: Str = STR_BLINK_CACHE_OUT; break; case 0xE3: case 0xE4: Str = STR_BLINK_UNDEF; break; case 0xE8: // HX I2C Str = STR_BLINK_HW_FAIL1; break; case 0xE9: // SX I2C Str = STR_BLINK_HW_FAIL2; break; case 0xEB: // NV I2C Str = STR_BLINK_HW_FAIL3; break; case 0xEC: case 0xED: case 0xEE: case 0xEF: Str = STR_BLINK_HW_UNKNOWN; break; case 0xF0: Str = STR_BLINK_OS_TASK_FAIL; break; case 0xF1: Str = STR_BLINK_OS_HISR_FAIL; break; case 0xF2: Str = STR_BLINK_OS_QUECR_FAIL; break; case 0xF3: Str = STR_BLINK_OS_SEM_FAIL; break; case 0xF4: Str = STR_BLINK_OS_LISR_FAIL; break; case 0xF5: Str = STR_BLINK_OS_QUEUE_FAIL; break; case 0xFE: Str = STR_BLINK_OS_ERR_LOOP; break; case 0xFF: Str = STR_BLINK_OS_GEN_ERR; break; default: Str = STR_BLINK_UNDEF; break; } sprintf ( temp = new char [ 21 + strlen (Str) ], "Blink Code 0x%x (%s)", status.sub, Str ); break; } }*/ if (temp == (char *)NULL) { if (Str == (char *)NULL) { sprintf (temp = new char [ 11 + strlen (class_Str) ], "%s %x:%x", class_Str, status.main, status.sub ); } else if (( curLBA != 0 ) && ( curLBA < maxLBA )) { sprintf (temp = new char [ strlen (Str) + 6 ], "%s %d%%", Str, (int)(( curLBA + ( maxLBA / 200L )) / ( maxLBA / 100L )) ); } // CR2037 - since this is not building yet (it is pending) // let's say "Building/Pending" instead of "Building" // but if dual level, bottom raid cannot be "/Pending", only "Building" else if (((Command::engine->devInfo_P->raidType == Command::RAID_TYPE_1) || (Command::engine->devInfo_P->raidType == Command::RAID_TYPE_5)) && (Command::engine->devInfo_P->raidParent != -1)) { return( Str ); } else if ((status.flags & FLG_STAT_LAP) && ((status.main == LAPM_BUILD) || (status.main == LAPM_REBUILD) || (status.main == LAPM_VERIFY)) && (curLBA == 0)) { sprintf (temp = new char [ strlen (Str) + 10 ], EventStrings[STR_STR_OVER_PENDING], Str); } else { return( Str ); } } return (temp); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/status.hpp0000664000175000000620000000647310044153336020222 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef STATUS_HPP #define STATUS_HPP /**************************************************************************** * * Created: 12/15/98 * ***************************************************************************** * * File Name: Status.hpp * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * *****************************************************************************/ /*** INCLUDES ***/ #include "osd_util.h" #include "eng_std.h" #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ #if (FLG_STAT_LAP == 0x20) # define FLG_STAT_LAP_SHIFT 5 #else # error FLG_STAT_LAP_SHIFT undefined #endif /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Dpt_Status { friend class Command; public: enum dpt_Status { // gross errors that correspond directly to engine statii DPT_STAT_OPTIMAL = DSPLY_STAT_OPTIMAL, DPT_STAT_WARNING = DSPLY_STAT_WARNING, // Yellow DPT_STAT_FAILED = DSPLY_STAT_FAILED, // Red DPT_STAT_IMPACTED = DSPLY_STAT_IMPACTED, // White DPT_STAT_ABSENT = DSPLY_STAT_ABSENT, DPT_STAT_GHOST = DSPLY_STAT_GHOST, // Lt Blue DPT_STAT_BUILD = DSPLY_STAT_BUILD, // Blue DPT_STAT_MISSING = DSPLY_STAT_MISSING // Black }; Dpt_Status( DPT_TAG_T thisTag ); ~Dpt_Status( void ); operator char *(); // Return string of detailed status #if defined _DPT_SCO operator dpt_Status () const #else operator enum dpt_Status () const #endif { return ( (enum dpt_Status) status.display ); } operator int () const { return ( ((status.flags & FLG_STAT_LAP) << (7 - FLG_STAT_LAP_SHIFT)) | ( status.main & 0x000F ) | (( status.sub & 0x0007 ) << 4 ) ); } private: uLONG curLBA; uLONG maxLBA; struct dptCstatus_S status; char * temp; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/strlist.cpp0000664000175000000620000001772610044153336020401 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/17/98 * ***************************************************************************** * * File Name: String_List.cpp * Module: * Contributors: Lee Page * Description: Encapsulates an array of C-strings. Used as a least-common denominator solution in coding C++ without STL. * Version Control: * * $Revision: 7 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "debug.hpp" #include "strlist.hpp" #include /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ String_List::String_List(): num_Items( 0 ), items( 0 ), next_Item_Index( 0 ) { ENTER( "String_List::String_List():" ); EXIT(); } String_List::String_List( const String_List &right ) { ENTER( "String_List::String_List( const String_List &right )" ); Copy_Items( right ); num_Items = right.num_Items; next_Item_Index = right.next_Item_Index; EXIT(); } String_List::~String_List() { ENTER( "String_List::~String_List()" ); Destroy_Items(); EXIT(); } String_List &String_List::operator += ( const String_List &right ) { ENTER( "String_List &String_List::operator += ( const String_List &right )" ); int int_Index; char **temp_Items; // allocate a larger buffer and copy over the existing entries temp_Items = new char *[ num_Items + right.num_Items ]; memcpy( temp_Items, items, num_Items * sizeof( char * ) ); delete [] items; items = temp_Items; // now copy over the ones being added for( int_Index = 0; int_Index < right.num_Items; int_Index++ ) { items[ int_Index + num_Items ] = right.get_Item( int_Index ); } num_Items += right.num_Items; EXIT(); return( *this ); } const String_List & String_List::operator = ( const String_List &right ) { ENTER( "const String_List & String_List::operator = ( const String_List &right )" ); Destroy_Items(); Copy_Items( right ); num_Items = right.num_Items; next_Item_Index = right.next_Item_Index; EXIT(); return( *this ); } /**************************************************************************** * * Function Name: add_Str(), Created:7/17/98 * * Description: Appends a string to the end of the list of strings. * * Notes: * *****************************************************************************/ void String_List::add_Item( const char *str ) { ENTER( "void String_List::add_Item( const char *str )" ); char **temp_Strings; temp_Strings = new char *[ num_Items + 1 ]; if( temp_Strings ) { if( items ) { //Copy all the previous items over to the new array memcpy( temp_Strings, items, num_Items * sizeof( char * ) ); delete [] items; } num_Items++; items = temp_Strings; items[ num_Items - 1 ] = new char[ strlen( str ) + 1 ]; strcpy( items[ num_Items - 1 ], str ); } EXIT(); } /**************************************************************************** * * Function Name: get_Str(), Created:7/17/98 * * Description: Fetches the nth str (0 based). The user should not deallocate the returned string. It is owned by the object. * * Return: char * * Notes: * *****************************************************************************/ char *String_List::get_Item( int index ) const { ENTER( "char *String_List::get_Item( int index ) const" ); char *ret_Str = 0; if( index < num_Items ) { ret_Str = items[ index ]; } EXIT(); return( ret_Str ); } /**************************************************************************** * * Function Name: get_Next_Str(), Created:7/17/98 * * Description: Fetches the next string. The user should not deallocate the returned string. It is owned by the object. * * Return: C-string * * Notes: * *****************************************************************************/ char *String_List::get_Next_Item() { ENTER( "char *String_List::get_Next_Item()" ); char *ret_Str = 0; if( next_Item_Index < num_Items ) { ret_Str = items[ next_Item_Index ]; next_Item_Index++; } EXIT(); return( ret_Str ); } /**************************************************************************** * * Function Name: shift_Item(), Created:7/28/98 * * Description: FIFO. Removes the first item from the list, and returns it. * * Return: The first item in the list. * * Notes: This is a destructive read. !!!MEMORY LEAK ALERT!!! The USER is required to free this string!! * *****************************************************************************/ char *String_List::shift_Item() { ENTER( "char *String_List::shift_Item()" ); char *ret_Item = items[ 0 ]; int copy_Index; for( copy_Index = 0; copy_Index < num_Items - 1; copy_Index++ ) { items[ copy_Index ] = items[ copy_Index + 1 ]; } num_Items--; next_Item_Index = ( next_Item_Index > 0 )?next_Item_Index - 1:0; EXIT(); return( ret_Item ); } /**************************************************************************** * * Function Name: reset_Next_Index(), Created:7/17/98 * * Description: Resets the get_Next_Str index to point to the first item. * * Notes: * *****************************************************************************/ void String_List::reset_Next_Index() { ENTER( "void String_List::reset_Next_Index()" ); next_Item_Index = 0; EXIT(); } void String_List::resetString_List() { ENTER( "void String_List::reset_String_List()" ); Destroy_Items(); EXIT(); } int String_List::num_Left() const { ENTER( "int String_List::num_Left() const" ); EXIT(); return( num_Items - next_Item_Index ); } void String_List::Destroy_Items() { ENTER( "void String_List::Destroy_Items()" ); int str_Index; for( str_Index = 0; str_Index < num_Items; str_Index++ ) { // printf ("Index: %d Strings: |%s| \n", str_Index,items[str_Index]); // fflush(stdout); delete [] items[ str_Index ]; } delete[] items; items = NULL; num_Items = 0; reset_Next_Index(); EXIT(); } void String_List::Copy_Items( const String_List &right ) { ENTER( "void String_List::Copy_Items( const String_List &right )" ); int str_Index; items = new char *[ right.num_Items ]; num_Items = right.num_Items; for( str_Index = 0; str_Index < num_Items; str_Index++ ) { items[ str_Index ] = new char[ strlen( right.items[ str_Index ] ) + 1 ]; if( items[ str_Index ] ) { strcpy( items[ str_Index ], right.items[ str_Index ] ); } } EXIT(); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/strlist.hpp0000664000175000000620000000637410044153335020402 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef STRING_LIST_HPP #define STRING_LIST_HPP /**************************************************************************** * * Created: 7/17/98 * ***************************************************************************** * * File Name: StrList.hpp * Module: * Contributors: Lee Page * Description: Encapsulates an array of C-strings. Used as a least-common denominator solution in coding C++ without STL. * Version Control: * * $Revision: 6 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ /*** CONSTANTS ***/ /*** TYPES ***/ class String_List { public: String_List(); String_List( const String_List &right ); ~String_List(); String_List &operator += ( const String_List &right ); const String_List & operator = ( const String_List &from_List ); void add_Item( const char *str = 0 ); // Fetches the nth str (0 based). The user should not // deallocate the returned string. It is owned by the // object. char *get_Item( int index ) const; // Fetches the next string. The user should not deallocate // the returned string. It is owned by the object. char *get_Next_Item(); // FIFO. Removes the first item from the list, and returns it. char *shift_Item(); // Resets the get_Next_Str index to point to the first item. void reset_Next_Index(); int num_Left() const; int get_Num_Items() const { return( num_Items ); } void resetString_List(); private: void Destroy_Items(); void Copy_Items( const String_List &right ); int num_Items; char **items; int next_Item_Index; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/swap_em.c0000664000175000000620000002140310044153336017753 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //File - SWAP_EM.C //*************************************************************************** // //Description: // // This file contains the definitions for the functions to reverse //the byte ordering of 2 and 4 byte variables. // //Author: Bob Roycroft //Date: 06/20/94 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "osd_util.h" //Function - osdSwap4() - start //=========================================================================== // //Description: // // This function reverses the byte ordering of a four byte variable. // //Parameters: // // inLong_P = Pointer to the 4 byte variable to be byte reversed. // //Return Value: // // The byte reversed variable. // Note that the input variable is also reversed. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- #ifndef _DPT_NETWARE uLONG osdSwap4(DPT_UNALIGNED uLONG * dwdp) { #ifndef _DPT_BIG_ENDIAN uSHORT wd0, wd1; wd0 = (uSHORT) *dwdp; wd1 = (uSHORT) (*dwdp>>16); wd0 = ((uSHORT) ((wd0>>8) | (wd0<<8))); wd1 = ((uSHORT) ((wd1>>8) | (wd1<<8))); return (* dwdp = (((uLONG)wd0<<16) | wd1)); #else return *dwdp; #endif } #endif //Function - osdSwap2() - start //=========================================================================== // //Description: // // This function swaps the MSB & LSB of a two byte variable. // //Parameters: // // inShort_P = Pointer to the 2 byte variable to be byte reversed. // //Return Value: // // The byte reversed variable // Note that the input variable is also reversed. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uSHORT osdSwap2(DPT_UNALIGNED uSHORT * wdp) { #ifndef _DPT_BIG_ENDIAN return (* wdp = ((uSHORT) (((*wdp>>8) | (*wdp<<8))))); #else return *wdp; #endif } //Function - osdSwap3() - start //=========================================================================== // //Description: // // This function reverses the byte ordering of a three byte variable. // //Parameters: // // inLong_P = Pointer to the 4 byte variable to be byte reversed. // //Return Value: // // The byte reversed variable. // Note that the input variable is also reversed. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // // //--------------------------------------------------------------------------- uLONG osdSwap3(DPT_UNALIGNED uLONG * dwdp) { #ifndef _DPT_BIG_ENDIAN uSHORT wd0, wd1; wd0 = (uSHORT) *dwdp; wd1 = (uSHORT) (*dwdp>>16); wd0 = ((uSHORT) ((wd0>>8) | (wd0<<8))); wd1 = ((uSHORT) ((wd1>>8) | (wd1<<8))); return (* dwdp = ((((uLONG)wd0<<16) | wd1) >> 8)); #else return *dwdp; #endif } /*Function - trueSwap2 - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function ALWAYS swaps the MSB & LSB of a two byte variable. */ /* */ /*Parameters: */ /* */ /*Return Value: */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /* */ /*---------------------------------------------------------------------------*/ uSHORT trueSwap2(uSHORT *inShort) { uSHORT i; i = (uSHORT) (*inShort & 0x0ff); *inShort >>= 8; *inShort |= (i << 8); return(*inShort); } /* trueSwap2() - end */ /*Function - trueSwap4 - start */ /*===========================================================================*/ /* */ /*Description: */ /* */ /* This function ALWAYS reverses the byte ordering of a four byte variable. */ /* */ /*Parameters: */ /* */ /*Return Value: */ /* */ /*Global Variables Affected: */ /* */ /*Remarks: (Side effects, Assumptions, Warnings...) */ /* */ /* */ /*---------------------------------------------------------------------------*/ uLONG trueSwap4(uLONG *inLong) { char src[4], *dst; int i; *(uLONG *)src = *inLong; dst = (char *)inLong; for(i = 0; i < 4; ++i) { dst[i] = src[3 - i]; } return(*inLong); } /* trueSwap4() - end */ //Function - netSwap4() - start //=========================================================================== // //Description: // // This function ensures that the input four byte variable is returned // in DPT network order (little-endian). On big-endian machines this // function will swap the four byte variable. On little-endian machines // this function will return the input value. // //Parameters: // // val = 4 byte variable to be byte reversed. // //Return Value: // // The variable in network order. // //Global Variables Affected: // //Remarks: (Side effects, Assumptions, Warnings...) // //--------------------------------------------------------------------------- uLONG netSwap4(uLONG val) { #if defined (_DPT_BIG_ENDIAN) // we need to swap the value and return it uSHORT wd0, wd1; wd0 = (uSHORT) val; wd1 = (uSHORT) (val >> 16); wd0 = (wd0 >> 8) | (wd0 << 8); wd1 = (wd1 >> 8) | (wd1 << 8); return (((uLONG)wd0 << 16) | wd1); #else // just return the value for little-endian machines return val; #endif // big_endian } //netSwap4() - end raidutils-0.0.6.orig/raidutil/taskctrl.cpp0000664000175000000620000002750310044153336020516 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 5/19/99 * ***************************************************************************** * * File Name: TaskCtrl.cpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 15 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include #include #include "taskctrl.hpp" #include "rustring.h" #include "status.hpp" #include "ctlr_map.hpp" #include "rscenum.h" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ extern char* EventStrings[]; /*** MACROS ***/ /*** PROTOTYPES ***/ //extern void Flush( String_List * ); extern void add_Unique_Item(Int_List *component_List, DPT_TAG_T component_Tag); /*** FUNCTIONS ***/ TaskControl::TaskControl( SCSI_Addr_List *deviceList, TaskCommandOptions cmd) :raidsToCtrl (deviceList), taskCmd (cmd) { ENTER( "TaskControl::TaskControl(" ); EXIT(); } TaskControl::TaskControl( const TaskControl &new_TaskControl ) { ENTER( "TaskControl::TaskControl( const TaskControl &new_TaskControl ):" ); taskCmd = new_TaskControl.taskCmd; raidsToCtrl = new SCSI_Addr_List(*(new_TaskControl.raidsToCtrl));//raidsToCtrl = new_TaskControl.raidsToCtrl; EXIT(); } TaskControl::~TaskControl() { ENTER( "TaskControl::~TaskControl()" ); delete raidsToCtrl; EXIT(); } Command::Dpt_Error TaskControl::execute(String_List **output) { ENTER("Command::Dpt_Error TaskControl::execute(String_List **output)"); String_List *out; Dpt_Error err; Int_List raid_List; DPT_TAG_T parentTag; Init_Engine(); *output = out = new String_List(); while (raidsToCtrl->num_Left()) { bool more_Devs_Left = true; SCSI_Address raid_Address = raidsToCtrl->get_Next_Item(); // get this raid's tag for (int dev_Index = 0; more_Devs_Left; dev_Index++) { get_Devs_Type devs_Type; DPT_TAG_T raid_Tag = Get_Address_by_Index(raid_Address, dev_Index, &more_Devs_Left, &devs_Type); if ( !more_Devs_Left ) { break; } switch (devs_Type) { case GET_RAID: case GET_RAID_REDIRECT: engine->Reset(); err = engine->Send(MSG_GET_INFO, raid_Tag); parentTag = engine->devInfo_P->raidParent; // we only want to control a parent (or single) if (parentTag == -1) { add_Unique_Item(&raid_List, raid_Tag); } } } } raid_List.reset_Next_Index(); // invalid if target not found // Check to see if any reserve conflicts arise from any device to be checked if (engine->devInfo_P->flags3 & FLG_DEV_RES_CONFLICT) out->add_Item( EventStrings[STR_RESCONFLICT] ); else if (raid_List.num_Left() == 0) { err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; out->add_Item((char *) err); } if (engine->devInfo_P->flags2 & FLG_DEV_MANUAL_JBOD_CONFIGURED) { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_THIS_DEVICE; out->add_Item((char *) err); } // do the command iff no errors if (!err.Is_Error() && !(engine->devInfo_P->flags3 & FLG_DEV_RES_CONFLICT)) { if (taskCmd == List) { out->add_Item(EventStrings[STR_LIST_TASKS]); out->add_Item(STR_DEV_DIVIDING_LINE); } while (raid_List.num_Left()) { err = ControlEachArray(raid_List.get_Next_Item(), out); if (err.Is_Error()) { out->add_Item((char *) err); } out->add_Item("\n"); } out->add_Item("\n"); } return (err); } /****************************************************************** Carries out the command on each array specified ******************************************************************/ Command::Dpt_Error TaskControl::ControlEachArray( DPT_TAG_T raid_Tag, String_List *out) { Dpt_Error err; char *tempString; bool tag_Valid; SCSI_Address tempAddr; Dpt_Status status(raid_Tag); Dpt_Status::dpt_Status tempStatus = status; err = engine->Send(MSG_GET_INFO, raid_Tag); switch (taskCmd) { case Build: if ((tempStatus == DSPLY_STAT_FAILED) || (tempStatus == DSPLY_STAT_WARNING)) { if (engine->devInfo_P->raidType == RAID_TYPE_1) { out->add_Item(EventStrings[STR_MUST_REBUILD_RAID1]); err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID; } else // raid type 0, 5, 10, 50 { if (engine->devInfo_P->raidType == RAID_TYPE_0) { tempAddr = DPT_Tag_to_Address(raid_Tag, &tag_Valid); // can't build a RAID 0 if (tempAddr.level < 2) { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID; break; } } // raid type 5, 10, 50 err = engine->Send(MSG_RAID_BUILD, raid_Tag); if (!err.Is_Error()) { Dpt_Status status(raid_Tag); tempStatus = status; if (tempStatus == DSPLY_STAT_BUILD) { PrintRaidAddress(raid_Tag, out); break; } } err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID; } } else { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID; } break; case Rebuild: if ((tempStatus == DSPLY_STAT_FAILED) || (tempStatus == DSPLY_STAT_WARNING)) { // if RAID 1, can't have more than 1 bad drive if (engine->devInfo_P->raidType == RAID_TYPE_1) { bool more_Comp_Left = true; get_Devs_Type comp_Type; DPT_TAG_T this_Comp_Tag; DPT_TAG_T good_comp, bad_comp; good_comp = bad_comp = 0; for (int comp_Index = 0; more_Comp_Left; ++comp_Index) { this_Comp_Tag = Get_Component(raid_Tag, comp_Index, &more_Comp_Left, &comp_Type); if (comp_Type == GET_SCSI_DASD) { Dpt_Status status(this_Comp_Tag); Dpt_Status::dpt_Status compStatus = status; if (compStatus == DSPLY_STAT_FAILED) bad_comp = this_Comp_Tag; else good_comp = this_Comp_Tag; } } // force the states to auto rebuild if (good_comp) { engine->Reset(); engine->Insert((uCHAR) FORCE_OPTIMAL); err |= engine->Send(MSG_FORCE_STATE, good_comp); engine->Reset(); engine->Insert((uCHAR) FORCE_REPLACED); err |= engine->Send(MSG_FORCE_STATE, bad_comp); if (!err.Is_Error()) { PrintRaidAddress(raid_Tag, out); } } else { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID; } } else // raid 0, 5, 10, 50 { if (engine->devInfo_P->raidType == RAID_TYPE_0) { tempAddr = DPT_Tag_to_Address(raid_Tag, &tag_Valid); // can't rebuild a RAID 0 if (tempAddr.level < 2) { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID; break; } } // raid 5, 10 50 err = engine->Send(MSG_RAID_REBUILD, raid_Tag); if (!err.Is_Error()) { Dpt_Status status(raid_Tag); tempStatus = status; if (tempStatus == DSPLY_STAT_BUILD) { PrintRaidAddress(raid_Tag, out); break; } } err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID; } } else { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID; } break; case Verify: // all raid types can verify (if optimal) if (tempStatus == DSPLY_STAT_OPTIMAL && !(engine->devInfo_P->flags2 & FLG_DEV_MANUAL_JBOD_CONFIGURED)) { err = engine->Send(MSG_RAID_VERIFY_FIX, raid_Tag); PrintRaidAddress(raid_Tag, out); } else { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID; } break; case VerifyNoFix: // all raid types can verify (if optimal) if (tempStatus == DSPLY_STAT_OPTIMAL) { err = engine->Send(MSG_RAID_VERIFY, raid_Tag); PrintRaidAddress(raid_Tag, out); } else { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID; } break; case List: PrintRaidAddress(raid_Tag, out); // print task type and status tempString = (char *)status; if (!strcmp(tempString, EventStrings[STR_BUILDING])) { out->add_Item(EventStrings[STR_BUILD_PENDING]); } else { out->add_Item((char *)status); } break; case Stop: // if the array is building ... #if !defined _DPT_NETWARE if ((tempStatus == DSPLY_STAT_BUILD) && (engine->devInfo_P->raidType == RAID_TYPE_5)) { // Are you SURE you want to stop the build?????????? //?? should I only warn if this is a RAID5? char Buffer[512]; fprintf (stderr, STR_STOP_BUILD_WARNING); fgets (Buffer, sizeof(Buffer), stdin); if ((Buffer[0] != 'y') && (Buffer[0] != 'Y')) { EXIT(); return(err); } } #endif // OKAY! Abort! err = engine->Send(MSG_RAID_ABORT, raid_Tag); if (!err.Is_Error()) { // print raid of the stop PrintRaidAddress(raid_Tag, out); } else { err = Dpt_Error::DPT_CMD_ERR_CMD_NOT_POSS_ON_RAID; } break; } return (err); } Command &TaskControl::Clone() const { ENTER("Command &TaskControl::Clone() const"); EXIT(); return(*new TaskControl(*this)); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/taskctrl.hpp0000664000175000000620000000556010044153334020520 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef TASKCTRL_HPP #define TASKCTRL_HPP /**************************************************************************** * * Created: 5/19/99 * ***************************************************************************** * * File Name: TaskCtrl.hpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 4 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "scsilist.hpp" #include "intlist.hpp" /*** CONSTANTS ***/ #define STR_STOP_BUILD_WARNING "Stopping an Array Build in progress will cause the array to be inaccessible. Do you wish to stop the build at this time? [yN]" /*** TYPES ***/ enum TaskCommandOptions { List, Build, Rebuild, Verify, Stop, VerifyNoFix }; class TaskControl:public Command { public: TaskControl::TaskControl(SCSI_Addr_List *deviceList, TaskCommandOptions cmd); TaskControl(const TaskControl &new_TaskControl); virtual ~TaskControl(); Dpt_Error execute(String_List **output); Dpt_Error ControlEachArray(DPT_TAG_T raid_Tag, String_List *out); Command &Clone() const; private: TaskCommandOptions taskCmd; SCSI_Addr_List *raidsToCtrl; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/trapdef.h0000664000175000000620000001543110044153334017754 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __TRAPDEF_H #define __TRAPDEF_H //File - trapdef.h //*************************************************************************** // //Description: these are the structures used by the logger for DMI traps // // //Author: Bill Smith //Date: 4/12/96 // //Editors: // //Remarks: // // //*************************************************************************** //Include Files ------------------------------------------------------------- #include "osd_util.h" #include "get_info.h" #include //Definitions - Defines & Constants ----------------------------------------- const uSHORT FLG_HBA_VALID = 0x0001; const uSHORT FLG_ADDR_VALID = 0x0002; const uSHORT FLG_DEV_TYPE_VALID = 0x0004; const uSHORT FLG_STATUS_VALID = 0x0008; const uSHORT FLG_CODE_VALID = 0x0010; const uSHORT FLG_HEXDUMP_VALID = 0x0020; const uSHORT FLG_ARRAY_NAME_VALID = 0x0040; const uSHORT FLG_VBLK_VALID = 0x0080; const uSHORT FLG_LEVEL_VALID = 0x0100; const uSHORT FLG_BLKNUM_VALID = 0x0200; const uSHORT FLG_RAM_ADDR_VALID = 0x0400; const uSHORT FLG_STAT_CHG_VALID = 0x0800; const uSHORT FLG_LOCK_START_VALID = 0x1000; const uSHORT MAX_NUM_DMI_VARS = 16; // constants for the device typw variable const uCHAR DEV_TYPE_DEVICE = 0; const uCHAR DEV_TYPE_ARRAY = 1; const uCHAR DEV_TYPE_LSU = 2; const uCHAR DEV_TYPE_HOTSPARE = 3; // constants for the code member // diags atarted const uSHORT CODE_DIAG_STARTED = 0; // stopped, device does not support them const uSHORT CODE_DIAG_NO_SUPPORT = 1; // stopped, drive failed const uSHORT CODE_DIAG_DRIVE_FAIL = 2; // stopped, error limit reached const uSHORT CODE_DIAG_ERR_LIMIT = 3; // stopped, user abort const uSHORT CODE_DIAG_USR_ABORT = 4; // stopped, finished const uSHORT CODE_DIAG_STOPPED = 5; // S.M.A.R.T. failure (from device) const uSHORT CODE_SMART_FAIL_PREDICT = 10; // F/W detected slow spin down const uSHORT CODE_SMART_FAIL_DOWN = 11; // F/W detected slow spin up const uSHORT CODE_SMART_FAIL_UP = 12; // scheduled diagnostics set const uSHORT CODE_SCHED_SCHEDULED = 20; // scheduled diagnostics queried const uSHORT CODE_SCHED_SCHED_QUERY = 21; // scheduled diagnostics canceled const uSHORT CODE_SCHED_SCHED_CANCLED = 22; // scheduled diagnostics exclusion periof set const uSHORT CODE_SCHED_SCHED_EXCLUSION = 23; //Definitions - Structure & Typedef ----------------------------------------- // the event code that we are sending const uSHORT SAB_TYPE_EVENTCODE = 0; // the text message that goes with the event const uSHORT SAB_TYPE_MSG_TEXT = 1; // the event variable strucuture const uSHORT SAB_TYPE_EVENTVAR = 2; //struct - subAgentBlock_S - start //=========================================================================== // //Description: this is the type/length structure placed into the map file // when talking to the subagent // // // // //--------------------------------------------------------------------------- struct subAgentBlock_S { uSHORT type; uSHORT length; }; // - end //struct - snmpTrapVars_S - start //=========================================================================== // //Description: the DMI variable data that can go along with an event // // // //--------------------------------------------------------------------------- struct snmpTrapVars_S { uLONG time; uSHORT flags; uSHORT code; uCHAR arrayName[DPT_NAME_SIZE+2]; //16+2 uCHAR hexDump[256]; uCHAR hba, chan, id, lun; uCHAR devType; uCHAR mainStatus; uCHAR subStatus; uCHAR devLevel; uSHORT vBlkCnt; uLONG vBlkNum; uLONG blkNum; uLONG ramAddr; uSHORT oldStatus; uSHORT newStatus; uCHAR lockStart; uCHAR reserved[491]; //make if 4 times // functions to place the data in void SetTime(uLONG x) { time = x; }; void SetHBA(uCHAR x) { hba = x; flags |= FLG_HBA_VALID; }; void SetAddr(uCHAR x, uCHAR y, uCHAR z) { chan = x; id = y; lun = z; flags |= FLG_ADDR_VALID; }; void SetAddr(uCHAR x, uCHAR y, uCHAR z, uCHAR w) { SetAddr(x, y, z); SetDevLevel(w); }; void SetDevType(uCHAR x) { devType = x; flags |= FLG_DEV_TYPE_VALID; }; void SetStatus(uCHAR x, uCHAR y) { mainStatus = x; subStatus = y; flags |= FLG_STATUS_VALID; }; void SetCode(uSHORT x) { code = x; flags |= FLG_CODE_VALID; }; void SetArrayName(uCHAR *s) { strcpy((char *) arrayName, (char *) s); flags |= FLG_ARRAY_NAME_VALID; }; void SetHexDump(uCHAR *s) { strcpy((char *) hexDump, (char *) s); flags |= FLG_HEXDUMP_VALID; }; void SetDevLevel(uCHAR x) { devLevel = x; flags |= FLG_LEVEL_VALID; }; void SetVirtualBlock(uLONG x, uSHORT y) { vBlkNum = x; vBlkCnt = y; flags |= FLG_VBLK_VALID; }; void SetBlock(uLONG x) { blkNum = x; flags |= FLG_BLKNUM_VALID; }; void SetRAMAddr(uLONG x) { ramAddr = x; flags |= FLG_RAM_ADDR_VALID; }; void SetStatusChange(uSHORT x, uSHORT y) { oldStatus = x; newStatus = y; flags |= FLG_STAT_CHG_VALID; }; void SetLockStart(uCHAR x) { lockStart = x; flags |= FLG_LOCK_START_VALID; }; }; //Variables - External ------------------------------------------------------ //Variables - Global -------------------------------------------------------- //Variables - File Scope ---------------------------------------------------- //Prototypes - function ----------------------------------------------------- #endif raidutils-0.0.6.orig/raidutil/uartdmp.cpp0000664000175000000620000001727410044153336020347 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 7/7/00 * ***************************************************************************** * * File Name: UartDmp.cpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 9 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "uartdmp.hpp" #include "rscenum.h" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ extern char* EventStrings[]; /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ UartDmp::UartDmp (int hbaNo, char *fileName) :hbaNum (hbaNo), dumpFileName (fileName) { ENTER("UartDmp::UartDmp("); EXIT(); } UartDmp::UartDmp (const UartDmp &new_UartDmp) { ENTER("UartDmp::UartDmp (const UartDmp &new_UartDmp):"); hbaNum = new_UartDmp.hbaNum; dumpFileName = new_UartDmp.dumpFileName; EXIT(); } UartDmp::~UartDmp() { ENTER( "UartDmp::~UartDmp()" ); EXIT(); } /******************************************************* Main exe loop *******************************************************/ Command::Dpt_Error UartDmp::execute(String_List **output) { ENTER("Command::Dpt_Error UartDmp::execute(String_List **output)"); char hbaOutStr[50]; String_List *out; Dpt_Error err; bool hbaIndexFound = true; DPT_TAG_T thisHBATag; Init_Engine(1); *output = out = new String_List(); memset(hbaOutStr, 0, sizeof(hbaOutStr)); // Opening the file for appending if ((strcmp(dumpFileName, "-") == 0) || (strcmp(dumpFileName, "- ") == 0)) outFile_P = stdout; else outFile_P = fopen(dumpFileName, "a+"); // Process ONLY the HBA specified if (hbaNum != -1) { // Determine the hba address from the index. thisHBATag = Get_HBA_by_Index (hbaNum, &hbaIndexFound); if (hbaIndexFound) { sprintf(hbaOutStr, EventStrings[STR_UART_HBA_NUM], hbaNum); err |= UartDmpHba(thisHBATag, hbaOutStr, hbaNum, out); } else { err |= Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; out->add_Item((char *) err); sprintf(hbaOutStr, EventStrings[STR_HBA_NUM_NOT_FOUND], hbaNum); fputs (hbaOutStr, outFile_P); } } // We want to process all the HBA's on the system. else { for (int hbaIndex = 0; hbaIndexFound ; hbaIndex++) { thisHBATag = Get_HBA_by_Index(hbaIndex, &hbaIndexFound); if (hbaIndexFound) { sprintf(hbaOutStr, EventStrings[STR_UART_HBA_NUM], hbaIndex); err |= UartDmpHba(thisHBATag, hbaOutStr, hbaIndex, out); } } } out->add_Item("\n"); fclose(outFile_P); return (err); } /****************************************************************** Controls printing the uart data for the hba ******************************************************************/ Command::Dpt_Error UartDmp::UartDmpHba(DPT_TAG_T hbaTag, char *hbaOutStr, int hbaNbr, String_List *out) { Dpt_Error err; char tempStr[50]; memset(tempStr, 0, sizeof(tempStr)); fputs (hbaOutStr, outFile_P); err = ViewUartDmp (out, hbaTag); // this goes to screen and file - ERROR getting DATA if (err.Is_Error()) { sprintf(tempStr, EventStrings[STR_ERR_UART_HBA_NUM], hbaNbr); out->add_Item(tempStr); out->add_Item((char *) err); out->add_Item("\n"); fputs (tempStr, outFile_P); sprintf(hbaOutStr, "%s\n", (char *) err); fputs (hbaOutStr, outFile_P); } // put this to screen only - DATA was written else if (anyDataOut == true) { sprintf(tempStr, EventStrings[STR_UART_WRITTEN_TO_FILE], hbaNbr); out->add_Item(tempStr); } // this goes to screen and file - NO DATA else { sprintf(tempStr, EventStrings[STR_NO_UART_DATA], hbaNbr); out->add_Item(tempStr); fputs (tempStr, outFile_P); } return (err); } /****************************************************************** Carries out the command on each array specified ******************************************************************/ Command::Dpt_Error UartDmp::ViewUartDmp( String_List *out, DPT_TAG_T obj_Tag) { Dpt_Error err; char result[1024]; // ask for 1K at a time typedef struct { char length1; char length2; char length3; char length4; char reserved[16]; } retHdr_S; retHdr_S rtnheader; uLONG bytesSent = 0; anyDataOut = false; engine->Reset(); engine->Insert ((uSHORT) 0x0080); engine->Insert ((uLONG) sizeof(result)); // inquiry length // twelve bytes of CDB uCHAR ScsiCmd[12]; memset(ScsiCmd, 0, sizeof(ScsiCmd)); ScsiCmd[0] = SC_DPT_MFC; ScsiCmd[1] = 0; ScsiCmd[2] = 0x25; ScsiCmd[3] = (uCHAR)((sizeof(result) & 0xff00) >> 8); // inquiry length ScsiCmd[4] = (uCHAR)(sizeof(result) & 0x00ff); // inquiry length ScsiCmd[5] = 0; engine->Insert(ScsiCmd, 12); do { err = engine->Send (MSG_SCSI_CMD, obj_Tag); engine->Extract (&rtnheader, sizeof(rtnheader)); bytesSent = (uLONG)(rtnheader.length4 & 0x000000ff); bytesSent += ((uLONG)rtnheader.length3) << 8; bytesSent += ((uLONG)rtnheader.length2) << 16; bytesSent += ((uLONG)rtnheader.length1) << 24; if ((err.Is_Error()) || (bytesSent == 0)) break; // there is data - set true for msg printed at end anyDataOut = true; memset(result, 0, sizeof(result)); engine->Extract (result, bytesSent); for (int i = 0; i < bytesSent; i++) { // replace a 0x00 or an 0x0d (CR) with a space if ((result[i] == 0) || (result[i] == 0x0d)) result[i] = ' '; } result[bytesSent] = 0; fputs (result, outFile_P); // if we got back less than what we asked for, end here if (bytesSent < (sizeof(result) - 20)) break; } while ((!err.Is_Error()) && (bytesSent != 0)); return (err); } Command &UartDmp::Clone() const { ENTER("Command &UartDmp::Clone() const"); EXIT(); return(*new UartDmp(*this)); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/uartdmp.hpp0000664000175000000620000000523010044153335020340 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UARTDMP_HPP #define UARTDMP_HPP /**************************************************************************** * * Created: 7/7/00 * ***************************************************************************** * * File Name: UartDmp.hpp * Module: * Contributors: Karla Summers * Description: * Version Control: * * $Revision: 3 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class UartDmp:public Command { public: UartDmp::UartDmp(int hbaNo, char *fileName); UartDmp(const UartDmp &new_UartDmp); virtual ~UartDmp(); Dpt_Error execute(String_List **output); Dpt_Error UartDmpHba(DPT_TAG_T hbaTag, char *hbaOutStr, int hbaNbr, String_List *out); Dpt_Error ViewUartDmp (String_List *out, DPT_TAG_T obj_Tag); Command &Clone() const; private: int hbaNum; bool anyDataOut; char *dumpFileName; FILE *outFile_P; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/usage.cpp0000664000175000000620000001746310044153336017777 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 8/6/98 * ***************************************************************************** * * File Name: Usage.cpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 35 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "usage.hpp" #include "rustring.h" #include "rscenum.h" extern char* EventStrings[]; char *STR_USAGE_UTIL_NAME = EventStrings[STR_RAIDUTIL]; char *STR_USAGE_PROGRAM_DESC = EventStrings[STR_RAIDUTIL_SHORT_DESCRIP]; /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ Show_Usage::Show_Usage() { ENTER( "Show_Usage::Show_Usage()" ); EXIT(); } Show_Usage::Show_Usage( const Show_Usage &usage ) { ENTER( "Show_Usage::Show_Usage( const Show_Usage &usage )" ); EXIT(); } Show_Usage::~Show_Usage() { ENTER( "Show_Usage::~Show_Usage()" ); EXIT(); } Command::Dpt_Error Show_Usage::execute( String_List **output ) { ENTER( "Command::Dpt_Error Show_Usage::execute( String_List **output )" ); out = new String_List; *output = out; out->add_Item( STR_USAGE_UTIL_NAME ); CR(); CR(); out->add_Item (EventStrings[STR_USAGE_PROGRAM_DESC_TITLE]); CR(); out->add_Item( STR_DEV_DIVIDING_LINE ); CR(); out->add_Item( STR_USAGE_PROGRAM_DESC ); CR(); CR(); out->add_Item (EventStrings[STR_USAGE_SW_TITLE]); CR(); out->add_Item (STR_DEV_DIVIDING_LINE ); CR(); out->add_Item (EventStrings[STR_USAGE_SW_CREATE_LOGICAL]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_CREATE_LOGICAL2]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_IGNORE_NONFATAL_ERRORS]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_DELETE_LOGICAL]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_CREATE_HOT_SPARE]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_DELETE_HOT_SPARE]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_ALARM]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_ACTION_TASK_CONTROL]); CR(); out->add_Item (EventStrings[STR_USAGE_EXPAND_ARRAY]); CR(); // out->add_Item( STR_USAGE_SW_PREDICTIVE_CACHING_CONTROL ); CR(); // out->add_Item( STR_USAGE_SW_PREFETCH_SIZE ); CR(); // out->add_Item( STR_USAGE_SW_READ_AHEAD_SIZE ); CR(); // This one not supported in FW and doesn't plan to be. // out->add_Item( STR_USAGE_SW_HOST_READ_CACHING ); CR(); out->add_Item (EventStrings[STR_USAGE_LOAD_SAVE_CONFIGURATION]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_WRITE_CACHING]); CR(); // out->add_Item (EventStrings[STR_USAGE_SW_RESET_CLEAR_RAID_STORE]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_RESET_NVRAM_CONFIG]); CR(); // out->add_Item( STR_USAGE_SW_BATTERY_STATUS_INFO ); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LIST_DEVICES_PHYSICAL]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LIST_DEVICES_LOGICAL]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LIST_DEVICES_CONTROLLER]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LIST_DEVICES_SPARE]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LIST_DEVICES_RAID]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LIST_DEVICES_SPEED]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LIST_DEVICES_CACHE]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LIST_DEVICES_VERSION]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LIST_DEVICES_REDIRECT]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LIST_BATTERY]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LIST_DEVICES_ALL]); CR(); #if !defined (_DPT_NETWARE) out->add_Item (EventStrings[STR_USAGE_SW_FLASH]); CR(); #endif out->add_Item (EventStrings[STR_USAGE_SW_DISPLAY_INQ_INFO]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_QUIET_MODE]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_PAGENATION]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_SHOW_UTIL_USAGE]); CR(); #if defined _DPT_SOLARIS out->add_Item (EventStrings[STR_USAGE_SW_SPECIFY_CTLR]); CR(); #endif out->add_Item (EventStrings[STR_USAGE_SW_SPECIFY_DPT]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_RAID_LEVEL]); CR(); // out->add_Item( STR_USAGE_SW_LOGICAL_DRIVE_NUM ); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LOGICAL_DRIVE_CAPACITY]); CR(); out->add_Item (EventStrings[STR_USAGE_SW_LOGICAL_DRIVE_STRIPE_SIZE]);CR(); out->add_Item (EventStrings[STR_USAGE_SW_TASK_RATE]); CR(); out->add_Item (EventStrings[STR_USAGE_VIEW_LOG]); CR(); out->add_Item (EventStrings[STR_USAGE_FORCE_STATE]); CR(); out->add_Item (EventStrings[STR_USAGE_CLUSTER_SUPPORT]); CR(); // out->add_Item( STR_USAGE_SW_SPEED ); CR(); CR(); out->add_Item (EventStrings[STR_USAGE_SAMPLE_TITLE]); CR(); out->add_Item (STR_DEV_DIVIDING_LINE); CR(); out->add_Item (EventStrings[STR_USAGE_SAMPLE_CREATE_LOGICAL]); CR(); out->add_Item (EventStrings[STR_USAGE_SAMPLE_DELETE_LOGICAL]); CR(); out->add_Item (EventStrings[STR_USAGE_SAMPLE_CREATE_HOT_SPARE]); CR(); out->add_Item (EventStrings[STR_USAGE_SAMPLE_DELETE_HOT_SPARE]); CR(); out->add_Item (EventStrings[STR_USAGE_SAMPLE_LIST_DEVICES]); CR(); out->add_Item (EventStrings[STR_USAGE_SAMPLE_DISPLAY_INQUIRY_INFO]); CR(); out->add_Item (EventStrings[STR_USAGE_SAMPLE_RESET_NVRAM]); CR(); out->add_Item (EventStrings[STR_USAGE_SAMPLE_QUIET_MODE]); CR(); out->add_Item (EventStrings[STR_USAGE_SAMPLE_SHOW_USAGE]); CR(); CR(); out->add_Item (EventStrings[STR_USAGE_SYNTAX]); CR(); out->add_Item (STR_DEV_DIVIDING_LINE); CR(); out->add_Item (EventStrings[STR_USAGE_LEGEND_1]); CR(); out->add_Item (EventStrings[STR_USAGE_LEGEND_2]); CR(); // out->add_Item( STR_USAGE_NOTES ); CR(); EXIT(); return( Command::Dpt_Error::DPT_CMD_ERR_NO_ERROR ); } Command &Show_Usage::Clone() const { ENTER( "Command &Show_Usage::Clone() const" ); EXIT(); return( *new Show_Usage( *this ) ); } /**************************************************************************** * * Function Name: CR(), Created:8/7/98 * * Description: I need to output a carriage return after every line, and a function like this cleans up the code considerably. * * Notes: * *****************************************************************************/ void Show_Usage::CR() { ENTER( "void Show_Usage::CR()" ); out->add_Item( "\n" ); EXIT(); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/usage.hpp0000664000175000000620000000463010044153333017771 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef USAGE_HPP #define USAGE_HPP /**************************************************************************** * * Created: 8/6/98 * ***************************************************************************** * * File Name: Usage.hpp * Module: * Contributors: Lee Page * Description: * Version Control: * * $Revision: 3 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ class Show_Usage: public Command { public: Show_Usage(); Show_Usage( const Show_Usage &usage ); virtual ~Show_Usage(); Dpt_Error execute( String_List **output ); Command &Clone() const; private: void CR(); String_List *out; }; #endif /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/zap.cpp0000664000175000000620000003204710044153336017460 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************** * * Created: 10/21/98 * ***************************************************************************** * * File Name: Zap.cpp * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * * $Revision: 24 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include #include "zap.hpp" #include "rustring.h" #include "ctlr_map.hpp" #include "status.hpp" #include "rscenum.h" /*** CONSTANTS ***/ /*** TYPES ***/ /*** STATIC DATA ***/ /*** EXTERNAL DATA ***/ extern char* EventStrings[]; /*** MACROS ***/ /*** PROTOTYPES ***/ extern void Flush( String_List * ); /*** FUNCTIONS ***/ Zap::Zap( SCSI_Addr_List *addresses, int resync ): address_List( addresses ), Resync(resync) { ENTER( "Zap::Zap(" ); EXIT(); } Zap::Zap( const Zap &new_Zap ): address_List( new_Zap.address_List ), Resync(new_Zap.Resync) { ENTER( "Zap::Zap( const Zap &new_Zap ):" ); EXIT(); } Zap::~Zap() { ENTER( "Zap::~Zap()" ); EXIT(); } void add_Unique_Item( Int_List *component_List, DPT_TAG_T component_Tag ) { component_List->reset_Next_Index(); while( component_List->num_Left() ) { if ( component_Tag == (DPT_TAG_T) (component_List->get_Next_Item()) ) { return; } } component_List->add_Item( component_Tag ); } // returns true if the item is in the list // return false if the item is not in the list bool tagBeenAdded (Int_List *component_List, DPT_TAG_T component_Tag) { component_List->reset_Next_Index(); while( component_List->num_Left() ) { if ( component_Tag == (DPT_TAG_T) (component_List->get_Next_Item()) ) { return (bool)true; } } return (bool)false; } void Zap::AddRaid( Int_List *component_List, DPT_TAG_T parent_Tag ) { DPT_TAG_T component_Tag; get_Devs_Type devs_Type; bool more_Devs_Left = true; for ( int id_Index = 0; more_Devs_Left; id_Index++ ) { component_Tag = Get_Component ( parent_Tag, id_Index, &more_Devs_Left, &devs_Type ); if ( more_Devs_Left ) { switch ( devs_Type ) { case GET_SCSI_DASD: add_Unique_Item( component_List, component_Tag ); break; case GET_RAID: case GET_RAID_HOT_SPARE: case GET_RAID_REDIRECT: AddRaid ( component_List, component_Tag ); } } } } Command::Dpt_Error Zap::execute( String_List **output ) { ENTER( "Command::Dpt_Error Zap::execute( String_List **output )" ); Dpt_Error err, busy_err; DPT_TAG_T component_Tag, busy_Tag; Int_List component_List, zapArrayList, skipArrayList; String_List *out; char* char1 = EventStrings[STR_CHAR_Y]; Init_Engine(); *output = out = new String_List(); // Resets address_List to point to the first index on list address_List->reset_Next_Index(); //Populates component_List while( address_List->num_Left() ) { SCSI_Address component; bool more_Devs_Left = true; component = address_List->get_Next_Item(); for (int dev_Index = 0; more_Devs_Left; dev_Index++) { get_Devs_Type devs_Type; component_Tag = Get_Address_by_Index( component, dev_Index, &more_Devs_Left, &devs_Type ); if ( !more_Devs_Left ) { break; } engine->Reset(); err = engine->Send( MSG_GET_INFO, component_Tag ); if( err.Is_Error() ) { continue; } switch ( devs_Type ) { case GET_SCSI_DASD: add_Unique_Item( &component_List, component_Tag ); break; case GET_RAID: case GET_RAID_HOT_SPARE: case GET_RAID_REDIRECT: AddRaid ( &component_List, component_Tag ); } } } //resets component_List index component_List.reset_Next_Index(); if ( component_List.num_Left() == 0 ) { err = Dpt_Error::DPT_CMD_ERR_CANT_FIND_COMPONENT; out->add_Item( (char *) err ); } else { char Buffer[ 512 ]; #if !defined _DPT_NETWARE fprintf (stderr, EventStrings[STR_RU_SURE_TO_ZAP]); fgets (Buffer, sizeof(Buffer), stdin); if (( Buffer[0] != *char1 ) && ( Buffer[0] != *(char1+1))) { EXIT(); return( err ); } #endif (*output)->add_Item(EventStrings[STR_LIST_DEV_PHYS_HEADER]); (*output)->add_Item( STR_DEV_DIVIDING_LINE ); //kds bool hbaFound; int hbaNum = 0; DPT_TAG_T hbaTag = Get_HBA_by_Index(hbaNum, &hbaFound); DPT_TAG_T allHba [16]; while (hbaFound == true){ allHba[hbaNum] = hbaTag; hbaTag = Get_HBA_by_Index(++hbaNum, &hbaFound); } // Actually zap the drives do { component_Tag = component_List.get_Next_Item(); engine->Reset(); err = engine->Send( MSG_GET_INFO, component_Tag ); if( err.Is_Error() ) { continue; } /*******start of device busy section**********/ uLONG devStatus; busy_Tag = component_Tag; if (engine->devInfo_P->raidParent != -1) { busy_Tag = engine->devInfo_P->raidParent; } // if user has already said to skip this array, continue if (tagBeenAdded(&skipArrayList, busy_Tag)) continue; busy_err |= engine->Send(MSG_CHECK_BUSY, busy_Tag); // If busy_err = MSG_RTN_IGNORED, then the engine does not // support this command. Simply treat as not busy. if ((busy_err.Is_Error()) && (busy_err != Dpt_Error::DPT_MSG_RTN_IGNORED)) err |= busy_err; if (!err.Is_Error()) { engine->Extract(&devStatus, sizeof(uLONG)); // If 1, then this device is busy, otherwise // the device is considered NOT busy. if (devStatus == 1) { if (!tagBeenAdded(&zapArrayList, busy_Tag)) { #if !defined _DPT_NETWARE PrintRaidAddress(component_Tag, out); (*output)->add_Item("\n"); Flush( *output ); fprintf (stderr, EventStrings[STR_DRIVE_IS_BUSY]); fprintf (stderr, EventStrings[STR_RU_SURE_TO_ZAP]); fgets (Buffer, sizeof(Buffer), stdin); if (( Buffer[0] != *char1 ) && ( Buffer[0] != *(char1+1))) { add_Unique_Item (&skipArrayList, busy_Tag); continue; // err = Dpt_Error::DPT_CMD_ERR_COMPONENT_BUSY; } #endif add_Unique_Item (&zapArrayList, busy_Tag); } } } /*******end of device busy section**********/ // Print information about this zapped drive { DPTControllerMap map; dptCaddr_S *addr_P = &engine->devInfo_P->addr; char * String = map.getTargetString( addr_P->hba, addr_P->chan, addr_P->id, addr_P->lun ); (*output)->add_Item( String ); delete [] String; } (*output)->add_Item(EventStrings[STR_SCSI_DASD]); { char * cp = engine->devInfo_P->vendorID; while (( *--cp == ' ' ) && ( cp > engine->devInfo_P->vendorID )) { *cp = '\0'; } (*output)->add_Item ( engine->devInfo_P->vendorID ); cp = engine->devInfo_P->productID; while (( *--cp == ' ' ) && ( cp > engine->devInfo_P->productID )) { *cp = '\0'; } (*output)->add_Item ( engine->devInfo_P->productID ); } unsigned long LBA = engine->devInfo_P->capacity.maxPhysLBA; sprintf( Buffer, "%ld%s", LBA / 2/ 1024L, EventStrings[STR_MB]); (*output)->add_Item( Buffer ); { Dpt_Status status( component_Tag ); (*output)->add_Item ( (char *)status ); } (*output)->add_Item( "\n" ); Flush( *output ); // Zap the drive memset ( Buffer, 0, sizeof(Buffer) ); unsigned long index = LBA - engine->devInfo_P->capacity.maxLBA; if ( index > 33 ) { index = 33; } if ( index == 0 ) { ++index; } for ( ; index; --index ) { engine->Reset (); engine->Insert ( (unsigned long)(LBA - index + 1) ); engine->Insert ( (unsigned short)1 ); engine->Insert ( Buffer, sizeof(Buffer) ); err = engine->Send( MSG_SCSI_WRITE, component_Tag ); if( err.Is_Error() ) { (*output)->add_Item( "" ); (*output)->add_Item( "" ); (*output)->add_Item( (char *) err ); unsigned i = strlen ( (char *) err ); if ( i > 18 ) { i = 18; } (*output)->add_Item( ( (char *) err ) + i ); i += strlen ( ( (char *) err ) + i ); if ( i > 26 ) { i = 26; } (*output)->add_Item( ( (char *) err ) + i ); sprintf (Buffer, "%ld", 1 - index ); (*output)->add_Item( Buffer ); (*output)->add_Item( "\n" ); Flush( *output ); break; } } // Flush the drive engine->Reset (); engine->Insert ( (unsigned short)0 ); engine->Insert ( (unsigned long)0L ); // twelve bytes of CDB // Sync command sent to device to flush engine->Insert ( (unsigned char)0x35 ); engine->Insert ( (unsigned char)0 ); engine->Insert ( (unsigned short)0 ); engine->Insert ( (unsigned long)0L ); engine->Insert ( (unsigned long)0L ); err = engine->Send( MSG_SCSI_CMD, component_Tag ); #ifdef _ZAP_VERIFY // Validate the flush index = LBA - engine->devInfo_P->capacity.maxLBA; if ( index > 33 ) { index = 33; } for ( ; index; --index ) { engine->Reset (); engine->Insert ( (unsigned long)(LBA - index + 1) ); engine->Insert ( (unsigned short)1 ); err = engine->Send( MSG_SCSI_READ, component_Tag ); unsigned short length = sizeof(Buffer); if( !err.Is_Error() ) { if (engine->Extract (Buffer, sizeof(Buffer))) err = MSG_RTN_COMPLETED; // err = engine->Extract ( Buffer, sizeof(Buffer) ); char * cp = Buffer; while (( *cp++ == '\0' ) && --length ); } if ( length ) { (*output)->add_Item( "" ); (*output)->add_Item( "" ); (*output)->add_Item( (char *) err ); unsigned i = strlen ( (char *) err ); if ( i > 18 ) { i = 18; } (*output)->add_Item( ( (char *) err ) + i ); i += strlen ( ( (char *) err ) + i ); if ( i > 26 ) { i = 26; } (*output)->add_Item( ( (char *) err ) + i ); sprintf (Buffer, "%ld", 1 - index ); (*output)->add_Item( Buffer ); (*output)->add_Item( "\n" ); Flush( *output ); break; } } #endif // ZAP_VERIFY } while (component_List.num_Left()); if (!err.Is_Error()) { // resync all hbas in the system if (Resync) { for (int i=0; iReset(); engine->Insert ((uLONG) 0x01); // perform a complete init err2 = engine->Send (MSG_I2O_RESYNC, allHba[i]); if (err2.Success()) (**output).add_Item(EventStrings[STR_SUCCESS_RESYNC_SUCCESS]); else if (err2 == Dpt_Error::DPT_MSG_RTN_IGNORED) (**output).add_Item(EventStrings[STR_SUCCESS_RESYNC_NOT_SUPPORTED]); else (**output).add_Item(EventStrings[STR_SUCCESS_RESYNC_FAILED]); } } else { (*output)->add_Item(EventStrings[STR_REBOOT]); (*output)->add_Item( "\n" ); } } } EXIT(); (*output)->add_Item( "~" ); // this will make the error string NOT truncated if (err.Is_Error()) (*output)->add_Item((char*) err); return( err ); } Command &Zap::Clone() const { ENTER( "Command &Zap::Clone() const" ); EXIT(); return( *new Zap( *this ) ); } /*** END OF FILE ***/ raidutils-0.0.6.orig/raidutil/zap.hpp0000664000175000000620000000534410044153334017463 0ustar bapstaff00000000000000/* Copyright (c) 1996-2004, Adaptec Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the Adaptec Corporation nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef ZAP_HPP #define ZAP_HPP /**************************************************************************** * * Created: 10/21/98 * ***************************************************************************** * * File Name: Zap.hpp * Module: * Contributors: Mark Salyzyn * Description: * Version Control: * * $Revision: 2 $ * $NoKeywords: $ * $Log: $ *****************************************************************************/ /*** INCLUDES ***/ #include "command.hpp" #include "scsilist.hpp" #include "intlist.hpp" /*** CONSTANTS ***/ /*** TYPES ***/ class Zap:public Command { public: Zap::Zap( SCSI_Addr_List *addresses, // a list of addresses int resync = 0 // (send reset to hba or not) ); // to delete raid tables on Zap( const Zap &new_Zap ); virtual ~Zap(); Zap &operator = ( Zap &right ); Dpt_Error execute( String_List **output ); Command &Clone() const; private: void AddRaid( Int_List *component_List, DPT_TAG_T parent_Tag ); SCSI_Addr_List *address_List; int Resync; }; /*** STATIC DATA ***/ /*** MACROS ***/ /*** PROTOTYPES ***/ /*** FUNCTIONS ***/ #endif /*** END OF FILE ***/