[SCM] Packaging for mmdb branch, master, updated. upstream/1.24.2-26-g24a0650
Picca Frédéric-Emmanuel
picca at debian.org
Sat Jun 29 14:05:42 UTC 2013
The following commit has been merged in the master branch:
commit 80d31e386442e742a8305e296e9efb8301f9bd35
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date: Sat Jun 29 15:23:38 2013 +0200
Imported Upstream version 1.25.3
diff --git a/Makefile.am b/Makefile.am
index 0bab973..2f33492 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,3 +32,7 @@ mmdb/random_n.cpp mmdb/mmdb_atom.cpp mmdb/mmdb_graph.cpp \
mmdb/mmdb_selmngr.cpp mmdb/stream_.cpp mmdb/hybrid_36.cpp
mmdb_libmmdb_la_LDFLAGS = -no-undefined
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = mmdb.pc
+
diff --git a/Makefile.in b/Makefile.in
index 35edacb..6e8eade 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 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.
@@ -16,7 +15,25 @@
@SET_MAKE@
+
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -38,10 +55,17 @@ host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(pkginclude_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
- COPYING.LESSER INSTALL build-aux/config.guess \
- build-aux/config.sub build-aux/depcomp build-aux/install-sh \
- build-aux/ltmain.sh build-aux/missing
+ $(srcdir)/config.h.in $(srcdir)/mmdb.pc.in \
+ $(top_srcdir)/build-aux/ar-lib \
+ $(top_srcdir)/build-aux/config.guess \
+ $(top_srcdir)/build-aux/config.sub \
+ $(top_srcdir)/build-aux/depcomp \
+ $(top_srcdir)/build-aux/install-sh \
+ $(top_srcdir)/build-aux/ltmain.sh \
+ $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \
+ AUTHORS COPYING COPYING.LESSER INSTALL build-aux/ar-lib \
+ build-aux/config.guess build-aux/config.sub build-aux/depcomp \
+ build-aux/install-sh build-aux/ltmain.sh build-aux/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -53,7 +77,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = mmdb.pc
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@@ -82,7 +106,8 @@ am__uninstall_files_from_dir = { \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
+ "$(DESTDIR)$(pkgincludedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
mmdb_libmmdb_la_LIBADD =
am__dirstamp = $(am__leading_dot)dirstamp
@@ -102,10 +127,23 @@ mmdb_libmmdb_la_OBJECTS = $(am_mmdb_libmmdb_la_OBJECTS)
AM_V_lt = $(am__v_lt_ at AM_V@)
am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
am__v_lt_0 = --silent
+am__v_lt_1 =
mmdb_libmmdb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
$(AM_CXXFLAGS) $(CXXFLAGS) $(mmdb_libmmdb_la_LDFLAGS) \
$(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I. at am__isrc@
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
@@ -118,25 +156,29 @@ LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
AM_V_CXX = $(am__v_CXX_ at AM_V@)
am__v_CXX_ = $(am__v_CXX_ at AM_DEFAULT_V@)
-am__v_CXX_0 = @echo " CXX " $@;
-AM_V_at = $(am__v_at_ at AM_V@)
-am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
-am__v_at_0 = @
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CXXLD = $(am__v_CXXLD_ at AM_V@)
am__v_CXXLD_ = $(am__v_CXXLD_ at AM_DEFAULT_V@)
-am__v_CXXLD_0 = @echo " CXXLD " $@;
-AM_V_GEN = $(am__v_GEN_ at AM_V@)
-am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
SOURCES = $(mmdb_libmmdb_la_SOURCES)
DIST_SOURCES = $(mmdb_libmmdb_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(pkgconfig_DATA)
HEADERS = $(pkginclude_HEADERS)
ETAGS = etags
CTAGS = ctags
+CSCOPE = cscope
+AM_RECURSIVE_TARGETS = cscope
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -146,8 +188,10 @@ am__remove_distdir = \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -303,6 +347,8 @@ mmdb/random_n.cpp mmdb/mmdb_atom.cpp mmdb/mmdb_graph.cpp \
mmdb/mmdb_selmngr.cpp mmdb/stream_.cpp mmdb/hybrid_36.cpp
mmdb_libmmdb_la_LDFLAGS = -no-undefined
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = mmdb.pc
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -357,9 +403,10 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
distclean-hdr:
-rm -f config.h stamp-h1
+mmdb.pc: $(top_builddir)/config.status $(srcdir)/mmdb.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
@@ -367,6 +414,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
@@ -382,12 +431,14 @@ uninstall-libLTLIBRARIES:
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
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
mmdb/$(am__dirstamp):
@$(MKDIR_P) mmdb
@: > mmdb/$(am__dirstamp)
@@ -452,72 +503,8 @@ mmdb/libmmdb.la: $(mmdb_libmmdb_la_OBJECTS) $(mmdb_libmmdb_la_DEPENDENCIES) $(EX
mostlyclean-compile:
-rm -f *.$(OBJEXT)
- -rm -f mmdb/bfgs_min.$(OBJEXT)
- -rm -f mmdb/bfgs_min.lo
- -rm -f mmdb/file_.$(OBJEXT)
- -rm -f mmdb/file_.lo
- -rm -f mmdb/hybrid_36.$(OBJEXT)
- -rm -f mmdb/hybrid_36.lo
- -rm -f mmdb/linalg_.$(OBJEXT)
- -rm -f mmdb/linalg_.lo
- -rm -f mmdb/machine_.$(OBJEXT)
- -rm -f mmdb/machine_.lo
- -rm -f mmdb/math_.$(OBJEXT)
- -rm -f mmdb/math_.lo
- -rm -f mmdb/mattype_.$(OBJEXT)
- -rm -f mmdb/mattype_.lo
- -rm -f mmdb/mmdb_align.$(OBJEXT)
- -rm -f mmdb/mmdb_align.lo
- -rm -f mmdb/mmdb_atom.$(OBJEXT)
- -rm -f mmdb/mmdb_atom.lo
- -rm -f mmdb/mmdb_bondmngr.$(OBJEXT)
- -rm -f mmdb/mmdb_bondmngr.lo
- -rm -f mmdb/mmdb_chain.$(OBJEXT)
- -rm -f mmdb/mmdb_chain.lo
- -rm -f mmdb/mmdb_cifdefs.$(OBJEXT)
- -rm -f mmdb/mmdb_cifdefs.lo
- -rm -f mmdb/mmdb_coormngr.$(OBJEXT)
- -rm -f mmdb/mmdb_coormngr.lo
- -rm -f mmdb/mmdb_cryst.$(OBJEXT)
- -rm -f mmdb/mmdb_cryst.lo
- -rm -f mmdb/mmdb_ficif.$(OBJEXT)
- -rm -f mmdb/mmdb_ficif.lo
- -rm -f mmdb/mmdb_file.$(OBJEXT)
- -rm -f mmdb/mmdb_file.lo
- -rm -f mmdb/mmdb_graph.$(OBJEXT)
- -rm -f mmdb/mmdb_graph.lo
- -rm -f mmdb/mmdb_manager.$(OBJEXT)
- -rm -f mmdb/mmdb_manager.lo
- -rm -f mmdb/mmdb_mask.$(OBJEXT)
- -rm -f mmdb/mmdb_mask.lo
- -rm -f mmdb/mmdb_mmcif.$(OBJEXT)
- -rm -f mmdb/mmdb_mmcif.lo
- -rm -f mmdb/mmdb_model.$(OBJEXT)
- -rm -f mmdb/mmdb_model.lo
- -rm -f mmdb/mmdb_rwbrook.$(OBJEXT)
- -rm -f mmdb/mmdb_rwbrook.lo
- -rm -f mmdb/mmdb_sbase.$(OBJEXT)
- -rm -f mmdb/mmdb_sbase.lo
- -rm -f mmdb/mmdb_sbase0.$(OBJEXT)
- -rm -f mmdb/mmdb_sbase0.lo
- -rm -f mmdb/mmdb_selmngr.$(OBJEXT)
- -rm -f mmdb/mmdb_selmngr.lo
- -rm -f mmdb/mmdb_symop.$(OBJEXT)
- -rm -f mmdb/mmdb_symop.lo
- -rm -f mmdb/mmdb_tables.$(OBJEXT)
- -rm -f mmdb/mmdb_tables.lo
- -rm -f mmdb/mmdb_title.$(OBJEXT)
- -rm -f mmdb/mmdb_title.lo
- -rm -f mmdb/mmdb_uddata.$(OBJEXT)
- -rm -f mmdb/mmdb_uddata.lo
- -rm -f mmdb/mmdb_utils.$(OBJEXT)
- -rm -f mmdb/mmdb_utils.lo
- -rm -f mmdb/mmdb_xml.$(OBJEXT)
- -rm -f mmdb/mmdb_xml.lo
- -rm -f mmdb/random_n.$(OBJEXT)
- -rm -f mmdb/random_n.lo
- -rm -f mmdb/stream_.$(OBJEXT)
- -rm -f mmdb/stream_.lo
+ -rm -f mmdb/*.$(OBJEXT)
+ -rm -f mmdb/*.lo
distclean-compile:
-rm -f *.tab.c
@@ -589,10 +576,34 @@ clean-libtool:
distclean-libtool:
-rm -f libtool config.lt
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
install-pkgincludeHEADERS: $(pkginclude_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -657,8 +668,32 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+
+clean-cscope:
+ -rm -f cscope.files
+
+cscope.files: clean-cscope cscopelist
+
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
@@ -701,40 +736,36 @@ distdir: $(DISTFILES)
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
- $(am__remove_distdir)
-
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
@@ -745,8 +776,6 @@ distcheck: dist
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
@@ -758,7 +787,7 @@ distcheck: dist
*.zip*) \
unzip $(distdir).zip ;;\
esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
+ chmod -R a-w $(distdir); chmod u+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
@@ -792,7 +821,7 @@ distcheck: dist
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
@@ -824,9 +853,9 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h
installdirs:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -885,7 +914,7 @@ info: info-am
info-am:
-install-data-am: install-pkgincludeHEADERS
+install-data-am: install-pkgconfigDATA install-pkgincludeHEADERS
install-dvi: install-dvi-am
@@ -933,27 +962,29 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS
+uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgconfigDATA \
+ uninstall-pkgincludeHEADERS
.MAKE: all install-am install-strip
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
- clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \
- dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar \
- dist-tarZ dist-xz dist-zip distcheck distclean \
- distclean-compile distclean-generic distclean-hdr \
+ clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \
+ cscope cscopelist ctags dist dist-all dist-bzip2 dist-gzip \
+ dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \
+ distclean distclean-compile distclean-generic distclean-hdr \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am \
install-libLTLIBRARIES install-man install-pdf install-pdf-am \
- install-pkgincludeHEADERS install-ps install-ps-am \
- 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-libLTLIBRARIES uninstall-pkgincludeHEADERS
+ install-pkgconfigDATA install-pkgincludeHEADERS install-ps \
+ install-ps-am 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-libLTLIBRARIES uninstall-pkgconfigDATA \
+ uninstall-pkgincludeHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/aclocal.m4 b/aclocal.m4
index c9ede0b..c15146a 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,8 +1,7 @@
-# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.12.2 -*- Autoconf -*-
+
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -14,20 +13,19 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 8
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
@@ -35,10 +33,10 @@ To do so, use the procedure documented by the package, typically `autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
+[am__api_version='1.12'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.3], [],
+m4_if([$1], [1.12.2], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -54,24 +52,85 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.3])dnl
+[AM_AUTOMAKE_VERSION([1.12.2])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed. If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+ [am_cv_ar_interface=ar
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+ [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([am_ar_try])
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=ar
+ else
+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([am_ar_try])
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=lib
+ else
+ am_cv_ar_interface=unknown
+ fi
+ fi
+ rm -f conftest.lib libconftest.a
+ ])
+ ])
+
+case $am_cv_ar_interface in
+ar)
+ ;;
+lib)
+ # Microsoft lib, so override with the ar-lib wrapper script.
+ # FIXME: It is wrong to rewrite AR.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__AR in this case,
+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+ # similar.
+ AR="$am_aux_dir/ar-lib $AR"
+ ;;
+unknown)
+ m4_default([$1],
+ [AC_MSG_ERROR([could not determine $AR interface])])
+ ;;
+esac
+AC_SUBST([AR])dnl
+])
+
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 2
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
@@ -90,7 +149,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
+# harmless because $srcdir is '.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@@ -116,22 +175,21 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 9
+# serial 10
# 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_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
@@ -150,16 +208,15 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 12
+# serial 17
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
@@ -169,7 +226,7 @@ fi])])
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -182,12 +239,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], UPC, [depcc="$UPC" am_compiler_list=],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
@@ -195,8 +253,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
@@ -236,16 +294,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@@ -254,8 +312,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
@@ -263,7 +321,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ # This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@@ -311,7 +369,7 @@ AM_CONDITIONAL([am__fastdep$1], [
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
@@ -321,9 +379,13 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
@@ -338,14 +400,13 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-#serial 5
+# serial 6
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
@@ -364,7 +425,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# 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
+ # 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.
@@ -376,21 +437,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
+ # 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
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
@@ -408,7 +467,7 @@ AC_DEFUN([_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
+# 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],
@@ -418,14 +477,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 16
+# serial 19
# 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.
@@ -471,31 +529,41 @@ AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[AC_DIAGNOSE([obsolete],
+[$0: two- and three-arguments forms are deprecated. For more info, see:
+http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
@@ -506,28 +574,35 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
- [_AM_DEPENDENCIES(OBJC)],
- [define([AC_PROG_OBJC],
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+dnl Support for Objective C++ was only introduced in Autoconf 2.65,
+dnl but we still cater to Autoconf 2.62.
+m4_ifdef([AC_PROG_OBJCXX],
+[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
@@ -555,14 +630,13 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 8
# AM_PROG_INSTALL_SH
# ------------------
@@ -577,9 +651,9 @@ if test x"${install_sh}" != xset; then
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -603,20 +677,19 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
-# 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 7
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well. Anyway, the user
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well. Anyway, the user
# can override the default with the --enable/--disable switch.
AC_DEFUN([AM_MAINTAINER_MODE],
[m4_case(m4_default([$1], [disable]),
@@ -627,10 +700,11 @@ AC_DEFUN([AM_MAINTAINER_MODE],
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
-[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- [USE_MAINTAINER_MODE=$enableval],
- [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
@@ -642,13 +716,13 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
+# serial 5
# AM_MAKE_INCLUDE()
# -----------------
@@ -667,7 +741,7 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# Ignore all kinds of additional output from 'make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
@@ -694,14 +768,13 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 6
+# serial 7
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@@ -731,49 +804,19 @@ 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])
+ AC_MSG_WARN(['missing' script is too old or missing])
fi
])
-# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
-# Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 1
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
- [[\\/$]]* | ?:[[\\/]]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 6
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -784,7 +827,7 @@ AC_DEFUN([_AM_MANGLE_OPTION],
# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
# _AM_SET_OPTIONS(OPTIONS)
# ------------------------
@@ -800,22 +843,18 @@ AC_DEFUN([_AM_IF_OPTION],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 9
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -826,32 +865,40 @@ case `pwd` in
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
- AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
test "$[2]" = conftest.file
)
then
@@ -861,31 +908,52 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
-# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
+# serial 3
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Enable less verbose build rules; with the default set to DEFAULT
-# (`yes' being less verbose, `no' or empty being verbose).
+# ("yes" being less verbose, "no" or empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[ --enable-silent-rules less verbose build output (undo: `make V=1')
- --disable-silent-rules verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no) AM_DEFAULT_VERBOSITY=1;;
-*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
esac
dnl
-dnl A few `make' implementations (e.g., NonStop OS and NextStep)
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
dnl do not support nested variable expansions.
dnl See automake bug#9928 and bug#10237.
am_make=${MAKE-make}
@@ -903,7 +971,7 @@ else
am_cv_make_support_nested_variables=no
fi])
if test $am_cv_make_support_nested_variables = yes; then
- dnl Using `$V' instead of `$(V)' breaks IRIX make.
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
@@ -920,37 +988,37 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 2
# AM_PROG_INSTALL_STRIP
# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# One issue with vendor 'install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
+# always use install-sh in "make install-strip", and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -971,18 +1039,18 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
+# serial 3
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# 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
@@ -1005,7 +1073,7 @@ AC_MSG_CHECKING([how to create a $1 tar archive])
_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 `-'.
+# Solaris sh will not grok spaces in the rhs of '-'.
for _am_tool in $_am_tools
do
case $_am_tool in
diff --git a/build-aux/ar-lib b/build-aux/ar-lib
new file mode 100755
index 0000000..67f5f36
--- /dev/null
+++ b/build-aux/ar-lib
@@ -0,0 +1,270 @@
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2012-03-01.08; # UTC
+
+# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Written by Peter Rosin <peda at lysator.liu.se>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+
+# func_error message
+func_error ()
+{
+ echo "$me: $1" 1>&2
+ exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv in
+ mingw)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+ operation=$2
+ archive=$3
+ at_file_contents=`cat "$1"`
+ eval set x "$at_file_contents"
+ shift
+
+ for member
+ do
+ $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+ done
+}
+
+case $1 in
+ '')
+ func_error "no command. Try '$0 --help' for more information."
+ ;;
+ -h | --h*)
+ cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "$me, version $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test $# -lt 3; then
+ func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+ if test $# -lt 2; then
+ func_error "you must specify a program, an action and an archive"
+ fi
+ case $1 in
+ -lib | -LIB \
+ | -ltcg | -LTCG \
+ | -machine* | -MACHINE* \
+ | -subsystem* | -SUBSYSTEM* \
+ | -verbose | -VERBOSE \
+ | -wx* | -WX* )
+ AR="$AR $1"
+ shift
+ ;;
+ *)
+ action=$1
+ shift
+ break
+ ;;
+ esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+quick=
+replace=
+index=
+create=
+
+while test -n "$action"
+do
+ case $action in
+ d*) delete=yes ;;
+ x*) extract=yes ;;
+ t*) list=yes ;;
+ q*) quick=yes ;;
+ r*) replace=yes ;;
+ s*) index=yes ;;
+ S*) ;; # the index is always updated implicitly
+ c*) create=yes ;;
+ u*) ;; # TODO: don't ignore the update modifier
+ v*) ;; # TODO: don't ignore the verbose modifier
+ *)
+ func_error "unknown action specified"
+ ;;
+ esac
+ action=${action#?}
+done
+
+case $delete$extract$list$quick$replace,$index in
+ yes,* | ,yes)
+ ;;
+ yesyes*)
+ func_error "more than one action specified"
+ ;;
+ *)
+ func_error "no action specified"
+ ;;
+esac
+
+if test -n "$delete"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -REMOVE "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+
+elif test -n "$extract"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ if test $# -gt 0; then
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -EXTRACT "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+ else
+ $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+ do
+ $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+ done
+ fi
+
+elif test -n "$quick$replace"; then
+ if test ! -f "$orig_archive"; then
+ if test -z "$create"; then
+ echo "$me: creating $orig_archive"
+ fi
+ orig_archive=
+ else
+ orig_archive=$archive
+ fi
+
+ for member
+ do
+ case $1 in
+ @*)
+ func_file_conv "${1#@}"
+ set x "$@" "@$file"
+ ;;
+ *)
+ func_file_conv "$1"
+ set x "$@" "$file"
+ ;;
+ esac
+ shift
+ shift
+ done
+
+ if test -n "$orig_archive"; then
+ $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+ else
+ $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+ fi
+
+elif test -n "$list"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ $AR -NOLOGO -LIST "$archive" || exit $?
+fi
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
old mode 100755
new mode 100644
index 78cf017..63ae69d
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -1,9 +1,9 @@
-# libtool (GNU libtool) 2.4
+# libtool (GNU libtool) 2.4.2
# Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011 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.
@@ -41,6 +41,7 @@
# --quiet, --silent don't print informational messages
# --no-quiet, --no-silent
# print informational messages (default)
+# --no-warn don't display warning messages
# --tag=TAG use configuration variables from tag TAG
# -v, --verbose print more informational messages than default
# --no-verbose don't print the extra informational messages
@@ -69,7 +70,7 @@
# compiler: $LTCC
# compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.4
+# $progname: (GNU libtool) 2.4.2
# automake: $automake_version
# autoconf: $autoconf_version
#
@@ -79,9 +80,9 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION=2.4
+VERSION=2.4.2
TIMESTAMP=""
-package_revision=1.3293
+package_revision=1.3337
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -136,15 +137,10 @@ progpath="$0"
: ${CP="cp -f"}
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
-: ${LN_S="ln -s"}
: ${MAKE="make"}
: ${MKDIR="mkdir"}
: ${MV="mv -f"}
: ${RM="rm -f"}
-: ${SED="/bin/sed"}
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
: ${Xsed="$SED -e 1s/^X//"}
@@ -387,7 +383,7 @@ case $progpath in
;;
*)
save_IFS="$IFS"
- IFS=:
+ IFS=${PATH_SEPARATOR-:}
for progdir in $PATH; do
IFS="$save_IFS"
test -x "$progdir/$progname" && break
@@ -771,8 +767,8 @@ func_help ()
s*\$LTCFLAGS*'"$LTCFLAGS"'*
s*\$LD*'"$LD"'*
s/\$with_gnu_ld/'"$with_gnu_ld"'/
- s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
- s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
p
d
}
@@ -1052,6 +1048,7 @@ opt_finish=false
opt_help=false
opt_help_all=false
opt_silent=:
+opt_warning=:
opt_verbose=:
opt_silent=false
opt_verbose=false
@@ -1120,6 +1117,10 @@ esac
opt_silent=false
func_append preserve_args " $opt"
;;
+ --no-warning|--no-warn)
+ opt_warning=false
+func_append preserve_args " $opt"
+ ;;
--no-verbose)
opt_verbose=false
func_append preserve_args " $opt"
@@ -2059,7 +2060,7 @@ func_mode_compile ()
*.[cCFSifmso] | \
*.ada | *.adb | *.ads | *.asm | \
*.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
- *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
func_xform "$libobj"
libobj=$func_xform_result
;;
@@ -3201,11 +3202,13 @@ func_mode_install ()
# Set up the ranlib parameters.
oldlib="$destdir/$name"
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
if test -n "$stripme" && test -n "$old_striplib"; then
- func_show_eval "$old_striplib $oldlib" 'exit $?'
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
fi
# Do each command in the postinstall commands.
@@ -3470,7 +3473,7 @@ static const void *lt_preloaded_setup() {
# 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*)
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
*-*-hpux*)
pic_flag_for_symtable=" $pic_flag" ;;
@@ -3982,14 +3985,17 @@ func_exec_program_core ()
# launches target application with the remaining arguments.
func_exec_program ()
{
- for lt_wr_arg
- do
- case \$lt_wr_arg in
- --lt-*) ;;
- *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
- esac
- shift
- done
+ case \" \$* \" in
+ *\\ --lt-*)
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done ;;
+ esac
func_exec_program_core \${1+\"\$@\"}
}
@@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f)
{
EOF
func_emit_wrapper yes |
- $SED -e 's/\([\\"]\)/\\\1/g' \
- -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
-
+ $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/ fputs ("\1", f);/p
+g
+D'
cat <<"EOF"
}
EOF
@@ -5643,7 +5655,8 @@ func_mode_link ()
continue
;;
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
func_append finalize_command " $arg"
@@ -6147,7 +6160,8 @@ func_mode_link ()
lib=
found=no
case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
@@ -6831,7 +6845,7 @@ func_mode_link ()
test "$hardcode_direct_absolute" = no; then
add="$dir/$linklib"
elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
+ add_dir="-L$absdir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in
@@ -7316,6 +7330,7 @@ func_mode_link ()
# which has an extra 1 added just for fun
#
case $version_type in
+ # correct linux to gnu/linux during the next big refactor
darwin|linux|osf|windows|none)
func_arith $number_major + $number_minor
current=$func_arith_result
@@ -7432,7 +7447,7 @@ func_mode_link ()
versuffix="$major.$revision"
;;
- linux)
+ linux) # correct to gnu/linux during the next big refactor
func_arith $current - $age
major=.$func_arith_result
versuffix="$major.$age.$revision"
@@ -8020,6 +8035,11 @@ EOF
# Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
+ # Remove ${wl} instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
if test "$hardcode_into_libs" = yes; then
# Hardcode the library paths
hardcode_libdirs=
@@ -8058,11 +8078,7 @@ EOF
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
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then
# We should set the runpath_var.
@@ -9152,6 +9168,8 @@ EOF
esac
done
fi
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
eval cmds=\"$old_archive_cmds\"
func_len " $cmds"
@@ -9261,7 +9279,8 @@ EOF
*.la)
func_basename "$deplib"
name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ func_resolve_sysroot "$deplib"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
test -z "$libdir" && \
func_fatal_error "\`$deplib' is not a valid libtool archive"
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
diff --git a/configure b/configure
index f0b3054..d88fc9e 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,9 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for mmdb 1.24.2.
+# Generated by GNU Autoconf 2.69 for mmdb 1.25.3.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -134,6 +132,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -220,21 +244,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -336,6 +364,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -457,6 +493,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -491,16 +531,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -512,28 +552,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# 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'"
@@ -567,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='mmdb'
PACKAGE_TARNAME='mmdb'
-PACKAGE_VERSION='1.24.2'
-PACKAGE_STRING='mmdb 1.24.2'
+PACKAGE_VERSION='1.25.3'
+PACKAGE_STRING='mmdb 1.25.3'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -631,8 +651,6 @@ NMEDIT
DSYMUTIL
MANIFEST_TOOL
RANLIB
-ac_ct_AR
-AR
LN_S
NM
ac_ct_DUMPBIN
@@ -642,6 +660,18 @@ FGREP
EGREP
GREP
SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
@@ -659,18 +689,8 @@ CPPFLAGS
LDFLAGS
CFLAGS
CC
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-LIBTOOL
-OBJDUMP
-DLLTOOL
-AS
+ac_ct_AR
+AR
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
@@ -740,11 +760,11 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_silent_rules
+enable_dependency_tracking
enable_shared
enable_static
with_pic
enable_fast_install
-enable_dependency_tracking
with_gnu_ld
with_sysroot
enable_libtool_lock
@@ -1218,8 +1238,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1305,7 +1323,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures mmdb 1.24.2 to adapt to many kinds of systems.
+\`configure' configures mmdb 1.25.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1375,7 +1393,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mmdb 1.24.2:";;
+ short | recursive ) echo "Configuration of mmdb 1.25.3:";;
esac
cat <<\_ACEOF
@@ -1383,17 +1401,20 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-silent-rules less verbose build output (undo: `make V=1')
- --disable-silent-rules verbose build output (undo: `make V=0')
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
--enable-shared[=PKGS] build shared libraries [default=no]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
--disable-libtool-lock avoid locking (might break parallel builds)
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
+ --enable-maintainer-mode
+ enable make rules and dependencies not useful (and
+ sometimes confusing) to the casual installer
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1483,10 +1504,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-mmdb configure 1.24.2
-generated by GNU Autoconf 2.68
+mmdb configure 1.25.3
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1562,7 +1583,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1860,7 +1881,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1882,8 +1903,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by mmdb $as_me 1.24.2, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by mmdb $as_me 1.25.3, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2264,7 +2285,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
ac_config_headers="$ac_config_headers config.h"
-am__api_version='1.11'
+am__api_version='1.12'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -2303,7 +2324,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_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.
@@ -2361,9 +2382,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -2374,32 +2392,40 @@ case `pwd` in
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
-alias in your environment" "$LINENO" 5
- fi
-
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
test "$2" = conftest.file
)
then
@@ -2411,6 +2437,16 @@ Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
@@ -2437,8 +2473,8 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
if test x"${install_sh}" != xset; then
@@ -2450,10 +2486,10 @@ if test x"${install_sh}" != xset; then
esac
fi
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
+# will honor the 'STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
@@ -2472,7 +2508,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2512,7 +2548,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2563,7 +2599,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir (GNU coreutils) '* | \
'mkdir (coreutils) '* | \
@@ -2592,12 +2628,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
$as_echo "$MKDIR_P" >&6; }
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
- [\\/$]* | ?:[\\/]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -2616,7 +2646,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2685,10 +2715,10 @@ if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
fi
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no) AM_DEFAULT_VERBOSITY=1;;
-*) AM_DEFAULT_VERBOSITY=1;;
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
esac
am_make=${MAKE-make}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
@@ -2741,7 +2771,7 @@ fi
# Define the identity of the package.
PACKAGE='mmdb'
- VERSION='1.24.2'
+ VERSION='1.25.3'
cat >>confdefs.h <<_ACEOF
@@ -2769,6 +2799,12 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
@@ -2781,171 +2817,6 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
-case `pwd` in
- *\ * | *\ *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
-esac
-
-
-
-macro_version='2.4'
-macro_revision='1.3293'
-
-
-
-
-
-
-
-
-
-
-
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-# Backslashify metacharacters that are still active within
-# double-quoted strings.
-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 delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
-$as_echo_n "checking how to print strings... " >&6; }
-# Test print first, because it will be a builtin if present.
-if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
- test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='print -r --'
-elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='printf %s\n'
-else
- # Use this function as a fallback that always works.
- func_fallback_echo ()
- {
- eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
- }
- ECHO='func_fallback_echo'
-fi
-
-# func_echo_all arg...
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
-{
- $ECHO ""
-}
-
-case "$ECHO" in
- printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
-$as_echo "printf" >&6; } ;;
- print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
-$as_echo "print -r" >&6; } ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
-$as_echo "cat" >&6; } ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@@ -2965,7 +2836,7 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# Ignore all kinds of additional output from 'make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
@@ -3031,7 +2902,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3071,7 +2942,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3124,7 +2995,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3165,7 +3036,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3223,7 +3094,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3267,7 +3138,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3713,8 +3584,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* 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);
@@ -3734,197 +3604,523 @@ static char *f (char * (*g) (char **, int), char **p, ...)
return s;
}
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=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=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar lib "link -lib"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar lib "link -lib"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+fi
+
+: ${AR=ar}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
+$as_echo_n "checking the archiver ($AR) interface... " >&6; }
+if ${am_cv_ar_interface+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_ar_interface=ar
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int some_variable = 0;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+ (eval $am_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=ar
+ else
+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+ (eval $am_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=lib
+ else
+ am_cv_ar_interface=unknown
+ fi
+ fi
+ rm -f conftest.lib libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
+$as_echo "$am_cv_ar_interface" >&6; }
+
+case $am_cv_ar_interface in
+ar)
+ ;;
+lib)
+ # Microsoft lib, so override with the ar-lib wrapper script.
+ # FIXME: It is wrong to rewrite AR.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__AR in this case,
+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+ # similar.
+ AR="$am_aux_dir/ar-lib $AR"
+ ;;
+unknown)
+ as_fn_error $? "could not determine $AR interface" "$LINENO" 5
+ ;;
+esac
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4.2'
+macro_revision='1.3337'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-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 ()
+# 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 delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
+ $ECHO ""
}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+case "$ECHO" in
+ printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+ print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-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
-depcc="$CC" am_compiler_list=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CC_dependencies_compiler_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- rm -rf conftest.dir
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
- am_cv_CC_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- am__universal=false
- case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CC_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CC_dependencies_compiler_type=none
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
- if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
- am__fastdepCC_TRUE=
- am__fastdepCC_FALSE='#'
-else
- am__fastdepCC_TRUE='#'
- am__fastdepCC_FALSE=
-fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
@@ -3949,7 +4145,7 @@ do
for ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+ as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
case `"$ac_path_SED" --version 2>&1` in
@@ -4025,7 +4221,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -4091,7 +4287,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4158,7 +4354,7 @@ do
for ac_prog in fgrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+ as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
case `"$ac_path_FGREP" --version 2>&1` in
@@ -4414,7 +4610,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4458,7 +4654,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4877,7 +5073,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4917,7 +5113,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5220,7 +5416,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5260,7 +5456,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5341,7 +5537,6 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
-
if test -n "$ac_tool_prefix"; then
for ac_prog in ar
do
@@ -5361,7 +5556,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5405,7 +5600,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5530,7 +5725,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5570,7 +5765,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5629,7 +5824,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5669,7 +5864,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6304,7 +6499,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6344,7 +6539,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6424,7 +6619,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6464,7 +6659,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6516,7 +6711,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6556,7 +6751,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NMEDIT="nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6608,7 +6803,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6648,7 +6843,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LIPO="lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6700,7 +6895,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6740,7 +6935,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL="otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6792,7 +6987,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6832,7 +7027,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL64="otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7356,7 +7551,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AS="${ac_tool_prefix}as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7396,7 +7591,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AS="as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7448,7 +7643,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7488,7 +7683,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7540,7 +7735,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7580,7 +7775,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -11613,7 +11808,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -11657,7 +11852,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -11853,8 +12048,8 @@ else
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
@@ -11889,16 +12084,16 @@ else
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@@ -11907,8 +12102,8 @@ else
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
@@ -11916,7 +12111,7 @@ else
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ # This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@@ -15175,6 +15370,37 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# AC_PROG_CXX doesn't fail if compiler is not found, test it explicitely
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+else
+ as_fn_error $? "C++ compiler not found." "$LINENO" 5
+fi
+rm -f core 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
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
@@ -15257,7 +15483,7 @@ else
as_fn_error $? "need math library" "$LINENO" 5
fi
-ac_config_files="$ac_config_files Makefile"
+ac_config_files="$ac_config_files Makefile mmdb.pc"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -15368,6 +15594,14 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@@ -15690,16 +15924,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -15759,28 +15993,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# 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'"
@@ -15801,8 +16023,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by mmdb $as_me 1.24.2, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by mmdb $as_me 1.25.3, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -15867,11 +16089,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-mmdb config.status 1.24.2
-configured by $0, generated by GNU Autoconf 2.68,
+mmdb config.status 1.25.3
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -15962,7 +16184,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -16379,6 +16601,7 @@ do
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "mmdb.pc") CONFIG_FILES="$CONFIG_FILES mmdb.pc" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -16988,7 +17211,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
# 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
+ # 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.
@@ -17022,21 +17245,19 @@ $as_echo X"$mf" |
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
+ # 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
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`$as_dirname -- "$file" ||
diff --git a/configure.ac b/configure.ac
index cbdfe51..4193561 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,15 +1,21 @@
-AC_INIT(mmdb, 1.24.2) # keep in sync with mmdb/mmdb_defs.h
+AC_INIT(mmdb, 1.25.3) # keep in sync with mmdb/mmdb_defs.h
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_SRCDIR(mmdb/mmdb_align.cpp)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects silent-rules -Wall])
+AM_PROG_AR
LT_INIT([disable-shared win32-dll])
AC_PROG_CXX
+# AC_PROG_CXX doesn't fail if compiler is not found, test it explicitely
+AC_LANG_PUSH(C++)
+AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [],
+ [AC_MSG_ERROR([C++ compiler not found.])])
+AC_LANG_POP(C++)
AM_MAINTAINER_MODE dnl disable (by default) maintainer mode
AC_SEARCH_LIBS([cos], [m], [], [AC_MSG_ERROR([need math library])])
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile mmdb.pc)
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index 9c7b5d4..07a8602 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -9,15 +9,15 @@
# @configure_input@
-# serial 3293 ltversion.m4
+# serial 3337 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4])
-m4_define([LT_PACKAGE_REVISION], [1.3293])
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4'
-macro_revision='1.3293'
+[macro_version='2.4.2'
+macro_revision='1.3337'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
diff --git a/mmdb.pc.in b/mmdb.pc.in
new file mode 100644
index 0000000..dd654a4
--- /dev/null
+++ b/mmdb.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: mmdb
+Description: Macromolecular coordinate library
+Version: @VERSION@
+Libs: -L${libdir} -lmmdb
+Cflags: -I${includedir}
diff --git a/mmdb/mmdb_atom.cpp b/mmdb/mmdb_atom.cpp
index d0533f2..b9c3285 100644
--- a/mmdb/mmdb_atom.cpp
+++ b/mmdb/mmdb_atom.cpp
@@ -6,13 +6,13 @@
//
// Copyright (C) Eugene Krissinel 2000-2008.
//
-// This library is free software: you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License version 3, modified in accordance with the provisions
+// This library is free software: you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License version 3, modified in accordance with the provisions
// of the license to address the requirements of UK law.
//
-// You should have received a copy of the modified GNU Lesser
-// General Public License along with this library. If not, copies
+// You should have received a copy of the modified GNU Lesser
+// General Public License along with this library. If not, copies
// may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
//
// This program is distributed in the hope that it will be useful,
@@ -22,18 +22,18 @@
//
// =================================================================
//
-// 04.02.09 <-- Date of Last Modification.
+// 23.04.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
// **** Module : MMDB_Atom <implementation>
// ~~~~~~~~~
// **** Project : MacroMolecular Data Base (MMDB)
-// ~~~~~~~~~
+// ~~~~~~~~~
// **** Classes : CAtom ( atom class )
// ~~~~~~~~~ CResidue ( residue class )
//
-// Copyright (C) E. Krissinel 2000-2009
+// Copyright (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -126,6 +126,7 @@ void CAtom::InitAtom() {
serNum = -1; // serial number
index = -1; // index in the file
name[0] = char(0); // atom name
+ label_atom_id[0] = char(0); // assigned atom name (not aligned)
altLoc[0] = char(0); // alternate location indicator
residue = NULL; // reference to residue
x = 0.0; // orthogonal x-coordinate in angstroms
@@ -145,11 +146,11 @@ void CAtom::InitAtom() {
u11 = 0.0; //
u22 = 0.0; // anisotropic
u33 = 0.0; //
- u12 = 0.0; // temperature
+ u12 = 0.0; // temperature
u13 = 0.0; //
u23 = 0.0; // factors
su11 = 0.0; //
- su22 = 0.0; // standard
+ su22 = 0.0; // standard
su33 = 0.0; // deviations of
su12 = 0.0; // anisotropic
su13 = 0.0; // temperature
@@ -177,7 +178,7 @@ int CAtom::GetNBonds() {
void CAtom::GetBonds ( RPSAtomBond AtomBond, int & nAtomBonds ) {
// This GetBonds(..) returns pointer to the CAtom's
-// internal Bond structure, IT MUST NOT BE DISPOSED.
+// internal Bond structure, IT MUST NOT BE DISPOSED.
nAtomBonds = nBonds & 0x000000FF;
AtomBond = Bond;
}
@@ -277,26 +278,21 @@ char N[10];
hy36encode ( 5,index,N );
strcpy_n ( &(S[6]),N,5 );
}
- /*
- if (serNum>0)
- PutInteger ( &(S[6]),serNum,5 );
- else PutInteger ( &(S[6]),index ,5 );
- */
if (!Ter) {
if (altLoc[0]) S[16] = altLoc[0];
strcpy_n ( &(S[12]),name ,4 );
strcpy_n ( &(S[72]),segID ,4 );
strcpy_nr ( &(S[76]),element,2 );
if (WhatIsSet & ASET_Charge) {
- sprintf ( N,"%+2i",mround(charge) );
+ if (charge>0) sprintf ( N,"%1i+",mround(charge) );
+ else if (charge<0) sprintf ( N,"%1i-",mround(-charge) );
+ else strcpy ( N," " );
strcpy_n ( &(S[78]),N,2 );
} else
strcpy_n ( &(S[78])," ",2 );
}
strcpy_nr ( &(S[17]),residue->name,3 );
strcpy_nr ( &(S[20]),residue->chain->chainID,2 );
-// S[21] = residue->chain->chainID[0];
-// if (!S[21]) S[21] = ' ';
if (residue->seqNum>MinInt4) {
if ((-999<=residue->seqNum) && (residue->seqNum<=9999))
PutIntIns ( &(S[22]),residue->seqNum,4,residue->insCode );
@@ -373,139 +369,274 @@ char N[10];
int i,j,RC;
PCChain chain = NULL;
PCModel model = NULL;
-Boolean singleModel = True;
+//Boolean singleModel = True;
if (residue) chain = residue->chain;
if (chain) model = PCModel(chain->model);
- if (model) {
- if (model->manager)
- singleModel = PCMMDBFile(model->manager)->nModels<=1;
- }
+// if (model) {
+// if (model->manager)
+// singleModel = PCMMDBFile(model->manager)->nModels<=1;
+// }
+
+/*
+
+loop_
+*0 _atom_site.group_PDB
+*1 _atom_site.id
+*2 _atom_site.type_symbol <- chem elem
+-3 _atom_site.label_atom_id <- atom name
+*4 _atom_site.label_alt_id <- alt code
+=5 _atom_site.label_comp_id <- res name ???
+=6 _atom_site.label_asym_id <- chain id ???
+=7 _atom_site.label_entity_id < ???
+=8 _atom_site.label_seq_id <- poly seq id
++9 _atom_site.pdbx_PDB_ins_code <- ins code
+-10 _atom_site.segment_id <- segment id
+*11 _atom_site.Cartn_x
+*12 _atom_site.Cartn_y
+*13 _atom_site.Cartn_z
+*14 _atom_site.occupancy
+*15 _atom_site.B_iso_or_equiv
+*16 _atom_site.Cartn_x_esd
+*17 _atom_site.Cartn_y_esd
+*18 _atom_site.Cartn_z_esd
+*19 _atom_site.occupancy_esd
+*20 _atom_site.B_iso_or_equiv_esd
+*21 _atom_site.pdbx_formal_charge
++22 _atom_site.auth_seq_id <- seq id we want
++23 _atom_site.auth_comp_id <- res name we want
++24 _atom_site.auth_asym_id <- ch id we want ?
+*25 _atom_site.auth_atom_id <- atom name we want ?
++26 _atom_site.pdbx_PDB_model_num <- model no
+
+'+' is read in CMMDBFile::CheckAtomPlace()
+'=' new in residue
+'-' new in atom
+
+
+*/
RC = CIF->AddLoop ( CIFCAT_ATOM_SITE,Loop );
if (RC!=CIFRC_Ok) {
// the category was (re)created, provide tags
+
Loop->AddLoopTag ( CIFTAG_GROUP_PDB ); // ATOM, TER etc.
Loop->AddLoopTag ( CIFTAG_ID ); // serial number
- Loop->AddLoopTag ( CIFTAG_AUTH_ATOM_ID ); // atom name
+
+ Loop->AddLoopTag ( CIFTAG_TYPE_SYMBOL ); // element symbol
+ Loop->AddLoopTag ( CIFTAG_LABEL_ATOM_ID ); // atom name
Loop->AddLoopTag ( CIFTAG_LABEL_ALT_ID ); // alt location
- Loop->AddLoopTag ( CIFTAG_AUTH_COMP_ID ); // residue name
- Loop->AddLoopTag ( CIFTAG_AUTH_ASYM_ID ); // chain id
- Loop->AddLoopTag ( CIFTAG_AUTH_SEQ_ID ); // res seq number
-// Loop->AddLoopTag ( CIFTAG_LABEL_ATOM_ID ); // atom name
-// Loop->AddLoopTag ( CIFTAG_LABEL_COMP_ID ); // residue name
-// Loop->AddLoopTag ( CIFTAG_LABEL_ASYM_ID ); // chain ID
-// Loop->AddLoopTag ( CIFTAG_LABEL_SEQ_ID ); // res seq number
+ Loop->AddLoopTag ( CIFTAG_LABEL_COMP_ID ); // residue name
+ Loop->AddLoopTag ( CIFTAG_LABEL_ASYM_ID ); // chain ID
+ Loop->AddLoopTag ( CIFTAG_LABEL_ENTITY_ID ); // entity ID
+ Loop->AddLoopTag ( CIFTAG_LABEL_SEQ_ID ); // res seq number
Loop->AddLoopTag ( CIFTAG_PDBX_PDB_INS_CODE ); // insertion code
+ Loop->AddLoopTag ( CIFTAG_SEGMENT_ID ); // segment ID
+
Loop->AddLoopTag ( CIFTAG_CARTN_X ); // x-coordinate
Loop->AddLoopTag ( CIFTAG_CARTN_Y ); // y-coordinate
Loop->AddLoopTag ( CIFTAG_CARTN_Z ); // z-coordinate
Loop->AddLoopTag ( CIFTAG_OCCUPANCY ); // occupancy
Loop->AddLoopTag ( CIFTAG_B_ISO_OR_EQUIV ); // temp factor
- Loop->AddLoopTag ( CIFTAG_SEGMENT_ID ); // segment ID
- Loop->AddLoopTag ( CIFTAG_TYPE_SYMBOL ); // element symbol
- Loop->AddLoopTag ( CIFTAG_CHARGE ); // charge on atom
+
Loop->AddLoopTag ( CIFTAG_CARTN_X_ESD ); // x-sigma
Loop->AddLoopTag ( CIFTAG_CARTN_Y_ESD ); // y-sigma
Loop->AddLoopTag ( CIFTAG_CARTN_Z_ESD ); // z-sigma
Loop->AddLoopTag ( CIFTAG_OCCUPANCY_ESD ); // occupancy-sigma
Loop->AddLoopTag ( CIFTAG_B_ISO_OR_EQUIV_ESD ); // t-factor-sigma
- Loop->AddLoopTag ( CIFTAG_PDBX_PDB_MODEL_NUM ); // model number
+
+ Loop->AddLoopTag ( CIFTAG_PDBX_FORMAL_CHARGE ); // charge on atom
+
+ Loop->AddLoopTag ( CIFTAG_AUTH_SEQ_ID ); // res seq number
+ Loop->AddLoopTag ( CIFTAG_AUTH_COMP_ID ); // residue name
+ Loop->AddLoopTag ( CIFTAG_AUTH_ASYM_ID ); // chain id
+ Loop->AddLoopTag ( CIFTAG_AUTH_ATOM_ID ); // atom name
+
+ Loop->AddLoopTag ( CIFTAG_PDBX_PDB_MODEL_NUM ); // model number
+
}
- if (Ter) {
+ if (Ter) { // ter record
+
+ if (!(WhatIsSet & ASET_Coordinates))
+ return;
- if (!(WhatIsSet & ASET_Coordinates)) return;
+ // (0)
Loop->AddString ( pstr("TER") );
+ // (1)
if (serNum>0) Loop->AddInteger ( serNum );
else Loop->AddInteger ( index );
+ // (2,3,4)
+ Loop->AddNoData ( CIF_NODATA_QUESTION ); // no element symbol
Loop->AddNoData ( CIF_NODATA_QUESTION ); // no atom name
- Loop->AddNoData ( CIF_NODATA_QUESTION ); // no alt code
- if (residue) Loop->AddString ( residue->name );
- else Loop->AddString ( NULL );
- if (chain) Loop->AddString ( chain->chainID,True );
- else Loop->AddString ( NULL );
+ Loop->AddNoData ( CIF_NODATA_QUESTION ); // no alt code
if (residue) {
- if (residue->seqNum>MinInt4)
- Loop->AddInteger ( residue->seqNum );
- else Loop->AddNoData ( CIF_NODATA_DOT );
+ // (5)
+ Loop->AddString ( residue->label_comp_id );
+ // (6)
+ Loop->AddString ( residue->label_asym_id );
+ // (7)
+ if (residue->label_entity_id>0)
+ Loop->AddInteger ( residue->label_entity_id );
+ else Loop->AddNoData ( CIF_NODATA_DOT );
+ // (8)
+ if (residue->label_seq_id>MinInt4)
+ Loop->AddInteger ( residue->label_seq_id );
+ else Loop->AddNoData ( CIF_NODATA_DOT );
+ // (9)
Loop->AddString ( residue->insCode,True );
} else {
+ // (5,6,7,8,9)
+ Loop->AddString ( NULL );
+ Loop->AddString ( NULL );
+ Loop->AddNoData ( CIF_NODATA_DOT );
Loop->AddNoData ( CIF_NODATA_DOT );
Loop->AddNoData ( CIF_NODATA_DOT );
}
-
- for (i=0;i<13;i++)
+
+ // (10-21)
+ for (i=10;i<=21;i++)
Loop->AddNoData ( CIF_NODATA_QUESTION );
+ // (22,23)
+ if (residue) {
+ if (residue->seqNum>MinInt4)
+ Loop->AddInteger ( residue->seqNum );
+ else Loop->AddNoData ( CIF_NODATA_DOT );
+ Loop->AddString ( residue->name );
+ } else {
+ Loop->AddNoData ( CIF_NODATA_DOT );
+ Loop->AddString ( NULL );
+ }
+
+ // (24)
+ if (chain) Loop->AddString ( chain->chainID,True );
+ else Loop->AddString ( NULL );
+
+ // (25)
+ Loop->AddNoData ( CIF_NODATA_QUESTION ); // no atom name
+
} else if (WhatIsSet & (ASET_Coordinates | ASET_CoordSigma)) {
+ // normal atom record
if (!WhatIsSet) return;
+
+ // (0)
if (Het) Loop->AddString ( pstr("HETATM") );
else Loop->AddString ( pstr("ATOM") );
+ // (1)
if (serNum>0) Loop->AddInteger ( serNum );
else Loop->AddInteger ( index );
+
if (WhatIsSet & ASET_Coordinates) {
- strcpy_css ( AtName,name );
- Loop->AddString ( AtName ); // atom name
+
+ // (2)
+ strcpy_css ( el,element );
+ Loop->AddString ( el,True );
+ // (3)
+ Loop->AddString ( label_atom_id ); // assigned atom name
+ // (4)
Loop->AddString ( altLoc,True ); // alt code
- if (residue) Loop->AddString ( residue->name );
- else Loop->AddNoData ( CIF_NODATA_DOT );
- if (chain) Loop->AddString ( chain->chainID,True );
- else Loop->AddNoData ( CIF_NODATA_DOT );
+
if (residue) {
- if (residue->seqNum>MinInt4)
- Loop->AddInteger ( residue->seqNum );
- else Loop->AddNoData ( CIF_NODATA_DOT );
+ // (5)
+ Loop->AddString ( residue->label_comp_id );
+ // (6)
+ Loop->AddString ( residue->label_asym_id );
+ // (7)
+ if (residue->label_entity_id>0)
+ Loop->AddInteger ( residue->label_entity_id );
+ else Loop->AddNoData ( CIF_NODATA_DOT );
+ // (8)
+ if (residue->label_seq_id>MinInt4)
+ Loop->AddInteger ( residue->label_seq_id );
+ else Loop->AddNoData ( CIF_NODATA_DOT );
+ // (9)
Loop->AddString ( residue->insCode,True );
} else {
+ // (5,6,7,8,9)
+ Loop->AddString ( NULL );
+ Loop->AddString ( NULL );
+ Loop->AddNoData ( CIF_NODATA_DOT );
+ Loop->AddNoData ( CIF_NODATA_DOT );
Loop->AddNoData ( CIF_NODATA_DOT );
- Loop->AddString ( CIF_NODATA_DOT );
}
+
+ // (10)
+ Loop->AddString ( segID ,True );
+ // (11,12,13)
Loop->AddReal ( x );
Loop->AddReal ( y );
Loop->AddReal ( z );
+ // (14)
if (WhatIsSet & ASET_Occupancy)
Loop->AddReal ( occupancy );
else Loop->AddNoData ( CIF_NODATA_QUESTION );
+ // (15)
if (WhatIsSet & ASET_tempFactor)
Loop->AddReal ( tempFactor );
else Loop->AddNoData ( CIF_NODATA_QUESTION );
- strcpy_css ( el,element );
- Loop->AddString ( segID ,True );
- Loop->AddString ( el ,True );
- if (WhatIsSet & ASET_Charge)
- sprintf ( N,"%+2i",mround(charge) );
- else strcpy ( N," " );
- Loop->AddString ( N,True );
- } else
- for (i=0;i<14;i++)
- Loop->AddNoData ( CIF_NODATA_QUESTION );
- if (WhatIsSet & ASET_CoordSigma) {
- Loop->AddReal ( sigX );
- Loop->AddReal ( sigY );
- Loop->AddReal ( sigZ );
- if ((WhatIsSet & ASET_OccSigma) &&
- (WhatIsSet & ASET_Occupancy))
+ // (16,17,18)
+ if (WhatIsSet & ASET_CoordSigma) {
+ Loop->AddReal ( sigX );
+ Loop->AddReal ( sigY );
+ Loop->AddReal ( sigZ );
+ } else {
+ Loop->AddNoData ( CIF_NODATA_QUESTION );
+ Loop->AddNoData ( CIF_NODATA_QUESTION );
+ Loop->AddNoData ( CIF_NODATA_QUESTION );
+ }
+ // (19)
+ if ((WhatIsSet & ASET_OccSigma) && (WhatIsSet & ASET_Occupancy))
Loop->AddReal ( sigOcc );
else Loop->AddNoData ( CIF_NODATA_QUESTION );
- if ((WhatIsSet & ASET_tFacSigma) &&
- (WhatIsSet & ASET_tempFactor))
+ // (20)
+ if ((WhatIsSet & ASET_tFacSigma) && (WhatIsSet & ASET_tempFactor))
Loop->AddReal ( sigTemp );
else Loop->AddNoData ( CIF_NODATA_QUESTION );
+
} else
- for (i=0;i<5;i++)
+ for (i=0;i<18;i++)
Loop->AddNoData ( CIF_NODATA_QUESTION );
+ // (21)
+ if (WhatIsSet & ASET_Charge) {
+ sprintf ( N,"%+2i",mround(charge) );
+ Loop->AddString ( N,True );
+ } else
+ Loop->AddNoData ( CIF_NODATA_QUESTION );
+
+ if (residue) {
+ // (22)
+ if (residue->seqNum>MinInt4)
+ Loop->AddInteger ( residue->seqNum );
+ else Loop->AddNoData ( CIF_NODATA_DOT );
+ // (23)
+ Loop->AddString ( residue->name );
+ } else {
+ Loop->AddNoData ( CIF_NODATA_DOT );
+ Loop->AddNoData ( CIF_NODATA_DOT );
+ }
+
+ // (24)
+ if (chain) Loop->AddString ( chain->chainID,True );
+ else Loop->AddNoData ( CIF_NODATA_DOT );
+ // (25)
+ strcpy_css ( AtName,name );
+ Loop->AddString ( AtName ); // atom name
+
}
- if (singleModel) Loop->AddNoData ( CIF_NODATA_QUESTION );
- else Loop->AddInteger ( model->serNum );
+ // (26)
+ if (!model) Loop->AddNoData ( CIF_NODATA_QUESTION );
+ else if (model->serNum>0) Loop->AddInteger ( model->serNum );
+ else Loop->AddNoData ( CIF_NODATA_QUESTION );
+
if (WhatIsSet & ASET_Anis_tFac) {
-
+
RC = CIF->AddLoop ( CIFCAT_ATOM_SITE_ANISOTROP,Loop );
if (RC!=CIFRC_Ok) {
// the category was (re)created, provide tags
@@ -531,7 +662,7 @@ Boolean singleModel = True;
if (serNum>0) Loop->AddInteger ( serNum );
else Loop->AddInteger ( index );
-
+
Loop->AddReal ( u11 );
Loop->AddReal ( u22 );
Loop->AddReal ( u33 );
@@ -576,10 +707,10 @@ int CAtom::ConvertPDBATOM ( int ix, cpstr S ) {
if (GetReal(tempFactor,&(S[60]),6)) WhatIsSet |= ASET_tempFactor;
if (WhatIsSet & (ASET_CoordSigma | ASET_Anis_tFac |
- ASET_Anis_tFSigma))
+ ASET_Anis_tFSigma))
// something was already submitted. check complience
return CheckData ( S );
- else
+ else
// first data submission. just take the data
GetData ( S );
@@ -595,9 +726,10 @@ void CAtom::SetAtomName ( int ix,
const Element eName ) {
index = ix;
serNum = sN;
- strcpy ( name ,aName );
- strcpy_css ( altLoc ,pstr(aLoc) );
- strcpy_css ( segID ,pstr(sID) );
+ strcpy ( name ,aName );
+ strcpy ( label_atom_id,aName );
+ strcpy_css ( altLoc ,pstr(aLoc) );
+ strcpy_css ( segID ,pstr(sID) );
if (!eName[0]) element[0] = char(0);
else if (!eName[1]) {
element[0] = ' ';
@@ -630,10 +762,10 @@ int CAtom::ConvertPDBSIGATM ( int ix, cpstr S ) {
if (GetReal(sigTemp,&(S[60]),6)) WhatIsSet |= ASET_tFacSigma;
if (WhatIsSet & (ASET_Coordinates | ASET_Anis_tFac |
- ASET_Anis_tFSigma))
+ ASET_Anis_tFSigma))
// something was already submitted. check complience
return CheckData ( S );
- else
+ else
// first data submission. just take the data
GetData ( S );
@@ -671,10 +803,10 @@ int CAtom::ConvertPDBANISOU ( int ix, cpstr S ) {
WhatIsSet |= ASET_Anis_tFac;
if (WhatIsSet & (ASET_Coordinates | ASET_CoordSigma |
- ASET_Anis_tFSigma))
+ ASET_Anis_tFSigma))
// something was already submitted. check complience
return CheckData ( S );
- else
+ else
// first data submission. just take the data
GetData ( S );
@@ -712,10 +844,10 @@ int CAtom::ConvertPDBSIGUIJ ( int ix, cpstr S ) {
WhatIsSet |= ASET_Anis_tFSigma;
if (WhatIsSet & (ASET_Coordinates | ASET_CoordSigma |
- ASET_Anis_tFac))
+ ASET_Anis_tFac))
// something was already submitted. check complience
return CheckData ( S );
- else
+ else
// first data submission. just take the data
GetData ( S );
@@ -732,7 +864,7 @@ int CAtom::ConvertPDBTER ( int ix, cpstr S ) {
index = ix;
- if (((S[6]>='0') && (S[6]<='9')) || (S[6]==' ')) {
+ if (((S[6]>='0') && (S[6]<='9')) || (S[6]==' ')) {
// Although against strict PDB format, 'TER' is
// actually allowed not to have a serial number.
// This negative value implies that the number is
@@ -746,11 +878,12 @@ int CAtom::ConvertPDBTER ( int ix, cpstr S ) {
if (WhatIsSet & ASET_Coordinates)
return Error_ATOM_AlreadySet;
- WhatIsSet |= ASET_Coordinates;
- Het = False;
- Ter = True;
- name[0] = char(0);
- element[0] = char(0);
+ WhatIsSet |= ASET_Coordinates;
+ Het = False;
+ Ter = True;
+ name[0] = char(0);
+ label_atom_id[0] = char(0);
+ element[0] = char(0);
return 0;
@@ -773,11 +906,21 @@ pstr CAtom::GetChainID() {
return pstr("");
}
+pstr CAtom::GetLabelAsymID() {
+ if (residue) return residue->label_asym_id;
+ else return pstr("");
+}
+
pstr CAtom::GetResName() {
if (residue) return residue->name;
else return pstr("");
}
+pstr CAtom::GetLabelCompID() {
+ if (residue) return residue->label_comp_id;
+ else return pstr("");
+}
+
int CAtom::GetAASimilarity ( const ResName resName ) {
if (residue) return ::GetAASimilarity ( pstr(residue->name),
pstr(resName) );
@@ -809,6 +952,16 @@ int CAtom::GetSeqNum() {
else return ATOM_NoSeqNum;
}
+int CAtom::GetLabelSeqID() {
+ if (residue) return residue->label_seq_id;
+ else return ATOM_NoSeqNum;
+}
+
+int CAtom::GetLabelEntityID() {
+ if (residue) return residue->label_entity_id;
+ else return -1;
+}
+
pstr CAtom::GetInsCode() {
if (residue) return residue->insCode;
else return pstr("");
@@ -845,7 +998,7 @@ PCModel CAtom::GetModel() {
int CAtom::GetResidueNo() {
if (residue) {
if (residue->chain)
- return residue->chain->GetResidueNo (
+ return residue->chain->GetResidueNo (
residue->seqNum,residue->insCode );
else return -2;
} else
@@ -1117,7 +1270,7 @@ realtype dx1,dy1,dz1, dx2,dy2,dz2,r;
void CAtom::MakeTer() {
WhatIsSet |= ASET_Coordinates;
Het = False;
- Ter = True;
+ Ter = True;
}
@@ -1139,7 +1292,11 @@ void CAtom::SetElementName ( const Element elName ) {
void CAtom::SetCharge ( cpstr chrg ) {
pstr p;
charge = strtod ( chrg,&p );
- if (p!=chrg) WhatIsSet |= ASET_Charge;
+ if (p!=chrg) {
+ WhatIsSet |= ASET_Charge;
+ if ((charge>0.0) && (*p=='-'))
+ charge = -charge;
+ }
}
void CAtom::SetCharge ( realtype chrg ) {
@@ -1202,9 +1359,9 @@ char S[50];
if (residue->chain) {
if (residue->chain->model) {
n = residue->chain->model->GetNumberOfModels();
- if (n<10) strcpy ( S,"/%1i/" );
- else if (n<100) strcpy ( S,"/%2i/" );
- else if (n<1000) strcpy ( S,"/%3i/" );
+ if (n<10) strcpy ( S,"/%1i/" );
+ else if (n<100) strcpy ( S,"/%2i/" );
+ else if (n<1000) strcpy ( S,"/%3i/" );
else strcpy ( S,"/%i/" );
sprintf ( AtomID,S,residue->chain->model->GetSerNum() );
} else
@@ -1224,7 +1381,7 @@ char S[50];
strcat ( AtomID,S );
return AtomID;
}
-
+
int CAtom::ConvertPDBHETATM ( int ix, cpstr S ) {
@@ -1242,7 +1399,7 @@ int RC;
void CAtom::GetData ( cpstr S ) {
pstr p;
- if (((S[6]>='0') && (S[6]<='9')) || (S[6]==' ')) {
+ if (((S[6]>='0') && (S[6]<='9')) || (S[6]==' ')) {
// Here we forgive cards with unreadable serial numbers
// as we always have index (ix) for the card. For the sake
// of strict PDB syntax we would have to return
@@ -1260,10 +1417,14 @@ pstr p;
strcpy_ncss ( segID ,&(S[72]),4 );
GetString ( element,&(S[76]),2 );
charge = strtod ( &(S[78]),&p );
- if ((charge!=0.0) && (p!=&(S[78])))
+ if ((charge!=0.0) && (p!=&(S[78]))) {
WhatIsSet |= ASET_Charge;
+ if ((charge>0.0) && (*p=='-'))
+ charge = -charge;
+ }
RestoreElementName();
+ strcpy ( label_atom_id,name );
}
@@ -1278,15 +1439,31 @@ realtype achrg;
aloc[0] = S[16];
if (aloc[0]==' ') aloc[0] = char(0);
else aloc[1] = char(0);
+
strcpy_ncss ( sID ,&(S[72]),4 );
GetString ( elmnt,&(S[76]),2 );
- if (ignoreCharge) achrg = charge;
- else achrg = strtod ( &(S[78]),&p );
- if (!(GetInteger(sN,&(S[6]),5))) sN = index;
+
+ if (ignoreCharge)
+ achrg = charge;
+ else {
+ achrg = strtod ( &(S[78]),&p );
+ if ((achrg!=0.0) && (p!=&(S[78]))) {
+ if ((achrg>0.0) && (*p=='-'))
+ achrg = -achrg;
+ }
+ }
+
+// if (!(GetInteger(sN,&(S[6]),5)))
+// sN = index;
+
+ if (hy36decode(5,&(S[6]),5,&sN))
+ sN = index;
+
if (ignoreSegID) {
if (segID[0]) strcpy ( sID,segID );
else strcpy ( segID,sID );
}
+
if (ignoreElement) {
if (element[0]) strcpy ( elmnt,element );
else strcpy ( element,elmnt );
@@ -1298,7 +1475,7 @@ realtype achrg;
// as we always have index (ix) for the card. For the sake
// of strict PDB syntax we would have to return
// Error_UnrecognizedInteger .
- if ((sN!=serNum) ||
+ if ((sN!=serNum) ||
(strcmp (altLoc ,aloc )) ||
(strncmp(name ,&(S[12]),4)) ||
(strcmp (segID ,sID )) ||
@@ -1308,17 +1485,17 @@ realtype achrg;
char name1[100];
strncpy ( name1,&(S[12]),4 ); name1[4] = char(0);
printf ( "\n serNum %5i %5i\n"
- " residue '%s' '%s'\n"
- " altLoc '%s' '%s'\n"
- " name '%s' '%s'\n"
- " segId '%s' '%s'\n"
- " element '%s' '%s'\n"
+ " residue '%s' '%s'\n"
+ " altLoc '%s' '%s'\n"
+ " name '%s' '%s'\n"
+ " segId '%s' '%s'\n"
+ " element '%s' '%s'\n"
" charge '%s' '%s'\n",
sN,serNum, res->name,residue->name,
altLoc ,aloc, name,name1,
- segID ,sID,
+ segID ,sID,
element,elmnt,
- charge ,achrg );
+ charge ,achrg );
if (res!=residue) printf (" it's a residue\n" );
*/
return Error_ATOM_Unmatch;
@@ -1340,6 +1517,45 @@ int RC;
if (WhatIsSet & ASET_Coordinates)
return Error_ATOM_AlreadySet;
+/*
+
+loop_
+*0 _atom_site.group_PDB
+*1 _atom_site.id
+*2 _atom_site.type_symbol <- chem elem
+-3 _atom_site.label_atom_id <- atom name
+*4 _atom_site.label_alt_id <- alt code
+=5 _atom_site.label_comp_id <- res name ???
+=6 _atom_site.label_asym_id <- chain id ???
+=7 _atom_site.label_entity_id < ???
+=8 _atom_site.label_seq_id <- poly seq id
++9 _atom_site.pdbx_PDB_ins_code <- ins code
+-10 _atom_site.segment_id <- segment id
+*11 _atom_site.Cartn_x
+*12 _atom_site.Cartn_y
+*13 _atom_site.Cartn_z
+*14 _atom_site.occupancy
+*15 _atom_site.B_iso_or_equiv
+*16 _atom_site.Cartn_x_esd
+*17 _atom_site.Cartn_y_esd
+*18 _atom_site.Cartn_z_esd
+*19 _atom_site.occupancy_esd
+*20 _atom_site.B_iso_or_equiv_esd
+*21 _atom_site.pdbx_formal_charge
++22 _atom_site.auth_seq_id <- seq id we want
++23 _atom_site.auth_comp_id <- res name we want
++24 _atom_site.auth_asym_id <- ch id we want ?
+*25 _atom_site.auth_atom_id <- atom name we want ?
++26 _atom_site.pdbx_PDB_model_num <- model no
+
+'+' read in CMMDBFile::CheckAtomPlace()
+'=' new in residue, read in CMMDBFile::CheckAtomPlace()
+'-' new in atom
+
+*/
+
+
+ // (0)
k = ix-1;
CIFGetString ( PDBGroup,Loop,CIFTAG_GROUP_PDB,k,
sizeof(PDBGroup),pstr("") );
@@ -1347,13 +1563,12 @@ int RC;
Ter = !strcmp(PDBGroup,pstr("TER") );
Het = !strcmp(PDBGroup,pstr("HETATM"));
+ // (1)
RC = CIFGetInteger1 ( serNum,Loop,CIFTAG_ID,k );
if (RC) {
- if (Ter)
- serNum = -1;
- else if (RC==Error_NoData)
- serNum = index;
- else
+ if (Ter) serNum = -1;
+ else if (RC==Error_NoData) serNum = index;
+ else
return RC;
}
@@ -1363,26 +1578,37 @@ int RC;
return 0;
}
- CIFGetString ( name ,Loop,CIFTAG_AUTH_ATOM_ID,k,
+ // (25)
+ CIFGetString ( name,Loop,CIFTAG_AUTH_ATOM_ID,k,
sizeof(name) ,pstr("") );
+ // (3)
+ CIFGetString ( label_atom_id,Loop,CIFTAG_LABEL_ATOM_ID,k,
+ sizeof(label_atom_id),pstr("") );
+ // (4)
CIFGetString ( altLoc,Loop,CIFTAG_LABEL_ALT_ID ,k,
sizeof(altLoc),pstr("") );
+ // (11,12,13)
RC = CIFGetReal1 ( x,Loop,CIFTAG_CARTN_X,k );
if (!RC) RC = CIFGetReal1 ( y,Loop,CIFTAG_CARTN_Y,k );
if (!RC) RC = CIFGetReal1 ( z,Loop,CIFTAG_CARTN_Z,k );
if (RC) return Error_ATOM_Unrecognized;
WhatIsSet |= ASET_Coordinates;
+ // (14)
if (!CIFGetReal1(occupancy,Loop,CIFTAG_OCCUPANCY,k))
WhatIsSet |= ASET_Occupancy;
+ // (15)
if (!CIFGetReal1(tempFactor,Loop,CIFTAG_B_ISO_OR_EQUIV,k))
WhatIsSet |= ASET_tempFactor;
+ // (10)
CIFGetString ( segID,Loop,CIFTAG_SEGMENT_ID,k,
sizeof(segID) ,pstr("") );
- if (!CIFGetReal1(charge,Loop,CIFTAG_CHARGE,k))
+ // (21)
+ if (!CIFGetReal1(charge,Loop,CIFTAG_PDBX_FORMAL_CHARGE,k))
WhatIsSet |= ASET_Charge;
+ // (2)
RC = CIFGetString ( element,Loop,CIFTAG_TYPE_SYMBOL,k,
sizeof(element),pstr(" ") );
if (RC)
@@ -1393,6 +1619,7 @@ int RC;
MakePDBAtomName ();
// printf ( " '%s' '%s'\n",name,element );
+ // (16,17,18)
RC = CIFGetReal1 ( sigX,Loop,CIFTAG_CARTN_X_ESD,k );
if (!RC) RC = CIFGetReal1 ( sigY,Loop,CIFTAG_CARTN_Y_ESD,k );
if (!RC) RC = CIFGetReal1 ( sigZ,Loop,CIFTAG_CARTN_Z_ESD,k );
@@ -1400,11 +1627,13 @@ int RC;
return RC;
if (!RC) WhatIsSet |= ASET_CoordSigma;
+ // (19)
if (!CIFGetReal1(sigOcc,Loop,CIFTAG_OCCUPANCY_ESD,k))
WhatIsSet |= ASET_OccSigma;
+ // (20)
if (!CIFGetReal1(sigTemp,Loop,CIFTAG_B_ISO_OR_EQUIV_ESD,k))
WhatIsSet |= ASET_tFacSigma;
-
+
Loop->DeleteRow ( k );
if (LoopAnis) {
@@ -1661,11 +1890,12 @@ void CAtom::Copy ( PCAtom atom ) {
Ter = atom->Ter;
WhatIsSet = atom->WhatIsSet;
- strcpy ( name ,atom->name );
- strcpy ( altLoc ,atom->altLoc );
- strcpy ( segID ,atom->segID );
- strcpy ( element ,atom->element );
- strcpy ( energyType,atom->energyType );
+ strcpy ( name ,atom->name );
+ strcpy ( label_atom_id,atom->label_atom_id );
+ strcpy ( altLoc ,atom->altLoc );
+ strcpy ( segID ,atom->segID );
+ strcpy ( element ,atom->element );
+ strcpy ( energyType ,atom->energyType );
charge = atom->charge;
}
@@ -1728,7 +1958,7 @@ void CAtom::SetShortBinary() {
void CAtom::write ( RCFile f ) {
int i,k;
-byte Version=1;
+byte Version=2;
byte nb;
f.WriteWord ( &WhatIsSet );
@@ -1753,11 +1983,12 @@ byte nb;
f.WriteInt ( &serNum );
f.WriteInt ( &index );
- f.WriteTerLine ( name ,False );
- f.WriteTerLine ( altLoc ,False );
- f.WriteTerLine ( segID ,False );
- f.WriteTerLine ( element ,False );
- f.WriteTerLine ( energyType,False );
+ f.WriteTerLine ( name ,False );
+ f.WriteTerLine ( label_atom_id,False );
+ f.WriteTerLine ( altLoc ,False );
+ f.WriteTerLine ( segID ,False );
+ f.WriteTerLine ( element ,False );
+ f.WriteTerLine ( energyType ,False );
f.WriteFloat ( &charge );
f.WriteBool ( &Het );
f.WriteBool ( &Ter );
@@ -1781,7 +2012,7 @@ byte nb;
f.WriteFloat ( &sigOcc );
if ((WhatIsSet & ASET_tempFactor) &&
(WhatIsSet & ASET_tFacSigma))
- f.WriteFloat ( &sigTemp );
+ f.WriteFloat ( &sigTemp );
}
if (WhatIsSet & ASET_Anis_tFac) {
@@ -1850,6 +2081,8 @@ byte nb,Version;
f.ReadInt ( &serNum );
f.ReadInt ( &index );
f.ReadTerLine ( name ,False );
+ if (Version>1)
+ f.ReadTerLine ( label_atom_id,False );
f.ReadTerLine ( altLoc ,False );
f.ReadTerLine ( segID ,False );
f.ReadTerLine ( element ,False );
@@ -1884,7 +2117,7 @@ byte nb,Version;
else sigOcc = 0.0;
if ((WhatIsSet & ASET_tempFactor) &&
(WhatIsSet & ASET_tFacSigma))
- f.ReadFloat ( &sigTemp );
+ f.ReadFloat ( &sigTemp );
else sigTemp = 0.0;
} else {
sigX = 0.0;
@@ -2062,15 +2295,20 @@ CResidue::~CResidue() {
if (chain) chain->_ExcludeResidue ( name,seqNum,insCode );
}
+
void CResidue::InitResidue() {
- strcpy ( name,"---" ); // residue name
- seqNum = -MaxInt; // residue sequence number
- strcpy ( insCode,"" ); // residue insertion code
- chain = NULL; // reference to chain
- index = -1; // undefined index in chain
- nAtoms = 0; // number of atoms in the residue
- AtmLen = 0; // length of atom array
- atom = NULL; // array of atoms
+ strcpy ( name ,"---" ); // residue name
+ strcpy ( label_comp_id,"---" ); // assigned residue name
+ label_asym_id[0] = char(0); // assigned chain Id
+ seqNum = -MaxInt; // residue sequence number
+ label_seq_id = -MaxInt; // assigned residue sequence number
+ label_entity_id = 1; // assigned entity id
+ strcpy ( insCode,"" ); // residue insertion code
+ chain = NULL; // reference to chain
+ index = -1; // undefined index in chain
+ nAtoms = 0; // number of atoms in the residue
+ AtmLen = 0; // length of atom array
+ atom = NULL; // array of atoms
Exclude = True;
SSE = SSE_None;
}
@@ -2121,7 +2359,7 @@ void * CResidue::GetCoordHierarchy() {
return NULL;
}
-void CResidue::GetAltLocations ( int & nAltLocs,
+void CResidue::GetAltLocations ( int & nAltLocs,
PAltLoc & aLoc,
rvector & occupancy,
int & alflag ) {
@@ -2169,7 +2407,7 @@ bvector alv;
// a) the data was not found wrong so far
// b) this atom name has not been checked before
// c) altcode is not the "empty"-altcode
- if ((!(alflag & ALF_Mess)) && (!alv[i]) &&
+ if ((!(alflag & ALF_Mess)) && (!alv[i]) &&
(atom[i]->altLoc[0])) {
B = False; // will be set True if "empty"-altcode
// is found for current atom name
@@ -2179,7 +2417,7 @@ bvector alv;
// current atom name
for (j=0;j<nAtoms;j++)
if (atom[j]) {
- if ((!atom[j]->Ter) &&
+ if ((!atom[j]->Ter) &&
(!strcmp(atom[j]->name,atom[i]->name))) {
if (atom[j]->WhatIsSet & ASET_Occupancy)
occ1 += atom[j]->occupancy;
@@ -2247,6 +2485,7 @@ void CResidue::SetResID ( const ResName resName, int sqNum,
strcpy_css ( name,pstr(resName) );
seqNum = sqNum;
strcpy_css ( insCode,pstr(ins) );
+ strcpy (label_comp_id,name );
}
void CResidue::FreeMemory() {
@@ -2456,12 +2695,16 @@ int i;
FreeMemory();
- seqNum = res->seqNum;
- index = res->index;
- AtmLen = res->nAtoms;
- strcpy ( name ,res->name );
- strcpy ( insCode,res->insCode );
- SSE = res->SSE;
+ seqNum = res->seqNum;
+ label_seq_id = res->label_seq_id;
+ label_entity_id = res->label_entity_id;
+ index = res->index;
+ AtmLen = res->nAtoms;
+ SSE = res->SSE;
+ strcpy ( name ,res->name );
+ strcpy ( label_comp_id,res->label_comp_id );
+ strcpy ( label_asym_id,res->label_asym_id );
+ strcpy ( insCode ,res->insCode );
if (AtmLen>0) {
atom = new PCAtom[AtmLen];
@@ -2496,12 +2739,16 @@ PPCAtom A;
FreeMemory();
- seqNum = res->seqNum;
- index = res->index;
- nAtoms = res->nAtoms;
- strcpy ( name ,res->name );
- strcpy ( insCode,res->insCode );
- SSE = res->SSE;
+ seqNum = res->seqNum;
+ label_seq_id = res->label_seq_id;
+ label_entity_id = res->label_entity_id;
+ index = res->index;
+ nAtoms = res->nAtoms;
+ SSE = res->SSE;
+ strcpy ( name ,res->name );
+ strcpy ( label_comp_id,res->label_comp_id );
+ strcpy ( label_asym_id,res->label_asym_id );
+ strcpy ( insCode ,res->insCode );
AtmLen = nAtoms;
A = NULL;
@@ -2535,12 +2782,16 @@ int i;
FreeMemory();
- seqNum = res->seqNum;
- index = res->index;
- nAtoms = res->nAtoms;
- strcpy ( name ,res->name );
- strcpy ( insCode,res->insCode );
- SSE = res->SSE;
+ seqNum = res->seqNum;
+ label_seq_id = res->label_seq_id;
+ label_entity_id = res->label_entity_id;
+ index = res->index;
+ nAtoms = res->nAtoms;
+ SSE = res->SSE;
+ strcpy ( name ,res->name );
+ strcpy ( label_comp_id,res->label_comp_id );
+ strcpy ( label_asym_id,res->label_asym_id );
+ strcpy ( insCode ,res->insCode );
AtmLen = nAtoms;
if (AtmLen>0) {
@@ -2556,7 +2807,7 @@ int i;
} else
atom[i] = NULL;
}
-
+
}
@@ -2599,10 +2850,18 @@ pstr CResidue::GetChainID() {
return pstr("");
}
+pstr CResidue::GetLabelAsymID() {
+ return label_asym_id;
+}
+
pstr CResidue::GetResName() {
return name;
}
+pstr CResidue::GetLabelCompID() {
+ return label_comp_id;
+}
+
int CResidue::GetAASimilarity ( const ResName resName ) {
return ::GetAASimilarity ( pstr(name),pstr(resName) );
}
@@ -2623,6 +2882,14 @@ int CResidue::GetSeqNum() {
return seqNum;
}
+int CResidue::GetLabelSeqID() {
+ return label_seq_id;
+}
+
+int CResidue::GetLabelEntityID() {
+ return label_entity_id;
+}
+
pstr CResidue::GetInsCode() {
return insCode;
}
@@ -3104,63 +3371,6 @@ int CResidue::GetUDData ( int UDDhandle, pstr & sudd ) {
}
-/* commented on 18.03.2004, to be deleted
-
-realtype BondAngle ( PCAtom A, PCAtom B, PCAtom C ) {
-realtype abx,aby,abz;
-realtype acx,acy,acz;
-realtype bcx,bcy,bcz;
-realtype absq,acsq,bcsq;
-
- abx = B->x - A->x;
- aby = B->y - A->y;
- abz = B->z - A->z;
-
- acx = A->x - C->x;
- acy = A->y - C->y;
- acz = A->z - C->z;
-
- bcx = C->x - B->x;
- bcy = C->y - B->y;
- bcz = C->z - B->z;
-
- absq = abx*abx + aby*aby + abz*abz;
- acsq = acx*acx + acy*acy + acz*acz;
- bcsq = bcx*bcx + bcy*bcy + bcz*bcz;
-
- return acos ( (bcsq + absq - acsq)/(2.0*sqrt(bcsq*absq)) );
-
-}
-
-#define NOmaxdist2 12.25
-
-Boolean CResidue::isMainchainHBond ( PCResidue res ) {
-// Test if there is main chain Hbond between PCRes1 (donor) and
-// PCRes2 (acceptor).
-// As defined Kabsch & Sanders
-// This probably need the option of supporting alternative criteria
-PCAtom NAtom,OAtom,CAtom;
-realtype dx,dy,dz;
-
- NAtom = GetAtom ( "N" );
- OAtom = res->GetAtom ( "O" );
- CAtom = res->GetAtom ( "C" );
-
- if (NAtom && OAtom && CAtom) {
- dx = fabs ( NAtom->x - OAtom->x );
- dy = fabs ( NAtom->y - OAtom->y );
- dz = fabs ( NAtom->z - OAtom->z );
- return ((dx*dx+dy*dy+dz*dz<=NOmaxdist2) &&
- (BondAngle(NAtom,OAtom,CAtom)>=Pi/2.0));
- }
-
- return False;
-
-}
-
-*/
-
-
#define NOmaxdist2 12.25
Boolean CResidue::isMainchainHBond ( PCResidue res ) {
@@ -3209,20 +3419,24 @@ realtype absq,acsq,bcsq;
}
-
+
void CResidue::write ( RCFile f ) {
int i;
-byte Version=1;
+byte Version=2;
CUDData::write ( f );
- f.WriteByte ( &Version );
- f.WriteInt ( &seqNum );
- f.WriteInt ( &index );
- f.WriteInt ( &nAtoms );
- f.WriteByte ( &SSE );
- f.WriteTerLine ( name ,False );
- f.WriteTerLine ( insCode,False );
+ f.WriteByte ( &Version );
+ f.WriteInt ( &seqNum );
+ f.WriteInt ( &label_seq_id );
+ f.WriteInt ( &label_entity_id );
+ f.WriteInt ( &index );
+ f.WriteInt ( &nAtoms );
+ f.WriteByte ( &SSE );
+ f.WriteTerLine ( name ,False );
+ f.WriteTerLine ( label_comp_id,False );
+ f.WriteTerLine ( label_asym_id,False );
+ f.WriteTerLine ( insCode ,False );
for (i=0;i<nAtoms;i++)
f.WriteInt ( &(atom[i]->index) );
@@ -3241,10 +3455,18 @@ byte Version;
f.ReadByte ( &Version );
f.ReadInt ( &seqNum );
+ if (Version>1) {
+ f.ReadInt ( &label_seq_id );
+ f.ReadInt ( &label_entity_id );
+ }
f.ReadInt ( &index );
f.ReadInt ( &nAtoms );
f.ReadByte ( &SSE );
- f.ReadTerLine ( name ,False );
+ f.ReadTerLine ( name,False );
+ if (Version>1) {
+ f.ReadTerLine ( label_comp_id,False );
+ f.ReadTerLine ( label_asym_id,False );
+ }
f.ReadTerLine ( insCode,False );
AtmLen = nAtoms;
A = NULL;
diff --git a/mmdb/mmdb_atom.h b/mmdb/mmdb_atom.h
index 5ae0da8..66cab38 100644
--- a/mmdb/mmdb_atom.h
+++ b/mmdb/mmdb_atom.h
@@ -22,7 +22,7 @@
//
// =================================================================
//
-// 15.07.10 <-- Date of Last Modification.
+// 06.02.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
@@ -32,10 +32,10 @@
// ~~~~~~~~~
// **** Classes : CAtom ( atom class )
// ~~~~~~~~~ CResidue ( residue class )
-// **** Functions : BondAngle
-// ~~~~~~~~~~~
+// **** Functions: BondAngle
+// ~~~~~~~~~~
//
-// Copyright (C) E. Krissinel 2000-2010
+// Copyright (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -86,7 +86,7 @@ extern Boolean ignoreNonCoorPDBErrors;
extern Boolean ignoreUnmatch;
-DefineStructure(SAtomStat);
+DefineStructure(SAtomStat)
struct SAtomStat {
@@ -131,23 +131,23 @@ struct SAtomStat {
};
-DefineStructure(SAtomBondI);
+DefineStructure(SAtomBondI)
struct SAtomBondI {
- int index; // bonded atom index
- byte order; // bond order
+ int index; //!< bonded atom index
+ byte order; //!< bond order
};
-DefineStructure(SAtomBond);
+DefineStructure(SAtomBond)
struct SAtomBond {
- PCAtom atom; // bonded atom pointer
- byte order; // bond order
+ PCAtom atom; //!< bonded atom pointer
+ byte order; //!< bond order
};
-DefineFactoryFunctions(CAtom);
+DefineFactoryFunctions(CAtom)
class CAtom : public CUDData {
@@ -159,36 +159,37 @@ class CAtom : public CUDData {
public :
- int serNum; // serial number
- AtomName name; // atom name (ALIGNED)
- AltLoc altLoc; // alternative location indicator ("" for none)
- PCResidue residue; // reference to residue
- realtype x,y,z; // orthogonal coordinates in angstroms
- realtype occupancy; // occupancy
- realtype tempFactor; // temperature factor
- SegID segID; // segment identifier
- Element element; // element symbol (ALIGNED TO RIGHT)
- EnergyType energyType; // energy type (without spaces)
- realtype charge; // charge on the atom
- realtype sigX,sigY,sigZ; // standard deviations of the coords
- realtype sigOcc; // standard deviation of occupancy
- realtype sigTemp; // standard deviation of temp. factor
- realtype u11,u22,u33; // anisotropic temperature
- realtype u12,u13,u23; // factors
- realtype su11,su22,su33; // standard deviations of
- realtype su12,su13,su23; // anisotropic temperature factors
- Boolean Het; // indicator of het atom
- Boolean Ter; // chain terminator
-
- word WhatIsSet; // mask field
- // 0x0001 atomic coordinates
- // 0x0002 occupancy
- // 0x0004 temperature factor
- // 0x0010 coordinate standard deviations
- // 0x0020 deviation of occupancy
- // 0x0040 deviation of temperature factor
- // 0x0100 anisotropic temperature factors
- // 0x1000 anis. temp. fact-s st-d deviations
+ int serNum; //!< serial number
+ AtomName name; //!< atom name (ALIGNED)
+ AtomName label_atom_id; //!< assigned atom name (not aligned)
+ AltLoc altLoc; //!< alternative location indicator ("" for none)
+ SegID segID; //!< segment identifier
+ Element element; //!< element symbol (ALIGNED TO RIGHT)
+ EnergyType energyType; //!< energy type (without spaces)
+ PCResidue residue; //!< reference to residue
+ realtype x,y,z; //!< orthogonal coordinates in angstroms
+ realtype occupancy; //!< occupancy
+ realtype tempFactor; //!< temperature factor
+ realtype charge; //!< charge on the atom
+ realtype sigX,sigY,sigZ; //!< standard deviations of the coords
+ realtype sigOcc; //!< standard deviation of occupancy
+ realtype sigTemp; //!< standard deviation of temp. factor
+ realtype u11,u22,u33; //!< anisotropic temperature
+ realtype u12,u13,u23; /// factors
+ realtype su11,su22,su33; //!< standard deviations of
+ realtype su12,su13,su23; /// anisotropic temperature factors
+ Boolean Het; //!< indicator of het atom
+ Boolean Ter; //!< chain terminator
+
+ word WhatIsSet; //!< mask field
+ /// 0x0001 atomic coordinates
+ /// 0x0002 occupancy
+ /// 0x0004 temperature factor
+ /// 0x0010 coordinate standard deviations
+ /// 0x0020 deviation of occupancy
+ /// 0x0040 deviation of temperature factor
+ /// 0x0100 anisotropic temperature factors
+ /// 0x1000 anis. temp. fact-s st-d deviations
CAtom ();
CAtom ( PCResidue res );
@@ -269,19 +270,23 @@ class CAtom : public CUDData {
void SetCoordinates ( realtype xx, realtype yy, realtype zz,
realtype occ, realtype tFac );
- int GetModelNum();
- pstr GetChainID ();
- pstr GetResName ();
- int GetAASimilarity ( const ResName resName );
- int GetAASimilarity ( PCAtom A );
+ int GetModelNum ();
+ pstr GetChainID ();
+ pstr GetLabelAsymID ();
+ pstr GetResName ();
+ pstr GetLabelCompID ();
+ int GetAASimilarity ( const ResName resName );
+ int GetAASimilarity ( PCAtom A );
realtype GetAAHydropathy();
realtype GetOccupancy ();
- int GetSeqNum ();
- pstr GetInsCode ();
- int GetSSEType (); // works only after SSE calculations
- pstr GetAtomName () { return name; }
- pstr GetElementName() { return element; }
- pstr GetAtomCharge ( pstr chrg );
+ int GetSeqNum ();
+ int GetLabelSeqID ();
+ int GetLabelEntityID ();
+ pstr GetInsCode ();
+ int GetSSEType (); // works only after SSE calculations
+ pstr GetAtomName () { return name; }
+ pstr GetElementName () { return element; }
+ pstr GetAtomCharge ( pstr chrg );
// GetChainCalphas(...) is a specialized function for quick
// access to C-alphas of chain which includes given atom.
@@ -471,14 +476,18 @@ class CResidue : public CUDData {
public :
- ResName name; // residue name - all spaces cut
- int seqNum; // residue sequence number
- InsCode insCode; // residue insertion code
- PCChain chain; // reference to chain
- int index; // index in the chain
- int nAtoms; // number of atoms in the residue
- PPCAtom atom; // array of atoms
- byte SSE; // SSE type
+ ResName name; //!< residue name - all spaces cut
+ ResName label_comp_id; //!< assigned residue name
+ ChainID label_asym_id; //!< assigned chain Id
+ InsCode insCode; //!< residue insertion code
+ PCChain chain; //!< reference to chain
+ PPCAtom atom; //!< array of atoms
+ int seqNum; //!< residue sequence number
+ int label_seq_id; //!< assigned residue sequence number
+ int label_entity_id; //!< assigned entity id
+ int index; //!< index in the chain
+ int nAtoms; //!< number of atoms in the residue
+ byte SSE; //!< SSE type
CResidue ();
CResidue ( PCChain Chain_Owner );
@@ -498,17 +507,21 @@ class CResidue : public CUDData {
PCChain GetChain();
PCModel GetModel();
- int GetModelNum ();
- pstr GetChainID ();
- pstr GetResName ();
+ int GetModelNum ();
+ pstr GetChainID ();
+ pstr GetLabelAsymID();
+ pstr GetResName ();
+ pstr GetLabelCompID();
int GetAASimilarity ( const ResName resName );
int GetAASimilarity ( PCResidue res );
realtype GetAAHydropathy();
- void SetResName ( const ResName resName );
- int GetSeqNum ();
- pstr GetInsCode ();
- int GetResidueNo();
- int GetCenter ( realtype & x, realtype & y, realtype & z );
+ void SetResName ( const ResName resName );
+ int GetSeqNum ();
+ int GetLabelSeqID ();
+ int GetLabelEntityID();
+ pstr GetInsCode ();
+ int GetResidueNo ();
+ int GetCenter ( realtype & x, realtype & y, realtype & z );
void * GetCoordHierarchy(); // PCMMDBFile
void GetAtomStatistics ( RSAtomStat AS );
diff --git a/mmdb/mmdb_cifdefs.h b/mmdb/mmdb_cifdefs.h
index 2e2fa27..045ee77 100644
--- a/mmdb/mmdb_cifdefs.h
+++ b/mmdb/mmdb_cifdefs.h
@@ -6,13 +6,13 @@
//
// Copyright (C) Eugene Krissinel 2000-2008.
//
-// This library is free software: you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License version 3, modified in accordance with the provisions
+// This library is free software: you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License version 3, modified in accordance with the provisions
// of the license to address the requirements of UK law.
//
-// You should have received a copy of the modified GNU Lesser
-// General Public License along with this library. If not, copies
+// You should have received a copy of the modified GNU Lesser
+// General Public License along with this library. If not, copies
// may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
//
// This program is distributed in the hope that it will be useful,
@@ -22,7 +22,7 @@
//
// =================================================================
//
-// 02.01.00 <-- Date of Last Modification.
+// 06.02.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
@@ -33,7 +33,7 @@
//
// CIF Definitions
//
-// (C) E. Krissinel 2000-2008
+// (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -113,7 +113,7 @@ extern pstr CIFName ( int NameID, int Mode );
#define CIFCAT_SYMMETRY pstr("_symmetry")
#define CIFCAT_OBSLTE pstr("_ndb_database_pdb_obs_spr")
-
+
#define CIFTAG_ANGLE_ALPHA pstr("angle_alpha")
#define CIFTAG_ANGLE_BETA pstr("angle_beta")
#define CIFTAG_ANGLE_GAMMA pstr("angle_gamma")
@@ -134,7 +134,7 @@ extern pstr CIFName ( int NameID, int Mode );
#define CIFTAG_CARTN_Y_ESD pstr("cartn_y_esd")
#define CIFTAG_CARTN_Z pstr("cartn_z")
#define CIFTAG_CARTN_Z_ESD pstr("cartn_z_esd")
-#define CIFTAG_CHARGE pstr("charge")
+#define CIFTAG_PDBX_FORMAL_CHARGE pstr("pdbx_formal_charge")
#define CIFTAG_CODE pstr("code")
#define CIFTAG_CODE_NDB pstr("code_NDB")
#define CIFTAG_CODE_PDB pstr("code_PDB")
@@ -170,11 +170,11 @@ extern pstr CIFName ( int NameID, int Mode );
#define CIFTAG_ID pstr("id")
#define CIFTAG_INS_CODE pstr("ins_code")
#define CIFTAG_LABEL_ALT_ID pstr("label_alt_id")
-//#define CIFTAG_LABEL_ATOM_ID pstr("label_atom_id")
-//#define CIFTAG_LABEL_ASYM_ID pstr("label_asym_id")
-//#define CIFTAG_LABEL_COMP_ID pstr("label_comp_id")
-//#define CIFTAG_LABEL_ENTITY_ID pstr("label_entity_id")
-//#define CIFTAG_LABEL_SEQ_ID pstr("label_seq_id")
+#define CIFTAG_LABEL_ATOM_ID pstr("label_atom_id")
+#define CIFTAG_LABEL_ASYM_ID pstr("label_asym_id")
+#define CIFTAG_LABEL_COMP_ID pstr("label_comp_id")
+#define CIFTAG_LABEL_ENTITY_ID pstr("label_entity_id")
+#define CIFTAG_LABEL_SEQ_ID pstr("label_seq_id")
#define CIFTAG_LENGTH_A pstr("length_a")
#define CIFTAG_LENGTH_B pstr("length_b")
#define CIFTAG_LENGTH_C pstr("length_c")
@@ -199,7 +199,8 @@ extern pstr CIFName ( int NameID, int Mode );
#define CIFTAG_NDB_DB_ALIGN_BEG_INS_CODE pstr("ndb_db_align_beg_ins_code")
#define CIFTAG_NDB_DB_ALIGN_END_INS_CODE pstr("ndb_db_align_end_ins_code")
#define CIFTAG_NDB_END_LABEL_INS_CODE_PDB pstr("ndb_end_label_ins_code_pdb")
-#define CIFTAG_NDB_INS_CODE pstr("ndb_ins_code")
+//#define CIFTAG_NDB_INS_CODE pstr("ndb_ins_code")
+#define CIFTAG_PDBX_PDB_INS_CODE pstr("pdbx_PDB_ins_code")
#define CIFTAG_NDB_HELIX_CLASS_PDB pstr("ndb_helix_class_pdb")
#define CIFTAG_NDB_KEYWORDS pstr("ndb_keywords")
#define CIFTAG_NDB_LABEL_ALT_ID pstr("ndb_label_alt_id")
@@ -282,7 +283,7 @@ extern pstr CIFName ( int NameID, int Mode );
#define CIFTAG_SENSE pstr("sense")
#define CIFTAG_SHEET_ID pstr("sheet_id")
#define CIFTAG_SOURCE pstr("source")
-#define CIFTAG_SPACE_GROUP_NAME_H_M pstr("space_group_name_h-m")
+#define CIFTAG_SPACE_GROUP_NAME_H_M pstr("space_group_name_H-M")
#define CIFTAG_TEXT pstr("text")
#define CIFTAG_TITLE pstr("title")
#define CIFTAG_TYPE pstr("type")
diff --git a/mmdb/mmdb_coormngr.cpp b/mmdb/mmdb_coormngr.cpp
index 4e81b0a..8ec1900 100644
--- a/mmdb/mmdb_coormngr.cpp
+++ b/mmdb/mmdb_coormngr.cpp
@@ -3838,73 +3838,75 @@ Boolean swap;
if (swap) {
- for (i=0;i<l1;i++) {
- // Find brick location
- GetBrickCoor ( A1[i],nx,ny,nz );
- if (nx>=0) {
- ix1 = IMax ( 0,nx-dn );
- iy1 = IMax ( 0,ny-dn );
- iz1 = IMax ( 0,nz-dn );
- ix2 = IMin ( nbrick_x,nx+dn+1 );
- iy2 = IMin ( nbrick_y,ny+dn+1 );
- iz2 = IMin ( nbrick_z,nz+dn+1 );
- for (ix=ix1;ix<ix2;ix++)
- if (Brick[ix])
- for (iy=iy1;iy<iy2;iy++)
- if (Brick[ix][iy])
- for (iz=iz1;iz<iz2;iz++) {
- B = Brick[ix][iy][iz];
- if (B)
- for (j=0;j<B->nAtoms;j++) {
- dx = A1[i]->x - B->Atom[j]->x;
- dy = A1[i]->y - B->Atom[j]->y;
- dz = A1[i]->z - B->Atom[j]->z;
- d2 = dx*dx + dy*dy + dz*dz;
- if (d2<=contDist2) {
- contact[ncontacts].id1 = B->id[j];
- contact[ncontacts].id2 = i;
- contact[ncontacts].dist = d2;
- ncontacts++;
+ for (i=0;i<l1;i++)
+ if (A1[i]) {
+ // Find brick location
+ GetBrickCoor ( A1[i],nx,ny,nz );
+ if (nx>=0) {
+ ix1 = IMax ( 0,nx-dn );
+ iy1 = IMax ( 0,ny-dn );
+ iz1 = IMax ( 0,nz-dn );
+ ix2 = IMin ( nbrick_x,nx+dn+1 );
+ iy2 = IMin ( nbrick_y,ny+dn+1 );
+ iz2 = IMin ( nbrick_z,nz+dn+1 );
+ for (ix=ix1;ix<ix2;ix++)
+ if (Brick[ix])
+ for (iy=iy1;iy<iy2;iy++)
+ if (Brick[ix][iy])
+ for (iz=iz1;iz<iz2;iz++) {
+ B = Brick[ix][iy][iz];
+ if (B)
+ for (j=0;j<B->nAtoms;j++) {
+ dx = A1[i]->x - B->Atom[j]->x;
+ dy = A1[i]->y - B->Atom[j]->y;
+ dz = A1[i]->z - B->Atom[j]->z;
+ d2 = dx*dx + dy*dy + dz*dz;
+ if (d2<=contDist2) {
+ contact[ncontacts].id1 = B->id[j];
+ contact[ncontacts].id2 = i;
+ contact[ncontacts].dist = d2;
+ ncontacts++;
+ }
}
- }
- }
+ }
+ }
}
- }
} else {
- for (i=0;i<l1;i++) {
- // Find brick location
- GetBrickCoor ( A1[i],nx,ny,nz );
- if (nx>=0) {
- ix1 = IMax ( 0,nx-dn );
- iy1 = IMax ( 0,ny-dn );
- iz1 = IMax ( 0,nz-dn );
- ix2 = IMin ( nbrick_x,nx+dn+1 );
- iy2 = IMin ( nbrick_y,ny+dn+1 );
- iz2 = IMin ( nbrick_z,nz+dn+1 );
- for (ix=ix1;ix<ix2;ix++)
- if (Brick[ix])
- for (iy=iy1;iy<iy2;iy++)
- if (Brick[ix][iy])
- for (iz=iz1;iz<iz2;iz++) {
- B = Brick[ix][iy][iz];
- if (B)
- for (j=0;j<B->nAtoms;j++) {
- dx = A1[i]->x - B->Atom[j]->x;
- dy = A1[i]->y - B->Atom[j]->y;
- dz = A1[i]->z - B->Atom[j]->z;
- d2 = dx*dx + dy*dy + dz*dz;
- if (d2<=contDist2) {
- contact[ncontacts].id1 = i;
- contact[ncontacts].id2 = B->id[j];
- contact[ncontacts].dist = d2;
- ncontacts++;
+ for (i=0;i<l1;i++)
+ if (A1[i]) {
+ // Find brick location
+ GetBrickCoor ( A1[i],nx,ny,nz );
+ if (nx>=0) {
+ ix1 = IMax ( 0,nx-dn );
+ iy1 = IMax ( 0,ny-dn );
+ iz1 = IMax ( 0,nz-dn );
+ ix2 = IMin ( nbrick_x,nx+dn+1 );
+ iy2 = IMin ( nbrick_y,ny+dn+1 );
+ iz2 = IMin ( nbrick_z,nz+dn+1 );
+ for (ix=ix1;ix<ix2;ix++)
+ if (Brick[ix])
+ for (iy=iy1;iy<iy2;iy++)
+ if (Brick[ix][iy])
+ for (iz=iz1;iz<iz2;iz++) {
+ B = Brick[ix][iy][iz];
+ if (B)
+ for (j=0;j<B->nAtoms;j++) {
+ dx = A1[i]->x - B->Atom[j]->x;
+ dy = A1[i]->y - B->Atom[j]->y;
+ dz = A1[i]->z - B->Atom[j]->z;
+ d2 = dx*dx + dy*dy + dz*dz;
+ if (d2<=contDist2) {
+ contact[ncontacts].id1 = i;
+ contact[ncontacts].id2 = B->id[j];
+ contact[ncontacts].dist = d2;
+ ncontacts++;
+ }
}
- }
- }
+ }
+ }
}
- }
}
@@ -3987,7 +3989,7 @@ int ix,iy,iz;
-DefineClass(CSortContacts)
+DefineClass(CSortContacts);
class CSortContacts : public CQuickSort {
public :
@@ -4060,50 +4062,8 @@ CSortContacts SC;
}
-/*
-void SortContacts ( PSContact contact, int ncontacts, int sortmode ) {
-int i,l1,l2, m1,m2;
-Boolean swap;
-
- if (sortmode==CNSORT_OFF) return;
-
- l1 = 1;
- l2 = ncontacts;
- do {
- m1 = -1;
- m2 = -1;
- for (i=l1;i<l2;i++) {
- switch (sortmode) {
- default :
- case CNSORT_1INC : swap = (contact[i-1].id1>contact[i].id1); break;
- case CNSORT_1DEC : swap = (contact[i-1].id1<contact[i].id1); break;
- case CNSORT_2INC : swap = (contact[i-1].id2>contact[i].id2); break;
- case CNSORT_2DEC : swap = (contact[i-1].id2<contact[i].id2); break;
- case CNSORT_DINC : swap = (contact[i-1].dist>contact[i].dist); break;
- case CNSORT_DDEC : swap = (contact[i-1].dist<contact[i].dist); break;
- }
- if (swap) {
- if (m1<0) m1 = i;
- m2 = i;
- ISwap ( contact[i-1].id1 ,contact[i].id1 );
- ISwap ( contact[i-1].id2 ,contact[i].id2 );
- RSwap ( contact[i-1].dist ,contact[i].dist );
- LSwap ( contact[i-1].group,contact[i].group );
- }
- }
- l1 = IMax(1,m1-1);
- l2 = m2+1;
- } while (l2>0);
-
-}
-*/
-
-
-
-
// ------------------- Stream functions ----------------------
-
void CMMDBCoorManager::write ( RCFile f ) {
byte Version=1;
f.WriteByte ( &Version );
@@ -4133,7 +4093,7 @@ byte Version;
}
-MakeStreamFunctions(CMMDBCoorManager)
+MakeStreamFunctions(CMMDBCoorManager);
diff --git a/mmdb/mmdb_cryst.cpp b/mmdb/mmdb_cryst.cpp
index cda00db..e205c0b 100644
--- a/mmdb/mmdb_cryst.cpp
+++ b/mmdb/mmdb_cryst.cpp
@@ -6,13 +6,13 @@
//
// Copyright (C) Eugene Krissinel 2000-2008.
//
-// This library is free software: you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License version 3, modified in accordance with the provisions
+// This library is free software: you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License version 3, modified in accordance with the provisions
// of the license to address the requirements of UK law.
//
-// You should have received a copy of the modified GNU Lesser
-// General Public License along with this library. If not, copies
+// You should have received a copy of the modified GNU Lesser
+// General Public License along with this library. If not, copies
// may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
//
// This program is distributed in the hope that it will be useful,
@@ -22,20 +22,20 @@
//
// =================================================================
//
-// 29.01.10 <-- Date of Last Modification.
+// 05.02.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
// **** Module : MMDB_Cryst <implementation>
// ~~~~~~~~~
// **** Project : MacroMolecular Data Base (MMDB)
-// ~~~~~~~~~
+// ~~~~~~~~~
// **** Classes : CCrystContainer ( container for cryst. data )
// ~~~~~~~~~ CNCSMatrix ( non-cryst. symm. matrix class )
// CTVect ( translational vector class )
// CMMDBCryst ( MMDB cryst. section class )
//
-// (C) E. Krissinel 2000-2010
+// (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -111,8 +111,8 @@ CNCSMatrix::~CNCSMatrix() {}
void CNCSMatrix::Init() {
int i,j;
- serNum = -1;
- iGiven = -1;
+ serNum = -1;
+ iGiven = -1;
for (i=0;i<3;i++) {
for (j=0;j<3;j++)
m[i][j] = 0.0;
@@ -128,7 +128,7 @@ Boolean CNCSMatrix::PDBASCIIDump1 ( RCFile f ) {
char S[100];
int i,j;
- if ((WhatIsSet & NCSMSET_All)==NCSMSET_All)
+ if ((WhatIsSet & NCSMSET_All)==NCSMSET_All)
for (i=0;i<3;i++) {
sprintf ( S,"MTRIX%1i %3i",i+1,serNum );
PadSpaces ( S,80 );
@@ -285,7 +285,7 @@ char Code[100];
iGiven = 1;
else
iGiven = MinInt4;
-
+
if (CIFGetReal(m[0][0],Loop,CIFTAG_MATRIX11,Signal)) return;
if (CIFGetReal(m[0][1],Loop,CIFTAG_MATRIX12,Signal)) return;
@@ -338,7 +338,7 @@ int i,j;
WhatIsSet = PCNCSMatrix(NCSMatrix)->WhatIsSet;
}
-
+
void CNCSMatrix::write ( RCFile f ) {
int i,j;
byte Version=1;
@@ -471,7 +471,7 @@ int i;
t[i] = PCTVect(TVect)->t[i];
CreateCopy ( comment,PCTVect(TVect)->comment );
}
-
+
void CTVect::write ( RCFile f ) {
int i;
byte Version=1;
@@ -555,15 +555,17 @@ int i,j,k;
alphas = 90.0;
betas = 90.0;
gammas = 90.0;
-
+
for (k=0;k<6;k++)
AC[k] = 0.0;
NCode = 0;
if (fullInit) {
- syminfo_lib = NULL;
- ignoreScalei = False; // flag to ignore SCALEi cards
+ syminfo_lib = NULL;
+ ignoreScalei = False; // flag to ignore SCALEi cards
+ processSG = True; // flag to process space group at file read
+ fixSpaceGroup = True; // flag to fix space group at file read
}
}
@@ -635,7 +637,7 @@ int CMMDBCryst::FixSpaceGroup() {
// however fix is not possible. spaceGroupFix receives
// a copy of spaceGroup
// -2 - any checks are not possible because cell parameters
-// are not found, spaceGroupFix receives a copy of
+// are not found, spaceGroupFix receives a copy of
// spaceGroup
//
realtype eps,m1,m2;
@@ -661,7 +663,7 @@ char c;
else {
m1 = (a+b+c)/3.0;
m2 = (alpha+beta+gamma)/3.0;
- if ((fabs(a-m1)<=eps) && (fabs(b-m1)<=eps) &&
+ if ((fabs(a-m1)<=eps) && (fabs(b-m1)<=eps) &&
(fabs(c-m1)<=eps) &&
(fabs(alpha-m2)<=eps) && (fabs(beta-m2)<=eps) &&
(fabs(gamma-m2)<=eps))
@@ -717,8 +719,7 @@ char c;
}
-int CMMDBCryst::ConvertPDBString ( pstr PDBString,
- Boolean fixSpaceGroup ) {
+int CMMDBCryst::ConvertPDBString ( pstr PDBString ) {
// Interprets the ASCII PDB line and fills the corresponding fields.
// Returns zero if the line was converted, otherwise returns a
// non-negative value of Error_XXXX.
@@ -747,7 +748,7 @@ PCTVect tVect;
CutSpaces ( spaceGroup,SCUTKEY_BEGEND );
if (fixSpaceGroup) FixSpaceGroup();
else strcpy ( spaceGroupFix,spaceGroup );
- if (spaceGroupFix[0]) {
+ if (spaceGroupFix[0] && processSG) {
if (SymOps.SetGroup(spaceGroupFix,syminfo_lib)==SYMOP_Ok)
WhatIsSet |= CSET_SpaceGroup;
}
@@ -832,7 +833,7 @@ PCTVect tVect;
return RC;
} else if (!strncmp(PDBString,"TVECT ",6)) {
-
+
tVect = new CTVect();
RC = tVect->ConvertPDBASCII(PDBString);
if (RC==0) TVect.AddData ( tVect );
@@ -870,7 +871,7 @@ char S[100];
f.WriteLine ( S );
}
- if ((WhatIsSet & CSET_OrigMatrix)==CSET_OrigMatrix)
+ if ((WhatIsSet & CSET_OrigMatrix)==CSET_OrigMatrix)
for (i=0;i<3;i++) {
sprintf ( S,"ORIGX%1i",i+1);
PadSpaces ( S,80 );
@@ -880,7 +881,7 @@ char S[100];
f.WriteLine ( S );
}
- if ((WhatIsSet & CSET_ScaleMatrix)==CSET_ScaleMatrix)
+ if ((WhatIsSet & CSET_ScaleMatrix)==CSET_ScaleMatrix)
for (i=0;i<3;i++) {
sprintf ( S,"SCALE%1i",i+1);
PadSpaces ( S,80 );
@@ -896,7 +897,7 @@ char S[100];
}
-int CMMDBCryst::GetCIF ( PCMMCIFData CIF, Boolean fixSpaceGroup ) {
+int CMMDBCryst::GetCIF ( PCMMCIFData CIF ) {
PCMMCIFStruct Struct;
int RC;
@@ -923,7 +924,7 @@ int RC;
if (!RC) WhatIsSet |= CSET_ZValue;
}
-
+
Struct = CIF->GetStructure ( CIFCAT_SYMMETRY );
if (Struct) {
CIFGetString ( spaceGroup,Struct,CIFTAG_SPACE_GROUP_NAME_H_M,
@@ -939,11 +940,13 @@ int RC;
strcpy ( spaceGroup,"C 1 2 1" );
}
*/
- if (SymOps.SetGroup(spaceGroupFix,syminfo_lib)==SYMOP_Ok)
- WhatIsSet |= CSET_SpaceGroup;
+ if (spaceGroupFix[0] && processSG) {
+ if (SymOps.SetGroup(spaceGroupFix,syminfo_lib)==SYMOP_Ok)
+ WhatIsSet |= CSET_SpaceGroup;
+ }
}
- if ((a*b*c*alpha*beta*gamma==0.0) ||
+ if ((a*b*c*alpha*beta*gamma==0.0) ||
((a==1.0) && (b==1.0) && (c==1.0) &&
(alpha==90.0) && (beta==90.0) && (gamma==90.0) &&
(!strcmp(spaceGroup,"P 1")))) {
@@ -1096,7 +1099,7 @@ int i,j,k;
if ((WhatIsSet & CSET_CellParams)==CSET_CellParams) {
// The 'cryst1' card was supplied. Calculate
// standard orthogonalizations.
-
+
CalcOrthMatrices();
if (NCode<0) NCode = 0;
@@ -1154,8 +1157,8 @@ int i,j,k;
}
}
}
-
- // Correct inaccuracy of SCALEi input due to FORMAT,
+
+ // Correct inaccuracy of SCALEi input due to FORMAT,
// replace RF,RO with RR[NCode][][] if possible.
if (NCode>=0) {
@@ -1185,7 +1188,7 @@ int i,j,k;
RFU[3][3] = 1.0;
Mat4Inverse ( RFU,ROU );
- } else
+ } else
CellCheck |= CCHK_NoCell;
}
@@ -1212,7 +1215,7 @@ int i,j;
} else
printf ( "\n $WARNING: NO CRYST CARDS READ$\n" );
- if ((WhatIsSet & CSET_ScaleMatrix)!=CSET_ScaleMatrix)
+ if ((WhatIsSet & CSET_ScaleMatrix)!=CSET_ScaleMatrix)
printf ( "\n $WARNING: NO SCALE CARDS READ$\n" );
}
@@ -1242,7 +1245,7 @@ int i,j,k;
Vol = 2.0*a*b*c*V;
// Precaution measure for erratic use of the library
- if ((fabs(Alph)<1.0e-6) || (fabs(Bet)<1.0e-6) ||
+ if ((fabs(Alph)<1.0e-6) || (fabs(Bet)<1.0e-6) ||
(fabs(Gamm)<1.0e-6)) {
as = 0.0;
bs = 0.0;
@@ -1260,7 +1263,7 @@ int i,j,k;
}
return;
}
-
+
sinA = sin(Alph);
cosA = cos(Alph);
sinB = sin(Bet);
@@ -1464,7 +1467,7 @@ int i,j,k;
return k;
}
- // transformation back to orthogonal coordinates
+ // transformation back to orthogonal coordinates
for (i=0;i<3;i++) {
for (j=0;j<4;j++) {
TMatrix[i][j] = 0.0;
@@ -1830,7 +1833,7 @@ int RC,l;
strcpy ( spaceGroupFix,spaceGroup );
if (spaceGroup[0]) {
RC = SymOps.SetGroup ( spaceGroup,syminfo_lib );
- // RC = SymOps.SetGroup ( spGroup,syminfo_lib );
+ // RC = SymOps.SetGroup ( spGroup,syminfo_lib );
// strncpy ( spaceGroup,spGroup,l );
// spaceGroup[l] = char(0);
if (RC==SYMOP_Ok) WhatIsSet |= CSET_SpaceGroup;
@@ -1877,7 +1880,7 @@ int i,j;
RO[3][3] = 1.0;
Mat4Inverse ( RO,RF );
-
+
WhatIsSet |= CSET_Transforms;
} else
@@ -2218,7 +2221,7 @@ MakeStreamFunctions(CMMDBCryst)
void TestCryst() {
-// reads from 'in.cryst', writes into
+// reads from 'in.cryst', writes into
// 'out.cryst' and 'abin.cryst'
CFile f;
char S[81];
@@ -2230,7 +2233,7 @@ PCMMDBCryst Cryst;
if (f.reset()) {
while (!f.FileEnd()) {
f.ReadLine ( S,sizeof(S) );
- Cryst->ConvertPDBString ( S,False );
+ Cryst->ConvertPDBString ( S );
}
f.shut();
} else {
@@ -2238,7 +2241,7 @@ PCMMDBCryst Cryst;
delete Cryst;
return;
}
-
+
f.assign ( pstr("out.cryst"),True );
if (f.rewrite()) {
Cryst->PDBASCIIDump ( f );
@@ -2259,10 +2262,10 @@ PCMMDBCryst Cryst;
delete Cryst;
return;
}
-
+
delete Cryst;
printf ( " Cryst deleted.\n" );
-
+
Cryst = new CMMDBCryst();
if (f.reset()) {
Cryst->read ( f );
@@ -2272,12 +2275,12 @@ PCMMDBCryst Cryst;
delete Cryst;
return;
}
-
+
f.assign ( pstr("abin.cryst"),True );
if (f.rewrite()) {
Cryst->PDBASCIIDump ( f );
f.shut();
- } else
+ } else
printf ( " Can't open output file 'abin.cryst' \n" );
delete Cryst;
diff --git a/mmdb/mmdb_cryst.h b/mmdb/mmdb_cryst.h
index 67f248d..f6ddc26 100644
--- a/mmdb/mmdb_cryst.h
+++ b/mmdb/mmdb_cryst.h
@@ -6,13 +6,13 @@
//
// Copyright (C) Eugene Krissinel 2000-2008.
//
-// This library is free software: you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License version 3, modified in accordance with the provisions
+// This library is free software: you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License version 3, modified in accordance with the provisions
// of the license to address the requirements of UK law.
//
-// You should have received a copy of the modified GNU Lesser
-// General Public License along with this library. If not, copies
+// You should have received a copy of the modified GNU Lesser
+// General Public License along with this library. If not, copies
// may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
//
// This program is distributed in the hope that it will be useful,
@@ -22,7 +22,7 @@
//
// =================================================================
//
-// 08.07.08 <-- Date of Last Modification.
+// 06.02.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
@@ -35,7 +35,7 @@
// CTVect ( translation vector class )
// CMMDBCryst ( MMDB cryst. section class )
//
-// (C) E. Krissinel 2000-2008
+// (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -63,8 +63,8 @@
// ==================== CCrystContainer ======================
-DefineClass(CCrystContainer);
-DefineStreamFunctions(CCrystContainer);
+DefineClass(CCrystContainer)
+DefineStreamFunctions(CCrystContainer)
class CCrystContainer : public CClassContainer {
@@ -72,7 +72,7 @@ class CCrystContainer : public CClassContainer {
CCrystContainer () : CClassContainer() {}
CCrystContainer ( RPCStream Object )
- : CClassContainer ( Object ) {}
+ : CClassContainer ( Object ) {}
~CCrystContainer() {}
PCContainerClass MakeContainerClass ( int ClassID );
@@ -89,8 +89,8 @@ class CCrystContainer : public CClassContainer {
#define NCSMSET_Matrix3 0x00000004
#define NCSMSET_All 0x00000007
-DefineClass(CNCSMatrix);
-DefineStreamFunctions(CNCSMatrix);
+DefineClass(CNCSMatrix)
+DefineStreamFunctions(CNCSMatrix)
class CNCSMatrix : public CContainerClass {
@@ -112,7 +112,7 @@ class CNCSMatrix : public CContainerClass {
int ConvertPDBASCII ( cpstr S );
void MakeCIF ( PCMMCIFData CIF, int N );
void GetCIF ( PCMMCIFData CIF, int & Signal );
-
+
int GetClassID () { return ClassID_NCSMatrix; }
void SetNCSMatrix ( int serialNum,
@@ -129,7 +129,7 @@ class CNCSMatrix : public CContainerClass {
// 0x0001 MTRIX1 was converted
// 0x0002 MTRIX2 was converted
// 0x0004 MTRIX3 was converted
-
+
void Init();
};
@@ -137,8 +137,8 @@ class CNCSMatrix : public CContainerClass {
// ================== CTVect ========================
-DefineClass(CTVect);
-DefineStreamFunctions(CTVect);
+DefineClass(CTVect)
+DefineStreamFunctions(CTVect)
class CTVect : public CContainerClass {
@@ -165,7 +165,7 @@ class CTVect : public CContainerClass {
void read ( RCFile f );
protected :
-
+
void Init();
};
@@ -226,7 +226,7 @@ class CMMDBCryst : public CStream {
int Z; // Z-value
mat33 o; // orthogonal transformation matrix
- vect3 t; // translation orthogonal vector
+ vect3 t; // translation orthogonal vector
mat33 s; // scale matrix
vect3 u; // translation part of the scale matrix
@@ -240,6 +240,9 @@ class CMMDBCryst : public CStream {
// 0x1000 - the check was not done
word WhatIsSet; // indicator of the fields set
Boolean ignoreScalei; // flag to ignore SCALEi cards
+ Boolean processSG; // flag to process space group at file
+ // read
+ Boolean fixSpaceGroup; // flag to fix space group at file read
CMMDBCryst ();
CMMDBCryst ( RPCStream Object );
@@ -253,7 +256,7 @@ class CMMDBCryst : public CStream {
// successfully converted, otherwise returns a non-negative value
// of Error_XXXX.
// PDBString must be not shorter than 81 characters.
- int ConvertPDBString ( pstr PDBString, Boolean fixSpaceGroup );
+ int ConvertPDBString ( pstr PDBString );
// RWBROOKReadPrintout() may be invoked after reading PDB file
// for simulating the old RWBROOK messages and warnings
@@ -307,7 +310,7 @@ class CMMDBCryst : public CStream {
// A PDB ASCII dump
void PDBASCIIDump ( RCFile f );
- int GetCIF ( PCMMCIFData CIF, Boolean fixSpaceGroup );
+ int GetCIF ( PCMMCIFData CIF );
void MakeCIF ( PCMMCIFData CIF );
Boolean areMatrices(); // returns True if the orthogonal-to-
@@ -451,7 +454,7 @@ class CMMDBCryst : public CStream {
extern cpstr getOrthCodeName ( int NCode );
/*
-extern void TestCryst(); // reads from 'in.cryst', writes into
+extern void TestCryst(); // reads from 'in.cryst', writes into
// 'out.cryst' and 'abin.cryst'
*/
diff --git a/mmdb/mmdb_defs.h b/mmdb/mmdb_defs.h
index b27f7e5..1523669 100644
--- a/mmdb/mmdb_defs.h
+++ b/mmdb/mmdb_defs.h
@@ -22,7 +22,7 @@
//
// =================================================================
//
-// 29.01.10 <-- Date of Last Modification.
+// 16.05.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
@@ -33,7 +33,7 @@
//
// Definition of types, constants and important classes.
//
-// (C) E. Krissinel 2000-2010
+// (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -46,8 +46,8 @@
#endif
#define MMDB_MAJOR_VERSION (1)
-#define MMDB_MINOR_VERSION (24)
-#define MMDB_MICRO_VERSION (2)
+#define MMDB_MINOR_VERSION (25)
+#define MMDB_MICRO_VERSION (3)
// ======================= types =================================
@@ -217,30 +217,33 @@ typedef char maxMMDBName[MaxMMDBNameLength];
// ClassID_XXXX are used by container classes for proper
// creating containered classes when reading from binary file.
-#define ClassID_Template 0
-#define ClassID_String 1
-#define ClassID_ObsLine 2
-#define ClassID_TitleLine 3
-#define ClassID_CAVEAT 4
-#define ClassID_Compound 5
-#define ClassID_Source 6
-#define ClassID_ExpData 7
-#define ClassID_Author 8
-#define ClassID_RevData 9
-#define ClassID_Supersede 10
-#define ClassID_Journal 11
-#define ClassID_Remark 12
-#define ClassID_DBReference 13
-#define ClassID_SeqAdv 14
-#define ClassID_ModRes 15
-#define ClassID_Het 16
-#define ClassID_NCSMatrix 17
-#define ClassID_TVect 18
-#define ClassID_Helix 19
-#define ClassID_Turn 20
-#define ClassID_Link 21
-#define ClassID_LinkR 22
-#define ClassID_CisPep 23
+enum ClassID {
+ ClassID_Template ,
+ ClassID_String ,
+ ClassID_ObsLine ,
+ ClassID_TitleLine ,
+ ClassID_CAVEAT ,
+ ClassID_Compound ,
+ ClassID_Source ,
+ ClassID_ExpData ,
+ ClassID_MdlType ,
+ ClassID_Author ,
+ ClassID_RevData ,
+ ClassID_Supersede ,
+ ClassID_Journal ,
+ ClassID_Remark ,
+ ClassID_DBReference,
+ ClassID_SeqAdv ,
+ ClassID_ModRes ,
+ ClassID_Het ,
+ ClassID_NCSMatrix ,
+ ClassID_TVect ,
+ ClassID_Helix ,
+ ClassID_Turn ,
+ ClassID_Link ,
+ ClassID_LinkR ,
+ ClassID_CisPep
+};
// ===================== classes ===============================
diff --git a/mmdb/mmdb_file.cpp b/mmdb/mmdb_file.cpp
index c6e197d..7eaa664 100644
--- a/mmdb/mmdb_file.cpp
+++ b/mmdb/mmdb_file.cpp
@@ -22,7 +22,7 @@
//
// =================================================================
//
-// 29.01.10 <-- Date of Last Modification.
+// 16.05.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
@@ -33,7 +33,7 @@
// **** Classes : CMMDBFile ( macromolecular data file class )
// ~~~~~~~~~
//
-// (C) E. Krissinel 2000-2010
+// (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -173,24 +173,28 @@ void CMMDBFile::ResetManager() {
void CMMDBFile::SetFlag ( word Flag ) {
Flags |= Flag;
- ignoreSegID = (Flags & MMDBF_IgnoreSegID ) != 0;
- ignoreElement = (Flags & MMDBF_IgnoreElement ) != 0;
- ignoreCharge = (Flags & MMDBF_IgnoreCharge ) != 0;
- ignoreNonCoorPDBErrors = (Flags & MMDBF_IgnoreNonCoorPDBErrors) != 0;
- ignoreUnmatch = (Flags & MMDBF_IgnoreUnmatch ) != 0;
- allowDuplChID = (Flags & MMDBF_AllowDuplChainID ) != 0;
- enforceUniqueChID = (Flags & MMDBF_EnforceUniqueChainID ) != 0;
+ ignoreSegID = (Flags & MMDBF_IgnoreSegID ) != 0;
+ ignoreElement = (Flags & MMDBF_IgnoreElement ) != 0;
+ ignoreCharge = (Flags & MMDBF_IgnoreCharge ) != 0;
+ ignoreNonCoorPDBErrors = (Flags & MMDBF_IgnoreNonCoorPDBErrors ) != 0;
+ ignoreUnmatch = (Flags & MMDBF_IgnoreUnmatch ) != 0;
+ allowDuplChID = (Flags & MMDBF_AllowDuplChainID ) != 0;
+ enforceUniqueChID = (Flags & MMDBF_EnforceUniqueChainID ) != 0;
+ Cryst.processSG = (Flags & MMDBF_DoNotProcessSpaceGroup ) == 0;
+ Cryst.fixSpaceGroup = (Flags & MMDBF_FixSpaceGroup ) != 0;
}
void CMMDBFile::RemoveFlag ( word Flag ) {
Flags &= ~Flag;
- ignoreSegID = (Flags & MMDBF_IgnoreSegID ) != 0;
- ignoreElement = (Flags & MMDBF_IgnoreElement ) != 0;
- ignoreCharge = (Flags & MMDBF_IgnoreCharge ) != 0;
- ignoreNonCoorPDBErrors = (Flags & MMDBF_IgnoreNonCoorPDBErrors) != 0;
- ignoreUnmatch = (Flags & MMDBF_IgnoreUnmatch ) != 0;
- allowDuplChID = (Flags & MMDBF_AllowDuplChainID ) != 0;
- enforceUniqueChID = (Flags & MMDBF_EnforceUniqueChainID ) != 0;
+ ignoreSegID = (Flags & MMDBF_IgnoreSegID ) != 0;
+ ignoreElement = (Flags & MMDBF_IgnoreElement ) != 0;
+ ignoreCharge = (Flags & MMDBF_IgnoreCharge ) != 0;
+ ignoreNonCoorPDBErrors = (Flags & MMDBF_IgnoreNonCoorPDBErrors ) != 0;
+ ignoreUnmatch = (Flags & MMDBF_IgnoreUnmatch ) != 0;
+ allowDuplChID = (Flags & MMDBF_AllowDuplChainID ) != 0;
+ enforceUniqueChID = (Flags & MMDBF_EnforceUniqueChainID ) != 0;
+ Cryst.processSG = (Flags & MMDBF_DoNotProcessSpaceGroup ) == 0;
+ Cryst.fixSpaceGroup = (Flags & MMDBF_FixSpaceGroup ) != 0;
}
@@ -255,22 +259,14 @@ int CMMDBFile::ReadPDBASCII ( RCFile f ) {
PCContString ContString;
word cleanKey;
int RC,modNum;
-Boolean fixSpaceGroup,fend;
+Boolean fend;
// remove previous data
ResetManager ();
FreeFileMemory();
FType = MMDB_FILE_PDB;
- ignoreSegID = (Flags & MMDBF_IgnoreSegID ) != 0;
- ignoreElement = (Flags & MMDBF_IgnoreElement ) != 0;
- ignoreCharge = (Flags & MMDBF_IgnoreCharge ) != 0;
- ignoreNonCoorPDBErrors = (Flags & MMDBF_IgnoreNonCoorPDBErrors) != 0;
- ignoreUnmatch = (Flags & MMDBF_IgnoreUnmatch ) != 0;
- ignoreRemarks = False;
- allowDuplChID = (Flags & MMDBF_AllowDuplChainID ) != 0;
- enforceUniqueChID = (Flags & MMDBF_EnforceUniqueChainID ) != 0;
- fixSpaceGroup = (Flags & MMDBF_FixSpaceGroup ) != 0;
+ SetFlag ( 0 );
if (f.FileEnd()) return Error_EmptyFile;
@@ -361,7 +357,7 @@ Boolean fixSpaceGroup,fend;
// read crystallographic information section
do {
- RC = Cryst.ConvertPDBString(S,fixSpaceGroup);
+ RC = Cryst.ConvertPDBString ( S );
if ((RC!=Error_WrongSection) && ignoreNonCoorPDBErrors)
RC = 0;
if (RC) break;
@@ -374,7 +370,7 @@ Boolean fixSpaceGroup,fend;
} while (!fend);
if (!RC) {
- RC = Cryst.ConvertPDBString(S,fixSpaceGroup);
+ RC = Cryst.ConvertPDBString ( S );
if ((RC!=Error_WrongSection) && ignoreNonCoorPDBErrors)
RC = Error_WrongSection;
}
@@ -478,21 +474,14 @@ int rc;
}
int CMMDBFile::ReadCIFASCII ( RCFile f ) {
-int W;
-Boolean fixSpaceGroup;
+int W;
// remove previous data
ResetManager ();
FreeFileMemory();
FType = MMDB_FILE_CIF;
- ignoreSegID = (Flags & MMDBF_IgnoreSegID ) != 0;
- ignoreElement = (Flags & MMDBF_IgnoreElement ) != 0;
- ignoreCharge = (Flags & MMDBF_IgnoreCharge ) != 0;
- ignoreNonCoorPDBErrors = (Flags & MMDBF_IgnoreNonCoorPDBErrors) != 0;
- ignoreUnmatch = (Flags & MMDBF_IgnoreUnmatch ) != 0;
- allowDuplChID = (Flags & MMDBF_AllowDuplChainID ) != 0;
- enforceUniqueChID = (Flags & MMDBF_EnforceUniqueChainID ) != 0;
- fixSpaceGroup = (Flags & MMDBF_FixSpaceGroup ) != 0;
+
+ SetFlag ( 0 );
CIFErrorLocation[0] = char(0); // CIF reading phase
@@ -519,13 +508,18 @@ Boolean fixSpaceGroup;
return int(W);
}
- return ReadFromCIF ( CIF,fixSpaceGroup );
+ W = ReadFromCIF ( CIF );
+ if (CIF) {
+ delete CIF;
+ CIF = NULL;
+ }
+
+ return W;
}
-int CMMDBFile::ReadFromCIF ( PCMMCIFData CIFD,
- Boolean fixSpaceGroup ) {
+int CMMDBFile::ReadFromCIF ( PCMMCIFData CIFD ) {
PCMMCIFLoop Loop1,Loop2;
pstr F,FC;
word cleanKey;
@@ -546,7 +540,7 @@ int RC,i,l,j,n,retc;
return RC;
}
- RC = Cryst.GetCIF ( CIFD,fixSpaceGroup );
+ RC = Cryst.GetCIF ( CIFD );
if (RC) {
CIFD->Optimize();
return RC;
@@ -1442,7 +1436,7 @@ PCContString ContString;
if (RC!=Error_WrongSection) return RC;
// belongs to the crystallographic information section?
- RC = Cryst.ConvertPDBString ( S,False );
+ RC = Cryst.ConvertPDBString ( S );
if (RC!=Error_WrongSection) {
// if (RC==0) Cryst.CalcCoordTransforms();
return RC;
@@ -1777,7 +1771,8 @@ int i,kndex,RC;
if (!crModel) SwitchModel ( 1 );
- RC = AllocateAtom ( kndex,chainID,resName,seqNum,insCode,True );
+ RC = AllocateAtom ( kndex,chainID,chainID,resName,resName,
+ seqNum,seqNum,1,insCode,True );
if (!RC)
Atom[kndex-1]->SetAtomName ( kndex,serNum,atomName,altLoc,
segID,element );
@@ -1833,8 +1828,11 @@ int i,kndex,RC,sn;
if (kndex==0) kndex = nAtoms+1;
- RC = AllocateAtom ( kndex,A->GetChainID(),A->GetResName(),
- A->GetSeqNum(),A->GetInsCode(),True );
+ RC = AllocateAtom ( kndex,A->GetChainID(),A->GetLabelAsymID(),
+ A->GetResName(),A->GetLabelCompID(),
+ A->GetSeqNum (),A->GetLabelSeqID (),
+ A->GetLabelEntityID(),A->GetInsCode(),
+ True );
if (serNum<=0) sn = kndex;
else sn = serNum;
@@ -2067,16 +2065,16 @@ InsCode insCode;
insCode[1] = char(0);
}
- return AllocateAtom ( index ,chainID,resName,
- seqNum,insCode,False );
+ return AllocateAtom ( index ,chainID,chainID,resName,resName,
+ seqNum,seqNum,1,insCode,False );
}
int CMMDBFile::CheckAtomPlace ( int index, PCMMCIFLoop Loop ) {
// Version of CheckAtomPlace(..) for reading from CIF file.
-ResName resName;
-int seqNum,RC,k,nM;
-ChainID chainID;
+ResName resName,label_comp_id;
+int seqNum ,label_seq_id,label_entity_id,RC,k,nM;
+ChainID chainID,label_asym_id;
InsCode insCode;
pstr F;
@@ -2085,14 +2083,14 @@ pstr F;
k = index-1;
// if (!CIFGetInteger1(seqNum,Loop,CIFTAG_LABEL_SEQ_ID,k))
if (!CIFGetInteger1(seqNum,Loop,CIFTAG_AUTH_SEQ_ID,k))
- CIFGetString ( insCode,Loop,CIFTAG_NDB_INS_CODE,k,
+ CIFGetString ( insCode,Loop,CIFTAG_NDB_HELIX_CLASS_PDB,k,
sizeof(InsCode),pstr("") );
else {
F = Loop->GetString ( CIFTAG_GROUP_PDB,k,RC );
if ((!F) || (RC)) return Error_CIF_EmptyRow;
if (strcmp(F,"TER")) {
seqNum = MinInt4; // only at reading CIF we allow this
- CIFGetString ( insCode,Loop,CIFTAG_NDB_INS_CODE,k,
+ CIFGetString ( insCode,Loop,CIFTAG_NDB_HELIX_CLASS_PDB,k,
sizeof(InsCode),pstr("") );
} else { // we allow for empty TER card here
seqNum = 0;
@@ -2103,12 +2101,22 @@ pstr F;
}
}
+ CIFGetInteger1 ( label_seq_id ,Loop,CIFTAG_LABEL_SEQ_ID ,k );
+ CIFGetInteger1 ( label_entity_id,Loop,CIFTAG_LABEL_ENTITY_ID,k );
+
// get chain/residue ID
CIFGetString ( chainID,Loop,CIFTAG_AUTH_ASYM_ID,k,
sizeof(ChainID),pstr("") );
CIFGetString ( resName,Loop,CIFTAG_AUTH_COMP_ID,k,
sizeof(ResName),pstr("") );
+ CIFGetString ( label_asym_id,Loop,CIFTAG_LABEL_ASYM_ID,k,
+ sizeof(ChainID),pstr("") );
+ CIFGetString ( label_comp_id,Loop,CIFTAG_LABEL_COMP_ID,k,
+ sizeof(ResName),pstr("") );
+
+ if (!resName[0]) strcpy ( resName,label_comp_id );
+
if (!CIFGetInteger1(nM,Loop,CIFTAG_PDBX_PDB_MODEL_NUM,k)) {
if (crModel) {
if (nM!=crModel->serNum) SwitchModel ( nM );
@@ -2116,16 +2124,21 @@ pstr F;
SwitchModel ( nM );
}
- return AllocateAtom ( index ,chainID,resName,
- seqNum,insCode,False );
+ return AllocateAtom ( index ,chainID,label_asym_id,resName,
+ label_comp_id,seqNum,label_seq_id,
+ label_entity_id,insCode,False );
}
int CMMDBFile::AllocateAtom ( int index,
const ChainID chainID,
+ const ChainID label_asym_id,
const ResName resName,
+ const ResName label_comp_id,
int seqNum,
+ int label_seq_id,
+ int label_entity_id,
const InsCode insCode,
Boolean Replace ) {
@@ -2188,6 +2201,11 @@ int CMMDBFile::AllocateAtom ( int index,
if (!crRes) return Error_DuplicateSeqNum;
}
+ strcpy ( crRes->label_asym_id,label_asym_id );
+ strcpy ( crRes->label_comp_id,label_comp_id );
+ crRes->label_seq_id = label_seq_id;
+ crRes->label_entity_id = label_entity_id;
+
// now check if there is place in the Atom array
if (index>AtmLen)
// there is no place, expand Atom by 1000 atom places at once
@@ -2685,6 +2703,20 @@ PCExpData expData;
}
+// -------------------------------------------------------------
+
+int CMMDBFile::GetNofMdlTypeRecs() {
+ return Title.MdlType.Length();
+}
+
+pstr CMMDBFile::GetMdlTypeRec ( int recNo ) {
+PCMdlType mdlType;
+ mdlType = PCMdlType(Title.MdlType.GetContainerClass(recNo));
+ if (mdlType) return mdlType->Line;
+ return NULL;
+}
+
+
// ------------------- Stream functions ----------------------
void CMMDBFile::Copy ( PCMMDBFile MMDBFile ) {
diff --git a/mmdb/mmdb_file.h b/mmdb/mmdb_file.h
index af44f42..6489fbd 100644
--- a/mmdb/mmdb_file.h
+++ b/mmdb/mmdb_file.h
@@ -22,7 +22,7 @@
//
// =================================================================
//
-// 24.03.09 <-- Date of Last Modification.
+// 16.05.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
@@ -33,7 +33,7 @@
// **** Classes : CMMDBFile
// ~~~~~~~~~
//
-// (C) E. Krissinel 2000-2009
+// (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -94,6 +94,7 @@
#define MMDBF_FixSpaceGroup 0x00008000
#define MMDBF_EnforceAtomNames 0x00010000
#define MMDBF_EnforceUniqueChainID 0x00020000
+#define MMDBF_DoNotProcessSpaceGroup 0x00040000
// MMDBF_EnforceUniqueChainID will make MMDB to rename chains on
// reading a file such as to maintain chains uniquesness. This
@@ -181,7 +182,7 @@ class CMMDBFile : public CUDData {
int ReadCIFASCII1 ( cpstr CIFLFName,
byte gzipMode=GZM_CHECK );
int ReadCIFASCII ( RCFile f );
- int ReadFromCIF ( PCMMCIFData CIFD, Boolean fixSpaceGroup );
+ int ReadFromCIF ( PCMMCIFData CIFD );
// adds info from PDB file
int AddPDBASCII1 ( cpstr PDBLFName,
@@ -509,6 +510,9 @@ class CMMDBFile : public CUDData {
int GetNofExpDataRecs();
pstr GetExpDataRec ( int recNo ); // 0.. on
+ int GetNofMdlTypeRecs();
+ pstr GetMdlTypeRec ( int recNo ); // 0.. on
+
int GetFileType() { return FType; }
void Copy ( PCMMDBFile MMDBFile );
@@ -590,8 +594,12 @@ class CMMDBFile : public CUDData {
int SwitchModel ( int nM );
int AllocateAtom ( int index,
const ChainID chainID,
+ const ChainID label_asym_id,
const ResName resName,
+ const ResName label_comp_id,
int seqNum,
+ int label_seq_id,
+ int label_entity_id,
const InsCode insCode,
Boolean Replace );
void ExpandAtomArray ( int inc );
diff --git a/mmdb/mmdb_graph.cpp b/mmdb/mmdb_graph.cpp
index 7d8b350..d598dbf 100644
--- a/mmdb/mmdb_graph.cpp
+++ b/mmdb/mmdb_graph.cpp
@@ -264,7 +264,7 @@ int Version;
void CVertex::mem_write ( pstr S, int & l ) {
byte Version=2;
- ::mem_write_byte ( Version ,S,l );
+ ::mem_write_byte ( Version,S,l );
::mem_write ( name ,S,l );
::mem_write ( type ,S,l );
::mem_write ( property,S,l );
@@ -275,7 +275,7 @@ byte Version=2;
void CVertex::mem_read ( cpstr S, int & l ) {
byte Version;
- ::mem_read_byte ( Version ,S,l );
+ ::mem_read_byte ( Version,S,l );
::mem_read ( name ,S,l );
::mem_read ( type ,S,l );
::mem_read ( property,S,l );
@@ -393,7 +393,7 @@ int Version;
void CEdge::mem_write ( pstr S, int & l ) {
byte Version=1;
- ::mem_write_byte ( Version ,S,l );
+ ::mem_write_byte ( Version,S,l );
::mem_write ( v1 ,S,l );
::mem_write ( v2 ,S,l );
::mem_write ( type ,S,l );
@@ -402,7 +402,7 @@ byte Version=1;
void CEdge::mem_read ( cpstr S, int & l ) {
byte Version;
- ::mem_read_byte ( Version ,S,l );
+ ::mem_read_byte ( Version,S,l );
::mem_read ( v1 ,S,l );
::mem_read ( v2 ,S,l );
::mem_read ( type ,S,l );
diff --git a/mmdb/mmdb_graph.h b/mmdb/mmdb_graph.h
index d72cd3b..70aa523 100644
--- a/mmdb/mmdb_graph.h
+++ b/mmdb/mmdb_graph.h
@@ -172,10 +172,10 @@ class CEdge : public CStream {
void SaveType (); // in property
void RestoreType (); // from property
- int GetVertex1 () { return v1-1; }
- int GetVertex2 () { return v2-1; }
- int GetType () { return type; }
- int GetProperty () { return property; }
+ inline int GetVertex1 () { return v1; }
+ inline int GetVertex2 () { return v2; }
+ inline int GetType () { return type; }
+ inline int GetProperty () { return property; }
virtual void Print ( int PKey );
@@ -286,10 +286,10 @@ class CGraph : public CStream {
int bondNo );
PCVertex GetVertex ( int vertexNo ); // 1<=vertexNo<=nVertices
- int GetNofVertices () { return nVertices; }
+ inline int GetNofVertices() { return nVertices; }
PCEdge GetEdge ( int edgeNo ); // 1<=edgeNo<=nEdges
- int GetNofEdges () { return nEdges; }
+ inline int GetNofEdges() { return nEdges; }
void GetVertices ( PPCVertex & V, int & nV );
void GetEdges ( PPCEdge & E, int & nE );
diff --git a/mmdb/mmdb_mmcif.cpp b/mmdb/mmdb_mmcif.cpp
index ffbf148..65b2823 100644
--- a/mmdb/mmdb_mmcif.cpp
+++ b/mmdb/mmdb_mmcif.cpp
@@ -4,7 +4,7 @@
// CCP4 Coordinate Library: support of coordinate-related
// functionality in protein crystallography applications.
//
-// Copyright (C) Eugene Krissinel 2000-2008.
+// Copyright (C) Eugene Krissinel 2000-2013.
//
// This library is free software: you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@ -22,7 +22,7 @@
//
// =================================================================
//
-// 29.01.10 <-- Date of Last Modification.
+// 07.02.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
@@ -36,7 +36,7 @@
// CMMCIFData ( mmCIF data block )
// CMMCIFFile ( mmCIF file )
//
-// (C) E. Krissinel 2000-2010
+// (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -93,143 +93,6 @@ int i,k,l,l1,l2;
}
-/* ----------- commented SortTags to be deleted after
- no bugs are discovered
-
-void SortTags ( psvector tag, int len, ivector index ) {
-// The idea is, the tags are created already sorted and
-// SortTags(..) should serve only in special cases, occasionally.
-// The bubble sorting should perform best in this situation
-// because of its N-complexity for sorted arrays.
-// Note: index must contain valid indices on input.
-int i,i1,i2;
-Boolean Done;
-// for (i=0;i<len;i++)
-// index[i] = i;
- do {
- Done = True;
- i1 = index[0];
- for (i=1;i<len;i++) {
- i2 = index[i];
- if (strcmp(tag[i1],tag[i2])>0) {
- index[i-1] = i2;
- index[i] = i1;
- Done = False;
- } else
- i1 = i2;
- }
- } while (!Done);
-}
-*/
-
-/* ----------------------------------------------------------------
- ANACHRONISM
-void SortTags ( psvector tag, int len, ivector index ) {
-int i,j,k;
- for (i=0;i<len;i++)
- index[i] = i;
- for (i=0;i<len-1;i++)
- for (j=i+1;j<len;j++)
- if (strcmp(tag[index[i]],tag[index[j]])>0) {
- k = index[i];
- index[i] = index[j];
- index[j] = k;
- }
-}
-------------------------------------------------------------------- */
-
-
-/* -----------------------------------------------------------------
- THESE VERSIONS OF HEAPSORT FROM NUMERICAL RECIPIES DO NOT WORK!
-
-void SortTags ( psvector tag, int len, ivector index ) {
-// Sorts tags by alphabetical order. index[] will return
-// indices of ordered tags; it must come allocated. tag[]
-// does not change; ordered tags are then obtained as
-// tag[index[i]].
-int i,j,k,l,N;
- for (i=0;i<len;i++)
- index[i] = i;
- if (len>1) {
- l = (len >> 1)+1;
- k = len;
- for (;;) {
- if (l>1) {
- l--;
- N = index[l-1];
- } else {
- k--;
- N = index[k];
- index[k] = index[0];
- if (k==1) {
- index[0] = N;
- return;
- }
- }
- i = l;
- j = l+1;
- while (j<=k) {
- if (j<k) {
- if (strcmp(tag[index[j-1]],tag[index[j]])<0)
- j++;
- }
- if (strcmp(tag[N],tag[index[j-1]])<0) {
- index[i-1] = index[j-1];
- i = j;
- j <<= 1;
- } else
- j = k+1;
- }
- index[i-1] = N;
- }
- }
-}
-
-void SortTags ( psvector tag, int len, ivector index ) {
-// Sorts tags by alphabetical order. index[] will return
-// indices of ordered tags; it must come allocated. tag[]
-// does not change; ordered tags are then obtained as
-// tag[index[i]].
-int i,j,k,l,N;
- for (i=0;i<len;i++)
- index[i] = i;
- if (len>1) {
- l = len >> 1;
- k = len-1;
- for (;;) {
- if (l>0)
- N = index[--l];
- else {
- N = index[k];
- index[k--] = index[0];
- if (!k) {
- index[0] = N;
- break;
- }
- }
- i = l;
- j = l+1;
- while (j<=k) {
- if (j<k) {
- if (strcmp(tag[index[j]],tag[index[j+1]])<0)
- j++;
- }
- if (strcmp(tag[N],tag[index[j]])<0) {
- index[i] = index[j];
- i = j;
- j <<= 1;
- j++;
- } else
- break;
- }
- index[i] = N;
- }
- }
-}
-
-------------------------------------------------------------------- */
-
-
// ====================== CMMCIFCategory ==========================
@@ -493,7 +356,7 @@ int i;
f.CreateReadVector ( index,0 );
}
-MakeStreamFunctions(CMMCIFCategory)
+MakeStreamFunctions(CMMCIFCategory);
@@ -554,8 +417,7 @@ psvector f1;
}
}
-void CMMCIFStruct::AddField ( cpstr F, cpstr T,
- Boolean Concatenate ) {
+void CMMCIFStruct::AddField ( cpstr F, cpstr T, Boolean Concatenate ) {
psvector field1;
int i,nAT;
pstr nf;
@@ -774,21 +636,34 @@ CFile f;
return False;
}
+#define _max_output_line_width 256
+
void CMMCIFStruct::WriteMMCIF ( RCFile f ) {
int i,j,k,l,m,n;
pstr F;
+
+ // calculate maximal length of tags
l = 0;
for (i=0;i<nTags;i++)
l = IMax(l,strlen(tag[i]));
- l += 1;
- m = 76-l;
+ l += 1; // add one space separator
+
+ // calculate maximal space left for data
+ m = _max_output_line_width - l;
+ // subtract category name width
if (name[0]!=char(1)) m -= strlen(name);
+
+ // start outout
f.LF();
- for (i=0;i<nTags;i++) {
+ for (i=0;i<nTags;i++) { // for each tag
+
+ // print category name, if not hidden, and dot
if (name[0]!=char(1)) {
f.Write ( name );
f.Write ( pstr(".") );
}
+
+ // print tag, checking for duplicate tag flag
F = strchr ( tag[i],'\1' );
if (F) {
*F = char(0);
@@ -796,7 +671,9 @@ pstr F;
*F = '\1';
} else
f.Write ( tag[i] );
- if (field[i]) {
+
+ // print field
+ if (field[i]) { // field is defined
F = field[i];
if (strchr(F,'\n') || strstr(F,"\" ")) {
f.Write ( pstr("\n;") );
@@ -804,7 +681,7 @@ pstr F;
f.Write ( pstr("\n;\n") );
} else {
n = strlen(F);
- if (n>m)
+ if (n>m) // wrap around if field is too long
f.Write ( pstr("\n ") );
else {
k = l-strlen(tag[i]);
@@ -823,13 +700,18 @@ pstr F;
} else
f.WriteLine ( field[i] );
}
- } else {
+
+ } else { // field if not defined, put question mark
+
k = l-strlen(tag[i]);
for (j=0;j<k;j++)
f.Write ( pstr(" ") );
f.WriteLine ( NODATA_Q );
+
}
+
}
+
}
void CMMCIFStruct::Copy ( PCMMCIFCategory Struct ) {
@@ -864,7 +746,7 @@ int i;
}
-MakeStreamFunctions(CMMCIFStruct)
+MakeStreamFunctions(CMMCIFStruct);
@@ -1536,7 +1418,10 @@ void CMMCIFLoop::WriteMMCIF ( RCFile f ) {
int i,j,k,m,n;
ivector l;
pstr F;
+
+ // write loop keyword
f.Write ( pstr("\nloop_\n") );
+
GetVectorMemory ( l,nTags,0 );
k = 0;
for (i=0;i<nTags;i++) {
@@ -1570,7 +1455,7 @@ pstr F;
}
l[i] = IMax(l[i],1);
k += l[i]+1;
- if (k>76) {
+ if (k>_max_output_line_width) {
l[i] = -l[i];
k = 0;
}
@@ -1583,7 +1468,7 @@ pstr F;
k = l[j]; // length of the field
if (k<0) k = -k;
m += k+1;
- if (m>76) {
+ if (m>_max_output_line_width) {
f.LF();
m = k+1;
} else
@@ -3585,6 +3470,34 @@ int i1,i;
}
+int CMMCIFFile::DeleteMMCIFData ( cpstr DName ) {
+int dataNo = GetCIFDataNo ( DName );
+
+ if (dataNo>=0) return DeleteMMCIFData ( dataNo );
+ return dataNo;
+
+}
+
+int CMMCIFFile::DeleteMMCIFData ( int dataNo ) {
+int i;
+
+ if ((0<=dataNo) && (dataNo<nData)) {
+
+ if (data[dataNo]) delete data[dataNo];
+ for (i=dataNo+1;i<nData;i++)
+ data[i-1] = data[i];
+ nData--;
+
+ Sort();
+
+ return 0;
+
+ }
+
+ return -nData;
+
+}
+
void CMMCIFFile::Copy ( PCMMCIFFile File ) {
int i;
FreeMemory();
diff --git a/mmdb/mmdb_mmcif.h b/mmdb/mmdb_mmcif.h
index 6f3583f..4b04ad5 100644
--- a/mmdb/mmdb_mmcif.h
+++ b/mmdb/mmdb_mmcif.h
@@ -22,7 +22,7 @@
//
// =================================================================
//
-// 29.01.10 <-- Date of Last Modification.
+// 16.01.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
@@ -36,7 +36,7 @@
// CMMCIFData ( mmCIF data block )
// CMMCIFFile ( mmCIF file )
//
-// (C) E. Krissinel 2000-2010
+// (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -541,8 +541,8 @@ class CMMCIFStruct : public CMMCIFCategory {
// ====================== CMMCIFLoop ==============================
-DefineClass(CMMCIFLoop);
-DefineStreamFunctions(CMMCIFLoop);
+DefineClass(CMMCIFLoop)
+DefineStreamFunctions(CMMCIFLoop)
/// \brief CMMCIFLoop represents mmCIF's \"loop\" category, which keeps
/// rows of data values associated with tags.
@@ -2089,6 +2089,8 @@ class CMMCIFFile : public CStream {
PCMMCIFData GetCIFData ( int dataNo ); // 0..nData-1
PCMMCIFData GetCIFData ( cpstr DName );
int AddMMCIFData ( cpstr DName );
+ int DeleteMMCIFData ( cpstr DName );
+ int DeleteMMCIFData ( int dataNo );
int GetCIFDataNo ( cpstr DName );
void WriteMMCIF ( RCFile f );
diff --git a/mmdb/mmdb_model.cpp b/mmdb/mmdb_model.cpp
index 337f776..e20ec40 100644
--- a/mmdb/mmdb_model.cpp
+++ b/mmdb/mmdb_model.cpp
@@ -6,13 +6,13 @@
//
// Copyright (C) Eugene Krissinel 2000-2008.
//
-// This library is free software: you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License version 3, modified in accordance with the provisions
+// This library is free software: you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License version 3, modified in accordance with the provisions
// of the license to address the requirements of UK law.
//
-// You should have received a copy of the modified GNU Lesser
-// General Public License along with this library. If not, copies
+// You should have received a copy of the modified GNU Lesser
+// General Public License along with this library. If not, copies
// may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
//
// This program is distributed in the hope that it will be useful,
@@ -29,7 +29,7 @@
// **** Module : MMDB_Model <implementation>
// ~~~~~~~~~
// **** Project : MacroMolecular Data Base (MMDB)
-// ~~~~~~~~~
+// ~~~~~~~~~
// **** Classes : CHetCompound ( description of het compounds )
// ~~~~~~~~~ CHetCompounds ( HETNAM, HETSYN, FORMULA records )
// CSSContainer ( container for helixes and turns )
@@ -659,6 +659,8 @@ int i,l,k,RC;
hetCompound[i]->wc = ' ';
}
+// CIF->DeleteLoop ( CIFCAT_CHEM_COMP );
+
if (F) delete[] F;
}
@@ -807,7 +809,7 @@ UNUSED_ARGUMENT(N);
PCMMCIFLoop Loop;
int RC;
RC = CIF->AddLoop ( CIFCAT_STRUCT_CONF,Loop );
- if (RC!=CIFRC_Ok)
+ if (RC!=CIFRC_Ok)
// the category was (re)created, provide tags
AddStructConfTags ( Loop );
Loop->AddString ( pstr(HelixTypeID) );
@@ -923,7 +925,7 @@ void CHelix::Copy ( PCContainerClass Helix ) {
strcpy ( endICode ,PCHelix(Helix)->endICode );
CreateCopy ( comment,PCHelix(Helix)->comment );
}
-
+
void CHelix::write ( RCFile f ) {
byte Version=1;
f.WriteByte ( &Version );
@@ -1054,13 +1056,13 @@ int RC;
Loop->AddString ( initICode,True );
Loop->AddString ( endResName );
Loop->AddString ( endChainID );
- Loop->AddInteger ( endSeqNum );
+ Loop->AddInteger ( endSeqNum );
Loop->AddString ( endICode ,True );
}
-int CStrand::ConvertPDBASCII ( cpstr S ) {
+int CStrand::ConvertPDBASCII ( cpstr S ) {
GetInteger ( strandNo ,&(S[7]) ,3 );
strcpy_ncss ( sheetID ,&(S[11]) ,3 );
@@ -1090,7 +1092,7 @@ int CStrand::ConvertPDBASCII ( cpstr S ) {
}
int CStrand::GetCIF ( PCMMCIFData CIF, cpstr sheet_id ) {
-PCMMCIFLoop Loop;
+PCMMCIFLoop Loop;
int RC,l,i,sNo;
pstr F;
@@ -1159,7 +1161,7 @@ void CStrand::Copy ( PCStrand Strand ) {
strcpy ( prevChainID,Strand->prevChainID );
strcpy ( prevICode ,Strand->prevICode );
}
-
+
void CStrand::write ( RCFile f ) {
byte Version=1;
f.WriteByte ( &Version );
@@ -1248,7 +1250,7 @@ int i;
void CSheet::PDBASCIIDump ( RCFile f ) {
char S[100];
int i;
- if (Strand)
+ if (Strand)
for (i=0;i<nStrands;i++)
if (Strand[i]) {
strcpy ( S,"SHEET" );
@@ -1301,7 +1303,7 @@ Boolean isSense;
}
if (nStrands>1) {
-
+
if (isSense) {
RC = CIF->AddLoop ( CIFCAT_STRUCT_SHEET_ORDER,Loop );
if (RC!=CIFRC_Ok) {
@@ -1401,8 +1403,8 @@ void CSheet::TryStrand ( int strand_no ) {
int i,k;
PPCStrand Strand1;
k = -1;
- for (i=0;(i<nStrands) && (k<0);i++)
- if (Strand[i])
+ for (i=0;(i<nStrands) && (k<0);i++)
+ if (Strand[i])
if (Strand[i]->strandNo==strand_no) k = i;
if (k<0) {
Strand1 = new PCStrand[nStrands+1];
@@ -1490,7 +1492,7 @@ Boolean Ok;
// Read each strand
RC = 0;
- for (i=0;(i<nStrands) && (!RC);i++)
+ for (i=0;(i<nStrands) && (!RC);i++)
RC = Strand[i]->GetCIF ( CIF,sheetID );
if (RC) return RC;
@@ -1537,7 +1539,7 @@ Boolean Ok;
return Error_WrongSheetOrder;
}
}
-
+
Loop = CIF->GetLoop ( CIFCAT_STRUCT_SHEET_HBOND );
if (Loop) {
Ok = True;
@@ -1636,7 +1638,7 @@ int i;
}
strcpy ( sheetID,Sheet->sheetID );
}
-
+
void CSheet::write ( RCFile f ) {
int i;
byte Version=1;
@@ -1705,7 +1707,7 @@ int i;
void CSheets::PDBASCIIDump ( RCFile f ) {
int i;
- if (Sheet)
+ if (Sheet)
for (i=0;i<nSheets;i++)
if (Sheet[i]) Sheet[i]->PDBASCIIDump ( f );
}
@@ -1713,7 +1715,7 @@ int i;
void CSheets::MakeCIF ( PCMMCIFData CIF ) {
int i;
- if (Sheet)
+ if (Sheet)
for (i=0;i<nSheets;i++)
if (Sheet[i]) Sheet[i]->MakeCIF ( CIF );
}
@@ -1732,7 +1734,7 @@ PPCSheet Sheet1;
k = i;
break;
}
- }
+ }
if (k<0) {
Sheet1 = new PCSheet[nSheets+1];
for (i=0;i<nSheets;i++)
@@ -1761,7 +1763,7 @@ PPCSheet Sheet1;
k = -1;
j = 0;
while ((j<nSheets) && (k<0)) {
- if (Sheet[j]) {
+ if (Sheet[j]) {
if (!strcmp(F,Sheet[j]->sheetID)) k = j;
}
j++;
@@ -1775,7 +1777,7 @@ PPCSheet Sheet1;
Sheet[nSheets] = new CSheet();
strcpy ( Sheet[nSheets]->sheetID,F );
nSheets++;
- }
+ }
}
}
}
@@ -1785,7 +1787,7 @@ int CSheets::GetCIF ( PCMMCIFData CIF ) {
int i,RC;
FreeMemory();
-
+
// First find all sheet names and create
// the corresponding classes. The CIF fields
// are not removed at this stage.
@@ -1919,7 +1921,7 @@ UNUSED_ARGUMENT(N);
PCMMCIFLoop Loop;
int RC;
RC = CIF->AddLoop ( CIFCAT_STRUCT_CONF,Loop );
- if (RC!=CIFRC_Ok)
+ if (RC!=CIFRC_Ok)
// the category was (re)created, provide tags
AddStructConfTags ( Loop );
Loop->AddString ( pstr(TurnTypeID) );
@@ -1944,10 +1946,10 @@ char L[100];
strcpy_ncss ( turnID ,&(S[11]),3 );
strcpy_ncss ( initResName,&(S[15]),3 );
strcpy_ncss ( initChainID,&(S[19]),1 );
- GetIntIns ( initSeqNum,initICode,&(S[20]),4 );
+ GetIntIns ( initSeqNum,initICode,&(S[20]),4 );
strcpy_ncss ( endResName ,&(S[26]),3 );
strcpy_ncss ( endChainID ,&(S[30]),1 );
- GetIntIns ( endSeqNum ,endICode ,&(S[31]),4 );
+ GetIntIns ( endSeqNum ,endICode ,&(S[31]),4 );
strcpy_ncss ( L ,&(S[40]),30 );
CreateCopy ( comment ,L );
return 0;
@@ -2028,7 +2030,7 @@ void CTurn::Copy ( PCContainerClass Turn ) {
strcpy ( endICode ,PCTurn(Turn)->endICode );
CreateCopy ( comment,PCTurn(Turn)->comment );
}
-
+
void CTurn::write ( RCFile f ) {
byte Version=1;
f.WriteByte ( &Version );
@@ -2220,13 +2222,13 @@ int CLink::ConvertPDBASCII ( cpstr S ) {
strcpy_ncss ( aloc1 ,&(S[16]),1 );
strcpy_ncss ( resName1,&(S[17]),3 );
strcpy_ncss ( chainID1,&(S[21]),1 );
- GetIntIns ( seqNum1,insCode1,&(S[22]),4 );
+ GetIntIns ( seqNum1,insCode1,&(S[22]),4 );
GetString ( atName2 ,&(S[42]),4 );
strcpy_ncss ( aloc2 ,&(S[46]),1 );
strcpy_ncss ( resName2,&(S[47]),3 );
strcpy_ncss ( chainID2,&(S[51]),1 );
- GetIntIns ( seqNum2,insCode2,&(S[52]),4 );
+ GetIntIns ( seqNum2,insCode2,&(S[52]),4 );
GetInteger ( s1,&(S[59]),3 );
GetInteger ( i1,&(S[62]),1 );
@@ -2355,7 +2357,7 @@ void CLink::Copy ( PCContainerClass Link ) {
k2 = PCLink(Link)->k2;
}
-
+
void CLink::write ( RCFile f ) {
byte Version=1;
@@ -2807,11 +2809,11 @@ int CCisPep::ConvertPDBASCII ( cpstr S ) {
strcpy_ncss ( pep1 ,&(S[11]),3 );
strcpy_ncss ( chainID1,&(S[15]),1 );
- GetIntIns ( seqNum1,icode1,&(S[17]),4 );
+ GetIntIns ( seqNum1,icode1,&(S[17]),4 );
strcpy_ncss ( pep2 ,&(S[25]),3 );
strcpy_ncss ( chainID2,&(S[29]),1 );
- GetIntIns ( seqNum2,icode2,&(S[31]),4 );
+ GetIntIns ( seqNum2,icode2,&(S[31]),4 );
GetInteger ( modNum ,&(S[43]),3 );
GetReal ( measure ,&(S[53]),6 );
@@ -2839,7 +2841,7 @@ void CCisPep::Copy ( PCContainerClass CisPep ) {
measure = PCCisPep(CisPep)->measure;
}
-
+
void CCisPep::write ( RCFile f ) {
byte Version=1;
@@ -3052,8 +3054,8 @@ int i,k;
Chain[nChains]->SetModel ( this );
nChains++;
- return Chain[nChains-1];
-
+ return Chain[nChains-1];
+
}
PCChain CModel::CreateChain ( const ChainID chID ) {
@@ -3071,7 +3073,7 @@ PCChain CModel::CreateChain ( const ChainID chID ) {
Chain[nChains]->SetModel ( this );
nChains++;
- return Chain[nChains-1];
+ return Chain[nChains-1];
}
@@ -3143,7 +3145,7 @@ Boolean isChainID;
return Chain[i]; // it is there; just return the pointer
}
}
- return NULL;
+ return NULL;
}
@@ -3263,7 +3265,7 @@ PCResidue CModel::GetResidue ( const ChainID chainID, int seqNo,
const InsCode insCode ) {
PCChain chain;
chain = GetChain ( chainID );
- if (chain)
+ if (chain)
return chain->GetResidue ( seqNo,insCode );
return NULL;
}
@@ -3301,7 +3303,7 @@ int CModel::GetResidueNo ( const ChainID chainID, int seqNo,
const InsCode insCode ) {
PCChain chain;
chain = GetChain ( chainID );
- if (chain)
+ if (chain)
return chain->GetResidueNo ( seqNo,insCode );
return -2;
}
@@ -3481,7 +3483,7 @@ int i,k;
// find the chain
k = -1;
for (i=0;(i<nChains) && (k<0);i++)
- if (!strcmp(chainID,Chain[i]->chainID))
+ if (!strcmp(chainID,Chain[i]->chainID))
k = i;
if (k>=0) {
@@ -3608,10 +3610,10 @@ PCAtom CModel::GetAtom ( const ChainID chID,
) {
PCChain chn;
PCResidue res;
- chn = GetChain ( chID );
+ chn = GetChain ( chID );
if (chn) {
- res = chn->GetResidue ( seqNo,insCode );
- if (res)
+ res = chn->GetResidue ( seqNo,insCode );
+ if (res)
return res->GetAtom ( aname,elmnt,aloc );
}
return NULL;
@@ -3621,9 +3623,9 @@ PCAtom CModel::GetAtom ( const ChainID chID, int seqNo,
const InsCode insCode, int atomNo ) {
PCChain chn;
PCResidue res;
- chn = GetChain ( chID );
+ chn = GetChain ( chID );
if (chn) {
- res = chn->GetResidue ( seqNo,insCode );
+ res = chn->GetResidue ( seqNo,insCode );
if (res) {
if ((0<=atomNo) && (atomNo<res->nAtoms))
return res->atom[atomNo];
@@ -3639,10 +3641,10 @@ PCAtom CModel::GetAtom ( const ChainID chID,
const AltLoc aloc ) {
PCChain chn;
PCResidue res;
- chn = GetChain ( chID );
+ chn = GetChain ( chID );
if (chn) {
if ((0<=resNo) && (resNo<chn->nResidues)) {
- res = chn->Residue[resNo];
+ res = chn->Residue[resNo];
if (res)
return res->GetAtom ( aname,elmnt,aloc );
}
@@ -3653,10 +3655,10 @@ PCResidue res;
PCAtom CModel::GetAtom ( const ChainID chID, int resNo, int atomNo ) {
PCChain chn;
PCResidue res;
- chn = GetChain ( chID );
+ chn = GetChain ( chID );
if (chn) {
if ((0<=resNo) && (resNo<chn->nResidues)) {
- res = chn->Residue[resNo];
+ res = chn->Residue[resNo];
if (res) {
if ((0<=atomNo) && (atomNo<res->nAtoms))
return res->atom[atomNo];
@@ -3674,7 +3676,7 @@ PCAtom CModel::GetAtom ( int chNo, int seqNo,
PCResidue res;
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo]) {
- res = Chain[chNo]->GetResidue ( seqNo,insCode );
+ res = Chain[chNo]->GetResidue ( seqNo,insCode );
if (res)
return res->GetAtom ( aname,elmnt,aloc );
}
@@ -3687,7 +3689,7 @@ PCAtom CModel::GetAtom ( int chNo, int seqNo, const InsCode insCode,
PCResidue res;
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo]) {
- res = Chain[chNo]->GetResidue ( seqNo,insCode );
+ res = Chain[chNo]->GetResidue ( seqNo,insCode );
if (res) {
if ((0<=atomNo) && (atomNo<res->nAtoms))
return res->atom[atomNo];
@@ -3705,7 +3707,7 @@ PCResidue res;
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo]) {
if ((0<=resNo) && (resNo<Chain[chNo]->nResidues)) {
- res = Chain[chNo]->Residue[resNo];
+ res = Chain[chNo]->Residue[resNo];
if (res)
return res->GetAtom ( aname,elmnt,aloc );
}
@@ -3719,7 +3721,7 @@ PCResidue res;
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo]) {
if ((0<=resNo) && (resNo<Chain[chNo]->nResidues)) {
- res = Chain[chNo]->Residue[resNo];
+ res = Chain[chNo]->Residue[resNo];
if (res) {
if ((0<=atomNo) && (atomNo<res->nAtoms))
return res->atom[atomNo];
@@ -3854,16 +3856,16 @@ int CModel::DeleteAtom ( const ChainID chID,
const AltLoc aloc
) {
PCChain chn;
- chn = GetChain ( chID );
+ chn = GetChain ( chID );
if (chn)
- return chn->DeleteAtom ( seqNo,insCode,aname,elmnt,aloc );
+ return chn->DeleteAtom ( seqNo,insCode,aname,elmnt,aloc );
return 0;
}
int CModel::DeleteAtom ( const ChainID chID, int seqNo,
const InsCode insCode, int atomNo ) {
PCChain chn;
- chn = GetChain ( chID );
+ chn = GetChain ( chID );
if (chn) return chn->DeleteAtom ( seqNo,insCode,atomNo );
return 0;
}
@@ -3874,15 +3876,15 @@ int CModel::DeleteAtom ( const ChainID chID,
const Element elmnt,
const AltLoc aloc ) {
PCChain chn;
- chn = GetChain ( chID );
- if (chn) return chn->DeleteAtom ( resNo,aname,elmnt,aloc );
+ chn = GetChain ( chID );
+ if (chn) return chn->DeleteAtom ( resNo,aname,elmnt,aloc );
return 0;
}
int CModel::DeleteAtom ( const ChainID chID, int resNo, int atomNo ) {
PCChain chn;
- chn = GetChain ( chID );
- if (chn) return chn->DeleteAtom ( resNo,atomNo );
+ chn = GetChain ( chID );
+ if (chn) return chn->DeleteAtom ( resNo,atomNo );
return 0;
}
@@ -3894,7 +3896,7 @@ int CModel::DeleteAtom ( int chNo, int seqNo,
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo])
return Chain[chNo]->DeleteAtom ( seqNo,insCode,aname,
- elmnt,aloc );
+ elmnt,aloc );
}
return 0;
}
@@ -3903,7 +3905,7 @@ int CModel::DeleteAtom ( int chNo, int seqNo, const InsCode insCode,
int atomNo ) {
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo])
- return Chain[chNo]->DeleteAtom ( seqNo,insCode,atomNo );
+ return Chain[chNo]->DeleteAtom ( seqNo,insCode,atomNo );
}
return 0;
}
@@ -3914,7 +3916,7 @@ int CModel::DeleteAtom ( int chNo, int resNo,
const AltLoc aloc ) {
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo])
- return Chain[chNo]->DeleteAtom ( resNo,aname,elmnt,aloc );
+ return Chain[chNo]->DeleteAtom ( resNo,aname,elmnt,aloc );
}
return 0;
}
@@ -3922,7 +3924,7 @@ int CModel::DeleteAtom ( int chNo, int resNo,
int CModel::DeleteAtom ( int chNo, int resNo, int atomNo ) {
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo])
- return Chain[chNo]->DeleteAtom ( resNo,atomNo );
+ return Chain[chNo]->DeleteAtom ( resNo,atomNo );
}
return 0;
}
@@ -3930,21 +3932,21 @@ int CModel::DeleteAtom ( int chNo, int resNo, int atomNo ) {
int CModel::DeleteAllAtoms ( const ChainID chID, int seqNo,
const InsCode insCode ) {
PCChain chn;
- chn = GetChain ( chID );
+ chn = GetChain ( chID );
if (chn) return chn->DeleteAllAtoms ( seqNo,insCode );
return 0;
}
int CModel::DeleteAllAtoms ( const ChainID chID, int resNo ) {
PCChain chn;
- chn = GetChain ( chID );
+ chn = GetChain ( chID );
if (chn) return chn->DeleteAllAtoms ( resNo );
return 0;
}
int CModel::DeleteAllAtoms ( const ChainID chID ) {
PCChain chn;
- chn = GetChain ( chID );
+ chn = GetChain ( chID );
if (chn) return chn->DeleteAllAtoms();
return 0;
}
@@ -3953,7 +3955,7 @@ int CModel::DeleteAllAtoms ( int chNo, int seqNo,
const InsCode insCode ) {
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo])
- return Chain[chNo]->DeleteAllAtoms ( seqNo,insCode );
+ return Chain[chNo]->DeleteAllAtoms ( seqNo,insCode );
}
return 0;
}
@@ -3961,7 +3963,7 @@ int CModel::DeleteAllAtoms ( int chNo, int seqNo,
int CModel::DeleteAllAtoms ( int chNo, int resNo ) {
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo])
- return Chain[chNo]->DeleteAllAtoms ( resNo );
+ return Chain[chNo]->DeleteAllAtoms ( resNo );
}
return 0;
}
@@ -3969,7 +3971,7 @@ int CModel::DeleteAllAtoms ( int chNo, int resNo ) {
int CModel::DeleteAllAtoms ( int chNo ) {
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo])
- return Chain[chNo]->DeleteAllAtoms();
+ return Chain[chNo]->DeleteAllAtoms();
}
return 0;
}
@@ -4004,14 +4006,14 @@ int CModel::AddAtom ( const ChainID chID, int seqNo,
const InsCode insCode,
PCAtom atom ) {
PCChain chn;
- chn = GetChain ( chID );
+ chn = GetChain ( chID );
if (chn) return chn->AddAtom ( seqNo,insCode,atom );
return 0;
}
int CModel::AddAtom ( const ChainID chID, int resNo, PCAtom atom ) {
PCChain chn;
- chn = GetChain ( chID );
+ chn = GetChain ( chID );
if (chn) return chn->AddAtom ( resNo,atom );
return 0;
}
@@ -4020,7 +4022,7 @@ int CModel::AddAtom ( int chNo, int seqNo, const InsCode insCode,
PCAtom atom ) {
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo])
- return Chain[chNo]->AddAtom ( seqNo,insCode,atom );
+ return Chain[chNo]->AddAtom ( seqNo,insCode,atom );
}
return 0;
}
@@ -4028,7 +4030,7 @@ int CModel::AddAtom ( int chNo, int seqNo, const InsCode insCode,
int CModel::AddAtom ( int chNo, int resNo, PCAtom atom ) {
if ((0<=chNo) && (chNo<nChains)) {
if (Chain[chNo])
- return Chain[chNo]->AddAtom ( resNo,atom );
+ return Chain[chNo]->AddAtom ( resNo,atom );
}
return 0;
}
@@ -4225,7 +4227,7 @@ Boolean singleModel = True;
PadSpaces ( S,80 );
f.WriteLine ( S );
}
-
+
}
@@ -4391,7 +4393,7 @@ int i;
Chain[i]->Copy ( Model->Chain[i] );
} else
Chain[i] = NULL;
- }
+ }
}
HetCompounds.Copy ( &(Model->HetCompounds) );
@@ -4450,7 +4452,7 @@ int i;
Chain[i]->_copy ( Model->Chain[i] );
} else
Chain[i] = NULL;
- }
+ }
}
HetCompounds.Copy ( &(Model->HetCompounds) );
@@ -4491,7 +4493,7 @@ int i;
Chain[i]->_copy ( Model->Chain[i],atom,atom_index );
} else
Chain[i] = NULL;
- }
+ }
}
HetCompounds.Copy ( &(Model->HetCompounds) );
@@ -4680,7 +4682,7 @@ int ic,ir,ia;
}
}
}
-
+
}
@@ -4941,8 +4943,8 @@ int CModel::GetUDData ( int UDDhandle, pstr & sudd ) {
int CModel::CalcSecStructure ( Boolean flagBulge, int aminoSelHnd ) {
// This function is contributed by Liz Potterton, University of York
//------------------------------------------------------------------
-// Define a secondary structure type of each amino acid residue in the
-// structure.
+// Define a secondary structure type of each amino acid residue in the
+// structure.
// Procedure:
// Find all amino acids
// Find all pairs of amino acids which have inter-Ca distance < 10.0A
@@ -4989,13 +4991,13 @@ int i,j,k,l;
Res[nres++] = chain->Residue[j];
}
}
-
+
if (nres<=0) {
delete[] Res;
return SSERC_noResidues;
}
-
+
}
// 2. Get C-alphas of all aminoacids
@@ -5059,16 +5061,16 @@ int i,j,k,l;
k = 0;
while ((hbonds[ir1][k]!=0) && (k<2)) k++;
hbonds [ir1][k] = -irdif;
- hbond_atoms[ir1][k] = Res[ir1]->GetAtom ( "N" );
- hbond_atoms[ir1][k+3] = Res[ir2]->GetAtom ( "O" );
+ hbond_atoms[ir1][k] = Res[ir1]->GetAtom ( "N" );
+ hbond_atoms[ir1][k+3] = Res[ir2]->GetAtom ( "O" );
}
// test if there is donor Hbond from residue ir2
- if (Res[ir2]->isMainchainHBond(Res[ir1])) {
- k = 0;
+ if (Res[ir2]->isMainchainHBond(Res[ir1])) {
+ k = 0;
while ((hbonds[ir2][k]!=0) && (k<2)) k++;
hbonds [ir2][k] = irdif;
- hbond_atoms[ir2][k] = Res[ir2]->GetAtom ( "N" );
- hbond_atoms[ir2][k+3] = Res[ir1]->GetAtom ( "O" );
+ hbond_atoms[ir2][k] = Res[ir2]->GetAtom ( "N" );
+ hbond_atoms[ir2][k+3] = Res[ir1]->GetAtom ( "O" );
}
}
}
@@ -5076,18 +5078,18 @@ int i,j,k,l;
// 6. Assign the turns - if there is bifurcated bond then the 4-turn
// takes precedence - read the paper to make sense of this
- for (i=0;i<nres;i++) {
+ for (i=0;i<nres;i++) {
k = 0;
while ((k<=2) && (hbonds[i][k]!=0)) {
if (hbonds[i][k]==-5) {
- Res[i-1]->SSE = SSE_5Turn;
- Res[i-2]->SSE = SSE_5Turn;
- Res[i-3]->SSE = SSE_5Turn;
- Res[i-4]->SSE = SSE_5Turn;
+ Res[i-1]->SSE = SSE_5Turn;
+ Res[i-2]->SSE = SSE_5Turn;
+ Res[i-3]->SSE = SSE_5Turn;
+ Res[i-4]->SSE = SSE_5Turn;
}
if (hbonds[i][k]==-3) {
- Res[i-1]->SSE = SSE_3Turn;
- Res[i-2]->SSE = SSE_3Turn;
+ Res[i-1]->SSE = SSE_3Turn;
+ Res[i-2]->SSE = SSE_3Turn;
}
k++;
}
@@ -5108,7 +5110,7 @@ int i,j,k,l;
// 7. Look for consecutive 4-turns which make alpha helix
for (i=1;i<nres-3;i++) {
- if (((Res[i ]->SSE==SSE_Helix) || (Res[i ]->SSE==SSE_4Turn)) &&
+ if (((Res[i ]->SSE==SSE_Helix) || (Res[i ]->SSE==SSE_4Turn)) &&
((Res[i+1]->SSE==SSE_Helix) || (Res[i+1]->SSE==SSE_4Turn)) &&
((Res[i+2]->SSE==SSE_Helix) || (Res[i+2]->SSE==SSE_4Turn)) &&
((Res[i+3]->SSE==SSE_Helix) || (Res[i+3]->SSE==SSE_4Turn)))
@@ -5121,7 +5123,7 @@ int i,j,k,l;
while ((k<=2) && (hbonds[i][k]!=0)) {
irdif = hbonds[i][k];
- // Test for 'close' hbond
+ // Test for 'close' hbond
j = i + irdif;
l = 0;
while ((l<=2) && (hbonds[j][l]!=0)) {
@@ -5162,7 +5164,7 @@ int i,j,k,l;
// Parallel strands
if (hbonds[j][l]==-irdif-2) {
Res[i ]->SSE = SSE_Strand;
- Res[j-1]->SSE = SSE_Strand;
+ Res[j-1]->SSE = SSE_Strand;
}
l++;
}
@@ -5175,14 +5177,14 @@ int i,j,k,l;
while ((l<=2) && (hbonds[j][l]!=0)) {
if (hbonds[j][l]==-irdif+1) {
if (flagBulge) {
- if (Res[i ]->SSE==SSE_None) Res[i ]->SSE = SSE_Bulge;
- if (Res[j+1]->SSE==SSE_None) Res[j+1]->SSE = SSE_Bulge;
- if (Res[j ]->SSE==SSE_None) Res[j ]->SSE = SSE_Bulge;
+ if (Res[i ]->SSE==SSE_None) Res[i ]->SSE = SSE_Bulge;
+ if (Res[j+1]->SSE==SSE_None) Res[j+1]->SSE = SSE_Bulge;
+ if (Res[j ]->SSE==SSE_None) Res[j ]->SSE = SSE_Bulge;
} else {
if (Res[i ]->SSE==SSE_None) Res[i ]->SSE = SSE_Strand;
if (Res[j+1]->SSE==SSE_None) Res[j+1]->SSE = SSE_Strand;
if (Res[j ]->SSE==SSE_None) Res[j ]->SSE = SSE_Strand;
- }
+ }
}
l++;
}
@@ -5205,7 +5207,7 @@ int i,j,k,l;
}
} else if (hbonds[j][l]==-irdif-3) {
// and bulge in parallel strand
- if (flagBulge) {
+ if (flagBulge) {
if (Res[i ]->SSE==SSE_None) Res[i ]->SSE = SSE_Bulge;
if (Res[j-1]->SSE==SSE_None) Res[j-1]->SSE = SSE_Bulge;
if (Res[j-2]->SSE==SSE_None) Res[j-2]->SSE = SSE_Bulge;
@@ -5239,7 +5241,7 @@ int i,j,k,l;
if (Ca) delete[] Ca;
return SSERC_Ok;
-
+
}
@@ -5252,7 +5254,7 @@ byte Version=3;
f.WriteByte ( &Version );
CProModel::write ( f );
-
+
f.WriteInt ( &serNum );
f.WriteInt ( &nChains );
@@ -5294,7 +5296,7 @@ byte Version;
Chain[i]->SetModel ( this );
Chain[i]->read ( f );
}
- }
+ }
}
HetCompounds.read ( f );
diff --git a/mmdb/mmdb_symop.cpp b/mmdb/mmdb_symop.cpp
index 05ceb40..fa869e3 100644
--- a/mmdb/mmdb_symop.cpp
+++ b/mmdb/mmdb_symop.cpp
@@ -6,13 +6,13 @@
//
// Copyright (C) Eugene Krissinel 2000-2008.
//
-// This library is free software: you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License version 3, modified in accordance with the provisions
+// This library is free software: you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License version 3, modified in accordance with the provisions
// of the license to address the requirements of UK law.
//
-// You should have received a copy of the modified GNU Lesser
-// General Public License along with this library. If not, copies
+// You should have received a copy of the modified GNU Lesser
+// General Public License along with this library. If not, copies
// may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
//
// This program is distributed in the hope that it will be useful,
@@ -32,7 +32,7 @@
// ~~~~~~~~~
//
// **** Classes : CSymOp ( symmetry operator )
-// ~~~~~~~~~
+// ~~~~~~~~~
//
// (C) E. Krissinel 2000-2010
//
@@ -338,7 +338,7 @@ realtype AV;
10,pstr("*") );
strcat ( S,Axis );
-
+
}
*/
@@ -440,7 +440,7 @@ byte Version=1;
for (j=0;j<4;j++)
f.WriteReal ( &(T[i][j]) );
}
-
+
void CSymOp::read ( RCFile f ) {
int i,j;
byte Version;
@@ -451,7 +451,7 @@ byte Version;
f.ReadReal ( &(T[i][j]) );
}
-MakeStreamFunctions(CSymOp)
+MakeStreamFunctions(CSymOp);
@@ -713,7 +713,7 @@ int nlines,npops,ncops;
}
/*
-int CSymOps::SetGroup ( cpstr SpaceGroup,
+int CSymOps::SetGroup ( cpstr SpaceGroup,
cpstr syminfo_lib ) {
CFile f;
pstr p;
@@ -937,7 +937,7 @@ byte Version=1;
for (i=0;i<Nops;i++)
StreamWrite ( f,SymOp[i] );
}
-
+
void CSymOps::read ( RCFile f ) {
int i;
byte Version;
diff --git a/mmdb/mmdb_title.cpp b/mmdb/mmdb_title.cpp
index c49f213..05fe320 100644
--- a/mmdb/mmdb_title.cpp
+++ b/mmdb/mmdb_title.cpp
@@ -6,13 +6,13 @@
//
// Copyright (C) Eugene Krissinel 2000-2008.
//
-// This library is free software: you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License version 3, modified in accordance with the provisions
+// This library is free software: you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License version 3, modified in accordance with the provisions
// of the license to address the requirements of UK law.
//
-// You should have received a copy of the modified GNU Lesser
-// General Public License along with this library. If not, copies
+// You should have received a copy of the modified GNU Lesser
+// General Public License along with this library. If not, copies
// may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
//
// This program is distributed in the hope that it will be useful,
@@ -22,14 +22,14 @@
//
// =================================================================
//
-// 29.01.10 <-- Date of Last Modification.
+// 16.05.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
// **** Module : MMDB_Title <implementation>
// ~~~~~~~~~
// **** Project : MacroMolecular Data Base (MMDB)
-// ~~~~~~~~~
+// ~~~~~~~~~
// **** Classes : CTitleContainer (container for title classes)
// ~~~~~~~~~ CObsLine
// CTitleLine
@@ -38,6 +38,7 @@
// CSource
// CKeyWords
// CExpData
+// CMdlType
// CAuthor
// CRevData
// CSupersede
@@ -46,7 +47,7 @@
// CBiomolecule
// CMMDBTitle ( MMDB title section )
//
-// (C) E. Krissinel 2000-2010
+// (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -75,10 +76,10 @@ PCContainerClass CTitleContainer::MakeContainerClass ( int ClassID ) {
default :
case ClassID_Template : return
CClassContainer::MakeContainerClass(ClassID);
- case ClassID_ObsLine : return new CObsLine ();
- case ClassID_CAVEAT : return new CCaveat ();
- case ClassID_TitleLine : return new CTitleLine();
- case ClassID_Compound : return new CCompound ();
+ case ClassID_ObsLine : return new CObsLine ();
+ case ClassID_CAVEAT : return new CCaveat ();
+ case ClassID_TitleLine : return new CTitleLine();
+ case ClassID_Compound : return new CCompound ();
case ClassID_Source : return new CSource ();
case ClassID_ExpData : return new CExpData ();
case ClassID_Author : return new CAuthor ();
@@ -213,7 +214,7 @@ IDCode idCode1;
Loop->DeleteField ( CIFTAG_REPLACE_PDB_ID,Signal );
Loop->DeleteField ( CIFTAG_PDB_ID ,Signal );
i++;
- }
+ }
}
Signal++;
} while (i<8);
@@ -226,7 +227,7 @@ int i;
for (i=0;i<8;i++)
strcpy ( rIdCode[i],PCObsLine(ObsLine)->rIdCode[i] );
}
-
+
void CObsLine::write ( RCFile f ) {
int i;
byte Version=1;
@@ -329,7 +330,7 @@ int CCaveat::ConvertPDBASCII ( cpstr S ) {
if (strlen(S)>12) {
strncpy ( idCode,&(S[11]),4 );
idCode[4] = char(0);
- if (strlen(S)>19)
+ if (strlen(S)>19)
CreateCopy ( Line,&(S[19]) );
else CreateCopy ( Line,pstr(" ") );
} else
@@ -558,7 +559,7 @@ pstr * KW;
for (i=nKeyWords;i<k;i++)
KW[i] = NULL; // null new pointers
KeyWord = KW;
-
+
i = 10;
if (Cont) nKeyWords--;
while (S[i] && (i<70)) {
@@ -595,7 +596,7 @@ char c;
if (KeyWord) {
N = 0;
i = 0;
- while (i<nKeyWords) {
+ while (i<nKeyWords) {
if (N==0) strcpy ( S,"KEYWDS " );
else sprintf ( S,"KEYWDS %2i ",N+1 );
do {
@@ -730,7 +731,7 @@ byte Version=1;
f.WriteByte ( &Version );
f.WriteInt ( &nKeyWords );
for (i=0;i<nKeyWords;i++)
- f.CreateWrite ( KeyWord[i] );
+ f.CreateWrite ( KeyWord[i] );
}
void CKeyWords::read ( RCFile f ) {
@@ -802,6 +803,57 @@ MakeStreamFunctions(CExpData)
+
+// =================== CMdlType ======================
+
+CMdlType::CMdlType() : CContString() {
+ InitMdlType();
+}
+
+CMdlType::CMdlType ( cpstr S ) : CContString() {
+ InitMdlType();
+ ConvertPDBASCII ( S );
+}
+
+CMdlType::CMdlType ( RPCStream Object ) : CContString(Object) {
+ InitMdlType();
+}
+
+CMdlType::~CMdlType() {}
+
+void CMdlType::InitMdlType() {
+ CreateCopy ( CIFCategory,CIFCAT_EXPTL );
+ CreateCopy ( CIFTag ,CIFTAG_METHOD );
+}
+
+int CMdlType::ConvertPDBASCII ( cpstr S ) {
+ if (strlen(S)>10)
+ CreateCopy ( Line,&(S[10]) );
+ else CreateCopy ( Line,pstr(" ") );
+ return 0;
+}
+
+void CMdlType::PDBASCIIDump ( pstr S, int N ) {
+ if (N==0) strcpy ( S,"MDLTYP " );
+ else sprintf ( S,"MDLTYP %2i",N+1 );
+ strcat ( S,Line );
+}
+
+void CMdlType::write ( RCFile f ) {
+byte Version=1;
+ f.WriteByte ( &Version );
+ CContString::write ( f );
+}
+
+void CMdlType::read ( RCFile f ) {
+byte Version;
+ f.ReadByte ( &Version );
+ CContString::read ( f );
+}
+
+MakeStreamFunctions(CMdlType)
+
+
// =================== CAuthor ======================
CAuthor::CAuthor() : CContString() {
@@ -840,13 +892,13 @@ void CAuthor::PDBASCIIDump ( pstr S, int N ) {
void CAuthor::write ( RCFile f ) {
byte Version=1;
f.WriteByte ( &Version );
- CContString::write ( f );
+ CContString::write ( f );
}
void CAuthor::read ( RCFile f ) {
byte Version;
f.ReadByte ( &Version );
- CContString::read ( f );
+ CContString::read ( f );
}
MakeStreamFunctions(CAuthor)
@@ -873,7 +925,7 @@ CRevData::~CRevData() {}
void CRevData::InitRevData() {
int i;
modNum = 0;
- strcpy ( modDate,"DD-MMM-YYYY" );
+ strcpy ( modDate,"DD-MMM-YYYY" );
strcpy ( modId , "----" );
modType = -1;
for (i=0;i<4;i++)
@@ -971,7 +1023,7 @@ pstr F;
if ((!RC) && F) strcpy ( record[2],F );
F = Loop->GetString ( CIFTAG_RCSB_RECORD_REVISED_4,Signal,RC );
if ((!RC) && F) strcpy ( record[3],F );
-
+
Loop->DeleteField ( CIFTAG_DATE ,Signal );
Loop->DeleteField ( CIFTAG_REPLACES ,Signal );
Loop->DeleteField ( CIFTAG_RCSB_RECORD_REVISED_1,Signal );
@@ -1013,7 +1065,7 @@ int i;
for (i=0;i<4;i++)
strcpy ( record[i],PCRevData(RevData)->record[i] );
}
-
+
void CRevData::write ( RCFile f ) {
int i;
byte Version=1;
@@ -1173,7 +1225,7 @@ IDCode idCode1;
Loop->DeleteField ( CIFTAG_REPLACE_PDB_ID,Signal );
Loop->DeleteField ( CIFTAG_PDB_ID ,Signal );
i++;
- }
+ }
}
Signal++;
} while (i<8);
@@ -1186,7 +1238,7 @@ int i;
for (i=0;i<8;i++)
strcpy ( sIdCode[i],PCSupersede(Supersede)->sIdCode[i] );
}
-
+
void CSupersede::write ( RCFile f ) {
int i;
byte Version=1;
@@ -1303,7 +1355,7 @@ void CRemark::PDBASCIIDump ( pstr S, int ) {
strcpy ( S,"REMARK" );
PadSpaces ( S,80 );
PutInteger ( &(S[7]) ,remarkNum,3 );
- strncpy ( &(S[11]),Remark,IMin(68,strlen(Remark)) );
+ strncpy ( &(S[11]),Remark,IMin(68,strlen(Remark)) );
}
}
@@ -1465,7 +1517,7 @@ int l,lkey,nAdd,j;
while (*p==' ') p++;
if ((p[1]!=',') && (p[1]!=' ')) p = NULL;
}
-
+
if (p) {
nAdd = strlen(p)/2 + 3;
ch1 = chain;
@@ -1792,7 +1844,7 @@ CMMDBTitle::CMMDBTitle ( RPCStream Object ) : CStream(Object) {
}
void CMMDBTitle::Init() {
-
+
// Header data
classification = NULL;
depDate[0] = char(0);
@@ -1822,6 +1874,7 @@ void CMMDBTitle::FreeMemory ( Boolean keepBiomolecules ) {
Source .FreeContainer();
KeyWords .Delete ();
ExpData .FreeContainer();
+ MdlType .FreeContainer();
Author .FreeContainer();
RevData .FreeContainer();
Supersede.FreeContainer();
@@ -1857,7 +1910,7 @@ void CMMDBTitle::SetHeader ( cpstr Classification,
depDate[sizeof(depDate)-1] = char(0);
idCode [sizeof(idCode) -1] = char(0);
}
-
+
int CMMDBTitle::ConvertPDBString ( pstr PDBString ) {
// Interprets the ASCII PDB line belonging to the title section
// and fills the corresponding fields.
@@ -1890,7 +1943,7 @@ PCContainerClass ContainerClass;
ContainerClass = new CObsLine(PDBString);
ObsData.AddData ( ContainerClass );
-
+
} else if (!strncmp(PDBString,"TITLE ",6)) {
ContainerClass = new CTitleLine(PDBString);
@@ -1900,7 +1953,7 @@ PCContainerClass ContainerClass;
ContainerClass = new CCaveat(PDBString);
CAVEAT.AddData ( ContainerClass );
-
+
} else if (!strncmp(PDBString,"COMPND",6)) {
ContainerClass = new CCompound(PDBString);
@@ -1910,41 +1963,46 @@ PCContainerClass ContainerClass;
ContainerClass = new CSource(PDBString);
Source.AddData ( ContainerClass );
-
+
} else if (!strncmp(PDBString,"KEYWDS",6)) {
-
+
KeyWords.ConvertPDBASCII ( PDBString );
} else if (!strncmp(PDBString,"EXPDTA",6)) {
ContainerClass = new CExpData(PDBString);
ExpData.AddData ( ContainerClass );
-
+
+ } else if (!strncmp(PDBString,"MDLTYPE",6)) {
+
+ ContainerClass = new CMdlType(PDBString);
+ MdlType.AddData ( ContainerClass );
+
} else if (!strncmp(PDBString,"AUTHOR",6)) {
ContainerClass = new CAuthor(PDBString);
Author.AddData ( ContainerClass );
-
+
} else if (!strncmp(PDBString,"REVDAT",6)) {
ContainerClass = new CRevData(PDBString);
RevData.AddData ( ContainerClass );
-
+
} else if (!strncmp(PDBString,"SPRSDE",6)) {
ContainerClass = new CSupersede(PDBString);
Supersede.AddData ( ContainerClass );
-
+
} else if (!strncmp(PDBString,"JRNL ",6)) {
ContainerClass = new CJournal(PDBString);
Journal.AddData ( ContainerClass );
-
+
} else if (!strncmp(PDBString,"REMARK",6)) {
ContainerClass = new CRemark(PDBString);
Remark.AddData ( ContainerClass );
-
+
} else
return Error_WrongSection;
@@ -2117,6 +2175,7 @@ int RC;
Source .GetCIF ( CIF,ClassID_Source );
KeyWords.GetCIF ( CIF );
ExpData .GetCIF ( CIF,ClassID_ExpData );
+ MdlType .GetCIF ( CIF,ClassID_MdlType );
Author .GetCIF ( CIF,ClassID_Author );
RC = RevData.GetCIF ( CIF,ClassID_RevData );
if (!RC) {
@@ -2137,13 +2196,13 @@ int i;
strcpy ( PDBString,"HEADER " );
strcat ( PDBString,classification );
i = strlen(PDBString);
- while (i<80)
+ while (i<80)
PDBString[i++] = ' ';
PDBString[IMin(i,80)] = char(0);
Date11to9 ( depDate,&(PDBString[50]) );
strncpy ( &(PDBString[62]),idCode,4 );
- } else
+ } else
strcpy ( PDBString,
"HEADER XXXXXXXXXXXXXXXXXXXXXXXXXXXX XX-XXX-XX ----" );
@@ -2278,6 +2337,7 @@ char PDBString[100];
Source .PDBASCIIDump ( f );
KeyWords .PDBASCIIDump ( f );
ExpData .PDBASCIIDump ( f );
+ MdlType .PDBASCIIDump ( f );
Author .PDBASCIIDump ( f );
RevData .PDBASCIIDump ( f );
Supersede.PDBASCIIDump ( f );
@@ -2307,7 +2367,7 @@ char DateCIF[20];
CIF->PutString ( DateCIF,CIFCAT_DATABASE,CIFTAG_DATE_ORIGINAL );
} else
CIF->PutString ( NULL,CIFCAT_DATABASE,CIFTAG_DATE_ORIGINAL );
-
+
ObsData .MakeCIF ( CIF );
Title .MakeCIF ( CIF );
CAVEAT .MakeCIF ( CIF );
@@ -2315,6 +2375,7 @@ char DateCIF[20];
Source .MakeCIF ( CIF );
KeyWords .MakeCIF ( CIF );
ExpData .MakeCIF ( CIF );
+ MdlType .MakeCIF ( CIF );
Author .MakeCIF ( CIF );
RevData .MakeCIF ( CIF );
Supersede.MakeCIF ( CIF );
@@ -2342,6 +2403,7 @@ int i;
Source .Copy ( &(TS->Source) );
KeyWords .Copy ( &(TS->KeyWords) );
ExpData .Copy ( &(TS->ExpData) );
+ MdlType .Copy ( &(TS->MdlType) );
Author .Copy ( &(TS->Author) );
RevData .Copy ( &(TS->RevData) );
Supersede.Copy ( &(TS->Supersede) );
@@ -2371,6 +2433,7 @@ int i;
Source .FreeContainer();
KeyWords .Delete ();
ExpData .FreeContainer();
+ MdlType .FreeContainer();
Author .FreeContainer();
RevData .FreeContainer();
Supersede.FreeContainer();
@@ -2392,7 +2455,7 @@ void CMMDBTitle::TrimInput ( pstr PDBString ) {
void CMMDBTitle::write ( RCFile f ) {
// writes header to PDB binary file
int i;
-byte Version=2;
+byte Version=3;
f.WriteByte ( &Version );
@@ -2409,6 +2472,7 @@ byte Version=2;
Source .write ( f ); // Source
KeyWords .write ( f ); // Key words
ExpData .write ( f ); // Experimental data
+ MdlType .write ( f ); // Model descriptions
Author .write ( f ); // Author data
RevData .write ( f ); // Revision data
Supersede.write ( f ); // Supersede records
@@ -2418,7 +2482,7 @@ byte Version=2;
f.WriteInt ( &nBiomolecules );
for (i=0;i<nBiomolecules;i++)
StreamWrite ( f,Biomolecule[i] );
-
+
}
void CMMDBTitle::read ( RCFile f ) {
@@ -2444,6 +2508,8 @@ byte Version;
Source .read ( f ); // Source
KeyWords .read ( f ); // Key words
ExpData .read ( f ); // Experimental data
+ if (Version>2)
+ MdlType.read ( f ); // Model descriptions
Author .read ( f ); // Author data
RevData .read ( f ); // Revision data
Supersede.read ( f ); // Supersede records
@@ -2531,7 +2597,7 @@ PCMMDBTitle Title;
delete Title;
return;
}
-
+
f.assign ( pstr("out.title"),True );
if (f.rewrite()) {
Title->PDBASCIIDump ( f );
@@ -2553,10 +2619,10 @@ PCMMDBTitle Title;
delete Title;
return;
}
-
+
delete Title;
printf ( " Title deleted.\n" );
-
+
Title = new CMMDBTitle();
if (f.reset()) {
Title->read ( f );
@@ -2566,7 +2632,7 @@ PCMMDBTitle Title;
delete Title;
return;
}
-
+
f.assign ( pstr("abin.title"),True );
if (f.rewrite()) {
Title->PDBASCIIDump ( f );
diff --git a/mmdb/mmdb_title.h b/mmdb/mmdb_title.h
index d05c9a4..5d5364e 100644
--- a/mmdb/mmdb_title.h
+++ b/mmdb/mmdb_title.h
@@ -6,13 +6,13 @@
//
// Copyright (C) Eugene Krissinel 2000-2008.
//
-// This library is free software: you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License version 3, modified in accordance with the provisions
+// This library is free software: you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License version 3, modified in accordance with the provisions
// of the license to address the requirements of UK law.
//
-// You should have received a copy of the modified GNU Lesser
-// General Public License along with this library. If not, copies
+// You should have received a copy of the modified GNU Lesser
+// General Public License along with this library. If not, copies
// may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
//
// This program is distributed in the hope that it will be useful,
@@ -22,7 +22,7 @@
//
// =================================================================
//
-// 29.01.10 <-- Date of Last Modification.
+// 16.05.13 <-- Date of Last Modification.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// -----------------------------------------------------------------
//
@@ -38,6 +38,7 @@
// CSource
// CKeyWords
// CExpData
+// CMdlType
// CAuthor
// CRevData
// CSupersede
@@ -46,7 +47,7 @@
// CBiomolecule
// CMMDBTitle ( MMDB title section )
//
-// (C) E. Krissinel 2000-2010
+// (C) E. Krissinel 2000-2013
//
// =================================================================
//
@@ -83,7 +84,7 @@ class CTitleContainer : public CClassContainer {
CTitleContainer () : CClassContainer() {}
CTitleContainer ( RPCStream Object )
- : CClassContainer ( Object ) {}
+ : CClassContainer ( Object ) {}
~CTitleContainer () {}
PCContainerClass MakeContainerClass ( int ClassID );
@@ -121,7 +122,7 @@ class CObsLine : public CContainerClass {
void read ( RCFile f );
protected :
-
+
void InitObsLine();
};
@@ -222,7 +223,7 @@ class CCompound : public CContString {
void read ( RCFile f );
protected :
-
+
void InitCompound();
};
@@ -328,12 +329,46 @@ class CExpData : public CContString {
void read ( RCFile f );
protected :
-
+
void InitExpData();
};
+// ==================== CMdlType =====================
+
+DefineClass(CMdlType);
+DefineStreamFunctions(CMdlType);
+
+class CMdlType : public CContString {
+
+ public :
+
+ CMdlType ();
+ CMdlType ( cpstr S );
+ CMdlType ( RPCStream Object );
+ ~CMdlType();
+
+ void PDBASCIIDump ( pstr S, int N );
+ Boolean PDBASCIIDump1 ( RCFile ) { return False; }
+
+ int ConvertPDBASCII ( cpstr S );
+ int GetClassID () { return ClassID_MdlType; }
+
+// void GetCIF ( PCMMCIFData CIF, int & Signal );
+// void MakeCIF ( PCMMCIFData CIF, int N );
+// void Copy ( PCContainerClass ExpData );
+
+ void write ( RCFile f );
+ void read ( RCFile f );
+
+ protected :
+
+ void InitMdlType();
+
+};
+
+
// ==================== CAuthor =====================
DefineClass(CAuthor);
@@ -444,7 +479,7 @@ class CSupersede : public CContainerClass {
void read ( RCFile f );
protected :
-
+
void InitSupersede();
};
@@ -672,6 +707,7 @@ class CMMDBTitle : public CStream {
CTitleContainer Source; // source
CKeyWords KeyWords; // key words
CTitleContainer ExpData; // experimental data
+ CTitleContainer MdlType; // model desctiptions
CTitleContainer Author; // author data
CTitleContainer RevData; // revision data
CTitleContainer Supersede; // supersede records
--
Packaging for mmdb
More information about the debian-science-commits
mailing list